LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining multiple numeric output to one indicator

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!

0 Kudos
Message 1 of 7
(6,348 Views)

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.

0 Kudos
Message 2 of 7
(6,343 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 7
(6,333 Views)

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.

0 Kudos
Message 4 of 7
(6,326 Views)

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.

0 Kudos
Message 5 of 7
(6,245 Views)

I understand that, it just that this is a subVI so I don't really see a problem of naming it for what it isSmiley Tongue

0 Kudos
Message 6 of 7
(6,243 Views)

I think in some cases you could use a local variable too.  

0 Kudos
Message 7 of 7
(4,050 Views)