EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  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  <20142015  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
Thanks for the quick reply! I had looked into StreamDevice before but had some trouble compiling my application with it- I'll look into it again, though.

Here's the record definition for getting and setting the frequency:

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;

}


On Wed, Dec 10, 2014 at 10:39 AM, Eric Norum <[email protected]> wrote:
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]



Replies:
Re: read status nin "" 0 error with Eric Norum
References:
read status nin "" 0 error with Ana Malagon
Re: read status nin "" 0 error with Eric Norum

Navigate by Date:
Prev: Acromag IP520 EPICS support Ron Sluiter
Next: Re: read status nin "" 0 error with Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: read status nin "" 0 error with Eric Norum
Next: Re: read status nin "" 0 error with Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·