33
LB
The MDrive Motion Control also offers the user the convenience of naming programs, subroutines and processes to ease in
branching from one part of a program to another, or calling a subroutine.
These labels, once set, will act as pointers to locations in program memory space.
The LB, or Label Instruction, allows the user to assign a 2 character name to a program or branch process within a program or
subroutine.
The restrictions for this command are:
1] A label cannot be named after a MDrive Motion Control Instruction, Variable or Flag.
2] The first character must be alpha, the second character may be alpha-numeric.
3] A label is limited to to characters.
4] A program labeled SU will run on power-up
Please Note: Any program labeled “SU” will execute on power-up.
Switch to program mode at address 200 PG 200
Label command will name the program LB K1
xxxxx
Program named by LB command xxxxx
xxxxx
Switch out of program mode PG
BR
Used to branch conditionally or unconditionally to a routine.
Switch to program mode at address 200 PG 200
Label command will name the program LB K1
xxxxx
Program named by LB command xxxxx
xxxxx
Unconditional branch to Program1 BR K1
Switch out of program mode PG
E
Designates the end of a program.
Switches to program mode at address 200 PG 200
Label command will name the program LB K1
xxxxx
Program named by LB command xxxxx
xxxxx
Unconditional branch to K1 BR K1
Designates the end of the program E
Switches out of program mode P