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

Subject: modbus ioc start
From: Dale Cox via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Thu, 13 Apr 2023 08:29:12 -0500
Good Morning,

I have an IOC that is currently reading registers via modbus rtu over rs485.  There are a set of registers that store multiple configuration options in a single register.  I set up the port using this line:

> drvModbusAsynConfigure("Z8TC1_Config", "SenecaBus", 5, 6, 53, 4, "UINT16", 100, "SenecaZ")

I've enabled the debugging lines on this IOC. When the IOC starts, I can see that the correct registers are being retrieved when the port is created.  I can also write config changes to those registers at their assigned PV's with no issues that I have found.  My issue is that the PV values aren't being updated when the IOC starts -- meaning that after the IOC start, the bo and mbbo values stored in that register don't match what was returned via the initial modbus request.

Here are a couple of the DB entries that I'm using:

record(bo,"$(P)$(R)-TC1_enable") {
    field(DTYP,"asynUInt32Digital")
    field(OUT,"@asynMask($(PORT), 0, 0x8000 )")
    field(ZNAM,"Disabled")
    field(ONAM,"Enabled")
}

record(bo,"$(P)$(R)-TC2_enable") {
    field(DTYP,"asynUInt32Digital")
    field(OUT,"@asynMask($(PORT), 0, 0x4000 )")
    field(ZNAM,"Disabled")
    field(ONAM,"Enabled")
}

record(bo,"$(P)$(R)-TC1-2_units") {
    field(DTYP,"asynUInt32Digital")
    field(OUT,"@asynMask($(PORT), 0, 0x2000 )")
    field(ZNAM,"tempDegC")
    field(ONAM,"mV")
}

Any help is appreciated.

Dale 

--
Dale Cox
Instrumentation and Electrical Engineer
ACU NEXT Lab 

Replies:
RE: modbus ioc start Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: epics synapps asyn compile error Mark Rivers via Tech-talk
Next: Re: areaDetector error in mingw, windows Ralph Lange 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  <20232024 
Navigate by Thread:
Prev: Re: Re:Re: areaDetector error in mingw, windows Mark Rivers via Tech-talk
Next: RE: modbus ioc start Mark Rivers 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  <20232024 
ANJ, 15 Apr 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·