Omron CVM1D Operation Manual page 240

Hide thumbs Also See for CVM1D:
Table of Contents

Advertisement

Conversion Instructions
Precautions
Flags
Example
0000
00
(277)
BISL
#0002
When C = 0003 (Input Data Range: –1999 9999 to 9999 9999 BCD)
S+1
First the signed BCD data format and range in words S+1 and S are checked
against the data control word (C). If the check is okay, the signed BCD data in
words S+1 and S are converted to binary and output to the designated words
D+1 and D. If it is not okay, the Error Flag (A50003) will turn ON and the instruc-
tion will not be executed.
In signed BCD data, a –0 is treated as a +0.
When the data to be converted is a negative number, after being converted it will
be output as 2's complement and the Negative Flag (A50008) will turn ON. In
order to convert a 2's complement to the true value, it is necessary to subtract it
from 0.
Refer to page 101 for general precautions on operand data areas.
ER (A50003):
EQ (A50006)
N (A50008)
When CIO 000000 is ON in the following example, first the signed BCD data for-
mat and range in D00101 and D00100 are checked against data control word
"0002" (first operand). If the check is okay, the double signed BCD data in
D00101 and D00100 is converted to binary and output to D00201 and D00200.
D00100
D00200
S+1: D00101
D+1: D00201
S
Data format is 0002, and the leftmost digit is A to E
Data format is 0003, and the leftmost digit is B to E.
Data to be converted is not BCD.
Content of *DM word is not BCD when set for BCD.
Content of the converted data is all zeroes.
Converted number is negative.
S: D00100
F 3 4 5
6 7 8 9
D: D00200
F F C B
4 0 E B
Section 5-17
7 digits BCD, 28 bits
0 to 9: Eighth digit BCD
A: Negative (-1)
F: Negative (–)
B to E: Error
Address Instruction
00000
LD
00001
BISL(277)
Double signed BCD data
(–3456789)
Double signed binary data
Operands
000000
#0002
D00100
D00200
235

Advertisement

Table of Contents
loading

Table of Contents