-
Notifications
You must be signed in to change notification settings - Fork 94
Description
The Transaction Identifier (the field identifying each modbus transaction) is ignored in ModbusTcpClient and ModbusTcpClientAsync:
| _ = reader.ReadUInt16Reverse(); // 00-01 Transaction Identifier |
| _ = reader.ReadUInt16Reverse(); // 00-01 Transaction Identifier |
According to the official docs, it is necessary to check it though: https://www.modbus.org/docs/Modbus_Messaging_Implementation_Guide_V1_0b.pdf (page 10):
Several MODBUS transactions can be activated simultaneously on the same TCP Connection.
Remark: If this is done then the MODBUS transaction identifier must be used to uniquely identify the matching requests and responses.
A real-life example:
A read request is written with transaction identifier 10.
The following message is a response with transaction identifier 0F.
Then, we get the response with transaction identifier 10.
Ignoring the transaction identifier will result in an incorrect value.
