LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuously Acquiring Data With Multiple Consecutive Files

I am using Labview 7.0 Full Development Package, and I have found a example VI named Continuously_Acquiring_Multiple_Consecutive_Files.zip. I am trying to continuously acquire data on 2 channels, and save data to a file so its remains a reasonable size. The example works but when you open the data file it looks like garbage? I would also like to slow down the sample rate, (the change in data is not happening to fast) but unsure where to make the change. Any help would be appreciated. Thanks
0 Kudos
Message 1 of 9
(3,534 Views)
Hi,

There are two VIs in this .llb. One is to create the .dat file and the other will read it. To slow down the sample rate, lower the scan rate. If you use the context help (Crtl H), and hover your mouse over the scan rate input, it will tell you that this is equivalent to the sample rate. Have a Great Day!

George
0 Kudos
Message 2 of 9
(3,512 Views)
I am making progress with the vi. I changed the data from binary to numbers, and I also added a graph. Now I am having a hard time organizing the data file that is saved. I would like to have the date, time (in ms) in to test since run button was pressed, # of iterations, and the channels that are selected to appear on the data file in columns with the appropiate channel names at the top. Can anyone look at this and help me i am stuck.
0 Kudos
Message 3 of 9
(3,507 Views)
From looking at your VI, it seems that you are trying to save your data as binary data while you at the same time want to add an ASCII (text) header. Since you also mention that you want columns and rows I am assuming that you want to save the data as a spreadsheet file (ASCII) that can be viewed from programs like Microsoft Excel and Notepad.

I will recommend you to look at the "Write LabVIEW Measurement File" Express VI that was introduced with LabVIEW 7. It is extremely easy to use and you just have to wire your waveform data from "AI Read.vi" to it. You can chose what header and other information you want to save in the file. The file (*.lvm) will then be readable in any spreadsheet editor e.g. Microsoft Excel.

If your version of LabVIEW is older than 7 you should use the "Export Waveforms To Spreadsheet File.vi" from the Waveform palette. It saves the date and timing information in the first columns next to the acquired data.

In both cases you should change the "AI Read.vi" to output Waveform data by right-clicking on "AI Read.vi" and choosing "Select Type >> Waveform".

If you want complete examples for acquiring and saving your data, search for "spreadsheet" examples.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 9
(3,488 Views)
Thanks for the replies but I dont see how to incorporate the export waveform to spreadsheet file.vi while still being able to create multiple files that save the data at a given time interval. The export waveform to spreadsheet file.vi prompts you for a directory to save to, I select a directory and it prompts me again.

Yes I want to save the data to a spreadsheet file like excel. No binary data should be saved. The only reason there was binary data being saved was because that's what the example had included with it.

Any suggestions?
0 Kudos
Message 5 of 9
(3,476 Views)
Hello,

I am just working on a project as described by you. You can adjust the sampling rate, number of samples and the plot speed ( by altering the X-Axis span ) from the front panel. The card used was a PCMCIA 6024E.

I have attached the VI which will give you some idea of the whole thing. But I am not sure if you are using LV7 - the Write LV measurement file.vi is highly modular and extremely powerful. I have configured it to write to a directory of my choice and add fresh files when the data gets larger than 100kb and all files are named with a date/time stamp. So easy to retrieve and view them if you configure a macro in Excel. And right now it is configured to get a snapshot that is decided by the sampling rate - if you find that this is too much of data, slow it down by opening a reloading counter inside the timed loop, and write to the file in the true case of count = 0. Reload the counter in the false case.

Hope that helps...


Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 6 of 9
(3,468 Views)
Sorry I have Labview 7.0 and the file was created with Labview 7.1.
0 Kudos
Message 7 of 9
(3,447 Views)
I was told in Labview class that Express Vi's take more time to process the data rather than traditional vi's. Is there any truth behind that statement? Also Express Vi's need DAQMX so if I try and use this Express Vi on an older card that does not support DAQMX it will not work.

I would much rather use traditional vi's to understand more of how each vi interacts with each other. Also, when to use say.... feature1 rather than feature2 sort of thing. Thanks for all the input.
0 Kudos
Message 8 of 9
(3,445 Views)
Express VIs are built using many low-level VIs, but at the same time they are built to be very efficient. In most cases you shouldn't worry about the small overhead that they add. In most cases you would have to be a very good programmer to create code as efficient as the Express VIs if you do it yourself. I would only recommend you to create the low-level code yourself if the functionality you want is not offered by the Express VI.

Only the DAQ Assistant needs NI-DAQmx. Express VIs in general do not need the DAQmx driver.

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 9 of 9
(3,437 Views)