EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 457

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
424
Conversion Instructions Section 3-11
C = 0003 (Input Data Range: –1999 9999 to 9999 9999 BCD)
The following table shows the possible BCD values for each signed BCD for-
mat and the corresponding signed binary values.
Flags
Example When CIO 0.00 is ON in the following example, the double signed BCD data
format and range in D101 and D100 are checked against the format specified
in the control word (0002). The source data is correct, so the double signed
BCD data in D101 and D100 is converted to double signed binary and output
to D201 and D200.
3-11-16 SIGNED BINARY-TO-BCD: BCDS(471)
Purpose Converts one word of signed binary data to one word of signed BCD data.
Setting Signed BCD values Signed binary values
C=0000 –999 9999 to –1 FF67 6981 to FFFF FFFF
0 to 999 9999 0000 0000 to 0098 967F
C=0001 –7999 9999 to –1 FB3B 4C01 to FFFF FFFF
0 to 7999 9999 0000 0000 to 04C4 B3FF
C=0002 –999 9999 to –1 FF67 6981 to FFFF FFFF
0 to 9999 9999 0000 0000 to 05F5 E0FF
C=0003 –1999 9999 to –1 FECE D301 to FFFF FFFF
0 to 9999 9999 0000 0000 to 05F5 E0FF
S + 1
3 digits BCD, 12 bits
0 to 9: Fourth digit BCD
A: Negative (–1)
F: Negative (–)
B to E: Error
Name Label Operation
Error Flag ER ON if C is not within the specified range of 0000 to 0003.
ON if C=0002 and the leftmost digit of S+1 is A to E.
ON if C=0003 and the leftmost digit of S+1 is B to E.
ON if the content of S+1 and S is not BCD.
OFF in all other cases.
Equals Flag = ON if D and D+1 contain 0000 0000 after execution.
OFF in all other cases.
Negative Flag N ON if bit 15 of D+1 is ON after execution.
OFF in all other cases.
F 3 4 5
F F C B
6 7 8 9
4 0 E B
S+1: D101
D+1: D201
S: D100
D: D200
0.00
D100
D200
Double signed BCD data
(–3,456,789)
Double signed binary data

Table of Contents

Related product manuals