Hello
I am trying to creat 8 buttons on my screen so that I can click on one and it will goto the commanded tool.
I have this code that works great in m6 macro for my tool changer, yet when I copy and past (only the top one for tool 1) into the button script, it wont work, gives me errors. Any help? I just want button 1, to goto tool one and use the first if statement in it.
If GetSelectedTool() = GetCurrentTool() Then
End
End If
If GetSelectedTool = 1 Then
Code "G53 G0 A0"
Code "G53 G0 A-5"
Code"G92 A0"
While IsMoving()
Wend
End If
If GetSelectedTool = 2 Then
Code "G53 G0 A45"
Code "G53 G0 A40"
Code"G92 A45"
While IsMoving()
Wend
End If
If GetSelectedTool = 3 Then
Code "G53 G0 A90"
Code "G53 G0 A85"
Code"G92 A90"
While IsMoving()
Wend
End If
If GetSelectedTool = 4 Then
Code "G53 G0 A135"
Code "G53 G0 A130"
Code"G92 A135"
While IsMoving()
Wend
End If
If GetSelectedTool = 5 Then
Code "G53 G0 A180"
Code "G53 G0 A175"
Code"G92 A180"
While IsMoving()
Wend
End If
If GetSelectedTool = 6 Then
Code "G53 G0 A225"
Code "G53 G0 A220"
Code"G92 A225"
While IsMoving()
Wend
End If
If GetSelectedTool = 7 Then
Code "G53 G0 A270"
Code "G53 G0 A265"
Code"G92 A270"
While IsMoving()
Wend
End If
If GetSelectedTool = 8 Then
Code "G53 G0 A315"
Code "G53 G0 A310"
Code"G92 A315"
While IsMoving()
Wend
End If
END