LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading back file for analysis purposes controlling X-axis

Alright, I lose using labview.  I use it for a ton of different projects at work.  I have been fooling around with this for a while and maybe I am just missing it.
 
Here goes, in one of my applications I record 4 AI channels at various rates (6, 600, 6000) Hz, I write the data to three different files depending on the record speed.  I create a .txt file using the "write to file" wizard.  I check the option to use one time column.  In the end I get a nice file with 5 columns the first being my time, and the other four being the data on the 4 AI channels. 
 
 Now I am trying to read this file back to graph and perform some analysis on it.  I have tried this a few different ways, with using charts and graphs.  My question is is there anyway to grab that first column and set it as my x-axis.  Right now the x-axis really dosn't make much sense.  Even if it graphed it as a sample number would be good.  Any help would be greatly appreated.
 
Thanks
Chris
 
0 Kudos
Message 1 of 8
(3,299 Views)
Hi Chris,

can you attach a (small snippet of a) data file?
Usually it should be no problem to read in the file as text and use "spreadsheet string to array" to get all data columns...
Best regards,
GerdW


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

Here is a sampling of the data I am trying to graph.  It is 4 AI channels and I am monitoring one discrete channel.

Oh yea where is the "String to spreadsheet" located on the pallette I couldn't find it last night.

 

Thanks,

Chris

 

 

0 Kudos
Message 3 of 8
(3,268 Views)
Hi Chris,

attached vi will read your data...
When you rename your txt to .lvm you may also use the "Read from measurement file" function. As I'm not using the dynamic datatype (DDT) (so far) I don't know how to separate the single signal from the output Smiley Sad - but it is shown in the properties dialog...

"Spreadsheet string to array" is located on the string palette - like any other string function too Smiley Wink
Best regards,
GerdW


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

Hi Chris,

Attached is a program which I think does what you are asking.  It uses Read From Spreadsheet File.vi to read the file, skipping the header because of the offset specified.  Then, using Index Array, the first and second columns are extracted and plotted against each other on an XY Graph. 

Jennifer R.
National Instruments
Applications Engineer
Message 5 of 8
(3,239 Views)
Hey ,
  THanks but I am still using Labview 7.1, the VIs you sent me where both for 8.5 😞
0 Kudos
Message 6 of 8
(3,221 Views)
Hi caunchman,

that's why I prefer to put all those LabView versions in my signature - other know instantly which version to useSmiley Wink

Here you go...


Best regards,
GerdW


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

Hi Chris,

Sorry about that.  Here is what I posted earlier, saved for LabVIEW 7.1. 

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(3,189 Views)