Word – bit integration

Forum Home Forums Development and Integration Word – bit integration

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2973
    Marko
    Participant

    Hello,

    I have a question about getting some bits out of some word (int). One word will contain 5 bits that corresponding to some status lamps for example. Bit 0 will turn off-on Lamp 1, bit 1 will turn off-on Lamp 2… Is there any way to accomplish this goal.

    #2974
    Mikhail
    Moderator

    Hi,
    You should create an input channel of Calculated Discrete type for each bit and use the formula GetBit for these channels
    Example: GetBit(Val(101), 1) – gets 1st bit from channel 101

    #2975
    Marko
    Participant

    It’s working. Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.