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: | Re: read status nin "" 0 error with |
From: | Ana Malagon <[email protected]> |
To: | Eric Norum <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Wed, 10 Dec 2014 11:20:36 -0800 |
record(ao, "$(SIGGEN):SET:FREQ")
{
field(DESC, "Set Frequency output MHz")
field(EGU,"MHz")
field(SCAN, "Passive")
field(DTYP, "AG83620B")
field(OUT, "#L$(L) A$(A) @3")
field(FLNK, "$(SIGGEN):GET:FREQ")
}
record(ai, "$(SIGGEN):GET:FREQ")
{
field(DESC, "Query Frequency ouput MHz")
field(EGU,"MHz")
field(SCAN, "Passive")
field(DTYP, "AG83620B")
field(INP, "#L$(L) A$(A) @4 CPP")
field(PINI, "YES")
}
and the corresponding commands in the c file:
/* Param 3 -- Set Output Frequency MHz */
{&DSET_AO, GPIBWRITE, IB_Q_HIGH, NULL, "FREQ:CW %1.5f MHZ", 0, 200, NULL, 0\
, 0, NULL, NULL, NULL},
/* Param 4 -- Get Output Frequency MHz */
{&DSET_AI, GPIBREAD, IB_Q_HIGH, "FREQ:CW?", NULL, 80, 200, readData, 1, 0, \
NULL, NULL, NULL},
where readData is the function:
static int readData(struct gpibDpvt *pdpvt,int P1, int P2, char**P3) {
struct aiRecord *pai=(struct aiRecord *)pdpvt->precord;
double meas =(double)atof(pdpvt->msg);
pai->val = meas;
if (P1==1) pai->val/=1e6;
pai->udf = 0;
return 0;
}
The IOC doesn’t seem to be actually sending out any request to the instrument. Please send the database that defines the record in question.
Also — I suggest that you use StreamDevice rather than devGpib. There’s a tutorial for that in HowToDoSerial_StreamDevice.html
--
Eric Norum
[email protected]