I have used very few timers in my PLEG scenes, and today i was experimenting for sake of learning by trying to help another here in this subsection. What i created were a human simulating switch toggle chain.
Basically i use timers in a chain of events, i use them for testing on virtual switches. VS1 and VS2
Schedule
sTimerX2 Self Trigger None Interval 00:00:10
Triggers
tvsTestSwitch TestSwitch is turned on
tVS1 VS1 is turned on
tVS2 VS2 is turned on
Conditions
cTest1 No tvsTestSwitch
cTest2 No tVS1 and (tVS1; !sTimerX2)
cTest3 No tVS2 and (tVS2; !sTimerX2)
Actions
VS1 SetTarget newTargetValue=1
General House Tasks StartTimer timerName=sTimerX2 intervalTime=
VS2 SetTarget newTargetValue=1
General House Tasks StartTimer timerName=sTimerX2 intervalTime=
VS3 SetTarget newTargetValue=1
Basically what happens is when u flick tvsTestSwitch, VS1 sets to ON and sTimerX2 is started, which is a random 1-10s timer. The condition cTest2 waits for VS1 to report back state ON and for sTimerX2 to go from state true to false. When this occurs the action turns on VS2 and calls StartTimer sTimerX2 again, next condition waits for the same when VS2 reports ON, and timer goes to false, action starts VS3.
This works as far as i can tell, very well, but very randomly the timer will never leave state “True”, it sticks there.
I seems to happen especially if i edit the PLEG, for example add a trigger or condition or something.
Right now what i did was make a “space” in a condition, saved, removed space and saved again. reloaded.
Now it stopped working.
Be kind and advice what it could be, is it a bug in PLEG? is it a bug in my head?
Edit: i Tried Self ReTrigger, so that the actions resets timer, that seems to solve the timer getting stuck issue. Could it be that the timer “crash” if it is triggered again while it is running in Self Trigger mode or smt? Because once timer goes false the time is very short until the action trigger it again. Havent had one issue yet, efter mode change.