LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

refresh channel data from text file

Hi,

 

I have text files coming in, each to add 250 values to a channel every 30 seconds.  I am writing some code to massage the incoming data, and append the 4 channels to a single text file.

 

So I have 4 channels in a text file which continues to grow.

 

How do I make Diadem display all new data as the text file grows, to show analysis on the channel data in real-time?

 

Thanks!

My text file looks like this, and will grow by new lines as I receive them:

 

height,width,length,volume
15.00,13.460125,13.196651,12.123
13.404634,13.545893,13.171975,12.234
15.10,13.460125,13.196651,12.345
13.404634,13.545893,13.171975,12.456

0 Kudos
Message 1 of 7
(3,221 Views)

Is the data from older tests? Or is it data that is continously being read?

You can just use the 'read from spreadsheet file' to get all the data from the file into an array.

Then you can append the new data onto the end of that array, and send the new 2D array to a waveform chart or XY graph depending on how your data is spaced.

Cory K
0 Kudos
Message 2 of 7
(3,214 Views)

The data is coming in every 30 seconds, at which point my VB.NET code will append all the new values to the big text file.

 


You can just use the 'read from spreadsheet file' to get all the data from the file into an array.

 

How/where is this done?  Is this a manual operation?  I need this to be automatic.  The customer needs to see real, live data as it is generated.

0 Kudos
Message 3 of 7
(3,208 Views)
I mis-posted, so not sure if this is clear, but I am working with Diadem...
0 Kudos
Message 4 of 7
(3,206 Views)

In your LabVIEW palette, look under

Programming >> Array >> Read From Spreadsheet File.vi

 

You can use the 'All Rows' output to get a 2D array of the data.

If you put this operation in a while loop, with a 30 second (wait), it will continously read the newest data.

Just remove the first row, since it will just be column headings.

 

Then you can send this data to a waveform graph.


I'm sorry I cant visually show you some code, I do not have LabVIEW on the computer I am using right now.

Maybe someone else can show you a quick example

Cory K
0 Kudos
Message 5 of 7
(3,205 Views)

I am not working with Labview, this is all being done in DIADEM.  I posted to the wrong forum.  Sorry for the confusion!

0 Kudos
Message 6 of 7
(3,203 Views)
This post was moved to the Diadem board and can be found here.
0 Kudos
Message 7 of 7
(3,160 Views)