2531
General Mach Discussion / Re: Tool Turret setup
« on: June 25, 2014, 03:08:37 PM »
I thought about it and likely you will only be requiring 1 output for the air solenoid as the default position will be air clamping and you will only have one signal to change the solenoid valve.
Anyway here is a macro, it seems to work here, so hopefully it will do. Paste the following into notepad and save as M6Start.m1s in the macro folder of the profile you are using.
OldTool = GetCurrentTool()
NewTool = GetSelectedTool() Mod 8
If NewTool = 0 Then
NewTool = 8
End If
Tool = ((NewTool * 45) - 45)
If NewTool = OldTool Then
End
Else
ActivateSignal (OutPut1)
sleep 100
Code "G53 G0 A" & Tool
While IsMoving()
Wend
DeActivateSignal(OutPut1)
End If
Hood
Anyway here is a macro, it seems to work here, so hopefully it will do. Paste the following into notepad and save as M6Start.m1s in the macro folder of the profile you are using.
OldTool = GetCurrentTool()
NewTool = GetSelectedTool() Mod 8
If NewTool = 0 Then
NewTool = 8
End If
Tool = ((NewTool * 45) - 45)
If NewTool = OldTool Then
End
Else
ActivateSignal (OutPut1)
sleep 100
Code "G53 G0 A" & Tool
While IsMoving()
Wend
DeActivateSignal(OutPut1)
End If
Hood