Re: Start From Selected Line
Start ftom selected line is same script as "OnStart" but you can check #<line> parameter to see if machine started from first line.
there are also options to restore Mist, Flood and Spindle to what it should be.
Your machine should not plunge down by itself. Perhaps some offsets were wrong.
If you can reproduce this then send me your profile, g-code and line number and I'll check what happened.
Re: Start From Selected Line
It seems to be ignoring the "OnStart" script. The only time I can get the script to run is running from the first line. I've sent all my files to the PlanetCNC support email. this is probably the most frustrating thing for me. I need a good routine for starting in the middle of a program. When I break a tool or something else. Back in my days of Mach 3, they had a nice dialog that would safely get you back to where you wanted to start from. I have no problem working on a script to do something similar but I believe there is something else going on here. It may be possible that I'm just not doing something right.
FS
Re: Start From Selected Line
I've added some very useful stuff for "OnStart" script that should solve all of your problems. Version 11-22 is scheduled for Friday
Re: Start From Selected Line
It is same "OnStart" script. You can check #<line> parameter to see it it is greater than 0 (start from selected line...) . I've also added other parameters to bheck basic IO state ad position state. For example:
Code:
(print,OnStart script @ Line: #<line,0>)
(print, PosState: X#<posstate_x,3>, Y#<posstate_y,3>, Z#<posstate_z,3>)
O<chk> if [#<line>]
(print, MistState: #<miststate,0>)
(print, FloodState: #<floodstate,0>)
(print, SpindleState: #<spindlestate,0>)
(print, MotorsState: #<motorsstate,0>)
(print, LimitsState: #<limitsstate,0>)
G53 G00 Z#<_probe_safeheigh>
G53 G00 X#<posstate_x> Y#<posstate_y>
G53 G00 Z#<posstate_z>
O<chk> endif
This script will print some values and then traverse to last position on safe height.
Re: Start From Selected Line
You can use OnStop script to store position and/or line number where program stopped.
Re: Start From Selected Line
That's sounds like what I need, unfortunately, I do not know how to write the script to do this. Is it possible to help me with an example? How do I store and then call back position state?
1 Attachment(s)
Re: Start From Selected Line
Why do you need this?
OnStop script prints line number to output window.
"Start from selected line" resumes from correct position. OnStart script can be used to manipulate this position.
Right click on g-code line gives you "Move to selected line" option.
I think everything is already in there and there is no need for special scripting unless you have special needs.
Re: Start From Selected Line
This also works in this version even without any scripts.
Did you forget to set new tool offsets after you changed tool?