i'm new to ahmi, while i understand basic operations, i want to ask
Im expecting 12 byte structured data from each write/read from user-defined fc, it's for personal project so im not bothered by performance or anything
I know i can use something like "66:0001" in PlcAddress, and I wonder if it can be done like this
Dim tmp As CustomStructure
Dim tmp2 As String() = TCPCom1.Read("65:0001", 6) '*assuming each element 16bit
tmp.el1 = tmp2(0) >> 8
tmp.el2 = tmp2(0) & 0xFF
tmp.el3 = tmp2(1)
...
does each tmp2(x) represent a byte? or short?
can i use TCPCom1.Read("65:0001", 1) and still expect 12 byte?
also, in modbus tcp driver, there's DataReceived event
can i use this to receive alarm or notification from device when there's value change or input? so ahmi doesn't need to poll data
for example the notification looks like this:
mbap header
function code
byte count
alarm type
data