LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to index a array to give it to for loop for one value at a time sequence to be ensured

I need to give one number from a array at a time to a for loop. means the for loop have to execute one number at a time  from a array of numbers. How to do it

0 Kudos
Message 1 of 6
(2,600 Views)

When you connect your array to a for loop, by default the indexing will be activated (so it will work as you said you need), but if you need you can disable the indexing to be able to use the whole array in each iteration of your for loop.

 

Clipboard01.png

oh, and if the indexing is disabled you will have to tell the for loop how many iteration you want, if it is enabled, it will run once for each element in the array.

 

hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 6
(2,597 Views)

This also can be done

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 6
(2,580 Views)

@Ranjeet_Singh wrote:

This also can be done


I'm sorry mate that wont do it, that just sets up the for loop to run number of times based on the value you index out of the array. Please read the help file for for loop.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 6
(2,577 Views)

But question is same only. is in it ?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 6
(2,547 Views)

Ranjeet,


@Ranjeet_Singh wrote:

But question is same only. is in it ?


With all due respect, NO.

Please make sure you know what you are talking about before blatantly countering someone else's comment. Can you prove that your vi and TiTou's snippet will do the same thing?


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 6 of 6
(2,531 Views)