6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
465
6
Converting single-precision real number to BCD format data
EMOD(P)
These instructions convert single-precision real number data to the BCD floating point format data.
■Execution condition
■Description, range, data type
■Applicable devices
Ladder ST
ENO:=EMOD(EN,s1,s2,d);
ENO:=EMODP(EN,s1,s2,d);
FBD/LD
Instruction Execution condition
EMOD
EMODP
Operand Description Range Data type Data type (label)
(s1) Single-precision real number data or the start device where
the single-precision real number data is stored
0, 2
-126
|(s1)|<2
128
Single-precision real
number
ANYREAL_32
(s2) Decimal part digit data 0 to 7 16-bit signed binary ANY16
(d) Start device for storing the BCD format data 16-bit signed binary ANY16_ARRAY
(Number of elements: 5)
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s1)
(s2)
(d)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)