
User Manual
Chapter 9
GFK-1503F
Jan 2020
Program Data
98
9.4.1
Real Numbers
The REAL data type, which can be used for some Math functions and Numerical functions, is
actually floating point data. Floating-point numbers are stored in single precision IEEE-
standard format. This format requires 32 bits, which occupy two (adjacent) 16-bit PLC
words.
Figure 57
For example, if the floating-point number occupies registers %R0005 and %R0006, then
%R0005 is the least significant register and %R0006 is the most significant register.
The range of numbers that can be stored in this format is from ± 1.401298E
–
45 to ±
3.38 and the number zero.
9.4.2
Errors in Real Numbers and Operations
Overflow occurs when a number greater than 3.38 or less than -3.38 is
generated by a REAL function. The ok output of the function is set OFF; and the result is set
to positive infinity (for a number greater than 3.38) or negative infinity (for a
number less than
–
3.38). You can determine where this occurs by testing the
sense of the ok output.
POS_INF = 7F800000h
–
IEEE positive infinity representation in hex.
NEG_INF = FF800000h
–
IEEE negative infinity representation in hex.
If the infinities produced by overflow are used as operands to other REAL functions, they
may cause an undefined result. This result is referred to as NaN (Not a Number). For
example, the result of adding positive infinity to negative infinity is undefined. When the
ADD_REAL function is invoked with positive infinity and negative infinity as its operands, it
produces NaN for its result.
9.5
Time-tick Contacts
There are four time-tick contacts. They can be used to provide regular pulses of power flow
to other program functions. The four time-tick contacts have time durations of 0.01 second,
0.1 second, 1.0 second, and 1 minute.
The state of these contacts does not change during the execution of the sweep. These
contacts provide a pulse having an equal on and off time duration.
The contacts are referenced as T_10MS (0.01 second), T_100MS (0.1 second), T_SEC (1.0
second), and T_MIN (1 minute).