353
Floating-point Math Instructions
Section 5-24
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.
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.
Flags
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.
5-24-2 FLOATING TO 32-BIT: FIXL(––)
Limitations
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.
Description
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.
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.)
S+1
S
R
Floating-point data (32 bits)
Signed binary data (16 bits)
S
: First source word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
R
:
First result word
IR, SR, AR, DM, EM, HR, LR
Ladder Symbols
Operand Data Areas
Third operand
:
Always 000
−−−
FIXL(
−−
)
S
R
000
@FIXL(
−−
)
S
R
000
S+1
S
Floating-point data (32 bits)
Signed binary data (32 bits)
R+1
R
Содержание SYSMAC CQM1H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 9: ......
Страница 11: ......
Страница 15: ...xvi...
Страница 87: ...62 Calculating with Signed Binary Data Section 1 7...
Страница 169: ...144 Serial Communications Board Section 2 6...
Страница 537: ......
Страница 565: ......
Страница 569: ......
Страница 573: ......
Страница 577: ......