Here is the VB for accessing serial
Function: GetInBit(buffIndex, Bit Number) as Integer
Function: SetOutBit(buffIndex, Bit Number) as Integer
Function: ResetOutBit(buffIndex, Bit Number) as Integer
GetInBit(BuffIndex, BitNumber) to use this one, Index number is 0-63 on channel one, and 64-127 on Channel 2, and BitNumber is 0-15 relating to the individual bit status in that word that you want, i.e. 0 or 1. See the Input section of config autopoller modbus. NOTE If you are using Bit packing special control then you can only Use the GetInBit on the 2cd channel 64-127. You have to use something like "IsActive(INPUT1)" on channel 1. If you don't use bit packing then you can use it with the 1st channel.
SetOutBit(BuffIndex, BitNumber) to use this one, Index number is 0-63 on channel one, and 64-127 on Channel 2. and BitNumber is 0-15 relating to the individual bit status in that word that you want, It Turns the bit ON!!. See the Output section of config autopoller modbus. NOTE If you are using Bit packing special control then you can only Use the SetOutBit on the 2cd channel 64-127. You have to use something like "ActivateSignal(OUTPUT1)" on channel 1. If you don't use bit packing then you can use it with the 1st channel.
ReSetOutBit(BuffIndex, BitNumber) is just like SetOutBit(BuffIndex, BitNumber) above, but it turns the requested bit OFF.
GetMasterInput(0-1023)
GetMasterOutput(0-1023)
SetMasterOutput(0-1023, 0-16bit)
SetMasterInput(0-1023, 0-16bit)
scott