12-24-2020 12:33 AM
Hi,
I am using a simple state machine for my multiple states on my main VI. I will see how it goes without adding the event-driven layer yet.
What i attached is just a VI that simulates one of the states (hence the State boolean).
Anyway, I'm looking for a simple solution to my problem inside this state. Which I believed and I've been said it should be very simple, but... it is hiding from us lol.
(Unless I pull the timer outside the state machine cases which is what I was being afraid of...)
12-24-2020 11:05 AM
I still think you can use my suggestion as a template for ideas. I strongly disagree that a solution would involve an event structure. Use are polling digital signals, not user interactions.
01-04-2021 09:42 AM
The only solution that I can see is to pull the Elapsed Timer outside (maybe use two timers?) because I can't figure out how to properly reset it otherwise (without it starting again in the same "state=1").
Do you have a more elegant/efficient idea?
01-04-2021 12:13 PM
@ASX24 wrote:
The only solution that I can see is to pull the Elapsed Timer outside (maybe use two timers?)
I really don't understand where "outside" is. Also note that I did not use any express VIs.
@ASX24 wrote:Do you have a more elegant/efficient idea?
You already talk about "states", so just design a proper state machine that implements all requirements.
01-04-2021 04:23 PM
Outside the case structure. Because otherwise I cannot (not)reset the timer the way I want, right?
I believe I had already mentioned this VI being a simulation of one of the states. I am working on a larger state machine but that takes time so I am testing the code of some of the states independently (and with controls and leds instead of real channels) before I put the code into the main VI.
Anyway, this might not even be relevant.
I am just asking for ideas on how to implement the simple code I described earlier. Your VI is very nice but it does not solve the same reset problem I am trying to solve.
Could you be kind enough to attach a modification to your file if it is a simple workaround? I really can't make the reset work the way I want.