Pierre and mschmit,
I will address your issues seperately.
Pierre : Because you said that it would be okay for you to use the falling edge of your trigger signal to stop the acquisition you could use a pause trigger to accomplish this. With a pause trigger all that happens is only when the trigger line is high OR low, that is when your data will be acquired. There is an example that you can use for this, called
Cont Acq&Chart Samples- Int Clk-Pause Trigger.vi With sample clock timing or burst handshake timing, the Pause Trigger pauses an ongoing acquisition or generation. Deasserting this trigger resumes an acquisition or generation. Depending on your device, there are some additional issues you need to remember. There are discussed in more details in the NI-DAQmx Help under NI-DAQmx Device Considerations
.
You could also use the reference trigger for this if you want this trigger to occur only once. This is along the lines of my previous post.
Here is an example to accomplish that.
mschmit : It seems like what you need is a random trigger that occurs and you want the reference at that point. More like "markers" along the acquisiton of the data. If this is not the case and you just want data to stop and start the pause trigger would be an option for you as well. However, I was playing around with some other options and created an example program for you to implement "marker" triggers.
What I am using to implement this is a counter. I am connecting the AI Sample Clock to the source and the Trigger to the Sample clock of the counter. Below is a
rough diagram to represent this better.

I have also attached my code that I got to work using this method. One thing to note would be that a timeout error occurs when I stop the code because there is no rising edge on the sample clock of the counter (also the trigger for the analog acquisiton) to latch the last values.
The code that I have attached gets an array of all the timestamps at which the trigger occurred. You can now use this to sort through your acquired data. You can use the attached code and modify it to your needs.
Hope all of this helps.
Regards,
Message Edited by Raajit L on 05-16-2007 04:36 PM
Raajit L
National Instruments