LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Precisely timed analog inputs on DAQ-mx

I'm using labview to make a program that will send a digital pulse out and after I send out that pulse I need to take some measurements. I'd like to take measurements as close as 10us after the negative edge of that pulse. I'd like to preface that I'm terrible with labview. So far what I've been able to find is the "Is task done?: VI and I'm using that to trigger a case statement. I know that isn't going to give me precise timing since it's like a software trigger. I've been able to see that this varies from around 1us to 200us. How do I make a better trigger that will control the timing of my measurements?

0 Kudos
Message 1 of 4
(2,735 Views)

Well, depending on what DAQmx functions you are using, you can use a TTL pulse to (are you ready for this?) trigger the Analog In acquisition.  Whether you get a reading within 10 microseconds or not depends on the speed of your A/D system.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,728 Views)

Any idea which function to use? I was planning on using the "DAQmx trigger" but I need to wire a source to it, and the TTL pulse I'm sending out isn't on one of the PFI terminals. I tried moving the TTL pulse to a PFI terminal but then I get an error saying those lines do not support buffered operations.

0 Kudos
Message 3 of 4
(2,676 Views)

Hi lordmonty,

 

Learning LabVIEW can be pretty daunting at first, but there is a whole library of example programs that come pre-installed with LabVIEW that can show you design patterns and best practices to model your own code after.

 

I think you would benefit from starting with an example program to see how these types of acquisitions are configured, and then you can pattern your own code after the example.

 

In LabVIEW, go to Help>>Find Examples...

Hardware Input and Output>>DAQmx>>Voltage - Continuous Input

 

In order to get consistently timed data points, hardware timing is the way to go. Using a square wave (like Bob mentioned) and using that as your clock source is a good way to accomplish this. However, there are lots of other options available to you depending on the hardware that you have, but we can't make recommendations on what to do until we know what kind of hardware you're working with.

 

This article (below) is a great resource for understanding more about the DAQmx API functions, what they do, and how to use them. 

 

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

http://www.ni.com/product-documentation/2835/en/

 

This is an article that focuses more specifically on the DAQmx Timing and DAQmx Trigger VIs, which are the VIs that control the behavior you are trying to achieve.

Timing and Synchronization Features of NI-DAQmx

http://www.ni.com/product-documentation/4322/en/

 

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
0 Kudos
Message 4 of 4
(2,657 Views)