LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from a text file

I am trying to read and display data held in a text file.

The text file has 11 fields and up to 3600 lines. The data held in each field is numerical data.
A programme written in �C� collects serial data, formats and appends data to the text file every 960 milliseconds.

I am trying to:

1/Display three of the data fields as waveform charts and the remaining eight as digital indicators.
2/Update all of the above displays every 960 milliseconds.
3/If possible start and stop the �C� programme from the Labview user interface.

I have managed to read the data in and view on a waveform chart using the Read from spreadsheet.vi.

Problems encountered:

1/I could not stack the waveform chart which would give me the three waveform di
splays.
2/I could not get displays on digital indicators.
3/Although I set the file path each time I run the programme I am asked to re-enter the file path.
4/Changing some of the attributes on the Read from spreadsheet.vi. did not change the waveform display.

Could you offer me at least a starting point.

Many Thanks
0 Kudos
Message 1 of 2
(2,614 Views)
I can try to help you out on some of these:

1. I'm not sure what you mean with this one. You can build an array with the waveforms and pass them to a chart to plot all three at the same time.
2. The digital indicator is a tough one to troubleshoot. Make sure that the values you are reading from the file are correct ( 1 or 0 ).
3. If you are using the Open/Create/Replace File VI, you can set the advisory dialog to False. This way, it will not keep asking you if you want to rewrite the file. In order to keep it from asking for the file name, just pass in a constant for the path name instead of leaving it unwired.
J.R. Allen
0 Kudos
Message 2 of 2
(2,614 Views)