Experimental Physics and
| |||||||||||||||||
|
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.
| ||||||||||||||||
ANJ, 17 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |