[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: HenryDUT
Forum Index » Profile for HenryDUT » Messages posted by HenryDUT
Author Message
HenryDUT wrote:Thanks for fmunhoz's recommendation.

In MODBUS Messaging on TCP/IP Implementation Guide, it says that

On TCP/IP, the MODBUS server is addressed using its IP address; therefore, the MODBUS Unit Identifier is useless. The value 0xFF has to be used.

When addressing a MODBUS server connected directly to a TCP/IP network, it’s recommended not using a significant MODBUS slave address in the “Unit Identifier” field. 0xFF is recommended for the “Unit Identifier" as non-significant value.

But 0xFF is greater than 247 (decimal), how can I assign 0xFF to the slave device address?


Who can help me?
mlohbihler wrote:Actually, max slave id is 240.


really?

Is it not assigned from 1 to 247 (decimal) ?
Thanks for fmunhoz's recommendation.

In MODBUS Messaging on TCP/IP Implementation Guide, it says that

On TCP/IP, the MODBUS server is addressed using its IP address; therefore, the MODBUS Unit Identifier is useless. The value 0xFF has to be used.

When addressing a MODBUS server connected directly to a TCP/IP network, it’s recommended not using a significant MODBUS slave address in the “Unit Identifier” field. 0xFF is recommended for the “Unit Identifier" as non-significant value.

But 0xFF is greater than 247 (decimal), how can I assign 0xFF to the slave device address?
Hi, I want to specify the value of slave id , but when I execute the following code, I get an exception "com.serotonin.modbus4j.exception.ModbusTransportException: Invalid slave id".

If slave id is less than 248?it will be OK.

Is there a problem with the code? or slave id can not be greater than 247 ?

int slave_id=255;
ModbusRequest req = new ReadInputRegistersRequest(slave_id, 0, 5);
ReadInputRegistersResponse rep = (ReadInputRegistersResponse) mp.send(req);


Thanks
 
Forum Index » Profile for HenryDUT » Messages posted by HenryDUT
Go to:   
Powered by JForum 2.1.9 © JForum Team