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: RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP
From: Nicolas Guilhermo Silva Moliterno via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Date: Wed, 20 Sep 2023 18:44:32 +0000
Hi Mark,

  • I am not sure what you are trying to do.  Do you want to run ADCore 2.2.0 or 3.12.1?
I already have full IOC compiled for ADCore 2.2.0.
I'm trying to update to the latest version of ADCore=3.12.1.

  • If you are building with R3.12.1 then why are you trying to avoid calling the base class for NDPluginDriverQueueSize and NDPluginDriverNumThreads?

Because when trying to run IOC to the latest version, I get these errors in the IOC prompt:
NDPluginDriver::deleteCallbackThreads timeout waiting for plugin thread 0 exit message
NDPluginDriver::writeInt32 ERROR, status=3, function=57, value=1, connectedToArrayPort_=1
NDPluginXIP:writeInt32: error, status=3 function=57
IPE:RIXSCam1:XIP1:NumThreads devAsynInt32::processCallbackOutput process error.


After avoiding calling the functions, the errors did not occur. But the problem of resetting the PVs arose
IPE:RIXSCam1:XIP1:ArraySize2_RBV = 0
IPE:RIXSCam1:XIP1:ArraySize1_RBV = 0


In the IOC cmd file using ADCore=2.2.0, the plugins look like this:

