From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus exception response 1

When trying to control 2 RTU outputs that are sequential, I get this error when I connect the second output. This only happens when my driver is Modbus serial, works fine when I use Modbus Ethernet. The complete error message I receive is "Modbus exception response 1 (Illegal Function) --function code 15 (start=0, count=2)"  When I have a 6 output capable RTU, I can only use every other output... Any ideas?

0 Kudos
Message 1 of 5
(5,424 Views)

What data member?

-----------------------------------------------------------------------
Forshock - Consult.Develop.Solve.
0 Kudos
Message 2 of 5
(5,419 Views)

An example would be 257 (works) 258 (doesn't work) 259 (works) 260 (doesn't work) 261 (works) 262 (doesn't work). It doesn't seem to matter what the data member is, it is just two in a row. If I connect to 257 all is good, if I then connect to 258 I get the error and nothing on that Modbus address works. 258 will work if I don't have connections to 257 or 259. If I have a Modbus RTU with two outputs, I can use one or the other but not both. All outputs work fine if I change to Modbus Ethernet, it is just Modbus serial that gives me the problem. Thanks

 

0 Kudos
Message 3 of 5
(5,417 Views)

Ive have seen some weird things, have you tried putting a 0 in front of the address

 

So the connection is now Modbus1.0257 vs Modbus1.257

 

 

-----------------------------------------------------------------------
Forshock - Consult.Develop.Solve.
0 Kudos
Message 4 of 5
(5,390 Views)

You can log the serial port data to see correct and incorrect responses to various polls. I'd question why a poll for 257 and 258 returns an exception response with a start address of 0.  ("Modbus exception response 1 (Illegal Function) --function code 15 (start=0, count=2)")

 

But that may not matter because the failure is "Illegal Function"  not data addressing at the RTU end. Lookout attempts to group data requests into efficient blocks.  A single bit force for 257 would use function 5. Forcing 257 and 259 would use 2 separate function 5's since the existance of 258 in the RTU canot be assured. However, if your process references both 257 and 258 Lookout will use function 15 - force multiple bits. For whatever reason your RTU doesn't appear to recognize function 15 on a serial interface.

 

A quick workaround might be to create 2 separate modbus devices with identical parameters. Use modbus1 for odd addresses such as 257, 259 etc.and modbus2 for even addreses such as 258 and 260.

 

Bob

 

0 Kudos
Message 5 of 5
(5,375 Views)