PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help streaming data to disk

I have enclosed a simple vi where I'm streaming data to disk and then would like to read the data (analyze it). I'm not a avid user in LV but would like to understand this concept. I'm having problems reading the data. Is anyone experienced in this arena?
0 Kudos
Message 1 of 4
(3,490 Views)
Hello,

I have taken a look at the vi you attached and have discovered where some problems may be arising. First your For and While loops do not know when to finish. You must give them some sort of termination element whether it be a certain number of iterations or end of file. However, the main problem you are running into is that you are trying to write and read from a file at the same time. The read is actually trying to read from a file that does not yet exist or have data. You must have these be sequential. When the write finishes then you can begin the read. You can do this by using a Sequence Structure from the Structures Palette.
I would also like to suggest using the examples in the Example Finder in the Help menu as a starting point. You can search for read and write to find examples you can incorporate. Also there is one example Read from Binary File that I believe you will find useful in your application.

Thanks,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 2 of 4
(3,473 Views)
Caroline,
Thanks for responding. I see many examples of writing to file and reading from file. I also see examples of writing to a datalogger. I'm trying to write multiple channels of data to file so, don't know the advantages/disadvantages of either method. I'm trying to determine the best way to write data from multiple transducers to file, open the data file then do my analysis (frequency analysis). I've been using labview for about 6 months and attended Basics 1 and 2 so still learning alot.

Scott
0 Kudos
Message 3 of 4
(3,469 Views)
Hello Scott,

There are really three different types of files you can write: binary, text, and datalog. Each has its own advantages and disadvantages. Depending on your needs, you can weigh these options for your application. Each will work with multiple plots and channels. Another discussion forum posting gives a great list of the advantages and disadvantages of each method. This porting can be found at:
http://forums.ni.com/ni/board/message?board.id=170&message.id=88187&requireLogin=False

Thanks,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 4 of 4
(3,450 Views)