LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Position of For Loop

Solved!
Go to solution

Hello,

 

I have auto indexed a For Loop (See attached .vi).

 

I would like to show the position of the For Loop on the front panel. At the moment the position is only shown at the end of each iteration of a loop. I would like to show the iteration of the loop (ie 1 - 6) at the beginning of each loop. How do I do this please?

 

NevicaCapture10.JPG

0 Kudos
Message 1 of 5
(2,976 Views)

Hi Nevica,

 

Using 'Flat Sequence Structure' you can meet your requirement. here in first sequence show the position of the for loop and in second sequence you can do your application part. I think this will help you to achive your requirement.

0 Kudos
Message 2 of 5
(2,965 Views)
Solution
Accepted by topic author nevica

R-click incoming int-wire in loop and create indicator.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 5
(2,956 Views)

You don't need an auto-indexing For Loop if all you're going to do is operate on a sequence of numbers.  Tell the loop to operate a fixed number of times (in your example, six) and use the Loop Iteration terminal with an Increment node.

 

Filterwheel[1]_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 5
(2,933 Views)

To quote from LabVIEW help, " The iteration (i) terminal provides the current loop iteration count, which ranges from 0 to n-1."

 

0 Kudos
Message 5 of 5
(2,921 Views)