![background image](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532238.webp)
(276)
BCDS
#0003
D00300
D00400
0000
01
233
When C = 0002 (Output Data Range: –999 to 9999 BCD)
3 digits BCD, 12 bits
0 to 9: Fourth digit BCD
F: Negative (–)
When C = 0003 (Output Data Range: –1999 to 9999 BCD)
3 digits BCD, 12 bits
0 to 9: Fourth digit BCD
A: Negative (–1)
F: Negative (–)
Data Ranges
The range of data that can be input or output is determined by the control word
(0000 to 0003), as shown in the following table.
Data format
Input range (binary)
Output range (BCD)
0000
FFFF to FC19
0000 to 03E7
–999 to 999
0001
FFFF to F0C1
0000 to 1F3F
–7999 to 7999
0002
FFFF to FC19
0000 to 270F
–999 to 9999
0003
FFFF to F831
0000 to 270F
–1999 to 9999
First the signed binary data in word S is checked against the data control word
(C). If the check is okay, the signed binary data in word S is converted to BCD
and output to the designated word D. If the check is not okay, the Error Flag
(A50003) will turn ON and the instruction will not be executed.
In signed BCD data, –0 is treated as +0.
Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Data is not within allowable range for data format.
Content of
*
DM word is not BCD when set for BCD.
EQ (A50006)
Content of the converted data is all zeroes.
N (A50008)
Data to be converted is a negative number.
Example
When CIO 000001 is ON in the following example, first the signed binary data in
D00300 is checked against data control word “0003” (first operand), and then
the signed binary data in D00300 is converted to signed BCD and output to
D00400.
Address
Instruction
Operands
00000
LD
000001
00001
BCDS(276)
#0003
D00300
D00400
Precautions
Conversion Instructions
Section 5-17
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...