Showing results for 
Search instead for 
Did you mean: 

Using 1st voltage output to trigger measurement of 2nd voltage and logging data

Hello, I am working on a project that requires data logging using a NI USB 6008 logger from 2 sensors that both produce a continuous analogue voltage that will vary depending on sensor position. I need to design a program that logs the voltage produced by the sensors at a particular point, however the complicated part is I need the 1st sensor to trigger a data log of both sensors as it increases by a set voltage increment (say 0.1V) and continue to log data each time the voltage increases by this increment. i.e use the output voltage from the 1st sensor as an input for the 2nd. I have very little experience using Labview but have to use it as its the only software that the daq board supports. Any help or advice would be greatly appreciated! (I have access to Labview 2012.)

                                                                                                                               Thanks, John Russell


0 Kudos
Message 1 of 2

Hi John,


Thanks for posting. 


Since you are unfamiliar with LabVIEW, I recommend we start from the basics of your project and build it up gradually. The first thing your VI needs to do is acquire voltage data from the USB 6008. This piece of hardware is software-timed, so the first recommendation would be to take a look at the Analog Input - SW Timed example built in to the example finder. You can locate the example at the following location:

Example Finder -> Hardware Input and Output -> DAQmx -> Analog Input -> Voltage - SW-Timed


By selecting the arrow on the control labelled 'Physical Channel' and choosing 'Browse', you can browse to your device and, holding shift or control on your keyboard, select multiple channels (therefore sensors) to retrieve data from. 


In terms of logging your data, there are also several examples built in to encompass a variety of data-logging situations. In fact, there is an example that triggers the logging of data. You can access these examples (and the triggered example in particular) by navigating to the following location:


Example Finder -> Fundamentals -> File Input and Output -> TDMS - Write data(triggered).vi 


Understanding these two as individual examples should make it quite simple to integrate the logging of data with the actual acquisition. From there, you can continue to develop the more difficult aspects of the code. 


ShalimarA | CLA
0 Kudos
Message 2 of 2