08-13-2010 11:47 AM
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.
08-13-2010 12:10 PM
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.
08-16-2010 10:23 AM
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,