LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to: save individual daq channel aquisitions

I'm new to daq's and labVIEW, and I've been reading and trying to understand tutorials provided by NI and IOtech for the daq3000 board we have. The simple question is - can anyone provide me with a good book or other source that should help me build or modify VIs in order to save data on 8 specific channels at 1Khz for a specific peroid of time?

 

The hard question could be - how in the world do you do it? I've been using the attached two VIs, but documentation on writing to files seems limited. I've found when I try to write to a file (LVM) I get something like the following, which isn't very useful. There are about 100 of these blocks. At the least, it would be nice to have all the samples in one row, or one column. 

 

Also, if someone could clarify scan rate and number of scans to aquire that would be very useful. If the scan rate is 1000 and the number of scans is 100, does that mean it will grab 100 scans of 1Khz so you'd have 1 measurement every 1/1000th of a second adding up to .1 seconds of data?

 

This data comes from 1 channel recieving a sin wave at about 2.5v p-p. 

 

Channels 100      
Samples 1 1 1 1
Date ######## ######## ######## ########
Time 40:06.0 40:05.7 40:05.7 40:05.7
X_Dimension Time Time Time Time
X0 0.00E+00 0.00E+00 0.00E+00 0.00E+00
Delta_X 1 1 1 1
***End_of_Header***    
X_Value Untitled Untitled 1 Untitled 2 Untitled 3
0 0.434278 -1.05808 -2.12561 -2.36061
         
Channels 100      
Samples 1 1 1 1
Date ######## ######## ######## ########
Time 40:06.0 40:05.9 40:05.9 40:05.9
X_Dimension Time Time Time Time
X0 0.00E+00 0.00E+00 0.00E+00 0.00E+00
Delta_X 1 1 1 1
***End_of_Header***    
X_Value Untitled Untitled 1 Untitled 2 Untitled 3
0 0.430921 -1.06052 -2.12714 -2.35908
Download All
0 Kudos
Message 1 of 6
(3,072 Views)

In terms of writing to files, probably the most useful thing you could do would be to write it to a spreadsheet file.  Lot easier than just about anything else, plus you can read it with excel.

 

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 2 of 6
(3,068 Views)

Hi:

 

First of all, your understanding of how the acquisition rate and the number of samples works is correct.

 

As for your data output, it appears that it's transposed.  Instead of 1 channel and 100 samples, it's reading as 100 channels with 1 sample.  How are you doing the file write?  It appears that you are using the Write to Measurement File Express VI but there's no file writing in the VIs you attached.  Let us know how you're doing this and we should be able to help some more.

 

For those interested, the required subVIs for the IOtech DaqBoard/3000 can be found here.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 3 of 6
(3,044 Views)

Thanks for the information!

 

Are there any books you could recommend for using daqs with labview? Really all I need to do is be able to output an analog signal and then recieve analog signals on 8 channels, which from what i've read is well within the means of the board. I'm just not sure I can accomplish it simply by using express VIs.

 

Also, to the poster who suggested using outputing the data to a spreadsheet, I can't seem to provide a path to save the file. When I provide one within the front pane, it still seems to default to asking where to save the file, over and over, as if it's either looped or not getting an acceptable answer.

0 Kudos
Message 4 of 6
(3,025 Views)

To find a book I would just search the discussion forum or put it into a search engine.  There are a lot of suggestions out there.  The other thing I would do is look for materials from the manufacturer of your DAQ card.  Hopefully they have some examples or documentation that will be helpful to you.

 

Good luck with your application!

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 5 of 6
(3,012 Views)

Hi LSUGrad,

          Here's a great place to look for books and manuals for programming in LabVIEW: National Instruments Books and Publications .  As well, have you tried wiring a constant file path to your 'write to file' VI- I'm not entirely sure what the problem is, but it might be a workaround to simply hard wire a file path rather than using a dialog box.  Happy Programming!

 

Message 6 of 6
(3,000 Views)