![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030559.webp)
519
Conversion Instructions
Section 3-12
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.
Flags
Examples
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.
Setting
Signed BCD values
Signed binary values
C=0000 –999 to –1 and 0 to 999
FC19 to FFFF and 0000 to 03E7
C=0001 –7999 to –1 and 0 to 7999
E0C1 to FFFF and 0000 to 1F3F
C=0002 –999 to –1 and 0 to 9999
FC19 to FFFF and 0000 to 270F
C=0003 –1999 to –1 and 0 to 9999
F831 to FFFF and 0000 to 270F
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 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.
Equals Flag
=
ON if D is 0000 after execution.
OFF in all other cases.
Negative Flag
N
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
Signed binary data
Signed BCD data (–123)
S: D00300
A 3 6 9
D: D00400
F A A 7
Signed BCD data
(–1,369)
Signed binary data
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...