B# | Program Bank Start |
This command marks the beginning of the program bank. # represents the program bank number. | |
B1 A1,S1,P1 END | Program bank one contains a single move and then ends. |
P# | Move to Position |
This will begin a move to the position located in the # location of the P register. The program will move to the next line when the target position is reached. | |
P4.1 | Begin move to Position stored in P4.1 using last loaded speed, acceleration, and torque |
S# | Set Speed |
Call the value located in the # location of the S register. This will set the speed for the next called move. | |
S6.1 | Set the speed for the next executed move to the value of S6.1 |
A# | Set Acceleration |
Call the value located in the # location of the A register. This will set the acceleration for the next called move. | |
A1.1 | Set the acceleration for the next executed move to the value of A1.1 |
M# | Set Torque |
Call the value located in the # location of the M register. This will set the torque for the next called move. | |
M8.1 | Set the torque for the next executed move to the value of M8.1 |
X# / X- | Loop |
The X# command begins a loop in a program bank. The following lines in the program will loop # number of times. For an infinite loop, # will be 0. To mark the end of the looped section, use X-. | |
X4.1 A1.1,S1.1,P1.1 P2.1 X- | Move motor 1 to position 1 at speed 1 and acceleration 1. Then move to position 2 with the same speed and acceleration. Execute these two moves 4 times and then move on. |
Y# | P Without Wait |
Execute the same as a P# command, but immediately move to the next line of the program and do not wait until the target position is reached. | |
Y4.1 | Begin move to P4.1 and immediately continue to the next line in the program. |
Q# | Push Move |
Execute a push move to position P#. | |
Q4.1 | Begin push move to position stored in P4.1. Move to the next program line when the push mode timer expires. |
Z# | P Without Wait |
Execute a push move to position P#, proceed immediately to the next program line. | |
Z4.1 | Begin a push move to position stored in P4.1 and immediately continue to the next program line. |
, | Command Concatenation / Simultaneous Motion |
When multiple commands are listed on a single line, they must be separated by a comma. This also allows for multiple motors to be issued move commands at the same time. When issuing commands to multiple motors, they should be sent in descending order, e.g. motor 2 than motor 1. | |
A1,S1,P1
P1.2,P3.1 | Move to P1 with acceleration A1 and speed S1.
Motor two moves to P1 and motor one moved to P3 at the same time. |
; | Merge Motion |
This command will merge two separate motions together, allowing for a smooth transition without stopping at the first target position. NOTE: This command is different if used within a logic bank. See Logic Bank Commands. | |
B1 A1,S1,P1; A2,S2,P2 END | Motion one will merge into motion two, without pausing when target position one is reached. |
C# | Call Program Bank |
Call another program bank. Once the called bank is complete, the first program bank will continue. # represents the program bank number to be called. | |
B1 C2 A2,S2,P2 END
B2 A1,S1,P1 END | Bank one calls bank two, where it will perform the first move. Once the move in bank two has been completed, bank one will continue to execute the second move, and then end. |
J# | Jump to Program Bank |
Jump to another program bank. We will not return to the first bank once we have jumped away. # represents the program bank number to be jumped to. | |
B1 I1,J2,T0 A2,S2,P2 END
B2 A1,S1,P1 END | In this example, if input one is true we jump to bank two. If input one is not true, we do nothing. In this way the motor will execute one of the two motions depending on the status of input one. |
B100 | Clear all Program Banks |
This command will erase all data in all program banks. Registers and Logic banks are not affected. It is good practice to begin most programs with this command to ensure you are starting with a clean slate. | |
B100
B1 A1,S1,P1 END | This example clears all program banks from the motor, and then writes bank one. |
For more applications and examples, see Application Notes.