Modbus Communication Exception code received

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
telisabeth
Posts:7
Joined: Thu Sep 05, 2019 4:56 pm

Modbus Communication Exception code received

Post by telisabeth »

Hello,
I work with a Redundant project, 3.16 P021

My development computer is in 192.168.11.77
I use MODBUS Driver to query a gateway in 192.168.11.62.
There are 6 slave addresses in this gateway.

To read a signed integer at address 1000 of slave #2,
I configure the int of my Datapoint Read_Word_1000 with :
PowerConfig / Periphery address / Driver type MODBUS /

Then the same for Datapoint Read_Word_1010.

Everything goes well, the reading of the words is refreshed every second.

But a problem occurs when the word 1005 is no longer accessible in the gateway !
The reading on the words 1000 and 1010 is compromised !?
Why ???
WCCOAmod (2), 2020.12.04 16:15:54.887, SYS, WARNING, 54, Unexpected state, ModModbusMaster, processResponse, 192.168.11.62: Exception code received: EC=6 FC=4 for UA: 2 Ref: 1000

Image
Last edited by telisabeth on Fri Dec 04, 2020 4:17 pm, edited 1 time in total.

telisabeth
Posts:7
Joined: Thu Sep 05, 2019 4:56 pm

Re: Modbus Communication Exception code received

Post by telisabeth »

Hello,

can I hope an answer or my issue is too common and easy to solve ?

thanks

amichon
Posts:93
Joined: Sat May 17, 2014 3:49 pm

Re: Modbus Communication Exception code received

Post by amichon »

It's due to the size of modbus frames (poll blocks)

EC=6 means that the slave device is busy

Your gateway can't split your modbus request into many responses if one register mapped to a slave device is not reachable.

You have to customize the size of frames with the following configuration (in config file / section [mod])


maxGap
Type: uint
Default: 16
Range: 0..100

If the difference of two consecutive address reference numbers is lower or equal the value in maxGap, than these addresses are grouped together in one poll block. If not, then a second poll block is created. This entry provides the poll query optimization.

telisabeth
Posts:7
Joined: Thu Sep 05, 2019 4:56 pm

Re: Modbus Communication Exception code received

Post by telisabeth »

Thank you amichon for this answer, it works well.

In the meantime I used different polling groups whenever I had inaccessible addresses in the gateway addressing.
And it works well too, but your solution is better !!!

4 posts • Page 1 of 1