LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have a couple of question about a VI I obtain from this forum. The question pretains to CASE structure

I've attached the VI in question.

The part of the VI that I need help on at this time is the CASE structure. If I understand the operation of this function correctly this particular CASE structure has been set with a 1 and 0. 1 being the default that returns an EMPTY STRING CONSTANT and 0 returning two constants 1st-MAX? and 2nd- being MIN? All outputs whichever end up connected to a CONCATENATE STRING function.

My first question is on the border of the CASE STRUCTURE there is a ? in a square that is tied to the ITERATION terminal of the FOR LOOP in which the CASE STRUCTURE is contained. The FOR LOOP is set for 10 executions. Does the ITERATION'S executed
number control what the CASE STRUCTURE returns? IF so does a 0 (zero) from the ITERATION cause the CASE to return the CONSTANTS MAX?/MIN? ? and if so during the next execution which would return a 1 value on the ITERATION terminal cause the CASE to return the EMPTY STRING CONSTANT?

I guess what I'm really asking is how does the FOR LOOP ITERATION control the CASE STRUCTURE in this VI. When would I get the MAX?/MIN? and when would I get the EMPTY STRING CONSTANT? If the ITERATION is the controller.
0 Kudos
Message 1 of 2
(2,010 Views)
The answer to all your questions in your third paragraph is Yes.
The question mark in a box on a Case structure is the Case Selector. The value wired to the selector determines which case gets executed.
The Case selector is wired to the For loop interation (=0 on first interation). So on the first iteration (=0) of the For loop, the Case returns "Max?" and "Min?". Since Case 1 is the default, whenever the iteration doesn't equal 0, two null strings are returned.
0 Kudos
Message 2 of 2
(2,010 Views)