Hej,
I have been trying to set material X0 by means of some macro, but when my macro reach the line with code
Code "G91 G0 X" &X0 - 3
Abnormal Condition turns on, I don't know why.
Rem VBScript For probing In the x+ direction
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Probe plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4"
Rem Probe Right
XNew = GetDro(0) + 3 'probe to current position + 3 mm
Code "G31 X" &XNew
While IsMoving() 'wait for prob move to complete
Wend
X0 = SetDRO(0,(-1)*(GetUserDRO(1300))+(-1)*(GetUserDRO(1301)/2)) ' UserDRO(1300) - probe diameter; UserDRO(1301) - plate thickness;
Rem move back adding plate thickness
Code "G91 G0 X" &X0 - 3
While IsMoving ()
Wend
Code "F" &CurrentFeed 'restore original feed rate
End If
I don't know either how to move my probe back.
Amnon