No response from Modbus device


Recommended Posts


I have a Modbus device connect to my PC via RS485.

I use the software that came with the device and I can get a status response.

The software that came with the device does not log, only displays.

I am trying to use DaqFactory to receive the status and log key values. (The logging part is easy)

I send the following to the device

01 03 08 00 00 00 00 00 00 00 00 00 17 6F (Hex)

\x30\x31\x20\x30\x33\x20\x30\x38\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x30\x30\x20\x31\x37\x20\x36\x46 (Ascii)

These are the same and I only send one.

I should receive

01 03 1B 00 62 09 0A 00 3C 05 16 00 06 F9 00 00 56 00 00 00 00 00 00 00 69 C3 00 00 00 51 00 59 8B

or the equivalent in Ascii but I do not receive anything

I have the port set to RTU with the 485 at 9600,n,8,1

I am hoping that there is something mindbogglingly simple that I in my ignorance have overlooked.

I am looking forward to receiving your suggestions.

Link to comment
Share on other sites

How are you sending this to the device? From the comm monitor? What you have there is not modbus. For one thing, you are sending ASCII, not binary values. The output to read holding registers (function 3) should be 8 bytes in ModbusRTU. Even in ModbusASCII, its only 16 bytes, there are no spaces. What you have is much longer. You are confusing general ascii with binary. Second, even the bytes you think you are sending is wrong. There shouldn't be all those 0's in the middle. If you are requesting 8 values starting at address 0 (40,001), it should look something like: 010300000008\crc\crc. If you are requesting 1 value, just replace that last 8 with 1.

The response you show is correctly formed Modbus (I didn't check the CRC), but its for 14 values (hex 1B / 2) not the 8 I think you are requesting.

Note you should be able to use the built in Modbus protocol and a channel to get it to work provided the device is actually ModbusRTU and you have the comm parameters correct.

Link to comment
Share on other sites

I am using the Comm monitor and am sending the codes without spaces.

I have tried both lines using the Comm monitor but I do not receive a response.

According to the manual, I have set up the port with the correct parameters as listed in my original post.

The manual gives me the entire hex code sequence to obtain the response from the modbus device.

I am using the modbus protocols provided by DaqFactory.

Link to comment
Share on other sites

I'm sorry, but what you are typing in is going out the port as ASCII, not binary. In DAQFactory, to send binary hex values you have to prefix the value with \x otherwise the monitor thinks its a ASCII string. So to send hex values 01 03 you'd type \x01\x03

But that doesn't change the fact that the query you posted above is just plain wrong. It looks much more like the response a modbusRTU slave would provide to a query for 4 input registers.

You should be able to select ModbusRTU, then create a channel with I/O type read input register U16, D# = 1, channel # = 0 and have it properly query the device.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.