LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FRAMES VS. LOOPS

HELLO TO ALL,

I HAVE THIS VI WHICH DOES A TEST. FIRST OF ALL IT SETS UP EACH OUTPUT HIGH ONE BY ONE AND ALSO SHOULD RECEIVE A HIGH INPUT IN THE 2 AND 4TH FRAMES. AFTER EACH INPUT/OUTPUT IS HIGH, THE INPUTS AND OUTPUTS GO LOW IN THE SAME FASHION IN WHICH THEY TURNED ON. mY QUESTION IS, SHOULD I USE A FOR LOOP TO DO THIS OR KEEP IT WITH FRAMES? IF I WHERE TO USE A FOR LOOP, HOW CAN I IMPLEMENT IT. THIS TEST IS PART OF A LARGE SEQUENCE, WHICH IS WHY I USE LOCAL VARIABLES.

tHANKS N ADVANCE!
FREDFRED
0 Kudos
Message 1 of 4
(2,603 Views)
You can do pretty much the same as in your other recent question. 🙂 See attached (LabVIEW 7.1).

(Your boolean patterns change very simply between iterations and could easily be generated programmatically. I show a more general solution where the patterns can change wildly between loops).
Message 2 of 4
(2,589 Views)
IS THERE A REASON WHY THE LOOP STOPS AFTER THREE ITERATIONS? I TRIED MODIFYING THE NUMBER OF TIMES THE LOOP EXECUTES WITH NO END RESULTS.


GRACIAS, MUCHAS GRACIAS!
0 Kudos
Message 3 of 4
(2,577 Views)
Sorry, a small oversight (remember I cannot run it!).
The three element blue array is accidentally set to autoindex. Remove autoindexing and you should be OK.

(arrow in the attached corrected example shows where the mistake was).

EXPLANATION: A FOR loop only runs as many times as the smallest autoindexing array. Dont set the loop count manually, it will now run according to the size of the 2D boolean array.
0 Kudos
Message 4 of 4
(2,569 Views)