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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: asyn connection management with asynPortDriver
From: <[email protected]>
To: <[email protected]>
Cc: [email protected]
Date: Fri, 10 Jun 2011 09:28:10 +1000
Hi Mark,

A bit more information about why I am confused. If the asynPortDriver class is instantiated with autoConnect disabled then the PCNCT field
of the asynRecord shows 'Connect' which I think means the port is connected. However asynReport in the IOC says the port isn't connected.
There doesn't seem to be a mechanism for connecting the port itself except via autoConnect, although I think that the ::connect method called with addr=-1 is what the documentation implies.

e.g. 
epics> asynReport 4
drx1 multiDevice:Yes canBlock:Yes autoConnect:No
    enabled:Yes connected:No numberConnects 0

epics> dbpr as:t:as01:drx:s1:asynRecord 4
ACKS: NO_ALARM      ACKT: YES           ACMD: None          ADDR: 0             
AINP:               AOUT:               AQR: 0              ASG:                
ASP: (nil)          AUCT: noAutoConnect BAUD: Unknown       BINP: 0             
BKPT: 00            BOUT: 0             CNCT: Disconnect    DBIT: Unknown       
DESC:               DISA: 0             DISP: 0             DISS: NO_ALARM      
DISV: 1             DPVT: 0xaa61c40     DRVINFO:            DSET: 0xb7740988    
DTYP: asynRecordDevice                  ENBL: Enable        EOMR: None          
ERRS: 0xaa61f20     EVNT: 0             F64INP: 0           F64IV: 1            
F64OUT: 0           FCTL: Unknown       FLNK:CONSTANT 0     GPIBIV: 0           
I32INP: 0           I32IV: 1            I32OUT: 0           IEOS:               
IFACE: asynOctet    IFMT: ASCII         IMAX: 80            IPTR: 0xaa61e70     
LCNT: 0             LSET: 0xb6c75078    MCTL: Unknown       
MLIS: 00 00 00 00 00 00 00 00 00 00 00 00                   MLOK: 28 1c a6 0a   
NAME: as:t:as01:drx:s1:asynRecord       NAWT: 0             NORD: 0             
NOWT: 80            NRRD: 0             NSEV: NO_ALARM      NSTA: NO_ALARM      
OCTETIV: 1          OEOS:               OFMT: ASCII         OMAX: 80            
OPTIONIV: 0         OPTR: 0xaa61e18     PACT: 0             PCNCT: Connect      
PHAS: 0             PINI: NO            PORT: drx1          PPN: (nil)          
PPNR: (nil)         PRIO: LOW           PROC: 0             PRTY: Unknown       
PUTF: 0             RDES: 0x9dc5570     REASON: 0           RPRO: 0             
RSET: 0xb7740940    SBIT: Unknown       SCAN: Passive       SDIS:CONSTANT       
SEVR: NO_ALARM      SOCK:               SPR: 0              SPVT: (nil)         
STAT: NO_ALARM      TB0: On             TB1: Off            TB2: Off            
TB3: Off            TB4: Off            TFIL: Unknown       TIB0: Off           
TIB1: Off           TIB2: Off           TIME: <undefined>   TINP:               
TIOM: 0             TMOD: Write/Read    TMOT: 1             TMSK: 1             
TPRO: 0             TSE: 0              TSEL:CONSTANT       TSIZ: 80            
UCMD: None          UDF: 0              UI32INP: 0          UI32IV: 1           
UI32MASK: 4294967295                    UI32OUT: 0          VAL:                

cheers,

Euan.

On 10/06/2011, at 2:16 AM, Mark Rivers wrote:

> Hi Euan,
> 
> I am away from the lab, but I will look into this and get you an answer when I return on June 20.  It seems like the asyn record should do what you want, but maybe something is wrong.
> 
> Meanwhile perhaps Eric Norum can help :-)
> 
> Mark
> 
> 
> ________________________________
> 
> From: [email protected] on behalf of [email protected]
> Sent: Wed 6/8/2011 8:25 PM
> To: [email protected]
> Subject: asyn connection management with asynPortDriver
> 
> 
> 
> Hi,
> 
> I would like to use the connection management features of asyn with a driver based on the asynPortDriver class. If I create the port driver class with the autoconnect flag set to true I can use the asynRecord CNCT field to connect or disconnect a device from the port. If autoconnect is set to false, then when the IOC starts up, the following messages appear:
> 
> iocRun: All initialization complete
> epics> 2011/06/09 10:51:51.625 as:t:as01:drx:s1:asynRecord: queueRequest failed for special.
> 2011/06/09 10:51:51.625 as:t:as01:drx:s1:asynRecord: port drx1 not connected
> 
> If I try and use the CNCT field if the asyn record to connect a device then a similar message is produced:
> epics> 2011/06/09 11:00:29.564 as:t:as01:drx:s1:asynRecord: exception 2
> 2011/06/09 11:00:39.172 as:t:as01:drx:s1:asynRecord: queueRequest failed for special.
> 2011/06/09 11:00:39.172 as:t:as01:drx:s1:asynRecord: port drx1 not connected
> 
> As I understand the setup, the asynPortDriver constructor will connect the port and the class methods connect() and disconnect() will connect  devices to the port. I have derived these methods in my class so that I can manage connections but without autoconnect to make the first connection these methods are not called. So even though the port is connected, without autoconnect I can't connect any devices to the port. I guess there is some setup I haven't performed. I would like advice as to how to manage the connections. I am using asyn 4.16 with EPICS 3.14.12.
> 
> cheers,
> 
> Euan.
> 
> 
> 



Replies:
RE: asyn connection management with asynPortDriver Mark Rivers
References:
asyn connection management with asynPortDriver Euan.Troup
RE: asyn connection management with asynPortDriver Mark Rivers

Navigate by Date:
Prev: Re: Sequencer Preprocessor Build Rules J. Lewis Muir
Next: driver support for SIS3302 and SIS3305 Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: asyn connection management with asynPortDriver Mark Rivers
Next: RE: asyn connection management with asynPortDriver Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·