Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 551

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Flags
Name
Error Flag
Equals Flag
Negative Flag
Function
FIXD
FIXD(841) converts the integer portion of the double-precision (64-bit) floating-point number in words S
to S+3 (IEEE754-format) to 16-bit signed binary data and places the result in D.
Only the integer portion of the floating-point data is converted, and the fraction portion is truncated.
Example conversions:
A floating-point value of 3.5 is converted to 3.
A floating-point value of -3.5 is converted to -3.
FIXD
FIXLD(842) converts the integer portion of the double-precision (64-bit) floating-point number in words
S to S+3 (IEEE754-format) to 32-bit signed binary data and places the result in D+1 and D.
Only the integer portion of the floating-point data is converted, and the fraction portion is truncated.
Example conversions:
A floating-point value of 2,147,483,640.5 is converted to 2,147,483,640.
A floating-point value of -2,147,483,640.5 is converted to -2,147,483,640.
514
Label
ER
• ON if the source data is not recognized as
floating-point data.
• ON if the source data (S) is not a number (NaN).
• ON if the integer portion of the source data (S)
is not within the range of -32,768 to 32,767.
• OFF in all other cases.
=
• ON if the result is 0000/0000 0000.
• OFF in all other cases.
N
• ON if bit 15 of the result is ON.
• OFF in all other cases.
S+3CH
S+2CH
S+1CH
DCH
Signed binary data (16 bits)
S+3CH
S+2CH
S+1CH
D+1CH
DCH
Operation
FIXD
• ON if the source data is not recognized as
floating-point data.
• ON if the data in words S to S+3 is not a number
(NaN).
• ON if the integer portion of words S to S+3 is
not within the range of -2,147,483,648 to
2,147,483,647.
• OFF in all other cases.
SCH
Floating-point data (64 bits)
SCH
Floating-point data (64 bits)
Signed binary data (32 bits)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
FIXLD

Advertisement

Table of Contents
loading

Table of Contents