From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting While Loop Iterations after Case Structure

Hello,

 

I want to reset the iteration count (i from while loop) after the case structure goes from false to true. How would I do this?

Download All
0 Kudos
Message 1 of 4
(998 Views)

@sambpk wrote:

I want to reset the iteration count (i from while loop) after the case structure goes from false to true. How would I do this?


Store your own count in a shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(992 Views)

Hi Sam,

 


@sambpk wrote:

I want to reset the iteration count (i from while loop) after the case structure goes from false to true. How would I do this?


You cannot change the value that loop iterator outputs…

 

But: you can create your own counter using a shift register!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(989 Views)

@sambpk wrote:

I want to reset the iteration count (i from while loop) after the case structure goes from false to true. How would I do this?


 

Please attach your VI instead of a series of images.

 

  • You have not followed any of the earlier advice.
  • Your use of value signaling properties is completely pointless because you don't even have an event structure. It also executes in parallel of writing to the table terminal and whatever happens last wins. No way to tell. You can significantly simplify all this.
  • You don't even need to maintain a count, just measure the "size +1" of the number of rows in the array. Right?

 

0 Kudos
Message 4 of 4
(972 Views)