LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx base voltage error

I've been trying to write a VI in LV 8.6 and using DAQmxbase on a MAC OS X that will read voltage from a power supply and collected using the USB-6009 DAQ.  I want it to then plot all the data on a separate graph of voltage vs. time.

 

I was using some of the example VIs given with DAQmxbase but found some errors.  Using nidatalogger, the ready to use data acquisition and graphing program, the graph would read the correct voltage of 2V that was coming out of my power supply.  When I used some of the example VIs, I would not get the correct reading, instead the graphs would show about .5V.

 

Now when I change the channel type on the create channel to RSE and run the VI, it changes it right back to default, not sure why.

 

Any suggestions to fix my problems or know why it may be reading .5V when my power supply is set to 2v?

 

Thanks 

0 Kudos
Message 1 of 29
(4,327 Views)

well I solved my problem, I wasn't entering the correct code for the input terminal configuration in the ring constant (RSE 10083).

 

Now I can read a single voltage measurement, how do I do continuous measuring of voltage and then have all the data on a single graph of voltage vs. time? 

0 Kudos
Message 2 of 29
(4,312 Views)

Solis,

 

Please post what you have tried so far along with specific questions about the parts which do not do what you want.  It is much easier for us to help when we can look at what you have done.  We can also help you learn to use LV more effectively that way.

 

I ran a battery monitoring system for several months with an USB-6009 connected to a Mac, so it can be done.

 

Lynn 

0 Kudos
Message 3 of 29
(4,289 Views)

Here is what I have so far.  This is using daqmx base on my mac os.  

 

It is able to graph voltage vs. time if I run it on "run continuously", but I am having trouble making it also graph on a similar graph with all the data instead of just the most recent 100 seconds.  Last, I want all the data to be output on an excel sheet, but I am having trouble with this. The final program will be used to read voltage vs. time from fluorescence captured by a photomultiplier tube.

Any suggestions or help much appreciated, thanks.  

0 Kudos
Message 4 of 29
(4,226 Views)

Don't use Run Continuously.

 

Put a while loop around any code that needs to repeat.

 

Waveform charts have a limited history.  Depending on your sampling rate and the history length will determine how much long of a time period the waveform chart will show.  You can increase the history length if you want.  You can also build your data into an array (just don't let the array grow indefinitely) to gather more data to show in a waveform graph.

 

What problems are you having with saving data into Excel.  Your attached VI doesn't show any attempt at this.  One of the basic ways is to write the data to a text file by using "Write to Spreadsheet File".  This creates a text file that Excel can open.

0 Kudos
Message 5 of 29
(4,219 Views)

The first thing to do is to put your read inside a while loop. Since you are reading a single channel, why do you have the read set for N channels? Fix that and eliminate the index array. You might also want to use N Samples if you want a reliable dt on the x axis. Showing 'all data' will require some clarification from you. As you should know, a chart has a settable history length. Once the length is exceeded, older points are dropped. Obviously, you will have to decide how large to make the history buffer based on how long you want the acquisition to run and how much memory your pc has. Using a graph and constantly appending new data with the Build Array has it's own set of problems.

 

Probably the easiest way to save data for Excel is to use the Write to Spreadsheet function. I would recomend the producer/consumer architecture so the write function is in a separate loop and does not affect the acquisition timing.

Message 6 of 29
(4,217 Views)
I have made a while loop but am having some trouble, now the graph is not reading anything?  
0 Kudos
Message 7 of 29
(4,206 Views)

Of course not. You've got it outside the loop. Your file write is also in the wrong location and is not at all what I recomended with the producer/consumer design pattern.

 

Please take some time and take the free tutorials.

0 Kudos
Message 8 of 29
(4,200 Views)
I have looked at some examples of producer/consumer architecture and writing data to a file.  I am still having some trouble using these examples, and don't know how to fix the one mistaken wiring.  
0 Kudos
Message 9 of 29
(4,171 Views)
You have an incorrect data type with the obtain queue. Since you are acquiring a 1D DBL (though I have no idea why), that is what you need to initialize the queue to.
0 Kudos
Message 10 of 29
(4,165 Views)