Announcement

Collapse
No announcement yet.

Determine status of single bit in an integer?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Determine status of single bit in an integer?

    Lets say I have a 32-bit integer called Int_A. I want to turn on an output coil if just the 4th bit of that integer is ON. Is there a single-rung solution for this?

  • #2
    Apparently you can just use a normally open contact and address the bit specifically with "Int_A:4"

    Comment


    • #3
      You are correct. You can also enable viewing of bits in the tag database by right clicking on the tag name and selecting "show bit of word details". Then you can add comments to each individual bit.

      Comment


      • #4
        Originally posted by ADC_CommTeam02 View Post
        You are correct. You can also enable viewing of bits in the tag database by right clicking on the tag name and selecting "show bit of word details". Then you can add comments to each individual bit.
        Did not know! Thanks.

        Comment

        Working...
        X