NI PXI-5404
Generating a Clock Signal (Square Wave)
- Initialize an NI-FGEN session for the appropriate device (niFgen Initialize VI or niFgen_init function).
- Set the appropriate standard function properties or attributes for the desired generation.
Properties Attribute Value Waveform NIFGEN_ATTR_FUNC_WAVEFORM NIFGEN_VAL_WFM_SQUARE Frequency NIFGEN_ATTR_FUNC_FREQUENCY the desired frequency (Hz), 0 MHz to 105 MHz Amplitude NIFGEN_ATTR_FUNC_AMPLITUDE the desired amplitude (Vpk-pk into a high impedance load), 1.8 V, 3.3 V, or 5 V Duty Cycle High NIFGEN_ATTR_FUNC_DUTY_CYCLE_HIGH The desired duty cycle (%), legal values vary by the frequency - Initiate the generation (niFgen_InitiateGeneration). The square wave should be generated at CLOCK out.
- 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 clock signal (square wave) example for various ADEs.
ADE | Path |
---|---|
LabVIEW | <LabVIEW>\examples\instr\niFgen\niFgen_5404_Clock_Generation_Example.vi |
LabWindows/CVI | <CVI>\Samples\niFgen\ClockGeneration5404.prj |
C++ | <MeasurementStudio>\VC\Examples\niFgen\niFgen_5404_Clock_Generation_Example.dsw |
Visual Basic | <MeasurementStudio>\VB\Samples\niFgen\5404_Clock_Example.vbp |
Standard C | <Program Files>\IVI\Drivers\niFgen\Examples\c\ClockGeneration5404.c |