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
- Replies:
- Re: SRQ support using asyn Eric Norum
- Navigate by Date:
- Prev:
RE: Using SynApps Calc Module Mark Rivers
- Next:
Re: SRQ support using asyn Eric Norum
- 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
2023
2024
- Navigate by Thread:
- Prev:
Re: CA.DLL for Windows ? Schoeneburg, Bernd
- Next:
Re: SRQ support using asyn Eric Norum
- 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
2023
2024
|