# Create a netCDF file saving plugin.
NDFileNetCDFConfigure("FileNetCDF1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("NDFileNetCDF.template","P=$(PREFIX),R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
# Load XIP plugin.  Specify BlockCallbacks to true, which is how it should stay.
NDPluginXIPConfigure("XIP1", $(QSIZE), 1, "$(PORT)", 0, -1, -1)
dbLoadRecords("NDPluginXIP.template", "P=$(PREFIX),R=XIP1:,  PORT=XIP1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")


In the IOC cmd file using ADCore=3.12.1, the plugins look like this:
# Create a netCDF file saving plugin
NDFileNetCDFConfigure("FileNetCDF1", $(QSIZE), 0, "$(PORT)", 0)
dbLoadRecords("NDFileNetCDF.template","P=$(PREFIX),R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
# Load XIP plugin.  Specify BlockCallbacks to true, which is how it should stay.
NDPluginXIPConfigure("XIP1", $(QSIZE), 1, "$(PORT)", 0, -1, -1)
dbLoadRecords("$(ADPLUGINXIP)/db/NDPluginXIP.template", "P=$(PREFIX),R=XIP1:,PORT=XIP1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
dbLoadRecords("$(ADPLUGINXIP)/db/XIPPVDefinitions.template", "P=$(PREFIX),R=XIP1:,PORT=XIP1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")

I needed to avoid the NDPluginDriverQueueSize and NDPluginDriverNumThreads functions, because XIP has this message:
Specify BlockCallbacks to true, which is how it should stay.

I didn't try to reset the argument like other plugins.

Thanks.



Nicolas Guilhermo Silva Moliterno
nicolas.moliterno at lnls.br

Grupo SWC-Software de Controle / Control Software Group
Laboratório Nacional de Luz Síncrotron - LNLS Centro Nacional de Pesquisa em Energia e Materiais - CNPEM

De: Mark Rivers <rivers at cars.uchicago.edu>
Enviado: quarta-feira, 20 de setembro de 2023 14:45
Para: Nicolas Guilhermo Silva Moliterno <nicolas.moliterno at lnls.br>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Assunto: RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP
 

Hi Nicolas,

 

I am not sure what you are trying to do.  Do you want to run ADCore 2.2.0 or 3.12.1?  I strong suggest you run the more recent version.

 

  • I think it's something related to the version of ADCore=2.2.0, it doesn't handle NDPluginDriverQueueSize and NDPluginDriverNumThreads.

 

R2-2 did have NDPluginDriverQueueSize but not NDPluginDriverNumThreads.

 

I got around this problem with the code:

asynStatus NDPluginXIP::writeInt32(asynUser *pasynUser, epicsInt32 value)

/* If this parameter belongs to a base class, call its method */

if (function < FIRST_NDPluginXIP_PARAM && function != NDPluginDriverQueueSize && function != NDPluginDriverNumThreads)

status = NDPluginDriver::writeInt32(pasynUser, value);

 

I don’t understand what you are doing.  If you are building with ADCore R2-2 then NDPluginDriverNumThreads will not be defined and you will get a compiler error.  If you are building with R3.12.1 then why are you trying to avoid calling the base class for NDPluginDriverQueueSize and NDPluginDriverNumThreads?  The base class does need to be called for those parameters.

 

Mark

 

 

From: Nicolas Guilhermo Silva Moliterno <nicolas.moliterno at lnls.br>
Sent: Wednesday, September 20, 2023 12:20 PM
To: tech-talk at aps.anl.gov
Cc: Mark Rivers <rivers at cars.uchicago.edu>; SWC <swc at lnls.br>
Subject: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP

 

 

Hi everyone, I'm compiling a RIXSCam detector.
I compiled EPICS BASE = 7.0.7
SYNAPPS = 6.2 with AreaDetector -> ADCore, ADSupport.
 
I was successful in compiling the entire system, detector and epics modules.
But after compiling and changing the version of ADCore, the XIP plugin has been showing strange behavior.
 
I think it's something related to the version of ADCore=2.2.0, it doesn't handle NDPluginDriverQueueSize and NDPluginDriverNumThreads.
 
In the new version of ADCore = 3.12.1, it handles these functions.
 
I got around this problem with the code:
asynStatus NDPluginXIP::writeInt32(asynUser *pasynUser, epicsInt32 value)
{
int function = pasynUser->reason;
 
asynStatus status = setIntegerParam(function, value);
 
for (auto histogramParam : _histogramParams)
{
if (histogramParam->HasParameterIndex(function))
{
_histogramParamsChanged = true;
break;
}
}
 
/* If this parameter belongs to a base class, call its method */
if (function < FIRST_NDPluginXIP_PARAM && function != NDPluginDriverQueueSize && function != NDPluginDriverNumThreads)
status = NDPluginDriver::writeInt32(pasynUser, value);
 
/* Do callbacks so higher layers see any changes */
callParamCallbacks();
ReportWriteStatus(pasynUser, status, "writeInt32");
return status;
}
 
But after that, IOC zeroed out the Array Size. And by definition, this is the PluginXIP call.
 
# Load XIP plugin. Specify BlockCallbacks to true, which is how it should stay.
NDPluginXIPConfigure("XIP1", $(QSIZE), 1, "$(PORT)", 0, -1, -1)
dbLoadRecords("$(ADPLUGINXIP)/db/NDPluginXIP.template", "P=$(PREFIX),R=XIP1:,PORT=XIP1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
dbLoadRecords("$(ADPLUGINXIP)/db/XIPPVDefinitions.template", "P=$(PREFIX),R=XIP1:,PORT=XIP1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
set_requestfile_path("$(ADPLUGINXIP)", "Db")



I needed to make the change in deleteCallbackThreads and createCallbackThreads, because when we raised the IOC, the shell showed: errors involving these two functions:
 
2023/07/11 12:00:50.994 NDPluginDriver::deleteCallbackThreads timeout waiting for plugin thread 0 exit message
2023/07/11 12:00:51.001 NDPluginDriver::writeInt32 ERROR, status=3, function=57, value=1, connectedToArrayPort_=1
2023/07/11 12:00:51.011 NDPluginXIP:writeInt32: error, status=3 function=57
2023/07/11 12:00:51.019 IPE:RIXSCam1:XIP1:NumThreads devAsynInt32::processCallbackOutput process error
 
 
I think it might be something related to the PVs
·         IPE:RIXSCam1:XIP1:QueueFree
·         IPE:RIXSCam1:XIP1:QueueSize
 
Because in the image with ADCore 2.2.0, the PVs IPE:RIXSCam1:XIP1:QueueSize and IPE:RIXSCam1:XIP1:QueueFree have the values ​​1 and 1 respectively.
While with ADCore 3.12.1 they have the values ​​1 and 0 respectively.
 

 

Thanks.

 

 

Nicolas Guilhermo Silva Moliterno

nicolas.moliterno at lnls.br

Grupo SWC-Software de Controle / Control Software Group
Laboratório Nacional de Luz Síncrotron - LNLS Centro Nacional de Pesquisa em Energia e Materiais - CNPEM

 

Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.

Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.


Replies:
RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP Mark Rivers via Tech-talk
References:
Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP Nicolas Guilhermo Silva Moliterno via Tech-talk
RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP Mark Rivers via Tech-talk
Next: Starting an app from the ioc st.cmd Siddons, David 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: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP Mark Rivers via Tech-talk
Next: RE: Help to ADCore 3.12.1 with RIXSCam IOC and PluginXIP 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, 21 Sep 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·