20
Looping/BranchingCommands
L0
LM0
LM-0
L
L-
LA
LoopcontinuallyfromthebeginningorLoop-to-markerofthecurrentprogram.
TheloopwilloccurtothelastLoop-to-markerofthecurrentprogramifitwasset
previously. Thiscommandcanbeusedonceinaprogramasthelastcommand,
itfunctionsthesameasa"continuousruninput".
Memoryusage=
1 byte.
LoopfrombeginningorLoop-to-markerofthecurrentprogram[-1times[ WR
65,535). Amaximumof10nestedloopcommandscanbeusedperrun.
NOTE:WhentheLoopreachesitslastcount,thenon-loopcommanddirectly
precedingtheLoopwillbeignored.
Memoryusage=3 bytes.
Example:
Thisexamplesets
alooptorepeat,anypreviouscommands4000-1times,while
repeatingthedirectlyprecedingnon-loopcommand4000-2times:
L4000<cr>
LoopfrombeginningorLoop-to-markerofthecurrentprogramx-1times
alternatingdirectionofmotor1indexes(x=2to65,535). Amaximumof10
nestedloopcommandscanbeusedper
run.
NOTE:WhentheLoopreachesitslastcount,thenon-loopcommanddirectly
precedingtheLoopwillbeignored.
Memoryusage=3 bytes.
Example:
Thisexamplesetsalooptorepeat,anypreviouscommands100-1times
alternatingmotor1directioneveryrepeat,whilerepeatingthedirectlypreceding
non-loopcommand100-2times: L-100<cr>
/RRS$OwaysfrombeginningorLoop-to-markerofthecurrentprogram x-1
times( =2to65,535). Maximum10nestedloopcommandsperrunallowed.
Memoryusage=3 bytes.
Examples:
Thisexamplesetsalooptorepeatallpreviouscommands4000-1times:
LA4000<cr>
Consecutively nested loops are equal to the product of their
loop values. For
example,thefollowingloopstogetherareequalto10,000,000-1(50,000x200):
` LA50000,LA200<cr>
SetstheLoop-to-markeratthispointinthecurrentprogram. Alllooping
commandsinthecurrentprogramthatfollowwillbranchtohere. Anyloop
commandsintheprogrampriortothismarkerwillbranch
tothebeginningofthe
programorapreviousmarker.
NOTE:Multiplemarkerscanbeusedinaprogram,thenumberisonlylimitedby
theprogrammemoryavailable(256bytesperprogram).
Memoryusage=1 byte
ResetstheLoop-to-markertothebeginningofthecurrentprogram.
NOTE:Multipleresetscan
beusedinaprogram,thenumberisonlylimitedby
theprogrammemoryavailable(256bytesperprogram).
Memoryusage=1 byte
x
x
x
x