Hello,
I have to create a "Start From Selected Line" button ,i used this code in program/planetCNC/Profiles/Default/Btn :
cmd: "Machine.Start_Option.Start_From_Selected_Line " "" "image=/Icons/IMG_MyImage.svg" imagechange"true" stroke=1.1
I noticed that this button work corretly only if before i started the program from the first line and then i stopped it, otherwise the button remains always inibited.
The behavior work correctly if i use the command from "Machine -> Start Options -> Start From Selected Line" but i prefer create a dedicated button for speed up the process.
This is my OnStart script that bring my machine in a home position before start and manages program if it start from first line or from a selected line.
G21
G90
O<chk> if [#<line>]
(print, program will start from selected line)
G53 G00 Z-4
G53 G00 X4 Y486
G53 G00 X#<posstate_x> Y#<posstate_y>
M3
G53 G00 Z#<posstate_z>
O<chk> else
(print, program will start from first line)
G53 G00 Z-4
G53 G00 X4 Y486
O<chk> endif
I would be happy if you could help me, thankyou for any replace.
(i'm new in this forum, so i'm sorry if i didn't comply any rule).