1
General Mach Discussion / Mach3 Macro issue
« on: January 02, 2021, 03:24:53 PM »Hello.
I have make a M6 code for the toolchanger and an M50 for the toolprobe, these M-code work well in a G-code program.
Now I have made a script to measure all the tools in the machine and then he will do all kinds of strange things.
Does anyone know what I'm doing wrong?
thank you in advance
Script:
'Tool1
If GetUserLED(1050) Then
Call SetUserLED (1070,0)
Code "T1 M6"
While ismoving()
Sleep(500)
Wend
Code "M50"
While ismoving()
Sleep(500)
Wend
End If
'Tool2
If GetUserLED(1051) Then
Code "T2 M6"
While ismoving()
Sleep(500)
Wend
Code "M50"
While ismoving()
Sleep(500)
Wend
End If
'Tool3
If GetUserLED(1052) Then
Code "T3 M6"
While ismoving()
Sleep(500)
Wend
Code "M50"
While ismoving()
Sleep(500)
Wend
End If