LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

true and false case switch periodically

Solved!
Go to solution

I try to use a case structure with the following function.  For example:in the true case, it runs 20s and then switch to false case and run 30s automaticlly and run true case for 20s,then to false case for  30s,like this  periodically switch.with another threads found i a simple example in my posted code:every 30s  switch case between true and false,but i don‘t konw how to modify it for periodically swtiching,f anyone can give me some ideas about case switch periodically that would be appreciated. 

 

Note:Labview 2009

0 Kudos
Message 1 of 6
(3,493 Views)

Have the cases output how long the Elapsed Time should count for.


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 6
(3,490 Views)

@crossrulz wrote:

Have the cases output how long the Elapsed Time should count for.


thank you.is your means  two case structurs inside Loop.one of them has output how long the Elapsed Time?

0 Kudos
Message 3 of 6
(3,479 Views)

You only have 1 case structure.  In the case structure, have each case output a time to elapse.  Thinking about this further, you should store that time in a shift register since you want the elasped time on the next iteration to get that value.


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 4 of 6
(3,475 Views)
Solution
Accepted by topic author jetfire

@jetfire wrote:

I try to use a case structure with the following function.  For example:in the true case, it runs 20s and then switch to false case and run 30s automaticlly and run true case for 20s,then to false case for  30s,like this  periodically switch.with another threads found i a simple example in my posted code:every 30s  switch case between true and false,but i don‘t konw how to modify it for periodically swtiching,f anyone can give me some ideas about case switch periodically that would be appreciated. 

 

Note:Labview 2009


something like this? BTW, that was my VI you used....    Smiley Happy

 

 

Spoiler
case.png

 

 

 

Message 5 of 6
(3,454 Views)

@apok wrote:

@jetfire wrote:

I try to use a case structure with the following function.  For example:in the true case, it runs 20s and then switch to false case and run 30s automaticlly and run true case for 20s,then to false case for  30s,like this  periodically switch.with another threads found i a simple example in my posted code:every 30s  switch case between true and false,but i don‘t konw how to modify it for periodically swtiching,f anyone can give me some ideas about case switch periodically that would be appreciated. 

 

Note:Labview 2009


something like this? BTW, that was my VI you used....

 

 

Spoiler
case.png

 

 

 


thanks for your code,it is very helpful for me。

0 Kudos
Message 6 of 6
(3,444 Views)