From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set minimum trigger delay for analog acquisition in LabWindows/CVI

Here's a different one: I need to set the trigger delay for a PCIe-6361 acquiring analog data using a digital rising-edge trigger. Using "status = DAQmxSetTrigAttribute (taskhandle, DAQmx_StartTrig_Delay, 0.0);" to start with; the user can set the trigger delay later.

 

When the program runs, I get the attached error:

"Delay from the start trigger is shorter than the shortest delay that can be generated using the onboard clock with a timebase suitable for generating the sample clock"; "Property: DAQmx_StartTrig_Delay"; "Corresponding Value: 0.000"; "Minimum Value: 20.0e-9"; "Status Code: -200333".

 

Huh? This is not documented anywhere that I can find. Is there a command to simply set it to the minimum value? For that matter, what precisely is this delay - I obviously have a misunderstanding somewhere.

0 Kudos
Message 1 of 3
(3,251 Views)

The really annoying thing is that the triggering units (set with DAQSetTrigAttribute (taskhandle, DAQmx_StartTrig_DelayUnits....) default to ticks, with a mimimum value of 4, which is 20ns (20e-9). When I set the units to seconds (DAQmx_Val_Seconds) the value is still 4 - seconds! It does not adjust the current trigger delay value accordingly when you change the units. And I was wondering why data acquisition was taking forever to get started.

0 Kudos
Message 2 of 3
(3,250 Views)

Hi pblase,

 

Here is the code that I used:


DAQmxSetStartTrigDelayUnits(taskHandle , DAQmx_Val_Seconds);
DAQmxSetStartTrigDelay(taskHandle, .00000002
);

 

This works, but the value passed (.0000002) is the minimum value.  This property delays the time between the trigger and the event that you are triggering by the value supplied.  If you need to set this back to no delay you can use this function.

 

DAQmxResetStartTrigDelay(TaskHandle taskHandle);

 

I hope this helps out, if not post back with questions!


Regards,

Dustin D

0 Kudos
Message 3 of 3
(3,218 Views)