05-13-2014 05:06 PM
I've written a VI that streams data to a TDMS file when the user specifies using the DAQmx Read Logging.Pause property. Now I would like to add the capability to stream the data to the file using a hardware reference trigger. I want to use a reference trigger because I need the data pre and post trigger.
The task has 34 channels sampling at 10000 Hz. One of the channels is the source for the digital reference trigger. The trigger is rising edge step function.
I'm getting error -200284 when I call the DAQmx Read function for any timeout value not equal to -1. If I set timeout to -1 I never see the trigger. I know the source gets the trigger because I can see it in MAX and in the data file produced in the original configuration. How am I incorrectly implementing the trigger?
05-14-2014 10:26 AM
Hey,
It sounds like it may just be that your read vi is timing out before the trigger occurs. That error message basically just means that your read vi timed out before it got the samples to read. You might want to try putting the read vi outside the loop before you start the task, and just have a "DAQmx Is Task Done.vi" inside the loop waiting for the read.
05-14-2014 11:26 AM
When logging and reading there a a few caveats about buffer sizes and samples per channel that you must pay attention to!
Read This section of the DAQmx Help file
05-14-2014 02:33 PM
is this what you mean?
05-14-2014 06:02 PM
That would be one way to avoid the "log and read" caveats and should perform quite well.