
Remote Control
Users Guide
6-6
fprintf(stderr,"%s failed, status 0x%lX\n",func,status); \
return 1; \
} \
}
ViStatus status;
(void) argc;
(void) argv;
/* Open default resource manager: */
status = viOpenDefaultRM (&rm);
CHECK_STATUS(status < VI_SUCCESS,"viOpenDefaultRM()",status);
/* Open VISA session to the instrument: */
status = viOpen (rm,RSRC_NAME,VI_NULL,0,&vi);
CHECK_STATUS(status != VI_SUCCESS,"viOpen()",status);
#if INTFC == INTFC_RS232
/* set RS-232 I/O attributes (transmission parameters): */
viSetAttribute (vi, VI_ATTR_ASRL_BAUD, RSRC_ATTR_BAUD);
viSetAttribute (vi, VI_ATTR_ASRL_FLOW_CNTRL, RSRC_ATTR_FLOW_CNTRL);
#endif
/* Query the instrument's ID string: */
viPrintf (vi, "*IDN?\n");
/* Read the ID string into buffer: */
viRead (vi, buffer, 256, &retCnt);
/* Print contens of the buffer on screen: */
printf (buffer);
/* Bring the instrument into default state: */
viPrintf (vi, "*RST\n");
/* Close VISA session to the instrument: */
status = viClose (vi);
CHECK_STATUS(status != VI_SUCCESS,"viClose(vi)",status);
/* Close session to the default resource manager: */
status = viClose(rm);
CHECK_STATUS(status != VI_SUCCESS,"viClose(rm)",status);
return 0;
#undef CHECK_STATUS
}
Perform Simple Power Measurement
Valid signals should be connected to the input channels of instrument, otherwise the
measured value can be invalid.
/*
* MEASURE POWER (wait synchronously)
*
* This program will open VISA session to the instrument and perform a simple
Summary of Contents for NORMA 4000 Operators
Page 6: ...Remote Control Users Guide iv ...
Page 8: ...Remote Control Users Guide vi ...
Page 10: ...Remote Control Users Guide viii ...
Page 26: ...Remote Control Users Guide 2 2 ...
Page 38: ...Remote Control Users Guide 3 2 ...
Page 50: ...Remote Control Users Guide 4 2 ...
Page 150: ...Remote Control Users Guide 4 102 ...
Page 152: ...Remote Control Users Guide 5 2 ...
Page 160: ...Remote Control Users Guide 6 2 ...
Page 184: ...Remote Control Users Guide 6 26 ...