Floating-point Math Instructions
Description
Flags
5-24-2 FLOATING TO 32-BIT: FIXL(––)
Limitations
Description
When the execution condition is OFF, FIX(––) is not executed. When the exe-
cution condition is ON, FIX(––) converts the integer portion of the 32-bit float-
ing-point number in S+1 and S (IEEE754-format) to 16-bit signed binary data
and places the result in R.
S+1
Only the integer portion of the floating-point data is converted, and the fraction
portion is truncated. The integer portion of the floating-point data must be
within the range of –32,768 to 32,767.
Example conversions:
A floating-point value of 3.5 is converted to 3.
A floating-point value of –3.5 is converted to –3.
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
ON if the data in S+1 and S is not a number (NaN).
ON if the integer portion of S+1 and S is not within the range of
–32,768 to 32,767.
EQ:
ON if the result is 0000.
Ladder Symbols
FIXL(−−)
@FIXL(−−)
S
R
000
The content of S+1 and S must be floating-point data and the integer portion
must be in the range of –2,147,483,648 to 2,147,483,647.
DM 6143 to DM 6655 cannot be used for R.
When the execution condition is OFF, FIXL(––) is not executed. When the
execution condition is ON, FIXL(––) converts the integer portion of the 32-bit
floating-point number in S+1 and S (IEEE754-format) to 32-bit signed binary
data and places the result in R+1 and R.
S+1
R+1
Only the integer portion of the floating-point data is converted, and the fraction
portion is truncated. (The integer portion of the floating-point data must be
within the range of –2,147,483,648 to 2,147,483,647.)
Floating-point data (32 bits)
S
Signed binary data (16 bits)
R
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
S
IR, SR, AR, DM, EM, HR, LR
R
Third operand: Always 000
000
Floating-point data (32 bits)
S
R
Signed binary data (32 bits)
Section 5-24
Operand Data Areas
S: First source word
R: First result word
−−−
353
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?