Will the following work? #<named_param> = 1 o101 while [#<named_param> LT 2] o102 if [some condition] #<named_param>=3 (exit the loop) o102 elseif [some other condition] (do something and reloop) o102 else (do nothing and reloop) o102 endif o101 endwhile
Then you are giving a valid way out of the loop, allowing something to happen while still in the loop and providing a way to keep looping without doing anything. Jim On 11/4/2015 7:57 PM, Ralph Stirling wrote: > I use Linuxcnc for machine automation in my manufacturing lab, > and am bothered by the difficulty of creating "infinite loops". > I often want to have a machine sit an indefinite amount of time > until a sensor signals it is time to make the next move. M66 > lets me wait for a sensor, but requires a timeout value. I don't > want a timeout value. > > In addition to this, I would like to be able to have WHILE [1] > infinite loops, with a conditional to break out based on some > input. Axis hangs loading a program with WHILE [1] in it, > even if I have (axis,HOLD) or (axis,STOP) at the beginning. > > Anybody else wanted to do this? Anybody find a way to? > > Thanks, > -- Ralph > ------------------------------------------------------------------------------ > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users