EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Converting GPIB device support from R3.13.9 to R3.14.6
From: Eric Norum <[email protected]>
To: Kristi Luchini <[email protected]>, [email protected]
Date: Tue, 07 Sep 2004 11:18:15 -0500
Kristi Luchini wrote:
Hi,

I'm converting an existing BESSY gpib device support from R3.13.9 to R3.14.6, and I have a conversion routine
within the device support that does an additional write and then a read in order to proceed with the conversion itself.
Does anyone know how is this now done with the new asyn software?


This is how the eariler version handled the details...

   if (drvGpib.writeIb(pdpvt->head.pibLink, pdpvt->head.device, msg,
       strlen(msg), pdpvt->timeout) == ERROR)
       goto fail;
   if (drvGpib.readIb(pdpvt->head.pibLink, pdpvt->head.device, resp,
       50, pdpvt->timeout) == ERROR)
       goto fail;

There are local read and write functions within the devSupportGpib() that may be accessible within some function table fouind
within one of the structure, but it is unclear to me which can be used within device support.



You can call the asynOctet read/write methods directly from the special conversion routine. If the special conversion routine is to handle *all* the I/O for the command you should specify GPIBCVTIO rathern than GPIBREAD or GPIBWRITE.



static int convertData(struct gpibDpvt *pdpvt, int P1, int P2, char **P3) { . . . asynOctet *pasynOctet = pgpibDpvt->pasynOctet; void *asynOctetPvt = pgpibDpvt->asynOctetPvt; asynUser *pasynUser = pgpibDpvt->pasynUser; gpibCmd *pgpibCmd = gpibCmdGet(pgpibDpvt); char *buf = pgpibDpvt->msg; int bufSize = pgpibCmd->msgLen; . . . if ((pasynOctet->write(asynOctetPvt,pdpvt->pasynUser,pgpibCmd->cmd, strlen(pgpibCmd->cmd),&i) != asynSuccess) || (pasynOctet->read(asynOctetPvt,pasynUser,buf,bufSize,&nread,0) != asynSuccess || nread == 0)) { epicsSnprintf(pasynUser->errorMessage,pasynUser->errorMessageSize, "Error performing I/O"); return -1; } . . .

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


References:
Converting GPIB device support from R3.13.9 to R3.14.6 Kristi Luchini

Navigate by Date:
Prev: Re: JCA 2.1.3 released Rok Sabjan
Next: RTEMS Evaluation CD Available Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Converting GPIB device support from R3.13.9 to R3.14.6 Kristi Luchini
Next: what need i do if i use linux to login sun xuguanglei
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·