Reading The Data Questionable Status Register Using Visa And C - Keysight Technologies X-Series Programming Manual

Signal generators
Hide thumbs Also See for X-Series:
Table of Contents

Advertisement

Programming Examples
GPIB Programming Interface Examples
#1 state
complete
complete
#1
complete flag
generator
complete
complete
manual mode\n");
}

Reading the Data Questionable Status Register Using VISA and C

In this example, the signal generator's data questionable status register is
read. You will be asked to set up the signal generator for error generating
conditions. The data questionable status register will be read and the program
will notify the user of the error condition that the setup caused. Follow the user
prompts presented when the program runs. Launch Microsoft Visual C++ 6.0,
add the required files, and enter the following code into your .cpp source file.
visaex9.cpp performs the following functions:
104
viPrintf(vi, "*RCL 1\n");
viPrintf(vi, "*OPC?\n");
while (!lngDone)
viScanf (vi ,"%d",&lngDone);
printf("The signal generator has been returned to it's Register
printf("Press Enter to continue\n");
printf("\n");
getch();
lngDone=0;
viPrintf(vi, "*RST\n");
viPrintf(vi, "*OPC?\n");
while (!lngDone)
viScanf (vi ,"%d",&lngDone);
printf("Press Local on instrument front panel to return to
printf("\n");
viClose(vi);
viClose(defaultRM);
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
// Recalls stored register
// Checks for operation
// Waits for setup to
// Print user information
state\n");
// Prints new line character
// Waits for user input
// Reset the operation
// Resets the signal
// Checks for operation
// Waits for setup to
// Print user information
// Prints new line character
// Close the sessions

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents