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  <20192020  2021  2022  2023  2024  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Should drvAsynIPPortConfigure print an error when device is not connected?
From: Mark Rivers via Tech-talk <[email protected]>
To: 'Abdalla Ahmad' <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 15 May 2019 16:09:06 +0000

Ø  When calling drvAsynIPPortConfigure on the IOC, shell passing an IP of a disconnected device, no message is print on the IOC shell. Is there a way to configure it?

 

Actually a message is printed on the IOC shell.  It is not printed immediately when you call drvAsynIPPortConfigure, it is printed 5 seconds later by default.  This is by design.

 

-          drvAsynIPPortConfigure does not actually try to connect to the device.  That is done in the asynCommon->connect() method. 

-          Recall that one of the arguments to drvAsynIPPortConfigure is noAutoConnect. 

o   If that flag is true then connections to the device only happen when some software explicitly calls pasynCommon->connect(). 

o   If that flag is false then asynManager will queue a connection request when the port is created, using a 5 second timeout. 

-          That timeout can be configured with the command asynSetAutoConnectTimeout command in your startup script before calling drvAsynIPPortConfigure. 

-          If the connection request times out, i.e. it cannot connect to the device, then an error message will be printed by asynManager. 

-          Note that only a single message will be printed when the device is not available, even if there are many connection attempts because the autoConnect flag is true.

-          There will be another single message printed if the device becomes available and does connect.

-          The reason that the connection attempt is not done in drvAsynIPPortConfigure is because it could greatly slow down the startup script if there are lots of disconnected devices.  How long should it wait for a device to connect?

 

Here is a demonstration that it is working correctly.

 

corvette:asyn/iocBoot/ioctestConnect>../../bin/linux-x86_64/testConnect st.cmd

dbLoadDatabase("../../dbd/testConnect.dbd")

testConnect_registerRecordDeviceDriver(pdbbase)

# This is a bogus IP address that will never connect

drvAsynIPPortConfigure("IPPort", "164.54.160.220:20", 0, 0, 1);

date

2019/05/15 10:44:57.158058

Starting iocInit

############################################################################

## EPICS R7.0.2.2

## EPICS Base built May 10 2019

############################################################################

iocRun: All initialization complete

epics> 2019/05/15 10:45:02.670 IPPort -1 autoConnect could not connect

 

So at 10:44:57 drvAsynIPPortConfigure was called.  At 10:45:02 (5 seconds later) the error message was printed saying that it could not connect.

 

Mark

 

 

From: [email protected] <[email protected]> On Behalf Of Abdalla Ahmad via Tech-talk
Sent: Wednesday, May 15, 2019 5:28 AM
To: [email protected]
Subject: RE: Should drvAsynIPPortConfigure print an error when device is not connected?

 

Totally forgot about this issue. Same issue here with Asyn 4.34 and stream 2.8.8, we started facing this issue with stream 2.8.8. I think when we used 2.7.7c it was reporting disconnected devices.

 

Best Regards,

Abdalla.

 

From: [email protected] [mailto:[email protected]] On Behalf Of Paduan Donadio, Marcio via Tech-talk
Sent: Wednesday, May 15, 2019 3:56 AM
To: [email protected]
Subject: Should drvAsynIPPortConfigure print an error when device is not connected?

 

Hello, all.

 

When calling drvAsynIPPortConfigure on the IOC, shell passing an IP of a disconnected device, no message is print on the IOC shell. Is there a way to configure it?

 

Thank you,

 

Márcio

 

 


Márcio Paduan Donadio | Control Systems Engineer

Advanced Control Systems Department

SLAC National Accelerator Laboratory | Menlo Park, CA

p: 650.926.5007 | w: slac.stanford.edu

 


References:
Should drvAsynIPPortConfigure print an error when device is not connected? Paduan Donadio, Marcio via Tech-talk
RE: Should drvAsynIPPortConfigure print an error when device is not connected? Abdalla Ahmad via Tech-talk

Navigate by Date:
Prev: Re: Request for Response of Projects that Use EPICS Siddons, David via Tech-talk
Next: Re: Request for Response of Projects that Use EPICS Tong Zhang 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Should drvAsynIPPortConfigure print an error when device is not connected? Abdalla Ahmad via Tech-talk
Next: Request for Response of Projects that Use EPICS bob dalesio 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  <20192020  2021  2022  2023  2024 
ANJ, 15 May 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·