<< Click to Display Table of Contents >> Navigation: 3. Script Language > Loops, and repeated action > Loops and repeated Commands |
MiniRobotLanguage (MRL)
RCL. - Repeat Counter Loop
Fast Integer Loop
Intention
The RCL.- Repeat Counter Loop is designed to be the fastest loop for the Smart Package Robot.
It does not use any variables that need to be resolved and it does not resolve a destination label.
Therefore, this loop is executed at the highest speed possible.
No variables can be used with this command. Only give it a numerical value as P1..
This is the maximum value up to which the loop is executed. It will always start with 1 and run up to that value.
There is no loop invariant and no variable to indicate where the loop counter is.
It is simply executed from this number to the maximum number and then continues with the Script.
Leaving the RCL. - repeat counter loop with a goto before the loop ends by reaching the maximum value will leave the loop in a running state.
If you would jump back to this loop it will still not be a problem because if you run over the RRC. reset repeat counter command then the loop will initialize and run as expected.
Executing an empty Loop from 1 to 5000.000 the RCL.-Command shows its strength and does it in 5 Seconds (in EXE-Run Mode).
Executing an empty Loop with 2 Comment-Lines from 1 to 5000.000 the RCL.-Command shows its strength and does it in 10 Seconds (in EXE-Run Mode).
Syntax
RCL.P1
Parameter Explanation
P1 - Numerical 32-bit Integer Value. Do not use Variables here! This value is fetched from the Pre-Processor to enable maximum Speed for the command.
At the Pre-Processing time, Variables are generally undefined.
Example
'***********************************
' RCL.-Sample
'***********************************
VFP.$$TIM=#dtime#
RRC.
' Do something
RCL.500000
CAL.$$TIZ=#dsince#-$$TIM
DMP.Speed
MBX.$$TIZ
ENR.
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's Parallel Robot Operations