adccommunitymod (AutomationDirect) asked a question.

Determine status of single bit in an integer?

Created Date: March 27,2020

Created By: Ty10YHM

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

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?


  • adccommunitymod (AutomationDirect)

    Created Date: March 27,2020

    Created by: Ty10YHM

    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?

  • adccommunitymod (AutomationDirect)

    Created Date: March 27,2020

    Created by: Ty10YHM

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

  • adccommunitymod (AutomationDirect)

    Created Date: March 27,2020

    Created by: ADC_CommTeam02

    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.

  • adccommunitymod (AutomationDirect)

    Created Date: March 27,2020

    Created by: kewakl

    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.