I forgot to add that you can also specify a single command table entry with GPIBSRQHANDLER:
GPIBSRQHANDLER
This is used to handle an unsolicited SRQ from gpibAddr, i.e. a device raises SRQ when a read wait, e.g. GPIBREADW or GPIBEFASTIW, is not active. This request is implemented only for longin records. When the device issues an SRQ, the status byte is put into the val field and the record is processed. It is expected that the record will forward link to records that issue GPIB commands to read the information that caused the SRQ.
On Aug 17, 2010, at 7:44 AM, Hinko Kocevar wrote:
> Hi,
>
> I've created a device support for simple GPIB according to the
> http://www.aps.anl.gov/epics/modules/soft/asyn/R4-14/HowToDoSerial/tutorial.pdf
> guide. I can get the data from the device as expected.
>
> Versions: EPICS R3.14.10, Asyn 4-14.
>
> I've added the SCAN field to my record:
>
> record(stringin, "$(P)$(R)VOL:N5V")
> {
> field(DESC, "Read -5V voltage")
> field(DTYP, "RFClock")
> field(INP, "#L$(L) A$(A) @4")
> field(SCAN, "I/O Intr")
> }
>
> At IOC startup I get following message:
> PV: FOO:BAR:VOL:N5V scanAdd: I/O Intr not valid (no get_ioint_info)
>
> After Googling a bit I found some pointers in 4_3_DeviceSupport_APS.pdf,
> but I'm a bit confused how to actually implement modification in my
> device support.
>
> If I understand correctly, I need to setup my own DSET with the
> get_ioint_info being defined. Done that:
>
> static long get_ioint_info (int cmd, struct stringinRecord *si,
> IOSCANPVT *ppvt)
> {
> printf("%s:%d ENTER\n", __FUNCTION__, __LINE__);
>
> return 0;
> }
>
> static gDset DSET_SI_IOSCAN = {
> 6,
> {0, 0, devGpib_initSi, get_ioint_info, devGpib_readSi, 0},
> &devSupParms
> };
> epicsExportAddress(dset,DSET_SI_IOSCAN);
>
> Modified the struct gpibCmd gpibCmds[] = {
> ...
> /* Param 4 - Read the -5V voltage */
> /*{&DSET_SI, GPIBREAD, IB_Q_HIGH, "VOL:N5V?", "VOL:N5V %s\r\nOK", 0, 80,
> NULL, 0, 0, NULL, NULL, NULL},*/
> {&DSET_SI_IOSCAN, GPIBREAD, IB_Q_HIGH, "VOL:N5V?", "VOL:N5V %s\r\nOK",
> 0, 80, NULL, 0, 0, NULL, NULL, NULL},
>
> ...
> };
>
> Now at IOC startup I get following messages:
> FOO:BAR:VOL:N5V : init_record : record type invalid for spec'd GPIB param#4
> PV: FOO:BAR:VOL:N5V scanAdd: I/O Intr not valid (no get_ioint_info)
>
>
>
> Not really sure what needs to done from here on.
>
>
> Best regards,
> Hinko
>
> --
> Hinko Kocevar
> Technical support software engineer
> Instrumentation Technologies d.d.
> Velika pot 22, SI-5250 Solkan - Slovenia
> T:+386 5 3352600, F:+386 5 3352601
> mailto: [email protected]
>
> http://www.i-tech.si - When your users demand stability
>
> The information transmitted is intended solely for the addressee and may
> contain confidential and/or privileged information. Any review, retention,
> disclosure or other use by persons other than the intended recipient is
> prohibited. If you received this in error, please notify the sender and
> delete all copies.
--
Eric Norum
[email protected]
- References:
- Asyn and I/O intr scanning Hinko Kocevar
- Navigate by Date:
- Prev:
Re: Asyn and I/O intr scanning Eric Norum
- Next:
Runtime Input Question Andrew Wagner
- 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: Asyn and I/O intr scanning Hinko Kocevar
- Next:
Runtime Input Question Andrew Wagner
- 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
|