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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | ASYN VXI-11 |
From: | Eric Norum <[email protected]> |
To: | Mark Rivers <[email protected]>, "[email protected] Talk" <[email protected]> |
Date: | Tue, 10 Jan 2017 09:58:45 -0800 |
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? 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) { |