EasyManua.ls Logo

VELMEX VXM-1 - Looping;Branching Commands

VELMEX VXM-1
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
LA-x Loop Always from beginning or Loop-to-marker of the current program x-1 times
alternating direction of motor 1 indexes (x=2 to 65,535). A maximum of 10
nested loop commands can be used per run.
Memory usage = 3 bytes.
Examples:
This example sets a loop to repeat 100-1 times all previous commands
alternating motor 1 direction every repeat: LA-100<cr>
Consecutively nested loops are equal to the product of their loop values. For
example, the following loops together are equal to 2,500,000,000-1 (50,000 x
50,000): LA-50000,LA50000<cr>
LM-2 Loop once from the beginning or Loop-to-marker of the current program,
reversing index direction of motor 2. See "Example Programs" section for use of
this command.
Memory usage = 1 byte
LM-3 Loop once from beginning or Loop-to-marker of the current program,
reversing index direction of motor 1 and motor 2. See "Example Programs"
section for use of this command.
Memory usage = 1 byte.
Jx Jump to the beginning of program number x, x= 0 to 4. Program number x will
temporarily be the current program, all commands will be executed starting from
the first one that was previously entered into program x. If there is not any
commands in program x, or after executing the last command, the program will
end, and the VXM will send the ready prompt to the host ("^"). The current
program number will still be the program that was originally selected with a
"PMx" or "PM-x" command. Linking multiple programs (maximum of 5) together
is possible by using a jump command, as the last command, to make a jump to a
different program. All looping commands in program x will be local to this
program only.
Memory usage = 2 bytes
Example:
This example will jump to program #1 : J1<cr>
JMx Jump to the beginning of program number x and come back for More after
program x ends, x= 0 to 4. Program number x will temporarily be the current
program, all commands will be executed starting from the first one that was
previously entered into program x. If there is not any commands in program x, or
after executing the last command, control will be transferred back to the program
that initiated the Jump, then the next command in the initiating program will be
executed. The maximum JMx commands active at a time is 4. This command
can be used to make programming more modular, having a main program that
jumps to other programs (modules) and returns, can make long programs easier
to maintain and edit. All looping commands in program x will be local to this
program
CAUTION: Motor reverse-direction-flags are set by "L-x", "LM-2", and "LM-3"
looping commands. If a JMx command is used "inside" one of these loops,
motor 1 and motor 2 direction may be reversed in program x.
Memory usage = 2 bytes
Example:
This example will jump to program #3 and return: JM3<cr>
21
20
Looping/Branching Commands
L0 Loop continually from the beginning or Loop-to-marker of the current program.
The loop will occur to the last Loop-to-marker of the current program if it was set
previously. This command can be used once in a program as the last command,
it functions the same as a "continuous run input".
Memory usage = 1 byte.
LM0 Sets the Loop-to-marker at this point in the current program. All looping
commands in the current program that follow will branch to here. Any loop
commands in the program prior to this marker will branch to the beginning of the
program or a previous marker.
NOTE: Multiple markers can be used in a program, the number is only limited by
the program memory available (256 bytes per program).
Memory usage = 1 byte
LM-0 Resets the Loop-to-marker to the beginning of the current program.
NOTE: Multiple resets can be used in a program, the number is only limited by
the program memory available (256 bytes per program).
Memory usage = 1 byte
Lx Loop from beginning or Loop-to-marker of the current program x-1 times (x=2 to
65,535). A maximum of 10 nested loop commands can be used per run.
NOTE: When the Loop reaches its last count, the non-loop command directly
preceding the Loop will be ignored.
Memory usage = 3 bytes.
Example:
This example sets a loop to repeat, any previous commands 4000-1 times, while
repeating the directly preceding non-loop command 4000-2 times:
L4000<cr>
L-x Loop from beginning or Loop-to-marker of the current program x-1 times
alternating direction of motor 1 indexes (x=2 to 65,535). A maximum of 10
nested loop commands can be used per run.
NOTE: When the Loop reaches its last count, the non-loop command directly
preceding the Loop will be ignored.
Memory usage = 3 bytes.
Example:
This example sets a loop to repeat, any previous commands 100-1 times
alternating motor 1 direction every repeat, while repeating the directly preceding
non-loop command 100-2 times: L-100<cr>
LAx Loop Always from beginning or Loop-to-marker of the current program x-1
times (x=2 to 65,535). Maximum 10 nested loop commands per run allowed.
Memory usage = 3 bytes.
Examples:
This example sets a loop to repeat all previous commands 4000-1 times:
LA4000<cr>
Consecutively nested loops are equal to the product of their loop values. For
example, the following loops together are equal to 10,000,000-1 (50,000 x 200):
` LA50000,LA200<cr>