This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Temporary overwrite a scheduler
#1
Hi alll,

I want to overwrite a scheduler temporary with a preferred value for some time. And when my event value return false again the scheduler should work as normal at that given time point. How can i do that?

Code:
value = event.getvalue()

if value == true then
  --overwrite the scheduler object
else
  --switch the object back following the scheduler
end

Thanks in advance for the help.
Reply
#2
Why don't you just disable the scheduler by using object, override the output value and enable and write what you want.
------------------------------
Ctrl+F5
Reply
#3
(20.09.2023, 13:01)Daniel Wrote: Why don't you just disable the scheduler by using object, override the output value and disable and write what you want.

Good idea but does the scheduler send the corresponding value direct after the schedelur is enabled again? Or does it just send when reached the next scheduled time again?
Reply
#4
it sends when the event occurs
------------------------------
Ctrl+F5
Reply
#5
(20.09.2023, 13:06)Daniel Wrote: it sends when the event occurs

Thanks, will do it this way. Much easier Smile
Reply
#6
Just use a bit of logic in the middle, create an event script on a TAG that is connected to your scheduler and override..
Code:
schedulerstate = grp.getvalue('10/0/0')
overridestate = grp.getvalue('10/0/1')
if overridestate == true then
  grp.checkwrite('10/0/2', overridestate)
else
  grp.checkwrite('10/0/2', schedulerstate)
end
Reply
#7
Just to be sure.. On/off object of the scheduler.

ON = scheduler active and OFF = scheduler inactive ?
Or is it ON = scheduler locked and OFF = scheduler unlocked ?
Reply
#8
1 is enabled, 0 disabled.
------------------------------
Ctrl+F5
Reply
#9
(20.09.2023, 13:22)Daniel Wrote: 1 is enabled, 0 disabled.

Huh 1 is scheduler enabled you mean?

my autistic brain gets confused because a time clock without this object attached has the value 0 and still works. Now we need to send the value 1 for this to work..
Reply
#10
Yes, nothing will change till you send a value to this object, scheduler will not read it.
------------------------------
Ctrl+F5
Reply


Forum Jump: