Delta Tau GEO BRICK LV User Manual

Page of 440
Turbo PMAC User Manual 
Turbo PMAC Computational Features
 
249
 
Variable Value Assignment Statement 
This type of statement calculates and assigns a value to a variable.  When a value assignment statement is 
sent to Turbo PMAC, if a program buffer is open, the statement is added to the buffer.  If not, it is 
executed immediately.  The standard assignment syntax is: 
{variable name}={expression} 
where {variable name} specifies which variable is to be used,  and {expression} represents the 
value to be assigned to the variable. 
I-Variable Default Value Assignment 
A statement with the syntax:   
{I-variable}=* 
will assign to the specified I-variable the manufacturer’s default value for that variable (not the user’s last 
saved value). 
Synchronous M-Variable Value Assignment 
In a motion program, when Turbo PMAC is blending or splining moves together, it must be calculating in 
the program ahead of the actual point of movement.  This is necessary in order to be able to blend moves 
together at all, and also to be able to do reasonable velocity and acceleration limiting.  Depending on the 
mode of movement, calculations while blending may occur one, two, or three moves ahead of the actual 
movement.   
Why Needed 
When assigning values to variables is part of the calculation, the variables will get their new values ahead 
of their place in the program when looking at actual move execution.  Generally, for P and Q-variables, 
this is not a problem, because they exist only to aid further motion calculations.  However, for M-
variables, particularly outputs, this can be a problem, because with a normal variable value assignment 
statement, the action will take place sooner than is expected, looking at the statement’s place in the 
program. 
For example, in the program segment 
X10 
 
; Move X-axis to 10 
M1=1   
; Turn on Output 1 
X20 
 
; Move X-axis to 20 
it might be expected that Output 1 would be turned on at the time the X-axis reached position 10.  But 
since Turbo PMAC is calculating ahead, at the beginning of the move to X10, it will have already 
calculated through the program to the next move, working through all program statements in between, 
including M1=1, which turns on the output.  Therefore, using this technique, the output will be turned on 
sooner than desired. 
How They Work 
Synchronous M-variable assignment statements were implemented as a solution to this problem.  When 
one of these statements is encountered in the program, it is not executed immediately; rather, the action is 
put on a stack for execution at the start of the actual execution of the next move in the program.  This 
makes the output action properly synchronous with the motion action. 
In the modified program segment 
X10 
 
; Move X-axis to 10 
M1==1   
; Turn on Output 1 synchronously 
X20 
 
; Move X-axis to 20 
the statement M1==1 (the double-equals indicates synchronous assignment) is encountered at the 
beginning of the move to X10, but the action is not actually performed until the start of blending into the 
next move (X20).