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: LiangChih Chiang via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 8 Nov 2024 09:15:34 +0800
Hi, dear Mark, thanks for replying.

>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.

I see. There should be somewhere records access beyond the max length of registers.

And I found the following record access address 4.

record(ai, "$(P)$(Q):WSP:RBV") {
  field(DESC, "Working SP Readback")
  field(DTYP, "asynInt32")
  field(INP, "@asyn(Eurotherm_$(PORT)_$(ADDR)_$(LOOP=1)_Rd_PV,4,1000)MODBUS_DATA")
  field(EGU, "$(EGUT=C)")
  field(SCAN, "I/O Intr")
  field(ASLO, "0.1")
  field(PREC, "1")
}

Thank you again.
It's probably I or my colleague modified the code and forgot.

On Fri, Nov 8, 2024 at 2:55 AM Mark Rivers <rivers at cars.uchicago.edu> wrote:

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?

 


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

Navigate by Date:
Prev: Re: IOClog Dale Cox via Tech-talk
Next: Re: IOClog Saisrikiran Mudigonda 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: Error "drvModbusAsyn::readPoller ... invalud memory request 3, max=3" of module Eurotherm2k Mark Rivers via Tech-talk
Next: Multiple asyn ports inside asynPortDriver class Abdalla Ahmad 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 ·