Jump over when "execute from here"?

More
24 Mar 2015 06:29 #57133 by endben
Hi all

Is it possible to jump over some parts in a Programm , when i press "execute from here" in the Axis editor.

for example in NC's from Siemens you can do things like.

.....
.....
.....
IF $P_SEARCH == 1 goto Marke_42
...
...some code or definition that should not be executed
...
Marke_42:
...
...
...

Please Log in or Create an account to join the conversation.

More
24 Mar 2015 07:44 #57136 by andypugh

IF $P_SEARCH == 1 goto Marke_42
...
...some code or definition that should not be executed
...
Marke_42:


There are similar (but different) structures in LinuxCNC G-code:
www.linuxcnc.org/docs/html/gcode/o-code.html

I don't think that there is any way to automatically change the behaviour between run-from-line and normal-run. You could do something a bit strange with something like

N10 #1 = 0
...
O100 if [0]
N20 #1 = 1
O100 endif
O101 if [#1 EQ 1]
{Do Stuff}
O101 endif

If you start from line N20 then the O101 IF is executed, but under normal conditions it wouldn't be as the O100 IF skips line N20.
The following user(s) said Thank You: RotarySMP

Please Log in or Create an account to join the conversation.

Time to create page: 0.198 seconds
Powered by Kunena Forum