04-20-2018 01:42 PM
I have a 2D array set to creates two waveform graphs. In each section of the array, I can change the frequency and the amplitude. I want to be able to change the frequency or amplitude in one section of the array, and the other section of the array to automatically update to the new value as well so that they are always the same. Is there a setting in the array that will allow me to have the array automatically update like that?
04-20-2018 01:47 PM - edited 04-20-2018 01:57 PM
Please attach a simplified version of your VI so we can efficiently find a solution.
04-21-2018 01:47 PM
I have attached part of my VI. I am trying to alter the output array in it. When I update one value in the array, I want the other parts of the array to update automatically to that value, so all of the values in each component of the array are identical.
04-21-2018 08:44 PM
@bmaloney14 wrote:
I have attached part of my VI. I am trying to alter the output array in it. When I update one value in the array, I want the other parts of the array to update automatically to that value, so all of the values in each component of the array are identical.
Thank you for attaching your code. When you speak about "update one value in the array", I assume you mean the control named "Output Array". When did you want to "update" it, before you run the code, or while the code is running?
I'm guessing from the fact you asked the question that you are trying to change Output Array while the code is running. You can, in fact, change it, but if you know anything about LabVIEW, you must know the Principle of Data Flow, which (according to your code) means that once you have read "Output Array" (when the program starts), any change you make after that will have no effect on your Program (because the original Value has already been used, and your code never tries to "read" the variable again).
If you mean something else, I apologize for jumping to the wrong conclusion.
Bob Schor
04-22-2018 02:22 AM
Your array only has one elements, so what are the "other parts"? If all elements should be the same, maybe all you need is a scalar (one array element) to avoid all that redundancy. Why the FOR loop? It only iterates once anyway.
You really need to explain better. How is the VI used? What should happen as a function of user interaction. What's the real purpose of changing the item called "output array" (which is actually an input). ???