2381
VB and the development of wizards / Re: Mach3 turn macro - Pause restart
« on: March 11, 2015, 04:16:19 AM »
Hi rhtuttle,
i think now what you tryed to do.
Pause is not working because there is no movement.
Try this:
Thomas
i think now what you tryed to do.
Pause is not working because there is no movement.
Try this:
Code: [Select]
Sub main
'Domed Winding check
'0.5614 fixture diameter
'0.2804 fixture radius
'0.725 Raw NickelBlank Dia
Message "(Mount back cut tool)"
DoOEMButton(1003)
WaitForStart
DoOEMButton(1003)
Message "(Jog to Fixture surface)"
WaitForStart
' Set Z to Fixture Radius
setDro(0,0.2807)
DoOEMButton(1003)
Message "(Mount Front Cut Tool, position to back edge of mounted nickel)"
WaitForStart
setDro(2,0.000)
' set spindle speed to 400
DoOEMButton(1003)
Message "(Turn Spindle on to 400RPM)"
WaitForStart
code "m3 S400"
code "g01 f2 x0.285"
code "g0 x0.3625"
While Ismoving()
sleep(200)
Wend
DoOEMButton(1003)
Message "(stop spindle)"
WaitForStart
code "M5"
Message "(finshed)"
End Sub
Sub WaitForStart
Sleep(300)
While Not GetLed(4) 'check Start LED
Sleep(200)
Wend
End Sub
Thomas