EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #676 background imageLoading...
Page #676 background image
676 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Appendix C Structured Text Programming
The table shows some examples.
How Strings Are Evaluated The hexadecimal values of the ASCII characters determine if one string is less
than or greater than another string.
• When the two strings are sorted as in a telephone directory, the order of the
strings determines which one is greater.
• Strings are equal if their characters match.
• Characters are case sensitive. Uppercase ‘A’ ($41) is not equal to lowercase
‘a’ ($61).
Use this format Example
For this situation Write
value1 operator value2 If temp is a DINT tag and your specification says: ‘If
temp is less than 100⋅ then…’
IF temp<100 THEN...
stringtag1 operator stringtag2 If bar_code and dest are string tags and your
specification says: ‘If bar_code equals dest then…’
IF bar_code=dest THEN...
char1 operator char2
To enter an ASCII character directly into the
expression, enter the decimal value of the
character.
If bar_code is a string tag and your specification
says: ‘If bar_code.DATA[0] equals ’A’ then…’
IF bar_code.DATA[0]=65 THEN...
bool_tag := bool_expressions If count and length are DINT tags, done is a BOOL
tag, and your specification says: ‘If count is greater
than or equal to length, you are done counting.’
Done := (count >= length);
ASCII Characters Hex Codes
1ab $31$61$62
1b $31$62
A$41
AB $41$42
B$42
a$61
ab $61$62
G
r
e
a
t
e
r
L
e
s
s
e
r
AB < B
a > B

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals