Experimental Physics and Industrial Control System
Bruins, Stefan wrote:
I presume this change has to be made in the "devSupportGpib.c" file of the
asyn driver in the function "writeIt"? Will a make of the ASYN module be
sufficient or must I run the makeSupport command a second time (this may be
a stupid question but I'm pretty new to EPICS/ASYN etc...)
No devSupportGpib.c does not need to be changed.
What you need to do is implement GPIBCVTIO. The devGpib documentation
states:
GPIBCVTIO
Supports record types:
ai, ao, bi, bo, event, longin.longout, mbbi, mbbo, mbbiDirect,
mmboDirect, stringin, stringout, waveform.
All I/O is done by the |convert| routine, which must be defined.
|convert| is called by a callback routine and thus can make an
arbitrary number of calls to low level drivers. It is passed the
address of |gpibDpvt| which contains the information needed to call
the low level drivers: |asynCommon, asynOctet, and asynGpib.| Note
that | asynGpib| may not be present, i.e. |pasynGpib| is null.
|gpibDpvt| also contains a field |pupvt| which can be used by the
convert routine. Is is initialized to null. The macro |gpibCmdGet|
can be used to get the address of |gpibCmd| which contains other
usefull information.
Your convert routine can start something like:
static int myConvert(struct gpibDpvt *pgpibDpvt, int P1, int P2, char **P3)
{
asynUser *pasynUser = pgpibDpvt->pasynUser;
gpibCmd *pgpibCmd = gpibCmdGet(pgpibDpvt);
asynOctet *pasynOctet = pgpibDpvt->pasynOctet;
void *asynOctetPvt = pgpibDpvt->asynOctetPvt;
asynStatus status;
Look in devSupportGpib.h for the definitions of gpibCmd, which contains
the info in the gpibCmd in your source code.
I think Eric Norum has an example of how to implement GPIBCVTIO.
Marty Kraimer
- References:
- RE: ASYN command string with null character Bruins, Stefan
- Navigate by Date:
- Prev:
RE: ASYN command string with null character Bruins, Stefan
- Next:
Re: ASYN command string with null character 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
2025
- Navigate by Thread:
- Prev:
RE: ASYN command string with null character Bruins, Stefan
- Next:
Re: ASYN command string with null character 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
2025