User's Manual

PMAC User Manual
Computational Features 163
Example:
In a PLC program, to turn on an output for a fixed number of milliseconds:
M1=1 ; Turn on Machine Output 1
M90=125*8388608/I10 ; Set timer (M90) to 125 msec, in servo cycles
WHILE (M90>0) ; Wait for counter to count down to zero
ENDWHILE
M1=0 ; Turn off Machine Output 1
Computational Considerations
When 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 PMAC the ability to
automatically convert between its different numerical formats and enables it to do bit-wise operations on
its P and Q-variables although they are floating point values.
The process of converting a number to 48-bit format is fast and will not be noticeable in most PMAC
applications. However, skipping the conversion step can help increase the PMAC 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 format) and are computed faster than other
variable types.
When PMAC is doing calculations with L-variables in a compiled PLC program (PLCC) it uses a 24-bit
fixed point format for the intermediate form of the calculation. This gives PMAC the ability to perform
the calculations extremely fast. L-variable calculations are about ten times faster than equivalent floating
point calculations.