I'm attempting to set the unitID for a tcp modbus transaction I can't seem to find a reference ot the correct field (I need to be able to do this for both read multiple, and read multiple discrete).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm attempting to set the unitID for a tcp modbus transaction I can't seem to find a reference ot the correct field (I need to be able to do this for both read multiple, and read multiple discrete).
Master:
The unit identifier can be set on the ModbusRequest (that extends ModbusMessageImpl):
http://jamod.sourceforge.net/apidocs/net/wimpi/modbus/msg/ModbusMessageImpl.html#setUnitID(int)
Slave:
The unit identifier can be set on the ModbusCoupler:
http://jamod.sourceforge.net/apidocs/net/wimpi/modbus/ModbusCoupler.html#setUnitID(int)
Thank you for your help.