Am 10.01.2017 um 18:58 schrieb Eric Norum:
> I’m attempting to communicate with a Keysight 53210A frequency
> counter using VXI-11/ASYN/StreamDevice. I’m seeing all sorts of
> problems when the driver attempts to set up the SRQ link — to the
> point where the windows application on the frequency counter crashes
> and puts up a ‘.exe failed’ message (upside down!) on the instrument
> screen.
>
> I had a look at the code in drvVxi11.c and by moving the SRQ code
> inside the ‘isGpibLink’ test everything seems to work. This change
> also gets VXI-11 communication working with some other instruments
> that also failed before.
>
> What are your thoughts on this change? Does anyone use SRQ with
> non-'GPIB' devices? If so, how did you make it work?
I have not done this, personally, but I know that the SRQ "back channel"
is officially part of the VXI-11 protocol definition and that devices
/should/ implement it, or, failing that, at least catch attempts to
connect and report an "unsupported feature" error code back to the
client, rather than doing funny stuff on the instrument screen!
That they fail to do so is a bug. First and foremost, you should take
your complaint to the vendor of the instrument.
It might not be possible to convince enough vendors of buggy VXI-11
instruments to fix their firmware, and even in case they they eventually
do that this might take longer than we want to wait. So I guess the most
reasonable approach for asyn is to offer a command (i.e. startup script
callable function) to selectively disable SRQ functionality (including
the request for an SRQ channel at startup) for a given asyn link. In
this way we could keep the (documented) standard VXI-11 behaviour while
giving users a way to easily switch it off and work around these
formware bugs.
Cheers
Ben
> diff -U50 -r ../asyn4-30.orig/asyn/vxi11/drvVxi11.c
> ./asyn/vxi11/drvVxi11.c --- ../asyn4-30.orig/asyn/vxi11/drvVxi11.c
> 2016-08-23 09:23:36.000000000 -0700 +++ ./asyn/vxi11/drvVxi11.c
> 2017-01-10 09:19:06.969887000 -0800 @@ -909,102 +909,102 @@
> pvxiPort->server.lid = link; pvxiPort->server.connected = TRUE;
> pvxiPort->ctrlAddr = -1; if(pvxiPort->isGpibLink) { /* Ask the
> controller's gpib address.*/ status = vxiBusStatus(pvxiPort,
> VXI_BSTAT_BUS_ADDRESS,pvxiPort->defTimeout,&pvxiPort->ctrlAddr);
> if(status!=asynSuccess) { asynPrint(pasynUser,ASYN_TRACE_ERROR, "%s
> vxiConnectPort cannot read bus status initialization aborted\n",
> pvxiPort->portName); if (pvxiPort->server.connected)
> vxiDisconnectPort(pvxiPort); return status; } /* initialize the
> vxiPort structure with the data we have got so far */
> pvxiPort->primary[pvxiPort->ctrlAddr].primary.lid = link;
> pvxiPort->primary[pvxiPort->ctrlAddr].primary.connected = TRUE; /*
> now we can use vxiBusStatus; if we are not the controller fail */
> status = vxiBusStatus(pvxiPort, VXI_BSTAT_SYSTEM_CONTROLLER,
> pvxiPort->defTimeout,&isController); if(status!=asynSuccess) {
> asynPrint(pasynUser,ASYN_TRACE_ERROR, "%s vxiConnectPort vxiBusStatus
> error initialization aborted\n", pvxiPort->portName); if
> (pvxiPort->server.connected) vxiDisconnectPort(pvxiPort); return
> status; } if(isController == 0) { status = vxiBusStatus(pvxiPort,
> VXI_BSTAT_CONTROLLER_IN_CHARGE, pvxiPort->defTimeout,&isController);
> if(status!=asynSuccess) { asynPrint(pasynUser,ASYN_TRACE_ERROR, "%s
> vxiConnectPort vxiBusStatus error initialization aborted\n",
> pvxiPort->portName); if (pvxiPort->server.connected)
> vxiDisconnectPort(pvxiPort); return asynError; } if(isController ==
> 0) { asynPrint(pasynUser,ASYN_TRACE_ERROR, "%s vxiConnectPort neither
> system controller nor " "controller in charge -- initialization
> aborted\n", pvxiPort->portName); if (pvxiPort->server.connected)
> vxiDisconnectPort(pvxiPort); return asynError; } } +
> vxiCreateIrqChannel(pvxiPort,pasynUser); } -
> vxiCreateIrqChannel(pvxiPort,pasynUser);
> pasynManager->exceptionConnect(pvxiPort->pasynUser); return
> asynSuccess; }
>
>
> static asynStatus vxiDisconnectPort(vxiPort *pvxiPort) { int
> addr,secondary; asynUser *pasynUser = pvxiPort->pasynUser;
>
> if(!pvxiPort->server.connected) {
> asynPrint(pasynUser,ASYN_TRACE_ERROR, "%s vxiDisconnectPort but not
> connected\n",pvxiPort->portName); return asynError; } if(pasynUser)
> asynPrint(pasynUser,ASYN_TRACE_FLOW, "%s
> vxiDisconnectPort\n",pvxiPort->portName);
> if(!pvxiPort->isSingleLink) for(addr = 0; addr < NUM_GPIB_ADDRESSES;
> addr++) { devLink *pdevLink;
>
> pdevLink = &pvxiPort->primary[addr].primary; if(pdevLink->connected)
> { if(addr!=pvxiPort->ctrlAddr) { vxiDestroyDevLink(pvxiPort,
> pdevLink->lid); vxiDisconnectException(pvxiPort,addr); }
> pdevLink->lid = 0; pdevLink->connected = FALSE; } for(secondary = 0;
> secondary < NUM_GPIB_ADDRESSES; secondary++) { pdevLink =
> &pvxiPort->primary[addr].secondary[secondary];
> if(pdevLink->connected) { vxiDestroyDevLink(pvxiPort,
> pdevLink->lid); vxiDisconnectException(pvxiPort,(addr*100 +
> secondary)); pdevLink->lid = 0; pdevLink->connected = FALSE; } } }
> vxiDestroyIrqChannel(pvxiPort); vxiDestroyDevLink(pvxiPort,
> pvxiPort->server.lid); pvxiPort->server.connected = FALSE;
> pvxiPort->server.lid = 0; clnt_destroy(pvxiPort->rpcClient);
> pasynManager->exceptionDisconnect(pvxiPort->pasynUser); return
> asynSuccess; }
>
>
> static void vxiReport(void *drvPvt,FILE *fd,int details) {
>
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- References:
- ASYN VXI-11 Eric Norum
- Navigate by Date:
- Prev:
RE: Problem with parallel make with seq 2.2.4 on Linux Mark Rivers
- Next:
Re: CA server bind failure on Windows Ben Franksen
- 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:
ASYN VXI-11 Eric Norum
- Next:
Problems with vxWorks IOCs on base 3.14.12.6 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>
2018
2019
2020
2021
2022
2023
2024
|