EasyManuals Logo
Home>Allen-Bradley>Controller>Studio 5000 Logix Emulate

Allen-Bradley Studio 5000 Logix Emulate User Manual

Allen-Bradley Studio 5000 Logix Emulate
676 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 #641 background imageLoading...
Page #641 background image
Chapter 11
Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018 641
See also
Structured Text Components: Expressions on page 638
Relational operators compare two values or strings to provide a true or false result.
The result of a relational operation is a BOOL value.
If the comparison is The result is
True 1
False 0
Use these relational operators.
For this comparison Use this operator Optimal data type
Equal = DINT, REAL, String type
Less than < DINT, REAL, String type
Less than or equal <= DINT, REAL, String type
Greater than > DINT, REAL, String type
Greater than or equal >= DINT, REAL, String type
Not equal <> DINT, REAL, String type
The table shows some examples.
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...
stringtag1 operator 'character string literal' If bar_code is a string tag and your specification says: ‘If
bar_code equals ’Test PASSED’ then...’
IF bar_code=’Test PASSED’ 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);
How strings are evaluated
The hexadecimal values of the ASCII characters determine if one string is less than
or greater than another string.
Use relational operators

Table of Contents

Other manuals for Allen-Bradley Studio 5000 Logix Emulate

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Studio 5000 Logix Emulate and is the answer not in the manual?

Allen-Bradley Studio 5000 Logix Emulate Specifications

General IconGeneral
BrandAllen-Bradley
ModelStudio 5000 Logix Emulate
CategoryController
LanguageEnglish

Related product manuals