Showing results for 
Search instead for 
Did you mean: 

Update the values in main VI


Please find the enclosed VIs.

Last iteration value of subVI is only updating in MainVI. But i need to update the previous iteration Case values also into mainVI. 



S Nagaraju

Download All
0 Kudos
Message 1 of 6

The sub VI sets the value, then returns to the main where the exact value is written again. There are no iterations in the sub VI. The references are redundant...


Not sure what you want exactly. You might try putting a wait in the main VI's loop. Or try highlight execution to see for yourself what your program is doing in slow motion.


If you want to show all values when done, let the loop build an array (auto indexing). 

If you want to show new values while looping, add the elements to an array that's in a shift register.

Message 2 of 6

Note: You misspelled "Separation" in your main vi.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 6

Even what you call "" is a subVI, so for us to understand your problem, it would help to attach also the caller, i.e. the real main vi.


A lot of the code seems a bit convoluted. You know that you can wire strings to case structures, so why are you sometimes doing equal comparisons instead? When you call your main.VI, there is possibly ancient data stuck in the "remaining string" which gets never cleared, but read via local with every call. Why do you use local variables for "status" instead of placing the indicator terminal after the case structure?


Some of the code is just plain silly, e.g. the following basically checks if the string contains "07".


First you find the match, then concatenate it with the string after the match, then you take the first two letters, basically undoing the concatenation and see if it matched the original search term.  Determining if "07" either exists at all or is at the start of the string does not need all that. If needed later, you can do the concatenation inside the following case structure. Can you guarantee that the string never contains more than one "07"?


In summary, take all your VIs. (real mainVI, subVI, subsubVI) and put them in a zip file. Include some simulated typcail data that shows the behavior. Tell us how you operate it, what you see, and what you like to see instead. Be as detailed as possible.

0 Kudos
Message 4 of 6

Dear sir,


In MainVI Response data control having three valid packets. Those are 070480000000000000000105000C0000AA439672BE42B1A85EAA000807048000000000000000010600080000AA0001AA0000000807048000000000000000010400080000AA010101AA000008.

In MainVI I'm separating the first valid packet and sending to subVI and it is giving the Az and El values and updating into MainVI.

In second iteration of MainVI is separating the second valid packet and sending to subVI. SubVI gives the antenna selected value and the same is updated into mainVI. But the Previous Az & El values are resetting to default. This is same for third valid packet also.


In MainVI, recent packet value only updating and rest of the values are setting to default. But i want to display the all the values in MainVI.

Kindly help me.



S Nagaraju.


0 Kudos
Message 5 of 6

@Sonti_11532 wrote:

In MainVI, recent packet value only updating and rest of the values are setting to default. But i want to display the all the values in MainVI.

You could use a FOR loop and autoindex the output values and then you can display the array.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6