LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output

I am new to labview and have a problem with outputting to an external file

I am using LabView to gather data on various tanks in a system. The tanks have a sensor that sense what the level of the volume in them is. These sensors are to be checked every 5 seconds and an output file needs to be updated with the new level of each tank.

This program needs to monitor the tanks and constantly output the levels to a text file (or any other output system that I decide upon). The user of my system wants to be able to at anytime view what is currently in the text file so far. For example this would be what they need to see after 20. seconds

tine value1 value2
0 2 3
5 2 4
10 3 4
15 2 4
20 5 1


The client wants to be able to open the text file at anytime and see what has happened so far. I can get my data to be outputted to a table inside of labview but am having trouble outputting to a text file, how would I go about doing this? Note: the program will be constantly running.

Thanks for the help.
0 Kudos
Message 1 of 3
(2,433 Views)

Look in the example finder for examples for writing to data files.

0 Kudos
Message 2 of 3
(2,425 Views)

Hi Nakhimov,

 

I would prefer a graph display in LabView instead of a text file...

 

But well: you may use "write to spreadsheet file" to output your 2D data to a text file. (In LV before 8.0 you have to use "array to spreadsheet string" and "write text"). One problem though: when the user opens the file with an other program (like notepad) the file often gets locked for write access and your LabView program will show an error because it cannot write to that file anymore . take care of this!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,424 Views)