EPICS Home

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

Subject: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k
From: LiangChih Chiang via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Thu, 7 Nov 2024 09:57:27 +0800
Hello, EPICS mates,

I use module Eurotherm2k (https://github.com/jwlodek/eurotherm2k)
to access controller Eurothermm 3508.

It's ok mostly, but I can't set the P/I/D values.

And there are two errors showed repeatedly:
2024/11/07 09:07:35.155 drvModbusAsyn::readPoller port Eurotherm_E3K01_1_1_Rd_PID invalid memory request 3, max=3
2024/11/07 09:07:35.852 drvModbusAsyn::readPoller port Eurotherm_E3K01_1_1_Rd_PV invalid memory request 4, max=3

In " E3K01_1_1"
"E3K01" is the port name,
the following "1" is the Modbus address,
then "1" is the loop number.

I found that in the file eurothermModbus.c of the module, it calls drvMosbusAsynConfigure:

        /* Create modbus channels for the PV, target setpoint and manual output */
        mkname(str, strmaxlen, asynPortName, modbusAddress, loopNumber, 0, "PV");
        asynRet = drvModbusAsynConfigure(str, asynPortName, modbusAddress,
                                MODBUS_READW, loopStart+PV_OFFSET, 3+2,
                                0, EUROTHERM_POLL_MS, "");
        if (asynRet != asynSuccess) {
                LOG_ERROR("drvModbusAsynConfigure failed with error %d", asynRet);
                free(str);
                return -EIO;
        }

        /* Create modbus channels for the PID parameters */
        mkname(str, strmaxlen, asynPortName, modbusAddress, loopNumber, 0, "PID");
        asynRet = drvModbusAsynConfigure(str, asynPortName, modbusAddress,
                                MODBUS_READW, loopStart+PID_OFFSET, 3+1,
                                0, EUROTHERM_POLL_MS, "");
        if (asynRet != asynSuccess) {
                LOG_ERROR("drvModbusAsynConfigure failed with error %d", asynRet);
                free(str);
                return -EIO;
        }

And in the file eurothermModbusLoop.template, the records uses the ports created above:

# PV: address 1
# % gdatag,pv,ro,$(gda_name=),PVRBV
# % archiver 1 Monitor
record(ai, "$(P)$(Q):PV:RBV") {
  field(DESC, "Temperature Readback")
  field(DTYP, "asynInt32")
  field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,0,1000)MODBUS_DATA")
  field(EGU, "$(EGUT=C)")
  field(SCAN, "I/O Intr")
}

# % gdatag,pv,ro,$(gda_name=),SPRBV
# % archiver 10 Monitor
record(ai, "$(P)$(Q):SP:RBV") {
  field(DESC, "Setpoint Readback")
  field(DTYP, "asynInt32")
  field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,1,1000)MODBUS_DATA")
  field(EGU, "$(EGUT=C)")
  field(SCAN, "I/O Intr")
  field(ASLO, "0.1")  
}

# % gdatag,pv,ro,$(gda_name=),ORBV
# % archiver 1 Monitor
record(ai, "$(P)$(Q):O:RBV") {
  field(DESC, "Output Readback")
  field(DTYP, "asynInt32")
  field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,2,1000)MODBUS_DATA")
  field(EGU, "%")
  field(SCAN, "I/O Intr")
  field(ASLO, "0.1")
  field(PREC, "1")
}

Would you please provide some suggestions?


Replies:
RE: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: EPICS Archiver compatibility w/Debian 12, Tomcat 10 Han Lee via Tech-talk
Next: RE: EPICS Archiver compatibility w/Debian 12, Tomcat 10 Sky Brewer 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  <20242025 
Navigate by Thread:
Prev: RE: EPICS Archiver compatibility w/Debian 12, Tomcat 10 Sky Brewer via Tech-talk
Next: RE: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k 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  2023  <20242025