Modbus Driver Warning: Exception Code for Function Code 1

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
5 posts • Page 1 of 1
daniel.ponader
Posts: 34
Joined: Tue Jan 10, 2012 1:40 pm

Modbus Driver Warning: Exception Code for Function Code 1

Post by daniel.ponader »

Dear all,
we have a project (WinCC OA Version 3.16 P001) with 10 modbus Servers/Slaves connected via Modbus TCP. 6 of them are connected via a Modbus/TCP RTU Gateway. 2 of the directly connected PLCs and 4 of the via Gateway connected one are giving warnings like this every 5 or 10 seconds:

WARNING, 54, Unexpected state, ModModbusMaster, processResponse, 192.168.0.32: Exception code received: EC=1 FC=1 for UA: 1 Ref: 0


I interpret the warning that the exception code 1 appears during polling the Server with modbus function code 1 at reference address 0 the exception code 1 was received ?! Exception code 1 means: "The function code received in the query is not an allowable action for the slave" . So I double checked all active address configs via "_DriverCommon.HW" if there is the function code 1 is used anywhere accidentally. The result is the function code 1 is never used in any of the address configs for any slave/server.

Now the question is, does the Modbus driver poll the slaves by means of Modbus function code 1 without using the address configs? Basically this is only a warning and should be no problem but on the slow RTU line witch is connected via the gateway an thrown exception code causes recognizable delay of data update.

Thanks and best regards
Daniel

User avatar
innovis
Posts: 8
Joined: Mon Mar 26, 2012 5:01 pm

Re: Modbus Driver Warning: Exception Code for Function Code 1

Post by innovis »

Hi Daniel,

just as a suggestion, you could log your modbus traffic via Wireshark, setting the filter to your PLC's IP address. This way you could really see, which message is triggering the exception code response. Maybe so you can get more information about what is happening in your system.

Best,
Eva

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Modbus Driver Warning: Exception Code for Function Code 1

Post by Gertjan van Schijndel »

The modbus driver only polls the configured addresses. Without any address configs there is nothing to do for the driver and it will not connect to the device.

Did you check the active address configs with a filter (like 'M.1.1.*')? Or did you check against a list of all addresses and could have overlooked an entry?

daniel.ponader
Posts: 34
Joined: Tue Jan 10, 2012 1:40 pm

Re: Modbus Driver Warning: Exception Code for Function Code 1

Post by daniel.ponader »

Thanks for the answers.
We checked the active configs by the following pattern: *M.?.1.*, the answer was/is empty. Before we used the asterisk and copied the answer out of the Editor into Excel for better Analysis...the result was the same: no FC1 used.

Best regards
Daniel

User avatar
alug
Posts: 42
Joined: Mon Oct 18, 2010 11:00 am

Re: Modbus Driver Warning: Exception Code for Function Code 1

Post by alug »

Hallo,

in 3.16 there is an alive check default every 10s using function code 1.
With the config entry

[mod]
aliveTimeout = 0

you can switch back to 3.15 default behavior and the error message shall no longer appear

best regards

Andreas

Post Reply
5 posts • Page 1 of 1