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: 

acquire n samples on trigger contineously

Dear all,

 

I am working with a NI USB-6210 device and the ANSI C API to communicate with it.

 

I am trying to acquire an image where I have an analog input with the pixel data and a digital trigger, which triggers each line.

 

So what I am trying to set up is a task which does the following:

For each image line trigger acquire n Samples and write them to a buffer or call a callback function.

 

My first approach was to start a task for each line, but this way I am loosing lines, because the initialization of the tasks takes too long.

 

Secondly, I was trying to record the whole image with a task which has an analog and digital channel, so that I can look for the trigger pulse and read the analog values from the corresponding index in the buffer. This apparently is not support by my USB device.

 

So my questions are:

Does anyone know a solution which works with my USB-6210 device or how I can setup a task which acquires a specific number of samples every trigger pulse?

If this is for sure not possible with the USB-6210 device, which device would support the sampling of digital input, so that I can implement my second approach?

 

Many thanks in advance for any hint.

 

Best regards

 

Martin

0 Kudos
Message 1 of 2
(2,501 Views)

Hello Martin,

 

i think that what you need is a retriggerable Finite Aquisition. With Your Device this is only possible using Counters.

You will have to create a Counter Output Task that generates the Number of Pulses required.

You will have to set this Task to be retriggerable using the property DAQmxSetStartTrigRetriggerable.

You than can use the Internal Output of the Counter to "Clock" your Analog Aquisition.

 

This should do the trick ...

 

Best Regards!

 

Moritz M.

 

 

0 Kudos
Message 2 of 2
(2,477 Views)