LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

true and false case switch automatically

Hi everyone, I want to run a VI with the following function: in the true case, it runs 30s and then switch to false case and run 30s automaticlly and run true case for 30s, and then false case 30s, just keeping switching between these two cases automaticlly. So far, I put a boolon control to switch true and false case manually. Any idea how I can complete this function within Labview? Thanks  🙂 

0 Kudos
Message 1 of 6
(4,028 Views)

You can store the state of the case structure in a shift register.  Have some way to keep track of how long you have been running.  After 30s, invert the value in the 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
Message 2 of 6
(4,026 Views)

can you say sth with more details? i know only for loop has shift register, how it comes with case loop structure? Thanks 

0 Kudos
Message 3 of 6
(4,023 Views)

The case structure is not a loop.  Only for and while loops are available in LV.  Place the case structure inside a while loop with a shift register for your boolean.

 

Lynn

0 Kudos
Message 4 of 6
(4,017 Views)

You have to put the case structure inside of a while structure.  How else are you going to run it for 30s?


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 5 of 6
(4,004 Views)

please take the labview tutorials to understand what is being said here...

 

here is what's being described to you....

 

Spoiler
bool.png

 

 

 

Message 6 of 6
(3,988 Views)