At the risk of exposing my ignorance, I have a fundamental problem; how to pass values in a tab controlled case structure.
I have a simple UI that utilizes a tab control container controlling a case structure all wrapped up in a while loop. I am using
The base intention is to execute VI's in tab 1, the results of which would be available to the VI's in tab 2 ect...
(see attached example; as an experiment I would like the changes made to the int & string controls on page 1 to be reflected
by the matching indicators on page 2).
I can "tunnel" the values from one case outside the case structure itself (through an output tunnel), but can't seem to make it
available to any other cases via an input tunnel.
I tried to tunnel out of the case into a shift register on the while loop but am thwarted in retrieving that data back into another case.
I tried to use local variables but obviously do not understand LabVIEW's scoping paradigm for variables; I can create a local
variable but can't seem to "wire" it to an indicator on the second page.
First question: Is the tab controlled case structure within a while loop a reasonable method for controlling program execution?
I chose it because I have literally dozens of parameters to set and validate and wish to manage the visual space
for the operator. For example, I would like this sequence:
Second question: It is clear I do not know how to use variables, and the examples I read involve passing data to parallel structures
and not within a case. Is a local variable a reasonable method of passing data between "tabs"? I will gladly
accept the admonishment to "RTFM" as long as the requisite "FM" is identified.
Thank you in advance for your kind attention to my advisedly freshman inquiry
Solved! Go to Solution.
Shift registers are simple to get data from. Where was your problem with using them? Though, did you think of just using the terminals dirctly in the Page 2 case?
You should learn to use the Event Structure. You shouldn't care which tab you are on. It is all in the same VI. Therefore use a single Event Structure for all of your control value changes.
Don't try to micromanage the code. There is rarely a need to wire a tab structure terminal to a case structure.
Simply wire the indicators to the controls and update whenever the control changes (e.g. using an event structure)
Omit the case structure and leave the tab terminal unwired.
If you don't use an event structure, place a small wait inside your loop to prevent CPU hogging.
Thank you all for the prompt replies! I did discover my problem using variables (they have a read and write property) and was able to get the scheme as is to work. I will however tahe your suggestions to heart and change to use a tab control with an event structure. Thank you for your kindness with such a noob question.