Finite State Machines - Delayed transitions

Rick 4 years ago in IQANdesign updated by Ulrik Zakariasson (Software development) 4 years ago 4

Just an idea: how about adding a delayOn property for FSM transition lines?

I'm a fan of the FSM component, as it cleans up the pages, and can be explained to non-programmers, showing how stuff globally works.

But since we're using delays often ("hold button for a second", ...), I still end up having a lot of additional IDC blocks.

Under review

Good idea! I have done it with a static variable and some Qcode, but a built in function for delay-on would be a nicer way I think.

state machine with timer delay.ids4

"static tmrDelay := 0"

Didn't know you can add variables with qCode that are memorized for the next cycle! Another thing learned.

I agree with you Rick!

If possible and easy to implement (Gustav) it would also be nice to have min and max timers for each state, together with next state parameter when max time-out occurs.

Have tried another way of manual state handling with QCode with both on-delay, min-time and time-out, which works but of course better if possible in FSM.


There is a new file in the solution library for IQANdesign 4.04 that describes how to solve this.