EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
<== Date ==> <== Thread ==>

Subject: Re: Modbus write/read data error help.
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Susheng Xin <sxin at bnl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 11 Jun 2025 01:41:05 +0000
Hi Susheng,

Your device uses the RS-485 communication standard. You appear to be using a USB port on your Linux machine. That means you need a USB to RS-485 converter to talk to the device. Is that what you are using, and if so what make and model?

Your IOC configuration is OK, but you should simplify it. You are using 2 drvAsynModbusConfigure commands, each reading just 1 register. You should change this to create just 1 driver that reads 2 registers. 

Sometimes the device returns nothing, and sometimes it returns 4 bytes.  I suspect it could be the hardware converter or wiring. 

You should add asynTrace commands on the underlying serial port so you can see the complete communication with the device.

Mark

Sent from my iPhone

On Jun 10, 2025, at 5:59 PM, Xin, Susheng via Tech-talk <tech-talk at aps.anl.gov> wrote:



Hi Modbus expert,

 

I am working on a Modbus RTU Temp & humidity sensor. Here is the driver configuration and error message after running the IOC. It seems the write/read length has error.

I am new to Modbus and don’t know how to make the correction. The last picture is the device protocol.   

 

<image001.png>

 

<image002.png>

 

<image003.png>

 

Susheng Xin

Brookhaven National Laboratory

Tel: 631-344-8477

 

PNG image

PNG image

PNG image


References:
Modbus write/read data error help. Xin, Susheng via Tech-talk

Navigate by Date:
Prev: Modbus write/read data error help. Xin, Susheng via Tech-talk
Next: Re: Retiga E7 and ADKinetix John Dobbins via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
Navigate by Thread:
Prev: Modbus write/read data error help. Xin, Susheng via Tech-talk
Next: areaDetector for ZWO ASI 183MM Pro Muhammad Septyawan Aulia via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <2025
ANJ, 12 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·