EasyManuals Logo

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 #678 background imageLoading...
Page #678 background image
678 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Appendix C Structured Text Programming
Use Bitwise Operators
Bitwise operators manipulate the bits within a value based on two values.
This is an example.
Determine the Order of Execution
The operations you write into an expression are performed in a prescribed order,
not necessarily from left to right.
• Operations of equal order are performed from left to right.
• If an expression contains multiple operators or functions, group the
conditions in parenthesis ( ) . This ensures the correct order of execution and
makes it easier to read the expression.
For Use this operator Optimal data type
Bitwise AND &, AND DINT
Bitwise OR OR DINT
Bitwise exclusive OR XOR DINT
Bitwise complement NOT DINT
Use this format Example
For this situation Write
value1 operator value2 If input1, input2, and result1 are DINT tags and your
specification says: ‘Calculate the bitwise result of input1
and input2. Store the result in result1.’
result1 := input1 AND input2;
Order Operation
1. ( )
2. function (…)
3. **
4. − (negate)
5. NOT
6. *, /, MOD
7. +, - (subtract)
8. <, <=, >, >=
9. =, <>
10. &, AND
11. XOR
12. OR

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