54
Chapter 2
Basic Operation
Using the Programmatic Interfaces
B
a
si
c Op
er
at
io
n
.int main(int argc, char* argv[])
{
ViStatus rc;
ViRsrc resourceName = "PXI4::10::INSTR"; // Set
this to
// match your hardware
ViBoolean IDQuery = VI_FALSE;
ViBoolean resetDevice = VI_TRUE;
ViSession session = 0;
ViInt32 wfmHandle1;
ViInt32 wfmHandle2;
int i;
double twopi;
double if Wfm[WFM_LENGTH];
double Fsig = 500e6; // Set this to a CW frequency
// <= 500 MHz
double Fs = 1.25e9; // Sample Clock Frequency
// Initialize N6030A and setup session handle
rc = AGN6030A_init(resourceName, IDQuery,
resetDevice, &session);
if ( rc != VI_SUCCESS )
return -1;
// Setup some Channel 1 states
// Set to single-ended operation, filter on,
// 500 MHz filter selected
rc = AGN6030A_ConfigureOutputConfiguration(session,
"1", AGN6030A_VAL_CONFIGURATION_SINGLE_ENDED,
VI_TRUE, 500e6);
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com