Please can anyone help explaining the queue logic for commandarray 'off after' events?
I have a zoned heating system - mostly running OK now. Every minute it checks the zone status and gets the current required setpoint and temperature. If a radiator was on and should be off I issue a command of the form commandarray[radiatorvalvename] = 'Off after 300'. This ensures that the radiator valve stays on for the overrun period of the boiler. If all radiators are off I issue an immediate Off command to the boiler.
The trouble is, every minute for 300 seconds I will re-issue the radiator 'Off after 300' command because I cannot tell within the script that the radiator valve is about to go off - the status (otherdevices[radiatorvalvename] always reads 'On' - so I re -issue the command to turn it off.
If the temperature drops during that 300 seconds I will turn the radiator valve back on again. What seems to happen is that there is just one Off after 300 queued. My radiator valve turns on when I issue the command and off again when the queued 'Off after 300' trips.
This mostly doesn;t matter for the slow radiator valves but does matter for the quick acting motorised valves. It is possible to dead head the pump and boiler for a minute or two - relying on the bypass and wasting heat, stressing the pump etc.
There are a variety of ways around this but I would benefit from knowing how the queuing actually works if anyone can help?
Unless someone can suggest a much better and cleaner solution the workarounds to be tried are:
a) Implement the off after timing logic within the script directly - a fair bit of work.
b) A hardware work a round to delay turning off the motorised zone valves to avoid the dead head problem
c) Most elegant: Find a way of overriding an imminent 'off after' event in the queue. i.e ignore pending 'off after' because I NOW want the output ON
d) Create an event on the output change and immediately override it if not wanted at this time . Again - yuk solution needing obscure code functionality.
Many thanks
Coppo
Commandarray Event queue question - using 'off after' being queued up
Moderator: leecollings
Who is online
Users browsing this forum: No registered users and 1 guest