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  <20182019  2020  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  <20182019  2020 
<== Date ==> <== Thread ==>

Subject: AW: Asyn: disconnect and reconnect port via PV
From: "Niedermayer, Philipp" <p.niedermayer@fz-juelich.de>
To: Mark Rivers <rivers@cars.uchicago.edu>, Bruno Martins <brunoseivam@gmail.com>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 4 Sep 2018 06:47:48 +0000

Hello Mark, hello Bruno,

 

thank you very much for your answers, it was exactly what I was looking for.

Out of curiosity: is it also possible to change the IP-Address of the VXI-11 device in a similar fashion?

 

Greetings

Philipp

 

 

Von: Mark Rivers [mailto:rivers@cars.uchicago.edu]
Gesendet: Freitag, 31.
August 2018 15:27
An: Niedermayer, Philipp; tech-talk@aps.anl.gov
Betreff: RE: Asyn: disconnect and reconnect port via PV

 

Hi Philip,

 

You should be able to do what you want by loading an asynRecord in that IOC and setting its PORT field to the name of “device_port” you used in the vxi11Configure command.  Below is a screen shot of the medm screen for controlling the asynRecord.  Note that there are 2 widgets labelled “Connect”, which is a bit confusing.

 

The upper one is the .PCNCT field and connects the asynRecord to an asyn port.  It results in a call to pasynManager->connectDevice() or pasynManager->disconnect().  You want to leave that in the Connect state. 

 

The lower one is the .CNCT field, and connects or disconnects the actual device, i.e. it calls pasynCommon->connect() or pasynCommon->disconnect().  If you select Disconnect on this then it will close the VXI11 connection.  You will also need to set the .AUCT field to noAutoConnect so that asynManager does not try to automatically reconnect the device the next time a record tries to communicate with it.

 

cid:image001.png@01D443B7.911F22C0

 

Let me know if you have questions or problems.

 

Mark

 

 

From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> On Behalf Of Niedermayer, Philipp
Sent: Friday, August 31, 2018 1:28 AM
To: tech-talk@aps.anl.gov
Subject: Asyn: disconnect and reconnect port via PV

 

Hello everyone,

 

I have implemented a soft IOC that communicates to a spectrum analyzer via asyn and stream device using vxi11:

 

vxi11Configure("device_port","$(DEVICE_IP)",0,"0.0","inst0",0,0)

 

The device has a limitation that it can only be controlled by one remote controller at a time. The current approach is to temporarily stop the entire soft IOC when required and then restart it via the st.cmd file.

 

It would be better to have a PV (e.g. a bo with CONNECTED/DISCONNECTED state) for this task, that can dis- and reconnect the asyn port.

I know that you can disable record processing by the DISA field, but that did not prevent asyn to keep up a connection to the device in background.

I found the “asynManager” which has the promising “connectDevice” and “disconnect” option, but I’m not sure how to (if at all) call them from the PV.

 

Is there a way to have such a PV? How could that be implemented?

 

Greetings and tanks in advance

Philipp



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing.
Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Replies:
RE: Asyn: disconnect and reconnect port via PV Mark Rivers
References:
Asyn: disconnect and reconnect port via PV Niedermayer, Philipp
RE: Asyn: disconnect and reconnect port via PV Mark Rivers

Navigate by Date:
Prev: EPICS Collaboration November Meeting Call for Abstracts [SEC=UNCLASSIFIED] POZAR, Andraz
Next: RE: Asyn: disconnect and reconnect port via PV Mark Rivers
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  <20182019  2020 
Navigate by Thread:
Prev: RE: Asyn: disconnect and reconnect port via PV Mark Rivers
Next: RE: Asyn: disconnect and reconnect port via PV Mark Rivers
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  <20182019  2020 
ANJ, 04 Sep 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·