PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-5413 Burst Standard Waveform

I am having trouble configuring the PXIe-5413 function generator to operate in burst mode. The device works as intended when configured to operate continuously after receiving a software trigger. When I execute the section of code below, the InitiateGeneration returns with the error “Invalid value for parameter or property”. I tried removing that call and the SendSoftwareTrigger returns a ‘Specified operation can be performed only when the task is running’ error. If the IVIFGEN_VAL_OPERATE_BURST is replaced with IVIFGEN_VAL_OPERATE_CONTINOUS, after the 5.0 second wait and software trigger the sine wave appears on the output.

 

// IVI_Session is valid, device initiated.

IviFgen_AbortGeneration(IVI_Session);

IviFgen_ConfigureOutputMode (IVI_Session, IVIFGEN_VAL_OUTPUT_FUNC); IviFgen_ConfigureStandardWaveform (IVI_Session, ChanName, IVIFGEN_VAL_WFM_SINE,0.5, 0.0,1000,0);

IviFgen_ConfigureOperationMode (IVI_Session, ChanName, IVIFGEN_VAL_OPERATE_BURST);

IviFgen_ConfigureTriggerSource (IVI_Session, ChanName, IVIFGEN_VAL_SOFTWARE_TRIG);                            

IviFgen_ConfigureStartTrigger (IVI_Session, ChanName, IVIFGEN_VAL_TRIGGER_SOURCE_SOFTWARE, IVIFGEN_VAL_TRIGGER_POSITIVE);

IviFgen_SetAttributeViInt32 (IVI_Session, ChanName,IVIFGEN_ATTR_BURST_COUNT,50);

IviFgen_ConfigureOutputEnabled (IVI_Session,"",VI_TRUE);                                                                         

IviFgen_InitiateGeneration (IVI_Session);                                                                                              

Delay(5.0);

IviFgen_SendSoftwareTrigger (IVI_Session);

 

NI FGEN version 17.5.0 and IVI compliance package 16.0

0 Kudos
Message 1 of 2
(521 Views)

Hello kellyd822,

 

What development environment are you using this code in? Have you checked the NI FGEN reference help documentation?

Best regards,

Ryan B.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(491 Views)