From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Extract Data from Waveform Chart to Txt File ?

Solved!
Go to solution

Hey Guys,

I have some doubts as follow:

A. How can I create a single top label for time and amplitude, whenever I am running the program top label is replicating with the while loop. I would like to write my text file for AMp vs Time! Did Created proper time indicator in the block diagram?

B. I would like to see my waveform chart from 0sec  whenever I run my program but It always shows the elapsed time. I also tried using the property node (History Data) but I don't know exactly how to use that. Any Suggestion?

Labviewcode.png

 

 

0 Kudos
Message 1 of 4
(2,662 Views)
Solution
Accepted by skdubey

A) Label is replicating because you are writing it every loop iteration. Add one more File write (of the label only) before the loop.

 

Note: I do not like Concatenate strings if it has more than 3 inputs. Options:

a) Single string: If you change its Display to "\ codes display" (right click), you can write "\t" for delimiter and "\n" for new line 

b) Array of strings and Spreadsheet string to array.

c) Format into string if any part is a variable

 

B) Write empty array into history data, it will clear chart.

 

Note: remove bundle-unbundle pair by mr. Goldberg. Use "Cluster to array" if have bundle to wire cluster to Chart. (time should be first). Or build separately from bundle if you want different order (time to be the 2-nd column in file).

 

PS (edit) calculating sine of integers is strange. If you want to see sine function, scale index (or time t) by Pi and period T. Y = sine (2 Pi * t / T)

Message 2 of 4
(2,623 Views)
Solution
Accepted by skdubey

Thanks ALexander, I done the suggested correction and it works! 

 

Solution Example4.png

0 Kudos
Message 3 of 4
(2,579 Views)

You still need to get rid of that bundle/unbundle combination you've got at the top center of your while loop!

 

Also use Block Diagram Cleanup to get rid of unnecessary wire bends, hidden wires, and backwards running wires.

Message 4 of 4
(2,569 Views)