LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching from excel file

Solved!
Go to solution

Hi Sam,

 

so your outer loop should autoindex the values delivered by the inner loop?

Then place the inner loop before the outer loop and use an autoindexing tunnel!

(You should replace the outer WHILE loop by a FOR loop…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 91 of 96
(1,062 Views)

@GerdW wrote:

Hi Sam,

 

so your outer loop should autoindex the values delivered by the inner loop?

Then place the inner loop before the outer loop and use an autoindexing tunnel!

(You should replace the outer WHILE loop by a FOR loop…)


Hi GerdW, can you give me any short example. Thanks

0 Kudos
Message 92 of 96
(1,061 Views)

Hi Sam,

 

can you give me any short example.

simple DATAFLOW and using autoindexing FOR loops:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 93 of 96
(1,058 Views)

@GerdW  작성:

 

simple DATAFLOW and using autoindexing FOR loops:

check.png


Hi GerdW, thanks for example but it doesn't work in my case, here is my code picture.Capture.JPGin this, when 0 plus increment value add and condition is true then just one value passed for further process. Let suppose increment is 5 and final value is 20, then first 5 passed for further process into next loop and then 10 then 15 then 20. 

0 Kudos
Message 94 of 96
(1,045 Views)

 


@GerdW  

Hi GerdW, I try to implement if condition inside the while loop. My logic is simple, if condition is true stop while loop and store result outside the loop. and if condition is false then stop while and store zero outside the loop. It is working but in both cases it give zero. here is picture of my implementation. 

Download All
0 Kudos
Message 95 of 96
(1,008 Views)

Hi sam,

 

My logic is simple,

But it seems you are not able to implement a simple logic…

 

IF "condition is true" THEN "stop while loop" and "store result"

IF "condition is false" THEN "stop while loop" and "store zero"

So you stop that loop independently from your condition: why do you need a loop at all when it will be stopped right after the first iteration???

And why don't you use a Select node instead of that case structure when all you want to do is to select between two possible values?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 96 of 96
(1,002 Views)