![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268823.webp)
784
Data Control Instructions
Section 3-18
If the input data (S) is greater than or equal to the lower limit (C) and less than
or equal to the upper limit (C+1), 0000 (hex) will be output to D and the Equals
Flag will turn ON.
If the input data (S) is less than the lower limit (C), the difference between the
input data minus the lower limit data will be output to D and the Less Than
Flag will turn ON.
If the input data (S) is greater than the upper limit (C+1), the difference
between the input data minus the upper limit data will be output to D and the
Greater Than Flag will turn ON.
If the output data is smaller than the 8000 (hex) or if is greater than 7FFF, the
sign will be reversed. For example, for a lower limit of 0100 (hex) and input
data of 8000 (hex), the output data will be as follows:
8000 (hex) [–32768] – 0100 (hex) [256] = 7F00 (hex) [32512]
Flags
Precautions
If the upper limit is less than the lower limit, an error will occur and the Error
Flag will turn ON.
If the input data (S) is greater than the upper limit, the Greater Than Flag will
turn ON.
If the output word D is 0000 hex, the Equals Flag will turn ON.
If the input data (S) is less than the lower limit, the Less Than Flag will turn
ON.
If the status of the leftmost bit of the output word D is “1,” the Negative Flag
will turn ON.
Example
If D00100 is 00B4 hex (180), then 180–200=FFEC hex (–20) will be output to
D00300 because 180 is less than the lower limit of 200.
If D00100 is 00E6 hex (230), then 0 will be output to D00300 because 230 is
within the upper and lower limits.
If D00100 is 015E hex (350), then 350–300=0032 hex (50) will be output to
D00300 because 350 is greater than the upper limit of 300.
Upper limit (C+1)
Output
Input
Lower limit (C)
Name
Label
Operation
Error Flag
ER
ON if the upper limit is less than the lower limit.
OFF in all other cases.
Greater Than
Flag
>
ON if the input data (S) is greater than the upper limit.
OFF in all other cases.
Equals Flag
=
ON if the result is 0.
OFF in all other cases.
Less Than Flag
<
ON if the input data (S) is less than the lower limit.
OFF in all other cases.
Negative Flag
N
ON if the leftmost bit of 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...