Omron CS1G/H-CPUxxH Instructions Manual page 488

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Conversion Instructions
Flags
Example
C = 0002 (Input Data Range: –999 9999 to 9999 9999 BCD)
S+1
C = 0003 (Input Data Range: –1999 9999 to 9999 9999 BCD)
S+1
The following table shows the possible BCD values for each signed BCD for-
mat and the corresponding signed binary values.
Setting
Signed BCD values
C=0000 –999 9999 to –1
0 to 999 9999
C=0001 –7999 9999 to –1
0 to 7999 9999
C=0002 –999 9999 to –1
0 to 9999 9999
C=0003 –1999 9999 to –1
0 to 9999 9999
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
When CIO 000000 is ON in the following example, the double signed BCD
data format and range in D00101 and D00100 are checked against the format
specified in the control word (0002). The source data is correct, so the double
signed BCD data in D00101 and D00100 is converted to double signed binary
and output to D00201 and D00200.
S+1: D00101
F 3 4 5
D+1: D00201
F F C B
S
S
FF67 6981 to FFFF FFFF
0000 0000 to 0098 967F
FB3B 4C01 to FFFF FFFF
0000 0000 to 04C4 B3FF
FF67 6981 to FFFF FFFF
0000 0000 to 05F5 E0FF
FECE D301 to FFFF FFFF
0000 0000 to 05F5 E0FF
Operation
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.
ON if D+1 contains 0000 0000 after execution.
OFF in all other cases.
ON if bit 15 of D+1 is ON after execution.
OFF in all other cases.
S: D00100
6 7 8 9
Double signed BCD data
(–3,456,789)
D: D00200
4 0 E B
Double signed binary data
Section 3-12
7 digits BCD, 28 bits
0 to 9: Eighth digit BCD
F: Negative (–)
A to E: Error
7 digits BCD, 28 bits
0 to 9: Eighth digit BCD
A: Negative (–1)
F: Negative (–)
B to E: Error
Signed binary values
467

Advertisement

Table of Contents
loading

Table of Contents