Programming Examples
12
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
847
* The commands in the extras function are shown for reference
* purposes only.
*/
/* extra(); */
/* <-- Uncomment to execute the extra function */
capture();
analyze();
/* Close session */
viClose(vi);
viClose(defaultRM);
printf ("Program execution is complete...\n");
}
/*
* initialize
* ------------------------------------------------------------------
* This function initializes both the interface and the oscilloscope
* to a known state.
*/
void initialize (void)
{
/* RESET - This command puts the oscilloscope in a known state.
* Without this command, the oscilloscope settings are unknown.
* This command is very important for program control.
*
* Many of the following initialization commands are initialized
* by this command.
It is not necessary to reinitialize them
* unless you want to change the default setting.
*/
viPrintf(vi, "*RST\n");
/* Write the *IDN? string and send an EOI indicator, then read
* the response into buf.
viQueryf(vi, "*IDN?\n", "%t", buf);
printf("%s\n", buf);
*/
/* AUTOSCALE - This command evaluates all the input signals and
* sets the correct conditions to display all of the active signals.
*/
viPrintf(vi, ":AUTOSCALE\n");
/* CHANNEL_PROBE - Sets the probe attenuation factor for the
* selected channel.
The probe attenuation factor may be from
* 0.1 to 1000.
*/
viPrintf(vi, ":CHAN1:PROBE 10\n");
/* CHANNEL_RANGE - Sets the full scale vertical range in volts.
* The range value is eight times the volts per division.
*/
viPrintf(vi, ":CHANNEL1:RANGE 8\n");
/* TIME_RANGE - Sets the full scale horizontal time in seconds.
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...