Hi, I’m trying to turn on a variable (ComputeEnable)at a given time with an ONDATE and turn it off at an other time with another ONDATE.
The thing is the program seems gets stuck in mylabel2
I was thinking when ondate triggers , it would execute mylabel2 once and not go back until ondate triggers again
thanks for your help
The script looks like this
ONDATE 2,“05 10 * * *”,“GOTO mylabel2”
mylabel2:
ComputeEnable@ = 1
StartDayTime@ = Getsys Prg, “TimeSec”
TotalizedTime@ = 0
OnPerCent@ = 0
Print 2
End
ONDATE 3,“10 10 * * *”,“GOTO mylabel3”
mylabel3:
ComputeEnable@ = 0
EndDayTime@ = Getsys Prg, “TimeSec”
TotalizedTime@ = 0
OnPerCent@ = 0
Print 3
End
ActualOnGoingTime@ = Getsys Prg, “TimeSec”
ActualDayTime@ = ActualOnGoingTime@ - StartDayTime@
IF ComputeEnable@ THEN
If DI1@ And mystep@ = 13 Then
Ontime@ = Getsys Prg, “TimeSec”
mystep@ =11