LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export waveform to excel

Solved!
Go to solution

hi GerdW, 

i obtain a text file see below .

a1.PNGa2.PNG 

 

0 Kudos
Message 21 of 25
(754 Views)

You might want to re-think what you are doing.  You have a loop that runs once a second for 60 seconds.  Each time through the loop, not only do you acquire 50,000 points of data, but you append them to an existing Waveform (which requires allocating 50k points each time through the loop until you have 3 million points(!), and also graphing all of them over and over again, which may take a little time.

 

Why not simply write the 50,000 points to the file, appending as you go?  No need to have all 3 mega-points in memory, simply dump them to disk.  Also, why are you plotting 50,000 points per second?  Why not decimate by 100 and plot 500 points a second in a Chart, which will scroll for you?  [You may need to see the entire record, so a Graph might be reasonable, but you certainly can't "look at" 3 million points ...].

 

Bob Schor

 

P.S. -- you forgot to specify a File Name for your file, so I'm guessing Windows "made up" a name for you.  It should be a binary file, but I'm not really sure of the format).  Try reading it in with the Read Waveform function.

0 Kudos
Message 22 of 25
(750 Views)

Hi Emna,

 

i obtain a text file see below .

No, you get a file with a filename using a suffix of "txt" - because you set that filename…

As can be seen in the screenshot you get a Datalog file, containing the waveform data!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 23 of 25
(740 Views)

Hi GerdW

thank you very much ;

i get the acquisition in 23/ 07 /2019 . when i read the Datalog file i found that the X axis is going from ( 1012982:56:58 ) to ( 1012982:57:58 ) . i want the X axis to be Always  from 0 Seconds to 60 seconds . How to do this ? 

i want to know if its possible  able to extract the Data to Excel file ( csv or xlsx ).

( see below my  code for reading Datalog file ).

cap1.PNGCap2.PNG

 

 

0 Kudos
Message 24 of 25
(725 Views)

Interesting number that 1012982.  That is a number of hours.  Divide by 24 and you get 42207 days.  Divide by 365.25, you get about 115.5 years.  Interesting in that there are approximately 115.5 years between now July 23, 2019 and January 1, 1904, the epoch for LabVIEW time.  If you had the X axis formatted to absolute time, you'd see it has has the date and time the data was acquired.

 

If modify the waveform so that whatever t0 is now (some billions of seconds) to 0, that will give you a 0-60 second waveform.

0 Kudos
Message 25 of 25
(707 Views)