
4.LADDER LANGUAGE B-63983EN/02
- 300 -
4.9.4 DCNVB (Extended Data Conversion: SUB 31)
This instruction converts 1, 2, and 4-byte binary code into BCD code or
vice versa. To execute this instruction, you must preserve the
necessary number of bytes in the memory for the conversion result
output data.
Format
Fig. 4.9.4 shows the ladder format and Table 4.9.4 shows the
mnemonic format.
DCNVB
SUB 31
CNV
Format specification
Input data address
Conversion result output address
RST
CT
W1
*
*
SIN
¡
¡¡¡¡
¡¡¡¡
Fig. 4.9.4 Format of DCNVB instruction
Table 4.9.4 Mnemonic of DCNVB instruction
Mnemonic format
Memory status of control
condition
Step
number
Instruction
Address
No.
Bit No. Remarks ST3 ST2 ST1 ST0
1RD ¡¡¡¡ .¡ SIN SIN
2 RD. STK ¡¡¡¡ .¡ CNV SIN CNV
3 RD. STK ¡¡¡¡ .¡ RST SIN CNV RST
4 RD. STK ¡¡¡¡ .¡ ACT SIN CNV RST ACT
5 SUB 31 DCNVB instruction
6(PRM) ¡ Size of table data
7(PRM) ¡¡¡¡ Conversion input data
address
8(PRM) ¡¡¡¡ Convert data output address
9WRT ¡¡¡¡ .¡ Error output W1