Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 559

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Conversion Instructions
Flags
Examples
C = 0003 (Input Data Range: –1999 to 9999 BCD)
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 to –1 and 0 to 999
C=0001 –7999 to –1 and 0 to 7999
C=0002 –999 to –1 and 0 to 9999
C=0003 –1999 to –1 and 0 to 9999
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
BCD Format 0 (C=#0000)
When CIO 000000 is ON in the following example, the signed BCD data for-
mat and range in D00100 are checked against the format specified in the con-
trol word (0000). The source data is correct, so the signed BCD data in
D00100 is converted to signed binary and output to D00200.
BCD Format 0 (C=#0003)
When CIO 000001 is ON in the following example, the signed BCD data for-
mat and range in D00100 are checked against the format specified in the con-
trol word (0003). The source data is correct, so the signed BCD data in
D00300 is converted to signed binary and output to D00400.
3 digits BCD, 12 bits
0 to 9: Fourth digit BCD
A: Negative (−1)
F: Negative (−)
B to E: Error
FC19 to FFFF and 0000 to 03E7
E0C1 to FFFF and 0000 to 1F3F
FC19 to FFFF and 0000 to 270F
F831 to FFFF and 0000 to 270F
Operation
ON if C is not within the specified range of 0000 to 0003.
ON if C=0002 and the leftmost digit of S is A to E.
ON if C=0003 and the leftmost digit of S is B to E.
ON if the content of S is not BCD.
OFF in all other cases.
ON if D is 0000 after execution.
OFF in all other cases.
ON if bit 15 of D is ON after execution.
OFF in all other cases.
S: D00100
1 1 2 3
D: D00200
F F 8 5
S: D00300
A 3 6 9
D: D00400
F A A 7
Section 3-12
Signed binary values
Signed BCD data (–123)
Signed binary data
Signed BCD data
(–1,369)
Signed binary data
519

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents