LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed loop with array dimension control

Hello,

 

I have imported an excel to an array and im trying to use a timed loop to run the values of the array on a timed interval. One of my problems is that the array is 2D and i cant use its length to stop the loop. I want to use witch value of the array in the loop in each iteration of the loop and i want the loop o stop when the counter equals the length of the array. Can someone help me plz here is the labview.Untitled.png

0 Kudos
Message 1 of 4
(2,041 Views)

It is really unclear what your question is.  Could you clarify?  

 

If you are struggling with why you have a broken wire it is because you are sending an array to the stop of the loop.  When you use the array size function on a 2D array it returns a 1D array with the size of each dimension.  When you then use the greater than function it returns a 1D array of Booleans.  It compares each element of the array size to the current count of the iteration terminal.  

 

To use this to stop your loop you need to reduce it to a single element some way before you send it to the stop control of the loop.  You could apply an "and" or "or" function to the out put of the greater than or pull out a single index out of the single greater than array. 

 

In the image logical AND, logical OR, or element could be used to stop the loop.  You just need to choose one that gives you the behavior you need.

 

array.png

 

Lukin
Certified LabVIEW Architect
0 Kudos
Message 2 of 4
(2,022 Views)

Thank you very much. It worked perfectly. Now im able to configure the excel table how i want and the loop stops perfectly.

0 Kudos
Message 3 of 4
(2,016 Views)

No problem.  Gald it worked for you.

Lukin
Certified LabVIEW Architect
0 Kudos
Message 4 of 4
(2,012 Views)