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  <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: RE: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: LiangChih Chiang <yehnan174 at gmail.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 7 Nov 2024 18:55:11 +0000

Hi,

 

I don’t understand why you are getting that error.  The Modbus ports are being created with a length of 3+2 (5) and 3+1 (4) registers respectively.  The records are reading single registers at offsets of 0, 1, and 2.  That should not generate the error you see.

 

Please send the output of:

 

asynReport 2

 

That will show information about all the asyn port drivers and may provide a clue.

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of LiangChih Chiang via Tech-talk
Sent: Wednesday, November 6, 2024 7:57 PM
To: tech-talk at aps.anl.gov
Subject: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k

 

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 LiangChih Chiang via Tech-talk
References:
Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k LiangChih Chiang via Tech-talk

Navigate by Date:
Prev: RE: Asyn device support does not reconnect Mark Rivers via Tech-talk
Next: Re: Asyn device support does not reconnect Miroslaw Dach 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: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k LiangChih Chiang via Tech-talk
Next: Re: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k LiangChih Chiang 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 
ANJ, 07 Nov 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·