I have a one shot pulse that is generated by a counter that I need to trigger a one shot sine wave from a PXI-5406 function generator.
I have tried to do this using the Function Generator softpanel provided by NI and I was able to produce the single sinewave output. When I tried to apply it using VB and DAQmx, it didn't work.
I copied the settings to my program that I used in the FunctionGenerator SoftPanel. The settings are as follow:
Mode---Frequency sweep of standard functions
TriggerType---Hardware
TriggerSource---PFI1
TriggerMode---Stepped
SignalOutput---Sinewave
StartFrequency---1000
StopFrequency---1000
Discrete Steps---2
Spacing---Linear
Amplitude---3
DCOffset---0 VDC
Below is my code that I am having problems with. Please help me out.
CheckError (niFgen_init("FunctionGenerator", True, True, GeneratorHandle))
CheckError (niFgen_AbortGeneration(GeneratorHandle))
CheckError (niFgen_ConfigureOutputMode(GeneratorHandle, NIFGEN_VAL_OUTPUT_FUNC))
CheckError (niFgen_ConfigureStandardWaveform(GeneratorHandle, "0", NIFGEN_VAL_WFM_SINE, 3.0, 0, 1000, 0))
CheckError (niFgen_ConfigureTriggerMode(GeneratorHandle, "0", NIFGEN_VAL_STEPPED))
CheckError (niFgen_ConfigureDigitalEdgeStartTrigger(GeneratorHandle, "PFI1", NIFGEN_VAL_RISING_EDGE))
CheckError (niFgen_ConfigureOutputEnabled(GeneratorHandle, "0", True))
CheckError (niFgen_InitiateGeneration(GeneratorHandle))
Thanks in advance for all your help.