04-18-2012 06:17 AM
Hello,
I attempted to use an external signal as the start and stop trigger for the analog data input. I had searched for solutions and mostly they suggest to use a reference trigger. But I don't really understand the way it is applied. For example, why it should be defined the number of pre-trigger samples? For me, the number of samples that are taken should be those between the start and stop trigger... I didn't really get it.
Migne
Solved! Go to Solution.
04-23-2012 08:07 AM
Hello Migne,
As you noticed it, there is no Stop Trigger readily available with DAQmx. You indeed need to use the Reference Trigger if you want to trigger the end of the acquisition. What does actually a Reference Trigger do on a task is to start a kind of continuous acquisition untill the trigger occur. Then, by default you will get a certain number of samples before (pre-trigger) and after (post-trigger) the trigger edge when you read the buffer, after the trigger event has occured.
In order to be able to read the data continuously during the acquisition, you need to modify a property to change the access mode when reading. You also need to properly handle the reading of the buffer has you certainly won't get the same amount of samples at the last reading.
A more detailed explanation as long as an example can be found there --> http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB?OpenDocument