LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure voltage vs time using NI USB 6009

Hi all, 

 

I am beginner Labview user and I was wondering if yall could guide me through what I'm trying to do.  It should be very simple.  

 

I want to use my USB 6009 DAQ device to take a voltage sample from a battery every number of arbitrary seconds that I set.  (Lets say every 30 seconds, but I want to be able to change it to whatever number of seconds I want).  I know how to use the DAQ assistant, but what settings do I choose or what should I add into the graphical program in order to let me select the number of seconds that overlaps before a sample is taken??

 

I want to plot that voltage vs. elapsed time and have it so at the end of say 2 hours, I can stop the data acquisition and see the entire voltage vs. time behavior on the graph.  (do I use Waveform chart, waveform graph or XY graph?  What special options do I need to select?)

 

I also want to make sure somehow that there are not too many data points taken and the earliest ones are overidden (how do I make sure of this?)

 

Thanks for your help, 

Kevin

0 Kudos
Message 1 of 10
(4,514 Views)

Most importantly, I would like to know how to make the Waveform Chart from overriding the earliest data points once it reaches its limit.  Is there a way?  Or should I not even be using Waveform Charts to do what I stated above?

 

Thanks!!

0 Kudos
Message 2 of 10
(4,501 Views)

I built such a system in 2008-9.  Because I was running it on a Mac, I used DAQmx Base rather than the DAQ Assistant.  I have no experience with the DAQ Assistant so I cannot tell you how to set it or even whether it can conveniently be done.  Using the DAQ drivers directly takes a bit more work initially but allows you complete control over the timing and other aspects of your DAQ process.

 

My program ran for several months taking data every 12 minutes.  It switched loads on and off as well.  Data was plotted on the screen and saved to a file.  The architecture was a state machine with the user interface handled by an event structure. A single loop was adequate due to the low data rates.  The state machine case structure was inside the Timeout case of the event structure. It calculated power, charge, and energy from the measured voltage, current, and time.  The number of cells it could monitor simultaneously depended on the test mode.

 

Lynn

0 Kudos
Message 3 of 10
(4,496 Views)

Hi Lynn, 

 

Do you still have a snapshot of your system?

 

Thanks!

0 Kudos
Message 4 of 10
(4,487 Views)

I still have some of the code.  What version of LV are you using?

 

Lynn

0 Kudos
Message 5 of 10
(4,482 Views)
I'm using the most recent evaluation version I think LV 2010.
0 Kudos
Message 6 of 10
(4,480 Views)

I don't use the DAQ Assistant either but I know it's not a data logger.  You'll still have to put it in a loop that has the wait function in it to time the data acquisition.  There are lots of examples of this type of simple logging program in  the help.

 

To make your chart stop scrolling off the end you can right-click it and set the 'chart history length' to something larger than the number of points you expect to collect.  There are better ways to display long history data using labVIEW but the chart is designed to do it most easily.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 10
(4,472 Views)

Hi Kevin

 

Sound like a fun project.  You should be using an XY graph because your time will be arbitray and could change during a run.  You will want to use a shift register to store your data because the XY graph does not have a history.  As far as the daq assistant goes, set it for one sample (on demand) and it will read one data point every time you call it, then use a WAIT function in the loop to set your timing.  This will allow you to adjust your time inbetween reads.

 

NOTE:  This will work as long as your data set is not getting to big.  If you need to store a lot of data, write the data to a file that you can read back after your test is over.  You can keep the shift register as a small data buffer, may 5000 samples.  If you need to now how to make a buffer do a search, there should be a lot of posts about that topic.

 

Good luck

0 Kudos
Message 8 of 10
(4,455 Views)

Hi stellarow12!!

In these days I have focused on the subject that covers the measuring voltage with usb 6009..I have to complete this project in 2 weeks..Since I keep on my intern in the company and this is my responsibility..If you got the necessary knowledge to achieve to do this project, can you guide me through this topic?? Can you send me your file which has .vi extension??

0 Kudos
Message 9 of 10
(4,297 Views)

This project should take you 15 minutes if you have labview and daqmx installed. 

 

Plug your device into the computer. Open Measurement and Automation Explorer (Start->All Programs-> National Instruments) and make sure you can see the device under "Devices and Interfaces" 

 

Go to labview, Open Help->Find Examples->Hardware Input and Output->Daqmx->Analog measurements->Voltage->Cont Acq&Graph Voltage-Int Clck.vi. Select your device and run the vi.

 

These links will help you understand what is going on: 

http://www.ni.com/gettingstarted/

http://zone.ni.com/devzone/cda/tut/p/id/5434

 

Also, you will want to create a new thread in the future for questions like this. 

 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 10 of 10
(4,284 Views)