From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed loops using an external trigger and my DAQ board

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.

 

However,

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 ?

 

Thank you,

Melanie

0 Kudos
Message 1 of 5
(3,144 Views)

Hi Melanie!

 

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!

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,118 Views)

Hi,

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.

 

Melanie

 

 

 

 

0 Kudos
Message 3 of 5
(3,090 Views)

Hi Melanie!

 

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!

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,075 Views)

Hi, 

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.

Download All
0 Kudos
Message 5 of 5
(2,822 Views)