![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268846.webp)
807
Data Control Instructions
Section 3-18
The source value in S is treated as an absolute BCD value and the sign is
indicated by the Carry Flag. The source value can thus be between –9999
and 9999.
If the result is less than the minimum conversion value, the minimum conver-
sion value will be output as the result. If the result is greater than the maxi-
mum conversion value, the maximum conversion value will be output.
SCL3(487) is used to convert data using a user-defined scale to signed binary
for Analog Output Units. For example, SCL3(487) can convert 0 to 200
°
C to
0000 to 0FA0 (hex) and output an analog output signal 1 to 5 V from the Ana-
log Output Unit.
Flags
Precautions
An error will occur and the Error Flag will turn ON if the contents of S is not
BCD or if the value for
∆
X (C+1) is not between 0001 and 9999 BCD.
The Equals Flag will turn ON when the contents of the result word D is 0000.
The Negative Flag will turn ON if the MSB of the result in R is 1, i.e., if the
result is negative.
Examples
When a value from 0 to 200 is scaled to an analog signal (1 to 5 V, for exam-
ple), a signed BCD value of 0000 to 0200 is converted (scaled) to signed
∆
X
∆
Y
∆
X
∆
Y
∆
X
∆
Y
S (signed BCD)
Offset
Offset
S (signed BCD)
Offset of 0000
Positive Offset
R (signed binary)
Negative Offset
R (signed binary)
Max conversion
Max conversion
Min. conversion
S (signed BCD)
Min. conversion
R (signed binary)
Max conversion
Min. conversion
Name
Label
Operation
Error Flag
ER
ON if the contents of S is not BCD.
ON if the contents of C+1 (
∆
X) is not between 0001 and
9999 BCD.
OFF in all other cases.
Equals Flag
=
ON if the result is 0.
OFF in all other cases.
Negative Flag
N
ON when the MSB of the R (the result) is 1.
OFF in all other cases.
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...