Hello Guest it is November 08, 2024, 09:12:26 PM

Author Topic: Mach3 turn atc  (Read 28041 times)

0 Members and 1 Guest are viewing this topic.

Mach3 turn atc
« on: September 08, 2012, 06:29:56 PM »
Hi and help lol
I have just done a conversion on a boxford mt2, the machine has a 8 position atc on it. I think the way it operates the stepper motor  rotates it  one way then reverses it to lock it in. There is only one proxy on it.
Do I need a macro to run it, lol I don't even know what a macro is or how to go about writing one. I have searched and seen a few macro's and to be honest it's just complete jibberish to me.
I think I need help

Thanks in advance

Offline Dan13

*
  •  1,208 1,208
    • DY Engineering
Re: Mach3 turn atc
« Reply #1 on: September 09, 2012, 03:25:52 AM »
Are you sure it's a stepper and not an ordinary DC motor? Having a proximity sensor I would assume it's a DC motor.

A macro is needed, but first you need to figure the exact setup you have.

Dan
« Last Edit: September 09, 2012, 03:27:27 AM by Dan13 »
Re: Mach3 turn atc
« Reply #2 on: September 09, 2012, 04:49:08 AM »
Thanks for the reply, I am fairly sure it's a stepper motor and have it wired as such. It works fine, the proxy is on the turret.
I assume it's there to tell the system to reverse to lock it

Offline Dan13

*
  •  1,208 1,208
    • DY Engineering
Re: Mach3 turn atc
« Reply #3 on: September 09, 2012, 05:49:06 AM »
Ok. Then you can use the switch for homing the turret. Since it's a stepper you will have to treat it as an axis and set it up in ports and pins and define the steps/per in motor tuning. For instance you could assign the A axis for the turret. Then you need to figure how many steps per one index of the turret the stepper has to make and enter this in the motor tuning. Once you know this you can write a simple macro to control the turret.

I suggest you doing a search on the forum for a macro and changing it to work for you. There are many here and I think you should be able to find something close to what you need. Anyway, see if you can find someting.

Dan

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Mach3 turn atc
« Reply #4 on: September 09, 2012, 06:07:24 AM »
Re: Mach3 turn atc
« Reply #5 on: September 09, 2012, 08:07:10 AM »
unlike the smaller denford lathe atc, boxford use a stepper for rotation. If you have a datum you can tell the motor to go 45 degrees plus a small amount to clear the pawl, then reverse a few degrees until it locks again. If you do this move in incremental mode you don't have to worry about missed steps when it locks on the pawl when you reverse the stepper..

Offline Dan13

*
  •  1,208 1,208
    • DY Engineering
Re: Mach3 turn atc
« Reply #6 on: September 09, 2012, 10:26:00 AM »
Here is a real quick one I made. Seems to work here in simulation.

numtools = 99                                              'The number of valid tools
newtool = GetSelectedTool( )                                         'read the new requested tool

currenttool = GetOEMDRO(1000)                                     'user DRO 1000 is used to store the current tool. In this line assign whatever is in this DRO to the variable
While(currenttool< 1 Or currenttool > numtools)                'Check that currenttool contains a legal tool number.
currenttool = question("Please enter the current tool")       ' If not ask to enter the current tool in position.
Wend
SetOEMDRO 1000,newtool                                               ' Set user DRO 1000 to the new tool number

dist = (newtool Mod 8 ) - (currenttool Mod 8 )                    ' the number of turret positions to move to the requested tool.

If (dist < 0) Then                                                            'Check if rollover needed
dist = 8 - Abs(dist)
End If

Code " G91 G0 A" & dist                                                  ' Move to the new turret position.
While IsMoving()
Wend
Code " G91 G0 A" & (-dist/5)                                           ' Reverse move to lock - set to 1/5th of one position and can be changed
While IsMoving()
Wend

Code "G90"                                                                  ' Set back to absolute mode.  

SetCurrentTool(newtool)


Set the A axis as above and although not mandatory check the rotational axis rollover in general config.

You can then use the proximity switch to home the A axis and set reset OEMDRO 1000.

Dan
« Last Edit: September 09, 2012, 10:31:28 AM by Dan13 »
Re: Mach3 turn atc
« Reply #7 on: September 09, 2012, 03:37:59 PM »
Thank you very much, do I just copy and paste that into the vscript.
As I said I am completely useless at this part of it.

Offline Dan13

*
  •  1,208 1,208
    • DY Engineering
Re: Mach3 turn atc
« Reply #8 on: September 10, 2012, 03:47:10 AM »
You have to put the code into the M6Start.m1s file located under Mach3\macros and the name of your turn profile (if you haven't changed it, it would be Mach3Turn).

Oh.. just noted there was a small mistake in the code. On the reverse move line it should be:

Code " G91 G0 A" & (-1/5)

Dan
Re: Mach3 turn atc
« Reply #9 on: September 10, 2012, 10:26:18 AM »
hello dan13,
My god, you gave him a really good idea. (thanks for that because i am gonna copy that too)
I am making a similar turret but i was considering a dc motor and 8 switches to index the turret and that means a lot of wires and input/outputs to mach3. Now i will also use a stepper motor for the indexing and locking of the turret. (you are very right that using the incremental mode for the stepper will not care for the missed steps that are surely  going to be there when the ratchet and pawl will meet.
maybe i will need some help from you on the macro's part later.

thanks,
jasminder singh