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  <20092010  2011  2012  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: SRQ support using asyn
From: Eric Norum <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Mon, 19 Jan 2009 09:49:19 -0600
I looked through my copy of the VXI-11 specification and agree with your analysis. The only mention of the 'lid' value returned by a create_link operation is in Rule B.6.3, "The value of lid SHALL be unique for all currently active links within a network instrumentation server". There is nothing saying that the value must be non-zero.

Please send your changes as a patch file to me or Mark Rivers.

Thank you.

On Jan 18, 2009, at 8:12 PM, [email protected] wrote:

Dear all,

 We have a question about a SRQ support which uses asyn(R4-10).
We are developing a device support for a waveform digitizer which employs the vxi11 protocol. It basically works properly except for the SRQ function.
What happens is as follows:

 When we receive SRQ from the device, the following message comes up
and the readout of the status byte fails:

2009/01/15 17:21:35.042 inst0 vxiCreateDeviceLink error VXI:
out of resources L0 vxiCreateDevLink failed for addr 0
2009/01/15 17:21:35.042 L0 addr 0 asynGpib:srqPoll serialPoll error

 We chased this error within the asyn code and found that it comes
from the function of vxiSerialPll() in asyn/vxi11/drvVxi11.c:
---------------------------
static asynStatus vxiSerialPoll(void *drvPvt, int addr,
   double timeout,int *statusByte)
{
 ...
   if(!pdevLink->lid) {
       Device_Link lid;
       if(!vxiCreateDevLink(pvxiPort,addr,&lid)) {
           printf("%s vxiCreateDevLink failed for addr %d\n",
               pvxiPort->portName,addr);
           return asynError;
       }
       pdevLink->lid = lid;
   }
 ...
}
----------------------------
This function judges whether the connection has been made or not by checking the value of "lid"; "non-zero" means "connected", and "zero" means "not connected". In the case of the device we are struggling with, Device_Link can be "zero" even if the connection succeeds. (I heard that this behavior of the device
does not violate the vxi11 specifications.)
And the problem happens when Device_Link is zero.

 We therefore modified the above code as shown below:
----------------------------
   if(!pdevLink->conneced) {         /* Modified */
       Device_Link lid;
       if(!vxiCreateDevLink(pvxiPort,addr,&lid)) {
           printf("%s vxiCreateDevLink failed for addr %d\n",
               pvxiPort->portName,addr);
           return asynError;
       }
       pdevLink->lid = lid;
       pdevLink->conneced = TRUE;  /* Added */
   }
----------------------------
 By this modification, everything seems to work properly now.
What we'd like to know is whether this modification is reasonable or not;
we wonder if the original code employs "lid" instead of "connected"
because of some important reason we don't know.

 Does anybody kindly tell us about this, please?

Many thanks in advance.

Best regards,

Takashi Asakawa
Yokogawa Electric Corporation, Japan


--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793



References:
SRQ support using asyn Takashi.Asakawa

Navigate by Date:
Prev: SRQ support using asyn Takashi.Asakawa
Next: Re: Using SynApps Calc Module Steve Kinder
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: SRQ support using asyn Takashi.Asakawa
Next: PLC: Schneider Electric - BMXP342020 – CPU340-20 Mauro Giacchini
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·