Hello Guest it is April 29, 2024, 01:52:13 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dan13

401
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 02:11:59 PM »
Glad it worked.

Although a T0 call is illegal, but just to prevent the turret from moving if a T0 gets issued somehow I would add an If conditional like this:

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

If (newtool > 0) Then                                     
                'Added this

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)

End If

402
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 01:56:32 PM »
Looks good here. Is you profile name "cnclathe"? If so, do you have the M6Start macro under C:\Mach3\macros\cnclathe ?

Dan

403
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 01:44:00 PM »
Please attach you XML file.

Dan

404
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 01:38:58 PM »
M6 is not required in Mach Turn. The correct way to call a tool change in Mach Turn is T0202. This will automatically call the M6Start macro.

You do not need the VB script editor be open in the background. Save it and close the window. Make sure you are saving the M6Start for the correct profile as I mentioned earlier. Also could be Mach is already at tool #2 when you issue T0202 so nothing happens. Check the Tool DRO in Mach.

Dan

405
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 01:11:58 PM »
You set it manually to the current tool and then you can check Persistent Tool Selection in General Config and Mach will remember the last tool on a restart. You can add a second switch for homing when you power up the machine.

Of course 4 switches on an 8 position turret would be better as Mach would always know the tool in position, but it's more complex too and requires 4 inputs, although you could even do it with only 3 switches.

Dan

406
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 11:52:06 AM »
Yes. Copy and paste it in the M6Start.m1s macro file.

Dan

407
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 11:46:36 AM »
Yes. The macro tells it to move the A axis. Go to General Config and under Tool Change select Automatic Tool Change.

Dan

408
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 11:41:25 AM »
You have to enable the A axis in Ports and Pins and then in Motor Tuning set the number of steps per one turret index. Actually just a bit more than one index so that it overshoots a bit and then reverses to lock.

Dan

409
General Mach Discussion / Re: Mach3 turn atc
« on: September 10, 2012, 11:35:52 AM »
Hi Jasminder,

You could still use a DC motor and only need one switch running on a cam or an optical switch with a slotted disk.

Dan

410
General Mach Discussion / Re: Mach3 turn atc
« 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