![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_7420301293.webp)
1253
Text String Processing Instructions
Section 3-33
ADC (41444300 hex) and B (4200 hex):
ADC < B, because at the beginning of the text strings 41 (hex) is less than 42
(hex).
ABC (41424300 hex) and ABD (41424400 hex):
ABC < ABD, because at the beginning of the text strings the 41s and 42s
match, so the result is determined by 43 being less than 44.
ABC (41424300 hex) and AB (414200 hex):
ABC > AB, because at the beginning of the text strings the 41s and 42s
match, so the result is determined by 43 being greater than 00.
AB (414200 hex) and AB (414200 hex):
AB = AB, because the 41s, the 42s, and the 00s all match.
Continue programming one instruction after another, treating LD, AND, and
OR in the same way. LD and OR instructions can be connected directly to the
bus bar, but AND instructions cannot.
Flags
Note String comparison instructions are used to rearrange the order of text strings
in order of ASCII. For example, the ASCII order from lower to higher is the
order of the alphabet from A to Z, so text strings can be arranged in alphabet-
ical order.
Precautions
Please a right-hand instruction after these instructions. The String Compari-
son Instructions cannot appear on the right side of the ladder diagram.
These instructions cannot be used on the last rung of a logic block.
The maximum number of characters that can be compared is 4,095 (0FFF
hex). If that number is exceeded (i.e., if there is no NUL before the 4,096th
character), an error will occur and the Error Flag will turn ON. When this hap-
pens, an OFF execution condition will be output to the next instruction.
Example
In this example, string comparison instructions are used to compare data.
Name
Label
Operation
Error Flag
ER
ON if more than 4,095 characters are designated by S1
or S2.
OFF in all other cases.
Greater Than
Flag
>
ON if the comparison results in S1 greater than S2.
OFF in all other cases.
Greater Than or
Equals Flag
>=
ON if the comparison results in S1 greater than or equal
to S2.
OFF in all other cases.
Equals Flag
=
ON if the comparison results in S1 equal to S2.
OFF in all other cases.
Not Equal Flag
<>
ON if the comparison results in S1 not equal to S2.
OFF in all other cases.
Less Than Flag
<
ON if the comparison results in S1 less than S2.
OFF in all other cases.
Less Than or
Equals Flag
<=
ON if the comparison results in S1 less than or equal to
S2.
OFF in all other cases.
Содержание 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 ...