8890
« on: March 23, 2009, 08:15:33 AM »
Another update. Just thought you may be interested in this.
I have added two buttons to the Mach screen one titled 'Laser ON/OFF' and used Scott's VB script to perform this function. The other button is titled 'Home to Laser' and uses the following script.
Xs=GetOemDRO(59) 'Xscale DRO
Ys=GetOemDRO(60) 'Yscale DRO
Xmove = -72.8719 * 1/Xs 'move distance adjusted for X scale factor
Ymove = 10.7156 * 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 DRO
DoOEMButton (1009) 'zero Y DRO
As I use the DRO Scale settings to scale my engraving work to fit the size of the blank I have included a calculation to position the cutter relative to the laser irrespective of the scale settings.
Tweakie.