Hello Guest it is April 19, 2024, 03:44:56 PM

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 - Royke777

Pages: 1
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

Pages: 1