I’ve been trying to debug a Modbus enabled device using the Saleae. Specifically I am trying to check the readout of registers but haven’t been able to confirm whether the device is sending anything back or if I’m misusing the Saleae. I’ve outlined my setup below. Please let me know if this is correct and what assumptions I’m able to make.
Physical set up:
Ch0 - A
Ch1 - B
Ch2 - TX enable
Ref Gnd - Gnd
CH0 Analyzer set up:
Modbus RTU Master
Baud rate 1200
no parity bit, 1 stop bit
Below is my Saleae capture : 010315200002C1CD
The transaction seems correct, but I get no response from the device. Can I assume that the issue is with the hardware and not in my interpretation?
B0 : slave address
B1 : function address
B2 : starting address MSB
B3 : starting address LSB
B4 : number of registers MSB
B5 : number of registers LSB
B6 : CRC LSB
B7 : CRC MSB (is it correct that it’s coming out little endian order?)
@valentina The ChkSum value reported by the software doesn’t seem to show any issues, which is great news so far. Can you let me know what exactly you mean by getting no response from the device?
If you can share your capture file (in .sal file format) with me, that might also help me understand the issue in more detail.
What I mean is that I see no Modbus Response. When you send a read holding register request, you’d expect a response packet with register data.
On my end, I’m using a firmware library to send the Modbus commands and all the internal checks are passing, yet the Saleae shows no corresponding response from the secondary device.
I’ve attached a capture to show you what I mean.
Session 1.sal (6.2 KB)
@valentina I took a look at your capture file. Thanks for sending that over. Just to make sure I understand the issue correctly, does the image below accurately depict the issue you are describing?
If so, this may be an issue with your DUT not actually sending anything back. One thing you can do is to enable an analog channel (i.e. enable Analog channel 0 in addition to Digital channel 0) to check and see if there is any perceived activity on that data line where you were to expect a reply.
My hunch is that there may be no reply at all by your DUT, or the reply signal is not properly transitioning below 0.6V, which is the voltage threshold under which Logic 8’s digital channels should register a LOW reading.
thanks for the insight. I did exactly as you suggested and lo and behold there IS movement on the analog lines, it’s just not getting registered. I’ve attached the capture file below.
Decoding the analog signal it appears as though I am in fact receiving the expected response format. I guess I can now assume that any further issues lie with the DUT.
revamodbuscapture.sal (3.8 MB)
@valentina Oh interesting, the response signal seems to be attenuating, which is likely why our digital channels are not recording any transitions.
I can’t tell what voltages the reply signal is swinging between, but I suspect it’s not crossing the voltage threshold for Logic 8 (i.e. the signal needs to fall below 0.6V to register a logic LOW, and needs to rise above 1.2V to register a logic HIGH).