LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Just a slight difference - Loop Iterations

Solved!
Go to solution

Hello all

 

When we have to run twice a For Loop to perform "almost" the same operation (with just a slight difference), what is the best way to do that?

 

The real operation that occurs inside the loop is not that easy. I just used this example to explain my problem. The question is: using the i terminal to select a case structure is the best choice?

 

Thanks

 

Dan07

Message Edited by dan07 on 01-19-2010 03:28 PM
Download All
0 Kudos
Message 1 of 9
(3,205 Views)
It really depends what else you need to do, but in this case you could rearrange the operation so you only need one loop and don't need to transpose.
Message 2 of 9
(3,155 Views)

Sorry, my computer crashed whe I tried to embed the picture above. Since I prefer to show it embedded, I post again.

Message 3 of 9
(3,130 Views)

Yes, you are right about your suggestion. But, my code is not that easy. I run a whole array of values over a for loop twice and inside this for loop there is another for loop getting value by value of the array and doing some calculations. I will work in my code and as soon as I have it finished I will send you.

 

Thanks

 

 

0 Kudos
Message 4 of 9
(3,094 Views)
Its sounding like you want a state machine with acquire and post process states.  Why not?

"Should be" isn't "Is" -Jay
Message 5 of 9
(3,077 Views)

hi

you can use state mechine concept . have a look at the VI attached.

Regards
Message 6 of 9
(3,053 Views)

Hello

 

Could you save the file in the 8.5 version?

 

Thanks

0 Kudos
Message 7 of 9
(3,028 Views)
Solution
Accepted by dan07
Message 8 of 9
(3,019 Views)

I modified the State Machine just a little and it is working perfect.

 

Thanks

Message Edited by dan07 on 01-28-2010 12:54 AM
0 Kudos
Message 9 of 9
(2,959 Views)