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: 

Getting a case structure process to repeat.

Solved!
Go to solution

I am looking to get the process that happens in the case structure to repeat or have the value of the iterations reset to 0. I need the case structure to repeat the pattern that it currently makes several hundred times but right now it just stops after 65 and runs the default value. I know there are issues with the proximity sensor portion of my code, please don't focus on that, I need help with the case structure stuff. Thanks in advance.

0 Kudos
Message 1 of 5
(2,022 Views)
Solution
Accepted by topic author JRyno

Hi JRyno,

 

I am looking to get the process that happens in the case structure to repeat 

I guess you are talking about the case structure with cases like "55, Default" - and not those other 3 case structures…

 

or have the value of the iterations reset to 0

That's not possible, that "iterator" will always count up (to a limit of 2^31-1)…

BUT:

  • You can make your own counter using a shift register.
  • You can use the Quotient&Remainder (aka modulo) operation to limit the counting range…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,017 Views)

Yes I am referencing the case structure that has 55 set as its default.

When you say using the quotient&remainder operation to limit the counting range would that be the counting range for the iterations?

And ok I'll work on my own counter with a reset when it hits a certain number, thanks.

0 Kudos
Message 3 of 5
(2,013 Views)

Hi JRyno,

 

When you say using the quotient&remainder operation to limit the counting range would that be the counting range for the iterations?

Something like this:

check.png

Best regards,
GerdW


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

Thanks, sometimes there's a solution so simple you don't even think about it.

0 Kudos
Message 5 of 5
(2,002 Views)