Modbus TCP / IP Query

P

Thread Starter

PLC_EIC_Bloke

Hi Folks,

I have previously worked with TCP/IP Modbus on numerous occasions and I have always used a Unit ID (Slave address). If the network has simply a single device behind a gateway or locally there is only a single Slave, is there a requirement to have the Unit ID setup? I'm sure I read data on a PLC before without the unit ID setup correctly? Since TCP/IP opens up the connection initially this would be plausible?

Perhaps this may change depending on the hardware / software used.

Any input greatly appreciated.
 
It seems most manufacturers in that case set
slave_adr = 1
as default value.

Try communication with that slave.
 
L

Lynn August Linse

The 'officially' sanctioned modbus.org answer is to use 0xFF (255), which means 'this is an IP message aimed at the device/bridge with this IP'.

However, that recommendation came after the horse was out of the barn! So very few devices make any meaningful use of the unit id when not required. Ideally, such a device won't care what value is used.

As pvbrowser suggests try 1 (& of course zero/0, as that was the original MBAP suggestion back in the 1990's).
 
P

PLC_EIC_Bloke

Cheers Lynn I had a feeling that is how it would work as I definitely tested it before without issue, I was just a little rusty on when and where.

Thanks guys for all the info, greatly appreciated.
 
Top