MODBUS Protocol

P

Thread Starter

Pro

I have to implement multiple read command in MODBUS, but the address locations are not continuous memory locations. Is there any standard function code available in MODBUS to implement this requirement?

Kindly reply on following mail ID:
chatterjeepb @ lntebg. com
 
C
I am 100% sure that standard MODBUS doesn't posses that kind of functionality. You could try with reconfiguration of items addresses of on device, if possible. Or you could use a maximal section on devices MODBUS memory map that could be read with one message (up to 2000 for coils), and than discard useless data.

Best Regards,
Cico Zoran
 
I have gone through the existing list of function codes (I have the list of function codes from 1 to 24), none of them fits my requirement.

So can I go for implementing a user-defined function code? Would there be any issue of getting a Modbus Compliance certificate under such circumstances?
 
Hi Pro,

What do you mean by "to implement multiple read command"?

Your problem actually can be solved by implementing multiple read as you've mentioned.

Say:
- func code 4, start 256, no of reg 8
- func code 4, start 512, no of reg 4

Regards,
arif
 
C

chatterjeepb

Hi Arif,

By multiple reads, I meant I need to read 5 different address locations in a single frame. I cannot perform individual reads for these 5 addresses. And these addresses are not continuous, otherwise I could have used function code 03 or 04 to implement it. And I have to implement this requirement using MODBUS protocol only. In your reply, what is Start? 256 and 512 are addresses?
 
Yes, 256 and 512 are addresses.

In the example, I can read two blocks of registers
that are not continuous (using two lines of Modbus
request, which is not applicable in your case).
If the 5 addresses in question are populated within 126 bytes range, then you can apply Modbus function with start address = the smallest address and the number of regs = 126 (or the largest address minus the smallest), but then your SCADA should ignore other registers that come along as a response of this request.
 
Top