NI PXI-5404
Generating a Sine Wave
Complete the following steps to generate a sine wave with the NI PXI-5404
- Initialize an NI-FGEN session to the appropriate device (niFgen Initialize VI or niFgen_init function).
- Set the appropriate standard function properties or attributes for the desired generation.
Property Attribute Value Waveform NIFGEN_ATTR_FUNC_WAVEFORM NIFGEN_VAL_WFM_SINE Frequency NIFGEN_ATTR_FUNC_FREQUENCY Desired frequency (Hz), 0 MHz to 105 MHz Amplitude NIFGEN_ATTR_FUNC_AMPLITUDE Desired amplitude (Vpk-pk into a 50 Ω load), 1Vpk-pk to 2 Vpk-pk - Initiate the generation (niFgen Initiate Generation VI or niFgen_InitiateGeneration function). The sine wave should be generated at the SINE Out terminal.
- If you want to stop the generation, do so by disabling the output (niFgen Output Enable VI or niFgen_ConfigureOutputEnabled function) and/or aborting the generation (niFgen Abort Generation VI or niFgen_AbortGeneration function).
- Close the NI-FGEN session (niFgen Close VI or niFgen_close function).
The following table lists the NI-FGEN sine wave example for various ADEs.
ADE | Path |
---|---|
LabVIEW | <LabVIEW>\examples\instr\niFgen\niFgen_5404_Sine_Generation_Example.vi |
LabWindows/CVI | <CVI>\Samples\niFgen\SineGeneration5404.prj |
Measurement Studio C++ | <MeasurementStudio>\VC\Examples\niFgen\niFgen_5404_Sine_Generation_Example.dsw |
Visual Basic | <MeasurementStudio>\VB\Samples\niFgen\5404_Sine_Example.vbp |
Standard C | <Program Files>\IVI\Drivers\niFgen\Examples\c\SineGeneration5404.c |