Showing results for 
Search instead for 
Did you mean: 
Reply

Timed Switch between 3 Cases and Back!

Solved!
Go to Solution
Highlighted

Timed Switch between 3 Cases and Back!

Hello,

 

I am trying to determine how I can switch between three cases in a case structure allowing a certain time between each switch.

 

For example: say I have three cases in a case structure (Cases {0,1,2}) where zero is the default case.

 

What I would to do is start in the default case 0 wait 1 sec, switch to case 1, wait 1 sec switch to case 2, wait 1 sec switch back to case 1, wait 1 second switch back to case 0.  Then repeat the order.

 

I was using the timer elapsed value from the Ramp Tim function to switch a select function between true and false but with the additional case I don't think this approach will work.

 

Any ideas?

Tim
0 Kudos
Message 1 of 3 (243 Views)
Reply
0 Kudos
Solution
Accepted by topic author smoothdurban
‎08-27-2015 06:09 PM

Re: Timed Switch between 3 Cases and Back!

Search for the term "State Machine". It is what you re trying to invent (nice work) so feel free to "Cheat" and look for the wheel as it exists now.

 

Ben

0 Kudos
Message 2 of 3 (239 Views)
Reply
0 Kudos

Re: Timed Switch between 3 Cases and Back!

Thanks a bunch.  I have been able to perofmr this simple task and have the possibly to complete much more complicated ones!

Tim
0 Kudos
Message 3 of 3 (229 Views)
Reply
0 Kudos