LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage vs. Time Plotting issues - LabVIEW 8.0 - NI USB 6009

Hello,
 
     I'm trying to create a VI that will log two voltage measurements with respect to time, as well as plot the measurements continously as they're being logged. I'm attempting to do this with an NI USB 6009, using LabView 8.0. I haven't been able to sucessful acheive this, and am open to suggestion.
     What I've done so far is create to routines for logging the measurements, one which logs based upon for loop iterations, which are controlled by measurement frequency (therefore indirect timing), and is controlled by DAQmx tasks, and one which uses a timed loop and a DAQ assistant. My problem with this approach is that I cannot run both of the routines at once... and of course that they use two separate plots.
     I understand the vagueness of my above description, therefore please find attached a copy of my VI so far:

0 Kudos
Message 1 of 5
(5,940 Views)

I'm sorry but nothing about your program makes much sense. You cannot use the event structure that way since you don't have it inside a while loop. Do not use run continuous mode!

Pick one architecture - either the lower level DAQmx functions or the DAQ Assistant. I don't think you really need to use the timed loop structure but if you do, the button to stop it must be inside the loop. Instead of a single sample, seOtherwise, the loop will not be able to detect the change of the Boolean. The same is true if you use a normal while loop.

If you use the lower level DAQmx functions, you need to put the DAQmx Read inside a loop. Otherwise you will only get a single reading. I don't understand at all what you are trying to do with the XY Graph. You said you wanted the data plotted versus time. If you were to simply wire the output of the DQmx Read to a normal graph, you would plot the two signals versus time.

Have you looked at the shipping examples? There are a couple that will acquire, plot, and log continuously (i.e. Cont Acq&Graph voltage - Write Data to File). Start with those and modify as needed.

0 Kudos
Message 2 of 5
(5,932 Views)
I checked your VI and I don't think there's a need to use software timing for the aquisition. I recommend setting the aquisition mode in DAQ assistant to continous at a rate of 1 K instead.
The attached VI shows how to continously acquire two analog channels and log the data in a spread sheet.
You will have to change the physical channels in DAQ assistant. To do that, Double click on the "DAQ assist " VI on the block diagram, delete the existing channels, and add the channels that are configured on your computer.
Hope that will work for you.
 
 
Faris Alhorr
Applications Engineer
National Instruments
Bueller
0 Kudos
Message 3 of 5
(5,891 Views)

Thanks for posting this with the example.  I am a beginner with Labview and I am trying to pull two voltage signals out of a cyclicvoltammety instrument and I couldn't figure out how to separate the outputs for two different graphs.  This is exactly what I needed.  I need to study more about arrays and clusters and when data types need to be converted.

 

Thanks

0 Kudos
Message 4 of 5
(5,144 Views)

Hi Bueller,

 

Thank you for your example. I'm doing similar stuff to record 3 channels voltage output from an instrument. Then log a time series data in every second, but only record the 30 second average data.

 

My question is how I can do data averaging process with your example, and how to record the data with the clock of computer such as 10:30:00, 10:30:30,...etc instead of Time (s) 0, 30, 60, 90...etc.

 

Thanks a lot

0 Kudos
Message 5 of 5
(4,840 Views)