LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two for loop counter

Hello,

 

I would like to create a counter for the two for loop. I have one inner loop which will do the temperature sweep, and the outer loop is the number cycle. I really need your help to create a counter that will count the number loop in the inner loop and display on the front panel. If I have 4 temperatures in the inner and 2 cycles on the outer loop so the output should display a number '8'.

 

In addition, let say I have some temperature loop 25, 125, 25, -55 in the inner loop, and the number cycle will be 2. So the number temperature will be sweep are 25, 125, 25, -55 (first cycle) then 25, 125, 25, -55. How do I insert 25 after -55 for the last cycle when it inner loop end. I want to bring the oven back to room temp.

 

Your advise is very important to me.

0 Kudos
Message 1 of 3
(1,922 Views)

@caahsc wrote:

 If I have 4 temperatures in the inner and 2 cycles on the outer loop so the output should display a number '8'.



Well, that would be a static display. I would not call it a counter. Just display the product of the two Ns. (See red indicator)

 

 

Similarly, you can display a results based on the two iteration terminals in the inner loop to make the progress visible in realtime.

 


@caahsc wrote:

I want to bring the oven back to room temp.


Then add another step after the loops.

 

 

Overall, your program design is not very maintainable and scalable. Try to eliminate the stacked sequences and backwards wires and use a state machine architecture instead.

0 Kudos
Message 2 of 3
(1,921 Views)

Hi,

 

I don't understand your second question. Can you help me specify which loop? Thanks.

0 Kudos
Message 3 of 3
(1,909 Views)