ModBus RTU mit größerem FrameSize

wom
 
Avatar
 
Subject:

ModBus RTU mit größerem FrameSize

 · 
Posted: 14.01.2013 - 15:44  ·  #1
Hallo,

ich habe eine Anwendung, in der der Kunde 118 Word Dateninhalt abfrage möchte. Dies ist aber anscheinend nicht möglich, oder besteht hier eine Möglichkeit dies zu ändern.

Gruß
WOM
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: ModBus RTU mit größerem FrameSize

 · 
Posted: 19.01.2013 - 18:28  ·  #2
The limit for MODBUS function 03 (READ HOLDING REGISTERS) is to read 125 words with a single request. So, you have not reached the limit. However, even if you did, I do not see what stops you to read more data in multiple requests. I read more then 300 floats (that is 600 words) with multiple requests without any problem. You can have polling cycle consisting of one request for 20 words, then another for 100, then another for 70, then another for 900 bits, then another and another, and then repeat the whole cycle. It's up to you how will you organize your polling requests. I usually put critical tags in a fast polling group (for example every 1000 ms), and less critical tags in a slow polling groups (like 5000 ms for slow changing temperatures). To avoid congestion group periods can be further optimized by using prime numbers, but that is quite another topic.
wom
 
Avatar
 
Subject:

Re: ModBus RTU mit größerem FrameSize

 · 
Posted: 22.01.2013 - 10:22  ·  #3
hello,

I am not a specialist but for ModBus,
the problem is that the customer imagines to get the functions # 3 is all data (140 words). Also, I get an error that the frame must be betwee 10 and 240 bate.

....
       SerPort2 = 19200, Databit8, parEven, Stop1;
       TxBuffer2 = 10, iData;
       RxBuffer2 = 8, iData;
       ModBus = SerPort2, 127, iData, 254;
       ModBusMode = RTU, Timer3;
       SerCtrl2 = PortD, 4, Positive;
....

    ModBuff [@ ModDPR]: record
                         cmd: mb_RdWrW;
                         DATE: array [0 .125] Of mb_RdWrW;
                       end;

br
wom
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: ModBus RTU mit größerem FrameSize

 · 
Posted: 25.01.2013 - 00:38  ·  #4
Ok. If online translation was good, you mentioned 118 words at first, and then 140 words. Let's say the last is correct and your client wants to read 140 words in a single request. Page 13 of Modbus standard document says "The maximum size of a MODBUS RTU frame is 256 bytes" (RTU=SlaveAddress+FunctionCode+Data+CRC). Since 140 * 2 = 280, your client asks for something that is not possible with the standard MODBUS protocol. That means your client needs 2 requests to read 140 words. I do not see a problem with that, since that is a way zillion MODBUS masters read their data from MODBUS clients.
wom
 
Avatar
 
Subject:

Re: ModBus RTU mit größerem FrameSize

 · 
Posted: 26.01.2013 - 19:26  ·  #5
Hello
that's what I thought too, but here I have also interpretriert Sun I'll loess but anderst and a command register, the customer rates different content. Thus, one can interpret the protocol of modbus as conversational protocol. thanks for the info.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   85   99 · Page-Gen-Time: 0.040517s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI