Delta Tau GEO BRICK LV Manuel D’Utilisation

Page de 440
Turbo PMAC User Manual 
Turbo PMAC Computational Features
 
253
 
In Turbo PMAC rotary program buffers single-line condition actions are the only types of conditional 
statements permitted.  Multiple-line conditions are not permitted because it cannot be guaranteed that the 
line that must be jumped to will be in the rotary buffer at that time. 
Multiple-Line Conditions 
In Turbo PMAC PLC programs (but not in motion programs) compound conditions over several program 
lines are allowed.  The first line of the condition must start with IF or WHILE; following lines of the 
condition must start with AND or OR.  Simple and compound conditions within a program line are always 
evaluated before the conditions on separate lines are combined.  Between the conditions on multiple lines, 
AND takes precedence over OR.  Turbo PMAC will stop evaluating a multi-line AND condition after one 
single-line condition has been found false.   
An example is: 
IF (M11=1 OR M12=1) 
AND (M13=1 OR M14=1) 
... 
Timers 
Each active coordinate system (those numbered from 1 to I68+1) has two timer variables running: Isx11 and 
Isx12.  These two 24-bit registers are general-purpose timers for user program use.  Turbo PMAC decrements 
them once per servo cycle.  Usually a value equal to the time to wait is written scaled in servo cycles.  Then the 
program waits for the register to become less than 0.  The registers will continue to count down until they 
reach –2
23
 (-8,388,608).  They will not roll over back to positive values. 
Since these timers have units of servo cycles, and most users will prefer to work in milliseconds, a 
conversion must be done.  To convert from milliseconds to servo cycles, multiply by 2
23
 (8,388,608) and 
divide by the value of I10. 
The timer variables that belong to a coordinate system can be used by any task on Turbo PMAC, 
including motion programs running in other coordinate systems. 
Example: 
In a PLC program, to turn on an output for a fixed number of milliseconds: 
M1=1 
; Turn on Machine Output 1 
I5111=125*8388608/I10 
; Set timer to 125 msec, in servo cycles 
WHILE (I5111>0) 
; Wait for counter to count down to zero 
ENDWHILE 
M1=0   
 
 
; Turn off Machine Output 1 
Computational Considerations 
When Turbo PMAC is doing calculations in a PLC program, motion program, or on-line, it uses its 48-bit 
floating-point format for the intermediate form of the calculation.  This gives Turbo PMAC the ability to 
convert between its different numerical formats automatically, and enables it to do bit-wise operations on 
its P and Q-variables even though they are floating-point values.   
The process of converting a number to 48-bit format is very fast and will not be noticeable in most Turbo 
PMAC applications.  However, skipping the conversion step can help increase Turbo PMAC’s speed and 
efficiency for computationally demanding applications.  In such applications, using P, Q, and L- (long-) 
format M-variables skip the conversion step (they are already in 48-bit floating-point format) and are 
computed faster than other variable types.