07-26-2011 09:29 AM
I want to use an external signal to control the repetition rate of a timed loop.
Inside the loop I would like to use a clock from my DAQ board, so I can do timing to sub millisecond intervals.
Inside the loop I will be acquiring the data from a camera.
I do not need to use the DAQ board either to generate the trigger for the timed loop, nor to acquire the data.
all the examples I find for timed loops with DAQmx assume you are acquiring and generating data with your DAQ board. They use eg a counter so you have acquired the data before you start the timed loop, which is the opposite of what I want to do.
I don't know what I can take out of these examples, and what to leave in.
Does anyone have an example I can copy ?
07-29-2011 12:32 PM
To help me understand this issue a little better, can you let me know what hardware you are using? Also, what have you tried so far that hasn't worked? When you say timed loop, are you refering to Real-Time programming or to the Daq-mx time loop function? Finally, have you searched in the NI Example Finder? You can get to it by opening LabVIEW and then going to Help-> Find Examples. Thanks!
08-01-2011 04:35 AM
thanks for reply.
I have a PCI 6221 DAQ board.
All the DAQmx examples are like "black magic". If what you want to do is like one of the standard examples, that's easy. You just copy the example, maybe change a few rates or other details. It works, you have no idea why or how, but that doesn't matter if it "does the job".
If what you want to do is different, it's very difficult because you have little idea of what happens "under the lid".
So what you have to do is take things out (things you think you don't need, because you are not actually measuring those types of signals). Then it seems to work for a while, later on you find you have to put some of it back, some invisible process "under the lid" was important, after all.
The people who put up the examples obviously know how it's operating "under the lid", but the DAQ course is just more of "this is what you do", very little on how it works.
I've now found a couple of examples on the NI website, I will try and combine what I think will work then get back to you if I have a problem (I'm on holiday this week really, so it will be next week).
Thanks again for your questions..........I think this is a fundamental issue with DAQ.
08-02-2011 04:51 PM
I hope you are able to work with the examples to get your program to work. Just let me know how it goes and have a wonderful holiday!
07-31-2012 03:21 AM
I'm using NI-USB 6218 for acquiring data from 16 ultrasonic sensors (ai0-ai15). The sensors triggered by 16 pulsed train trigger signals (connected to PFI0) that comes from a microcontroller. My plan is to use the timed loop so that, each time rising edge at trigger signal is detected the timed loop at the VI will acquire data from each sensors sequentially. My problem is my VI has errors and I really don't have any ideas how to resolve it. Need your advice.