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?
Solved! Go to Solution.
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)
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.