04-10-2018 06:58 AM
Hello,
Propably this is stupid question, but i don't know how to do a continous measurement in state machine. What I want is to have a continous measurement of pressure which is independent of state machine which controlls some tanks. I use JKI template. Measurment of pressure is paused when the state machine is in Event Structure. Is there any solution for this?
04-10-2018 07:04 AM
@JackAPV wrote: What I want is to have a continous measurement of pressure which is independent of state machine which controlls some tanks.
Then put the measuring in a parallel loop. You can use a Queue, Notifier, or Global Variable to pass the data to your state machine loop.
04-27-2018 07:14 AM
Make the event-structure timeout something other than -1 ("wait forever"). Set it to zero (or 100ms, or whatever), and you can use the timeout case to call your next measurement.
Don't, BTW, put your measurement code outside the case structure like that. Put it in its own "Take Measurement" case. And put your initialization code in an "Start measurement case".