6466
« on: August 15, 2010, 02:04:23 PM »
THis is based on doing a SET NEW LINE approach If you need to use "RUN FROM HERE" let me know. Hood I am glad top help out just did not want to butt in if you were wanting to practice your VB(;-)
There are 2 buttons 1 to stop the program and record all the paramaters needed to restart then MOVE off to a safe location.
1 button to restart the process move back to position and restart.
Give it a try and let me know if we need to modify it for your use
'***********************************************************************
'Stop Button Feedhold/stop to check torch
DoButton(1) 'Feedhold
While IsMoving 'Wait for movement to stop
Sleep(100)
Wend
DoSpinStop ' Turn OFF spindle if running
Sleep(1000)
DoButton(286) ' Set positions
Sleep(1000)
DoButton(3) 'Set Stop
Sleep(1000)
SetVar(301,GetDro(2))
sleep(100)
SetVar(304,GetDro(18)) 'SetVar to Feedrate
Sleep(100)
SetVar(305,GetDro(16)) 'SetVar to CurrentLine#
Sleep(100)
Code"G0 Z10.000" 'Move to a SafeZ
While IsMoving()
Sleep(1000)
Wend
Code"G0 X0.000 Y0.000" 'Move to a safe XY position
While Ismoving()
Sleep(1000)
Wend
Code"(Stop Routine Complete)"
End
'************************************************************************************************************************
'Restart Button to return to work
Code"G1 Z10.000 F#304" 'Go To a SafeZ
While IsMoving()
Sleep(1000)
Wend
SetDro(16,Getvar(305)) 'Reset SET NEXT LINE #
Sleep(100)
SetDro(18,GetVar(304)) 'Reset Feedrate
Sleep(100)
DoOemButton(285) 'Return to stop position
While IsMoving()
Sleep(1000)
Wend
Code"G1 Z#301 F#304" 'Return Z to stop Point
While IsMoving()
Sleep(1000)
Wend
DOSPINCW() 'ReStart Spindle if needed
Sleep(100)
DoButton(0) 'Resume Program Run from Stop Point
Code"(You are now back ONLINE cutting )"
End