10-13-2011 01:34 AM
Hi Jason,
I understand what you're saying.
Could you point to me any VI example which demonstrates what I need to do? (acquiring analog signal using a triggering train of 150 triggers)
Thanks,
Abe
10-13-2011 01:35 AM
Hi Jason,
I understand what you're saying.
Could you point to me any VI example which demonstrates what I need to do? (acquiring analog signal using a triggering train of 150 triggers)
Thanks,
Abe
10-13-2011 10:30 AM
Hi Abe,
I don't think you really need an example for this. You are practically almost there. I would just trigger your signals twice as fast. If you really want to see an example, the closest thing I can find would be under Tools -> Find Examples -> Hardware Input and Output -> DAQmx -> Analog Measurements -> Voltage -> Acq&Graph Voltage-Int Clk-Retriggerable.vi . Once again, just try triggering your trigger signal twice as fast within the same time frame.
Jason L
10-13-2011 10:54 AM
Hello Jason,
What exactly do you mean by saying : I would just trigger your signals twice as fast ?
In my while loop I use the following three DAQmx VIs in the following order:
(1) Configure Triggering Task (rising edge) -> (2) Read data from task -> (3) stop task
These three operations are running in a while loop until 150 triggers were detected (this is the stop condition of the while loop).
Unfortunately, the code detects only 75 of them, so the loop obviosuly never ends.
My question is : how would you modify the operations order (bolded text above) in order to implement your suggestion?
Thanks,
Abe
10-13-2011 10:59 AM
Abe,
I was referring to your hardware setup, not software. What are you using to trigger your task? Your triggering task can only detect rising or falling edges, not both. So I was thinking that when you trigger, you are toggling a signal. Everytime you toggle, the trigger will have a falling edge or a rising edge. If this is the case, then only every other toggle will trigger the task, thus you are only seeing half the triggers.
Jason L.
10-13-2011 11:53 AM
Okay, the triggering signal which I used is composed of 150 pulses. The time difference between two consecutive pulses in this train is ~200ms.
In my application I need to detect only the rising edge of these pulses - which is 150 as well.
You are correct that I have both rising and falling edges, but I have 150 of each one of them as I have 150 pulses altogether.
As far as I uderstand, if I'm coding correctly, the task should identify the 150 rising edges of these 150 pulses, but it detects only 75 of them.
Abe
10-13-2011 11:56 AM
I would not start and stop the triggering, but use the trigger to clock a sample and keep reading until all samples are in.
Maybe you need to configure your triggering a bit more dedictated.
But if you look carefully through the examples and are not affraid to try to understand all crazy names in the example folder you should be able to find a correct example.
10-13-2011 12:00 PM
Did you look at the example mentioned? Is your code actually starting and stopping the task with each iteration? If so, stop doing that. Starting and stopping a task is a lengthy process and you may be simply taking too long and hence missing half of the triggers.