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.
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.
09-13-2019 02:06 PM
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?
Solved! Go to Solution.
09-13-2019 05:16 PM - edited 09-13-2019 05:22 PM
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)
09-13-2019 08:51 PM
Thanks ALexander, I done the suggested correction and it works!
09-13-2019 09:16 PM - edited 09-13-2019 09:26 PM
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.