LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Channels to Spreadsheet

I am using LabVIEW 8.6 with a USB-6229 DAQ to measure voltages from load cells and string pots to help me generate Load vs. Displacement curves for materials testing in our test lab.  I am relatively new to LabView but I've gone through every tutorial I can get my hands on and looked at example code to help me generate my program.  What I am trying to do with this program is:

 

  • take data from the DAQ and continuously monitor it (as little as 1 channel as many as 10 channels, determined by user on front panel drop down menu)
  • enable user to input data acquisition sample rate for each channel and scale for the real time graph "monitor"
  • enable user to stop the acquisition and have the data saved to one spreadsheet file and have the user prompted for a file save name
  • Data in the spreadsheet has a time column and the label of each data channel at the top of the data columns as well as a header with a time stamp of the current date


I currently have a program I found that works well (see attached files), however, when I try and duplicate the code in the same program to add more data channels, I get a "specific resource is reserved" error and it only records one data channel.  Please Help!

Tim

0 Kudos
Message 1 of 7
(3,783 Views)
hi...what do you mean with "duplicate the code"? this error show you that you are trying to use the same channel on the same devide twice at the same time...i think you must to multiplex the task or use another channel.
0 Kudos
Message 2 of 7
(3,775 Views)

Sapingo,

thanks, I made the horribly simple mistake of thinking that I could just "copy and paste" the entire block diagram to add an additional channel.  I would like to be able to choose from the front panel how many channels I want to use, be able to continuously monitor those channels during the course of the test, and upon conclusion, write all of the data to one spreadsheet file.  Hope that helps clarify my issue,

thanks,

Tim

0 Kudos
Message 3 of 7
(3,773 Views)
i recommend you to implement all physiscs channel u need usind DAQ express and after that use cluster option to be able to save all entire data in only one spreadsheet. aditionally u can use split signal option to separate all data from DAQ adquisicion and graphic separetly
0 Kudos
Message 4 of 7
(3,771 Views)

The correct way to add more channels is with the physical channel control and use a single task for all channels. You click on the little arrow on the right side and select Browse. Then you can use the Shift-click or Ctrl-click to select consecutive or non-consecutive channels.

 

I would also recomend that you wire the data from the DAQmx Read to the Export Waveforms to Spreadsheet File. What you are doing is going to result in the loss of all timing information in the saved file.

0 Kudos
Message 5 of 7
(3,760 Views)

Thanks,

using the physical channel control worked perfectly.  As for using "Export Waveforms to Spreadsheet File" I am getting a broken wire on the file input paths (see pics).  If I try and run it without connecting this path, it gives me a file save prompt every iteration.  How should I properly wire this?

thanks for you help!

Tim

Download All
0 Kudos
Message 6 of 7
(3,737 Views)
Under the "File I/O" palette is an additional palette called "Advanced File Functions".  In that palette you will find a function labeled "refnum to path".  Use that function to convert the refnum you have to a path (apparently required by the "write file" function you're using).
0 Kudos
Message 7 of 7
(3,726 Views)