/* @(#)GNC Version 1.4: : R3361 */
/******************************************************************************
 *
 * The following define statements are used to declare the names to be used
 * for the dset tables.   
 *
 * NOTE: The dsets are referenced by the entries in the command table.
 *
 ******************************************************************************/

#defineDSET_AI devAiR3361Gpib
#defineDSET_AO devAoR3361Gpib
#defineDSET_BI devBiR3361Gpib
#defineDSET_BO devBoR3361Gpib
#defineDSET_SI devSiR3361Gpib
#defineDSET_SO devSoR3361Gpib
#defineDSET_LI devLiR3361Gpib
#defineDSET_LO devLoR3361Gpib
#defineDSET_MBBI devMbbiR3361Gpib
#defineDSET_MBBO devMbboR3361Gpib
#defineDSET_WF devWfR3361Gpib
#include <devGpib.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <devCommonGpib.h> #include <errlog.h> #include <menuFtype.h> #include <epicsStdio.h> #define STATIC static # line 2 "../devR3361Gpib.gt" static float get_onedata(char wa1[]); static int rd_data(char wav[], float temp[]); static int rd_datab(unsigned char wav[], unsigned short temp[]); static int rd_wf_data(struct gpibDpvt *pdpvt, int p1, int p2, char **p3); /****************************************************************************** * * Define all the dset's. * * Note that the dset names are provided via the #define lines at the top of * this file. * * Other than for the debugging flag(s), these DSETs are the only items that * will appear in the global name space within the IOC. * * The last 3 items in the DSET structure are used to point to the parm * structure, the work functions used for each record type, and the srq * handler for each record type. * ******************************************************************************/ /****************************************************************************** * * Debugging flags that can be accessed from the shell. * ******************************************************************************/ int R3361Debug = 0; /****************************************************************************** * * Use the TIME_WINDOW defn to indicate how long commands should be ignored * for a given device after it times out. The ignored commands will be * returned as errors to device support. * * Use the DMA_TIME to define how long you wish to wait for an I/O operation * to complete once started. * * These are to be declared in 60ths of a second. * ******************************************************************************/
#define TIMEWINDOW1
#define TIMEOUT1
/****************************************************************************** * * Strings used by the init routines to fill in the znam, onam, ... * fields in BI and BO record types. * ******************************************************************************/ static unsigned long GDL_BinaryNameVal[] = { 0 ,1 }; static char *MkfcnameList[] = { "OFF", "ON" }; static struct devGpibNames Mkfcname = { 2, MkfcnameList, GDL_BinaryNameVal, 1 }; /****************************************************************************** * * Structures used by the init routines to fill in the onst, twst,... and the * onvl, twvl,... fields in MBBI and MBBO record types. * * Note that the intExtSsBm and intExtSsBmStop structures use the same * intExtSsBmStopList and intExtSsBmStopVal lists but have a different number * of elements in them that they use... The intExtSsBm structure only represents * 4 elements, while the intExtSsBmStop structure represents 5. * ******************************************************************************/ static char *XdbnList[] = { "10dB/" ,"5dB/" ,"2dB/" ,"1dB/" ,"0.5dB/" ,"0.2dB/" ,"0.1dB/" }; static unsigned long XdbnVal[] = { 0 ,1 ,2 ,3 ,4 ,5 ,6 }; static struct devGpibNames Xdbn = { 7, XdbnList, XdbnVal, 3 }; static char *ViewNameList[] = { "A" ,"B" ,"C" }; static unsigned long ViewNameVal[] = { 0 ,1 ,2 }; static struct devGpibNames ViewName = { 3, ViewNameList, ViewNameVal, 2 }; static char *DivNameList[] = { "8div" ,"12div" ,"N/A" }; static unsigned long DivNameVal[] = { 0 ,1 ,2 }; static struct devGpibNames DivName = { 3, DivNameList, DivNameVal, 2 }; /****************************************************************************** * * String arrays for EFAST operations. Note that the last entry must be * NULL. * * On input operations, only as many bytes as are found in the string array * elements are compared. If there are more bytes than that in the input * message, they are ignored. The first matching string found (starting * from the 0'th element) will be used as a match. * * NOTE: For the input operations, the strings are compared literally! This * can cause problems if the instrument is returning things like \r and \n * characters. You must take care when defining input strings so you include * them as well. * ******************************************************************************/ static char *(Xdbe[])={"0","1","2","3","4","5","6",NULL}; static char *(Mkfcmode[])={"MKFC OFF;\r\n","MKFC ON;\r\n",NULL}; static char *(ViewMode[])={"VIEW TRA;\r\n","VIEW TRB;\r\n","VIEW TRC;\r\n",NULL}; static char *(DivMode[])={"0","1","2",NULL}; /****************************************************************************** * * Array of structures that define all GPIB messages * supported for this type of instrument. * ******************************************************************************/ #define EOSLN NULL static struct gpibCmd gpibCmds[] = { /* CMMAND 0 set_center_freq */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 CF%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 1 get_center_freq */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "HD0 DL0 CF?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 2 set_start_freq */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 FA%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL,EOSLN }, /* CMMAND 3 get_start_freq */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 FA?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 4 set_stop_freq */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 FB%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 5 get_stop_freq */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 FB?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 6 set_center_freq_step */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 CS %lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 7 set_center_freq_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 CA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 8 get_center_freq_step */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 CS?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 9 set_span */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 SP%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 10 get_span */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 SP?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 11 set_rbw */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 RB%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 12 set_rbw_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 13 get_rbw */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 RB?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 14 set_vbw */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 VB%lfHZ\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 15 set_vbw_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 VA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 16 get_vbw */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 VB?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 17 set_sweep */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 SW%lfSC\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 18 set_sweep_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AS\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 19 get_sweep */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "HD0 DL0 SW?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 20 set_attenuation */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AT%lfDB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 21 set_attenuation_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 22 get_attenuation */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 AT?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 23 set_couple_all_auto */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AL\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 24 set_log_scale */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 DD%lfDB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 25 get_log_scale */ {&DSET_MBBI, GPIBEFASTI, IB_Q_LOW, "DL0 DD?\r\n", NULL, 0, 32, NULL, 0, 0, Xdbe, &Xdbn, EOSLN }, /* CMMAND 26 set_reference_level */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 RE%lfDB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 27 get_reference_level */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "HD0 DL0 RE?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 28 set_tgpwr */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TGL%lfDB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 29 set_tgpwr_on */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TG\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 30 set_tgpwr_off */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TGF\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 31 get_tgpwr */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "DL0 TGL?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 32 set_srccal */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TGA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 33 set_title */ {&DSET_SO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 LON/%s/\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 34 set_title_off */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 LOF\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 35 get_trace_a */ {&DSET_WF, GPIBREADW, IB_Q_LOW, "DL0 SI S0 SR HD0 DL2 TBA?", NULL, 0, 819100, rd_wf_data, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 36 get_trace_b */ {&DSET_WF, GPIBREAD, IB_Q_LOW, "HD0 DL2 TBB?", NULL, 0, 819100, rd_wf_data, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 37 set_trigger_single */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 SI\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 38 set_trigger_start */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 SR\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 39 set_trigegr_cont */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 FR\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 40 set_trace_a_clrw */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 CWA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 41 set_trace_b_clrw */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 CWB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 42 set_marker_peak */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 PS\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 43 set_marker_on */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 MN\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 44 set_market_off */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 MO\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 45 set_marker_delta */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 MT\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 46 set_marker_normal */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 MK\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 47 get_marker_freq */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "HD0 DL0 MF?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 48 get_marker_amp */ {&DSET_AI, GPIBREAD, IB_Q_LOW, "HD0 DL0 ML?\r\n", "%lf\r\n", 0, 1024, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 49 set_view_traceA */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TA\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 50 set_view_traceB */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 TB\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 51 set_sa_init */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 IP\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 52 set_trace_writeA */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AW\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 53 set_trace_writeB */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BW\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 54 set_trace_viewA */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AV\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 55 set_trace_viewB */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BV\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 56 set_trace_maxholdA */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AM\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 57 set_trace_maxholdB */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BM\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 58 set_trace_vavgA */ {&DSET_LO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AG%d\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 59 set_trace_vavgA_start */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AGR\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 60 set_trace_vavgA_stop */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 AGS\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 61 set_header_off */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "HD0 DL0 S2\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 62 set_trace_vavgB */ {&DSET_LO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BG%d\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 63 set_trace_vavgB_start */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BGR\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 64 set_trace_vavgB_stop */ {&DSET_AO, GPIBWRITE, IB_Q_LOW, NULL, "DL0 BGS\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 65 set_srccal_man */ {&DSET_LO, GPIBWRITE, IB_Q_LOW, NULL, "TGM %d\r\n", 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 66 set_srq_on */ {&DSET_SO, GPIBCMD, IB_Q_LOW, "DL0 S0\r\n", NULL, 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 67 set_srq_off */ {&DSET_SO, GPIBCMD, IB_Q_LOW, "DL0 S1\r\n", NULL, 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 68 UNSolicited_SRQ */ {&DSET_SO, GPIBCMD, IB_Q_LOW, "DL0 S2\r\n", NULL, 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 69 set_div_8 */ {&DSET_SO, GPIBCMD, IB_Q_LOW, "DL0 DV0\r\n", NULL, 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 70 set_div_12 */ {&DSET_SO, GPIBCMD, IB_Q_LOW, "DL0 DV1\r\n", NULL, 0, 32, NULL, 0, 0, NULL, NULL, EOSLN }, /* CMMAND 71 get_divnum */ {&DSET_MBBI, GPIBEFASTI, IB_Q_LOW, "DL0 DV?\r\n", NULL, 0, 32, NULL, 0, 0, DivMode, &DivName, EOSLN } }; /* The following is the number of elements in the command array above. */
#define NUMPARAMSsizeof(gpibCmds)/sizeof(struct gpibCmd)
/****************************************************************************** * * Structure containing the user's functions and operating parameters needed * by the gpib library functions. * * The magic SRQ parm is the parm number that, if specified on a passive * record, will cause the record to be processed automatically when an * unsolicited SRQ interrupt is detected from the device. * * If the parm is specified on a non-passive record, it will NOT be processed * when an unsolicited SRQ is detected. * * In the future, the magic SRQ parm records will be processed as "I/O event * scanned"... not passive. * ******************************************************************************/ static long init_ai(int parm) { if(parm==0) { devSupParms.name = "devR3361Gpib"; devSupParms.gpibCmds = gpibCmds; devSupParms.numparams = NUMPARAMS; devSupParms.timeout = TIMEOUT; devSupParms.timeWindow = TIMEWINDOW; devSupParms.respond2Writes = -1.0; } return(0); } /****************************************************************************** * * Initialization for device support * This is called one time before any records are initialized with a parm * value of 0. And then again AFTER all record-level init is complete * with a param value of 1. * ******************************************************************************/ /****************************************************************************** * * Print a report of operating statistics for all devices supported by this * module. * * This function will no longer be required after epics 3.3 is released * ******************************************************************************/ /****************************************************************************** * * c code * *****************************************************************************/ # line 120 "../devR3361Gpib.gt"
#defineR3361_GOODBITS0x3f
#define R3361_UNCAL0x1
#define R3361_ENDCAL0x2
#define R3361_ENDSW 0x4
#define R3361_ENDAV0x8
#define R3361_ERR0x20
static float get_onedata(char wa1[]) { return atof(wa1); } static int rd_data(char wav[], float data[]) { int i; char wa1[81910]; strcpy(wa1,strtok(wav,"\r\n")); data[0]=get_onedata(wa1); for (i=1; i<701; i++) { strcpy(wa1,strtok(NULL,"\r\n"));
/*printf("wa1=%s\n",wa1); */
data[i] = get_onedata(wa1); } return 0; } static int rd_datab(unsigned char wav[], unsigned short data[]) { int i; for (i=0; i<701; i++) { data[i]= wav[i*2]*256+wav[i*2+1]; } return 0; } STATIC int rd_wf_data(struct gpibDpvt *pdpvt, int p1, int p2, char **p3) { struct waveformRecord *pwf = (struct waveformRecord *) (pdpvt->precord);
unsigned char*craw;
unsigned short *temparray; unsigned short temp[81910],*ptemp;
ints[81910],ok_flag;
unsigned longnumElem;
temparray = (unsigned short *) pwf->bptr; craw = pdpvt->msg;
/*logMsg("craw = %s\n",craw);
printf("craw -- end\n");*/
/* craw = strtok(craw,"\r\n"); if (craw == NULL) { devGpibLib_setPvSevr(pwf, READ_ALARM, INVALID_ALARM); logMsg("null data in R3361\n"); return(ERROR); } */ ok_flag = rd_datab(craw,temp); /* logMsg("1,2,3,4 %d %d %d %d\n",temp[0],temp[1],temp[2],temp[3]); */ if (ok_flag != 0) { /* devGpibLib_setPvSevr(pwf,READ_ALARM, INVALID_ALARM); logMsg("Not OK R3361\n"); return(ERROR); */ } numElem = 701; if (numElem > pwf->nelm) numElem = pwf->nelm; pwf->nord = numElem;
ptemp=temp;
while (numElem--) {
/* logMsg( "\n%d-th data: %f",numElem, *ptemp); */
*temparray++ = (unsigned short) *ptemp++; } /* logMsg( "\nread_wf end normally\n"); */ return(0); } # line 236 "../devR3361Gpib.gt"