Delta Tau GEO BRICK LV User Manual

Page of 440
 
Turbo PMAC User Manual 
250
 
Turbo PMAC Computational Features 
Note:  
With synchronous assignment, the actual assignment is performed where the 
blending to the new move begins, which is generally ahead of the programmed 
point.  In LINEAR and CIRCLE mode moves, this blending occurs V*TA/2 
distance ahead of the specified intermediate point, where V is the commanded 
velocity of the axis, and TA is the acceleration (blending) time. 
Also, note that the assignment is synchronous with the commanded position, not necessarily the actual 
position.  It is the responsibility of the servo loop to make the commanded and actual positions match 
closely. 
In applications in which Turbo PMAC is executing segmented moves (Isx13 > 0), the synchronous M-
variables are executed at the start of the first Isx13 spline segment after the start of blending into the 
programmed move. 
Turbo PMAC checks to see whether it is time to pull synchronous assignments out of the queue and 
execute them every real-time interrupt (every I8+1 servo cycles).  The smaller I8 is, and the smaller the 
servo cycle time is, the tighter the timing control of the synchronous outputs is. 
Note:  
Synchronous M-variables after the last move or DWELL in the program do not 
execute when the program ends or temporarily stops.  Use a DWELL as the last 
statement of the program to execute these statements. 
If synchronous assignments are left in the queue because the program ended or was stopped before it was 
time for their execution, they can be removed from the queue with the on-line MFLUSH command. 
Syntax.  There are four forms of synchronous M-variable assignment statements: 
M{constant}=={expression} 
; Straight equals assignment 
M{constant}&={expression} 
; AND-equals assignment 
M{constant}|={expression} 
; OR-equals assignment 
M{constant}^={expression} 
; XOR-equals assignment 
In all of these forms, the expression on the right side of the statement is evaluated when the line is 
encountered in the program, ahead of the execution of the move.  The value of the expression, the 
variable number, and the operator are placed on a stack for execution at the proper time. 
Execution 
When actual execution of the appropriate move starts, these items are pulled off the stack, and the actual 
action is performed.  In the case of the == syntax, the value is simply assigned to the variable at this time.  
In the case of the other forms (&=|=, and ^=), the variable is read at this time, the bit-by-bit Boolean 
operation (AND, OR, XOR, respectively) is performed between the variable value and the expression 
value, and the result is written back to the variable. 
Special Boolean Feature 
These Boolean assignment operators are subtly different from what would seem to be equivalent == 
statements.  Consider the two statements acting on an 8-bit M-variable, which attempt to make all of the 
odd bits 1, while leaving the even bits where they are: 
M50==M50 & $AA 
M50&=$AA 
The difference between the two statements is apparent when M50 is read for the operation.  In the first 
case, it is read when the statement is first evaluated in the program.  In the second case, it is read when the 
operation is pulled off the stack, immediately before the variable is written to.  In this second technique 
there is no chance that the value of the M-variable can be changed by some other task in the mean time.