Random error codes and ID mismatch


mkennett
 Share

Recommended Posts

Hi there,

I recently developed a system for a water treatment plant, which has run flawlessly for weeks at a time, until randomly falling over. Our client has now had two instances whereby logging has stopped in the middle of the night, and these errors have been present.

P-ModbusRTU 0000 #-1

P-ModbusRTU 0000 #-25

P-ModbusRTU 0000 #127

P-ModbusRTU 0000 #10

P-ModbusRTU 0000 #-20

P-ModbusRTU 0000 #117

P-ModbusRTU 0000 #-65

P-ModbusRTU 0000 #-33

P-ModbusRTU 0000 #-3

P-ModbusRTU 0014 ID Mismatch

I understand the "0014 ID Mismatch" error, however I'm unsure about the "0000 #xxx" errors. I'm assuming they're timeout related but struggling to find any clear information on exactly what they mean. Anyone able to shed any light on the meaning of these codes?

The hardware setup:

4 x Chemtrac PC3400 liquid particle counters communicating via Modbus RTU (RS-485)

2 x Advantech ADAM 4017+ Analogue Input modules on the same RS-485 loop, attaching various turbidity, flow, and pressure meters.

1 x Advantech ADAM 4561 serial > usb converter.

Any help would be hugely appreciated!

Thanks,

Matt

Link to comment
Share on other sites

If you look at the monitor you'll see what is happening, though I'm guessing you are not in front of the system when it occurs?

Anyhow, the Modbus protocol specifies that if there is an error, the slave device will reply with 3 bytes, the first is the ID of the device, the second is the function requested + 128, and the third is the error code. There are about 10 or 15 error codes in the actual modbus spec, and if DAQFactory sees one of the first 4 codes, it will display the appropriate message. If, however, a non-standard error code is returned, it generates the 0000: Modbus Error # message and provides the code. The thing is, the code gets cast to a signed integer, so for all those negative numbers, you need to add 256 to get the real code. That said, however, the fact that you are getting random codes just tells me you have some sort of comms issue, most likely faulty wiring or a bad USB converter, but really looking at the comm monitor when this happens will be the best indication of where the issue is.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share