Delta Tau GEO BRICK LV Manuel D’Utilisation
Turbo PMAC User Manual
Motor Compensation Tables and Constants
175
RETURN(FTOI(P345))
L10=FTOI(P92/65536)
L10=FTOI(P92/65536)
RETURN(L10)
The RETURN command will typically be the last line of an Open Servo algorithm. Putting it earlier in the
algorithm will not cause the command data to be used any sooner by the Turbo PMAC. If the Open
Servo program is used for a task other than servo-loop closure, there is no need to use the RETURN
command. In this case, when the Open Servo algorithm reaches the CLOSE statement that is required at
the end of the program, it will write a 0 to this holding register automatically.
algorithm will not cause the command data to be used any sooner by the Turbo PMAC. If the Open
Servo program is used for a task other than servo-loop closure, there is no need to use the RETURN
command. In this case, when the Open Servo algorithm reaches the CLOSE statement that is required at
the end of the program, it will write a 0 to this holding register automatically.
Turbo PMAC will take the resulting value and add the contents of the torque compensation register
(usually from the motor’s TCOMP torque compensation table) to it. If Turbo PMAC is not performing
commutation for this motor (Ixx01 bit 0 = 0), it will take this sum and copy it to the register specified by
Ixx02. If you do not use the RETURN command in this case, Turbo PMAC will still copy the zero value
that it has placed in the holding register that would have been used by the RETURN command into the
register specified by Ixx02.
(usually from the motor’s TCOMP torque compensation table) to it. If Turbo PMAC is not performing
commutation for this motor (Ixx01 bit 0 = 0), it will take this sum and copy it to the register specified by
Ixx02. If you do not use the RETURN command in this case, Turbo PMAC will still copy the zero value
that it has placed in the holding register that would have been used by the RETURN command into the
register specified by Ixx02.
If Turbo PMAC is performing commutation for this motor (Ixx01 bit 0 = 1), it will use the resulting sum
as the “quadrature current” (torque) command input to the commutation algorithm. In this case, Ixx02
specifies the multiple output registers from the commutation algorithm.
as the “quadrature current” (torque) command input to the commutation algorithm. In this case, Ixx02
specifies the multiple output registers from the commutation algorithm.
The Ixx29 and Ixx79 offset terms are added automatically by Turbo PMAC, just as if the built-in servo
algorithms were used.
algorithms were used.
The returned value must be an integer value in the range –8,388,608 to +8,388,607. Most of the
command output ranges associated with Turbo PMAC’s automatic servo loops are expressed as 16-bit
values, with a range of –32,768 to +32,767. The values associated with RETURN are therefore 256 times
larger. The actual command output device will not necessarily have this full 24-bit resolution (and
probably will not). In general, however, an n-bit output device uses the high “n” bits of the 24-bit
returned value.
command output ranges associated with Turbo PMAC’s automatic servo loops are expressed as 16-bit
values, with a range of –32,768 to +32,767. The values associated with RETURN are therefore 256 times
larger. The actual command output device will not necessarily have this full 24-bit resolution (and
probably will not). In general, however, an n-bit output device uses the high “n” bits of the 24-bit
returned value.
Variable Value Assignments
Mathematical operations in an Open Servo algorithm are performed with variable value assignment
statements, just as in other PMAC programs. The syntactical rules for these statements are the same as in
other PMAC interpreted and compiled programs. Any I, P, Q, M, L, or F-variable can be assigned a
value, whether referenced directly or as part of any array.
Mathematical operations in an Open Servo algorithm are performed with variable value assignment
statements, just as in other PMAC programs. The syntactical rules for these statements are the same as in
other PMAC interpreted and compiled programs. Any I, P, Q, M, L, or F-variable can be assigned a
value, whether referenced directly or as part of any array.
Logical Control
Logical branching and looping control in Open Servo algorithms is performed with IF / [ELSE] / ENDIF
branching constructs, and WHILE / ENDWHILE looping constructs, just as in other PMAC programs. The
syntactical rules for these statements are the same as in PMAC PLC programs; they do not support a few
features possible in motion programs (such as an action on the same line as a condition), and they do
support a few features not possible in motion programs (such as multiple-line conditions). Refer to the
Program Command section of the Software Reference manual for details (see IF, ELSE, ENDIF,
WHILE, ENDWHILE, AND, OR).
Logical branching and looping control in Open Servo algorithms is performed with IF / [ELSE] / ENDIF
branching constructs, and WHILE / ENDWHILE looping constructs, just as in other PMAC programs. The
syntactical rules for these statements are the same as in PMAC PLC programs; they do not support a few
features possible in motion programs (such as an action on the same line as a condition), and they do
support a few features not possible in motion programs (such as multiple-line conditions). Refer to the
Program Command section of the Software Reference manual for details (see IF, ELSE, ENDIF,
WHILE, ENDWHILE, AND, OR).
If WHILE / ENDWHILE loops are used in an Open Servo, it is the user’s responsibility to make sure that
the algorithm never gets stuck in a loop so long that other tasks are compromised. Turbo PMAC will not
release automatically from a loop in an Open Servo for any other task of equal or lower priority. Failure
to release from a loop in a timely fashion can result in servo error (failure to complete one cycle’s servo-
interrupt tasks by the next servo interrupt), run-time error (failure to compute commanded move
equations in time for that move to start, causing the motion program to abort), or watchdog timer error
(failure to cycle through all required tasks in a timely fashion, causing the Turbo PMAC to shut down
completely).
the algorithm never gets stuck in a loop so long that other tasks are compromised. Turbo PMAC will not
release automatically from a loop in an Open Servo for any other task of equal or lower priority. Failure
to release from a loop in a timely fashion can result in servo error (failure to complete one cycle’s servo-
interrupt tasks by the next servo interrupt), run-time error (failure to compute commanded move
equations in time for that move to start, causing the motion program to abort), or watchdog timer error
(failure to cycle through all required tasks in a timely fashion, causing the Turbo PMAC to shut down
completely).