Hello,
I am using Datasubcriber2 to check 8 different bits, but i think i may be calling the values wrong. Other examples i have seen are only calling on one bit at a time.
This is a snippet of my code:
If e.Values(0) = True Then
shutcut.Value = initial0 + 1
End If
If e.Values(1) = True Then
sc_call.Value = initial1 + 1
End If
If e.Values(2) = True Then
boxpos.Value = initial2 + 1
End If
If e.Values(3) = True Then
boxblock.Value = initial3 + 1
End If
If e.Values(4) = True Then
loomguard.Value = initial4 + 1
End If
If e.Values(5) = True Then
mispick.Value = initial5 + 1
End If
If e.Values(6) = True Then
patalarm.Value = initial6 + 1
End If
If e.Values(7) = True Then
tension.Value = initial7 + 1
End If
The error i get is for e.Values(1), which says 'Index was out of range. Must be non-negative and less than the size of the collection.' but i cam calling member 1 of the datasubscriber right?
I may be doing this wrong, which is why i am asking.