i need to set a variable and 5 sends later set it to 0 with the push of a button
what are the steps to do this
Thank you
Updating a variable with a button
- marcio
- Posts: 4
- Joined: Mon Jan 17, 2011 1:53 pm
- jpurdum
- Enovation Controls Development
- Posts: 153
- Joined: Mon Jun 21, 2010 11:19 am
Re: Updating a variable with a button
Hi Marcio -
In your post, you say "5 sends later" - I assume you mean "5 seconds later". Is that correct?
I've created an example config that hopefully demonstrates what you're looking for. The state machine receives an event from the button and goes to the first state which sets the variable to 1 and kicks off a one shot timer. The timer is attached to the transition from the second state to the third state, so when the timer expires, this transition occurs. The third state clears the variable and sends and event to force it back to the first state.
I hope this helps
john p.
In your post, you say "5 sends later" - I assume you mean "5 seconds later". Is that correct?
I've created an example config that hopefully demonstrates what you're looking for. The state machine receives an event from the button and goes to the first state which sets the variable to 1 and kicks off a one shot timer. The timer is attached to the transition from the second state to the third state, so when the timer expires, this transition occurs. The third state clears the variable and sends and event to force it back to the first state.
I hope this helps
john p.