# Modbus Analyzer Decoding

**URL:** https://discuss.saleae.com/t/modbus-analyzer-decoding/2304
**Category:** Logic 2 Software
**Created:** [June 28, 2023, 10:07pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304 "2023-06-28T22:07:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![valentina](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@valentina](https://discuss.saleae.com/u/valentina)
#### Post date: [June 28, 2023, 10:07pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/1 "2023-06-28T22:07:21Z")

</div>

Hi All,  
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  
non inverted  
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?)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/0/037d2de632d87187b0a35a7bf6340a73a14f5c30.png)

---

<div class="post-metadata">

### Author: ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)
#### Post date: [June 28, 2023, 11:31pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/2 "2023-06-28T23:31:28Z")

</div>

@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](https://support.saleae.com/user-guide/using-logic/saving-loading-and-exporting-data) (in .sal file format) with me, that might also help me understand the issue in more detail.

---

<div class="post-metadata">

### Author: ![valentina](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@valentina](https://discuss.saleae.com/u/valentina)
#### Post date: [June 29, 2023, 8:47pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/3 "2023-06-29T20:47:45Z")

</div>

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](https://discuss.saleae.com/uploads/short-url/5gTOMpEk89FIGh42qjZkUCRig2C.sal) (6.2 KB)

---

<div class="post-metadata">

### Author: ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)
#### Post date: [June 29, 2023, 11:30pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/4 "2023-06-29T23:30:26Z")

</div>

@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?

 ![Screenshot 2023-06-29 at 6.24.57 PM](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/a/a263ee7ac33e60ff909237e380e5507f6d5a2b74.png)

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.

> **[Supported Voltages](https://support.saleae.com/user-guide/supported-voltages)**

---

<div class="post-metadata">

### Author: ![valentina](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@valentina](https://discuss.saleae.com/u/valentina)
#### Post date: [July 3, 2023, 6:54pm UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/5 "2023-07-03T18:54:15Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/0/02f209164db77fe067bf222c51b036e96ff2fe2f.png)

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](https://discuss.saleae.com/uploads/short-url/omVo4zEKb2s18lleXq3nuSMZQAa.sal) (3.8 MB)

---

<div class="post-metadata">

### Author: ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)
#### Post date: [July 6, 2023, 12:05am UTC](https://discuss.saleae.com/t/modbus-analyzer-decoding/2304/6 "2023-07-06T00:05:40Z")

</div>

@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).
