590
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
Floating-point data to BCD
EMOD(P)
*1 Applicable for the Universal model QCPU, LCPU.
• Dissociate the 32-bit floating decimal point data designated by (S1) into BCD type floating point format based on the
decimal fraction digits specified by (S2), and stores the result into the area starting from the device designated by (D).
• (S2) specifies the decimal fraction digits of the 32-bit floating decimal point real number data of (S1). In the example above,
a decimal fraction digit is designated as shown below:
(S1): 32-bit floating decimal point real number data or head number of the devices where the floating decimal point real number data is stored (real number)
(S2): Decimal fraction digits data (BIN 16 bits)
(D): Head number of the devices where the data after break down into BCD will be stored (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word K, H E
(S1)
*1
(S2)
(D)
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
EMOD
EMODP
S1
S2
D
S1
S2
D
EMOD
EMODP
32-bit floating-point
real number
+1
Number of digits in decimal fraction
Sign
7 BCD digits
Sign (for exponent)
BCD exponent
+4
+3
+2
+1
+1
3
0
4270
H
0325H
1
3
+4
+3
+2
+1
3.254 27
32-bit floating-point
real number
Positive: 0
Negative: 1
Positive: 0
Negative: 1
(0 to 38)
BCD
floating-point
format
3254270
H
S1
S2
S1
S2
D
D
D
D
D
D
D
D
D
D
S1
S1
+1
4
1
3542770
H
1
4
+4
+3
+2
+1
3
1
1543210
H
1
1
1
.
5 4 321E
+
2
0
.
03
5
42
7
6
8
S1
S2
D
D
D
D
D
+4
+3
+2
+1
D
D
D
D
D
S2
S
1
+1
S1S1