GetBit Error

Forum Home Forums Communicating with Devices Modbus GetBit Error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10558
    victorlam
    Participant

    There is GetBit formula inside the Dictionary under Administrator. I would like to get the bit 0 or bit 1 value from register address 30001. It reported with server stop when I use the formula GetBit(Val(106),0) or GetBit(Val(106),1). Or I should use the formula GetBit(106,0) and GetBit(106,1). Not sure if this can get the bit status of register address 30001 (channel number 106). Not sure if this is the bug or my typo error here.

    Or what is the syntax for this formula GetBit?

    #10573
    manjey73
    Participant

    Val(106) – Channel value number 106
    106 is just a channel number, you will always receive a bit from the number 106, and converted to double by the system beforehand

    If you need only one bit from the incoming signal, and you are not interested in the number itself and other bits, then you can simply use the GetBit(Cnl, 0) formula in the input channel without resorting to calculation channels

    #12289
    TDE
    Participant

    What GetBit((-1), 0) refer to?

    #12290
    Mikhail
    Moderator

    GetBit((-1), 0) looks meaningless. Did you copy it from somewhere?

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