10-19-2017 02:34 PM
Hi guys,
I'm building a code that would input value in A,B,C,and D. the system would then be feed change in those values as primes like A' and B'. This code is than expected to calculate the numeric difference between all the values and evenly distribute them to Anew, Bnew,...etc.
The trouble for the code comes at the last portion, when I try to have multiple (up to 4!) numeric output connected to the same indicator, I used a merge signal function, but it seems to only take in inputs at A and neglects the values from other input.
I'm not sure if my understanding of the merge function is incorrect or is there something wrong?
any help would be greatly appreciated!
10-19-2017 02:38 PM
Hi Caleb,
I cannot view your VI, but a numeric indicator can only display a single value. You can "build array" to get an array of numeric values, or "bundle" to get a cluster of values. You could also create a string that contains multiple values.
10-19-2017 03:01 PM - edited 10-19-2017 03:03 PM
Hi Caleb,
what are you trying to do with your VI?
Why do you need all those Formula ExpressVIs - with basically the same formula in all of them? Why not use a subVI which does exactly this calculation from 4 or 5 inputs?
'm not sure if my understanding of the merge function is incorrect or is there something wrong?
Your understanding is wrong.
How do you define the operation of "merging" 4 floating point numbers?
Which result do you expect, when the 4 inputs are 1, 2, 3, and 4? Please provide an example!
but it seems to only take in inputs at A and neglects the values from other input.
Wrong. Merge works as intended - but to display the result in a scalar numeric indicator will not work! (Your understanding is wrong, again…)
Your VI is a great example, why you should NOT use ExpressVIs and DDT wires! 😉
So please describe your goal and we will guide you the way…
10-19-2017 03:10 PM
While technically allowed, It is probably a bad idea to start a file name with a % sign. Too easily confused with environment variables, for example.
10-24-2017 06:55 PM
Thanks for the rapid response guys!
This is actually an subVI that suppose to takes in a Value and the difference between the previous value and current (), then distribute the difference between the old and new to the rest of the outputs.
My intention for the output was to have one numeric output to be constantly overridden by the next change.
For example, when if I start with values in A, lets say it has 5, than I change that value to 10, the system in the mainVI will recognize theres a +5 difference between the two and inputs a A' value of +5, and at the same time A on this VI will be change to 10 as well. Now at the point this VI needs properly distribute the "5" difference to ensue the sum of all the values stays at 100. The system needs to stay at 100 total value in order to function properly, so this specific VI is in charge of doing that.
So that is why we have 4 wires going to the same indicator for all 4 of them, because they need to be constantly overwritten by the change in numeric inputs.
10-24-2017 06:56 PM
I understand that, it just that this is a subVI so I don't really see a problem of naming it for what it is
10-07-2020 02:32 AM
I think in some cases you could use a local variable too.