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
(362 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
(356 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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 4
(353 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?

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 4
(336 Views)