
64
Chapter 2
Basic Operation
Using Programmatic Interfaces
ifWfm[i] = sin(twopi * (Fsig/Fs) * (double)i);
}
// Set N8241A output mode to ARB in preparation of
// downloading and playing our waveform.
rc = AGN6030A_ConfigureOutputMode(session,
AGN6030A_VAL_OUTPUT_ARB);
if (rc != VI_SUCCESS)
return -1;
// Download the waveform to both channels 1 and 2
// even if 2is not used. This is a requirement at
// this time and must be followed!! To do this,
// call the function twice and discard the second
// waveform handle if Channel 2 is not used.
rc = AGN6030A_CreateArbWaveform(session, WFM_LENGTH,
ifWfm, &wfmHandle1);
if (rc != VI_SUCCESS)
return -1;
rc = AGN6030A_CreateArbWaveform(session, WFM_LENGTH,
ifWfm, &wfmHandle2);
if (rc != VI_SUCCESS)
return -1;
// Configure N8241A to play downloaded waveforms.
// Set to 250 mV gain and 0V offset.
rc = AGN6030A_ConfigureArbWaveform(session, "1",
wfmHandle1, 0.250, 0.0);
if (rc != VI_SUCCESS)
return -1;
rc = AGN6030A_ConfigureArbWaveform(session, "2",
wfmHandle2, 0.250, 0.0);
if (rc != VI_SUCCESS)
return -1;
// Close the open session
rc = AGN6030A_close(session);
return 0;
Summary of Contents for N8241A
Page 8: ...7...
Page 9: ...8...
Page 33: ...34 Chapter 1 Introducing the N8241 2A AWGs Maintenance...
Page 64: ...Chapter 2 65 Basic Operation Using Programmatic Interfaces...
Page 65: ...66 Chapter 2 Basic Operation Using Programmatic Interfaces...
Page 76: ...Chapter 3 77 Theory of Operation Waveform Playback Figure 3 3 Waveform Play Flow Chart...
Page 91: ...92 Chapter 3 Theory of Operation Multiple Module Synchronization...
Page 109: ...110 Chapter 5 Direct Digital Synthesis Option 330 Theory of Operation Figure 5 7 DDS...