zero laser (put it in a button script)
Xs = GetOemDRO(59) 'X-Scale DRO
Ys = GetOemDRO(60) 'Y-Scale DRO
Xmove = -73.3844 * 1/Xs 'Move distance adjusted for X-Scale factor
Ymove = 10.7438 * 1/Ys 'Move distance adjusted for Y-Scale factor
DeActivateSignal(OUTPUT5) 'Turn off laser
Code "G91 G0 X" &Xmove & "Y" &Ymove ' Makes an incremental move the distances that you set
While IsMoving () ' Waits while that happens
Wend
Code "G90" 'Goes back to absolute moves
DoOEMButton (1008) 'Zero X-Axis DRO
DoOEMButton (1009) 'Zero Y-Axis DRO
Laser on off (put it in button script)
f IsOutputActive(OUTPUT5) Then ‘Check to see if its on
DeActivateSignal(OUTPUT5) ‘Its on so turn it off
Else
ActivateSignal(OUTPUT5) ‘Its off so turn it on
End If
this code is from
http://www.cooperman.talktalk.net/files/17.htm I use it every day it works every time for info of how to use it look at web site all thanks go to tweakie.
just edit it to your needs