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  <20252026  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  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: Modbus configuration issues for the Shimaden SRS10A series digital controllers
From: Mark Rivers via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>, LONG FENG <[email protected]>
Date: Tue, 16 Dec 2025 14:54:14 +0000
Hi Feng,

I understand the problem.  For Modbus output drivers, SRS10_Out1 - SRS10_Out7 in your case, the driver attempts an initial read operation from that Modbus address if the pollMsec argument is non-zero.  This allows the EPICS output records to be synchronized to the PLC values when the IOC starts.  This is documented in the pollMsec argument here:

However, I looked at the manual for your device:

Addresses 0x180-x198 are write-only (W/B in the manual).  This means that the read operation will fail, and it generates the Modbus exception 2, "illegal address".  Addresses 0x300 - 0x952 are read/write (R/W/B in the manual).  The is why SRS10_Out6 and SRS10_Out7 do not generate an error message.

You can easily fix the problem.  Just change the pollMsec argument from 1000 to 0 for SRS10_Out1 - SRS10_Out5.

Mark


From: Tech-talk <[email protected]> on behalf of LONG FENG via Tech-talk <[email protected]>
Sent: Tuesday, December 16, 2025 4:29 AM
To: [email protected] <[email protected]>
Subject: Modbus configuration issues for the Shimaden SRS10A series digital controllers
 
Hi all,
I encountered a strange issue while using the Modbus module to read data from an SRS10A controller. Data reading works correctly, but the problem occurs during data writing.
Part of my st.cmd file is shown below:  

drvAsynIPPortConfigure("SRS", "192.168.1.54:502")

# Enable ASYN_TRACEIO_HEX on octet server
asynSetTraceIOMask(SRS, 0, HEX)

# Enable ASYN_TRACE_ERROR and ASYN_TRACEIO_DRIVER on octet server
asynSetTraceMask(SRS, 0, ERROR|DRIVER)
#modbusInterposeConfig(const char *portName,
#                      modbusLinkType linkType,  # 0=TCP, 1=RTU, 2=ASCII
#                      int timeoutMsec,
#                      int writeDelayMsec)
modbusInterposeConfig("SRS", 0, 1000, 50)
###############################################################
# drvModbusAsynConfigure(
#   char *portName,
#   char *octetPortName,
#   int modbusSlave,
#   int modbusFunction,
#   int modbusStartAddress,
#   int modbusLength,
#   modbusDataType dataType,
#   int pollMsec,
#   char *plcType)
###############################################################
drvModbusAsynConfigure("SRS10_In1", "SRS", 1, 3, 0x100, 8, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_In2", "SRS", 1, 3, 0x109, 3, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_In3", "SRS", 1, 3, 0x10D, 2, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_In4", "SRS", 1, 3, 0x120, 3, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_In5", "SRS", 1, 3, 0x123, 4, 0, 1000,"status")

drvModbusAsynConfigure("SRS10_In6", "SRS", 1, 3, 0x300, 3, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_In7", "SRS", 1, 3, 0x30A, 2, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In8", "SRS", 1, 3, 0x400, 18, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In9", "SRS", 1, 3, 0x460, 18, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In10", "SRS", 1, 3, 0x500, 4, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In11", "SRS", 1, 3, 0x508, 4, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In12", "SRS", 1, 3, 0x50D, 1, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In13", "SRS", 1, 3, 0x510, 4, 0, 1000,"status")
#drvModbusAsynConfigure("SRS10_In14", "SRS", 1, 3, 0x515, 1, 0, 1000,"status")

drvModbusAsynConfigure("SRS10_Out1", "SRS", 1, 6, 0x180, 1, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out2", "SRS", 1, 6, 0x182, 4, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out3", "SRS", 1, 6, 0x18C, 1, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out4", "SRS", 1, 6, 0x190, 3, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out5", "SRS", 1, 6, 0x198, 1, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out6", "SRS", 1, 6, 0x300, 3, 0, 1000,"status")
drvModbusAsynConfigure("SRS10_Out7", "SRS", 1, 6, 0x30A, 2, 0, 1000,"status")

The following error occurs when I run it:

  2025/12/16 05:15:40.517 drvModbusAsyn::doModbusIO port SRS10_Out1 Modbus exception=2
drvModbusAsynConfigure("SRS10_Out2", "SRS", 1, 6, 0x182, 4, 0, 1000,"status")
2025/12/16 05:15:42.627 drvModbusAsyn::doModbusIO port SRS10_Out2 Modbus exception=2
drvModbusAsynConfigure("SRS10_Out3", "SRS", 1, 6, 0x18C, 1, 0, 1000,"status")
2025/12/16 05:15:43.779 drvModbusAsyn::doModbusIO port SRS10_Out3 Modbus exception=2
drvModbusAsynConfigure("SRS10_Out4", "SRS", 1, 6, 0x190, 3, 0, 1000,"status")
2025/12/16 05:15:44.910 drvModbusAsyn::doModbusIO port SRS10_Out4 Modbus exception=2
drvModbusAsynConfigure("SRS10_Out5", "SRS", 1, 6, 0x198, 1, 0, 1000,"status")
2025/12/16 05:15:46.030 drvModbusAsyn::doModbusIO port SRS10_Out5 Modbus exception=2

Note that SRS10_Out6 and SRS10_Out7 do not produce any errors, and I am indeed able to write data through them normally. This is what confuses me: why do SRS10_Out1 through SRS10_Out5 report errors? I have carefully checked the address settings and did not find any mistakes. Where could the problem be?  

Feng


References:
Modbus configuration issues for the Shimaden SRS10A series digital controllers LONG FENG via Tech-talk

Navigate by Date:
Prev: Modbus configuration issues for the Shimaden SRS10A series digital controllers LONG FENG via Tech-talk
Next: Re: Consultation: connecting I2C/SPI devices to network Kuldeep Joshi 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  <20252026 
Navigate by Thread:
Prev: Modbus configuration issues for the Shimaden SRS10A series digital controllers LONG FENG via Tech-talk
Next: EPICS Collaboration Meeting Spring 2026 - CEA IRFU Paris-Saclay GAGET Alexis 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  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·