06-07-2014 11:07 PM
I am new to labview and here is one naive question. I want to do the follwing:
Pass the value of one numeric indicator "A" from main VI to sub VI, change its value in the subVI (like do A=A+1 for 10 times), while updating the indicator in main VI immediately after each change in the subVI.
I know one way is to pass the refnum of the indicator to the subVI and use property nodes to set its value. But If I want to make A=A+1 in the subVI using property node, it seems I need to do it in two steps with a sequence structure. First read the value of A to some other variable B, then set its value to B+1; or a feedback node will automatically appear.
Is there a simpler way to realize my purpose (with condition that I only need pass one terminal into the subVI)? Like using global variable or some other methods? Thanks!
06-07-2014 11:11 PM
I'm sure you don't need a sequence structure to do what you are trying to do.
Post your VI's so we can see what you are doing now. That will make it easier to suggest to you a better way of doing what you want.
06-07-2014 11:28 PM
Thanks. Attached are the main and subVI.
06-07-2014 11:47 PM - edited 06-07-2014 11:52 PM
Here is a modified subVI with the sequence removed. You don't need the X+Y indicator either unless you want to see the number within the subVI.

06-07-2014 11:53 PM
@RavensFan wrote:
Here is a modified subVI with the sequence removed. You don't need the X+Y indicator either unless you want to see the number within the subVI.
Thanks. Is It possible to use a single property node to do this?
06-07-2014 11:55 PM
No.
06-08-2014 11:55 AM - edited 06-08-2014 11:56 AM
firephysix wrote:Thanks. Is It possible to use a single property node to do this?
Assuming that you know that the the indicator will not be changed between iterations, you can save the value in a shift register. This way you just need a property node to get the initial value and then you just use a second one inside of the loop to update the value.

06-09-2014 02:45 AM
Another solution is to insert the subVI in a panel and use/update the subVIs indicator. Then you only need to send in the start value and use the shift register as already shown.
/Y