07-30-2009 12:26 PM
My goal is to acquire data for an amount of time corresponding to the time and length of a TTL pulse with a user defined pretrigger window. I'm successfully able to trigger data acquisition with my TTL pulse on a digital channel but I'm not sure how to end the sampling correctly.
This is an image of what the TTL and input data looks like:
Without a way to succesfully end the sampling when the TTL falls, I'm only able to capture this data:
I need a way to trigger without setting the right amount of samples. This is what the data acquisition section of the VI looks like as of now:
I'm using the DaqMXbase driver set. Thanks for your help.
08-03-2009 08:35 AM
If you know how long the TTL signal is high you could trigger off the falling edge of the TTL signal with a specified number of pretrigger samples. There is unfortunately nothing like a stop trigger in DAQmx.
For more information about reference triggers check out the KnowledgeBase article below
http://digital.ni.com/public.nsf/allkb/3DE994179719296D86256CB000544217?OpenDocument
08-04-2009 02:42 PM
Thanks for the reply.
I had also tried to set the sample clock to continuous samples and find something to trigger the stop sub-VI but I couldn't get anything to work.
As of now my only way to implement was to set a small, finite amount of samples with a digital start trigger with a relatively large pretrigger sample during the first triggered sampling iteration and afterwards continuously polling the trigger input and writing to an array to generate a longer sample and stop the sampling when the polling returns a low TTL.
08-05-2009 05:03 PM
Another option would be to use a counter as the sample clock for your analog input. We can then setup this counter to gate on the TTL input signal that you are triggering off of. This will cause the counter to only generate a signal when your TTL line is high, which will only cause the analog input to sample when the TTL line is high.
http://zone.ni.com/devzone/cda/tut/p/id/2760