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 #89 background imageLoading...
Page #89 background image
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 89
Bit Instructions (XIC, XIO, OTE, OTL, OTU, ONS, OSR, OSF, OSRI, OSFI) Chapter 2
Example: Indirect Serial Bit Reference in a DINT array
Ta g
MyBits : DINT[10]
BitRef : DINT
EndTag
MOV(34,BitRef )
XIC(MyBits[(BitRef AND NOT 31)/32].[BitRef AND 31])
Explanation
(BitRef AND NOT 31)/32=Calculates the element in the DINT
.[BitRef AND 31]=Calculates the bit within the element
If the tag MyBits is defined as an INT or SINT, the mask value would be 15 or 7,
respectively. Both the Diagnostic Detect (DDT) and File Bit Compare (FBC)
instructions provide a bit number as a result of their operation. These
instructions are limited to DINT arrays, and so the indirect addressing example
can be used to programmatically locate the bit number returned from these
instructions.

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