Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Heating control (I think its beaten me)
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday Oct 16th, 2016 08:55 pm
   PM  Quote  Reply 
1st Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Hi,
I am trying to get my three zone heating which is currently controlled in a fairly basic manner by comfort, to a more complex and functional setup based on temperature values, and I am failing miserably with it.
My setup is as follows
4 x 6 button scs panels with temp sensors.4 x velbus heating relays as follows
Relay 1 activates the oil burnerRelay 2 activates the living zoneRelay 3 activates the bedroom zone.Relay 4 activates the hot water zone
So, with the above 4 relays, relay 1 must be on anytime one of the other relays are requested, for example
The hot water zone is activated by an scs button, which activate relay 1 and relay 4.There is a hot water storage tank, with an old fashioned thermostat wired to a comfort input which turns off relay 4 once it is activated (and then turns off relay 1 if no other resources are calling on it)
The bedroom or living room zones are also activated by scs button, and the idea is that the scs temp value from each of these zones controls the relevant velbus relay (and also relay 1 if no other resources require the oil burner to be on)



I am  hampered by the fact that my heating must draw on relay one when any of the other relays are activated.  I had a relatively successfull implemetation of this, using a counter increment/decrement to determine if the oil burner was required. As each of relay 2,3 or 4 was activated or deactivaed, I incremented a "burner required" counter to monitor the need to have the relay 1 on or not. When the counter reached 0, the burner was turned off.
The functions feature within comfigurator I thought would be the most straight forward way to implement temperature controlled heating, except that the functions feature does not allow you to control anyhting beyond a comfort relay, so I cannot use it to directly control my velbus devices.
Another user suggested that I use the functions feature, but create a loop which monitors for the state of a dummy output that I assign, and then respond to activating my velbus relays dependend on the state of the functions output.
I did this, but I just couldnt get it to work alongside my "burner required" response, the loop kept doing the counter increment/decrement every loop.
Anyway, long story short, looking for some advise on how best to implement this, I am both out of ideas, and probably out of ability now at this point also.



 Posted: Tuesday Oct 18th, 2016 04:12 pm
   PM  Quote  Reply 
2nd Post
cgiltrow
Member
 

Joined: Monday Jun 12th, 2006
Location: Johannesburg, South Africa
Posts: 107
Status: 
Offline

  back to top

Hi,

I implemented something similar with sprinklers where I needed to switch a power supply on (to power the solenoids) and then switch the solenoids for the sprinklers.  I have a lot of sprinklers now and have changed the way I switch the power, but when I only had a few I found that the best way was to check each of the other sprinklers each time.  So when I switched one on, I just switched the power on as well (even if it was already on).  When I switch a sprinkler off, I checked whether any of the other sprinklers were on.  If one of the other sprinklers were on then I didn't switch the power off.  If none of the other sprinklers were on then I switched the power off too.  Its a bit of repetitive code - not the most efficient - but it worked well.



 Posted: Tuesday Oct 18th, 2016 04:26 pm
   PM  Quote  Reply 
3rd Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Thanks cgil
I am managing the activation of the burner based on a counter which increments or decrements when ever a zone is activated or de-activated. So when the counter goes >0, then it turns on the burner, and when it goes back down to 0 it turns off the burner.

What I am struggling with now, I think is this

1) When scs sensor value changes, i need it to compare it to a second counter which is by setback temp setting and then make a decision.

So for example, lets say the hall temp sensor changes, I need to do this

IF hall temp sensor > set back counter
Turn off hall heating zoneelseif hall temp sensor<setback counterTurn on hall heating zone

The setback counter is = to hall temp setting - 2 (hysterises). I am copying this idea from the functions item in comfigurator ((which wont work for me as it only controls comfort relays direct, and not external devices)

Last edited on Tuesday Oct 18th, 2016 04:28 pm by wexfordman



 Posted: Tuesday Oct 18th, 2016 07:13 pm
   PM  Quote  Reply 
4th Post
cgiltrow
Member
 

Joined: Monday Jun 12th, 2006
Location: Johannesburg, South Africa
Posts: 107
Status: 
Offline

  back to top

Hi,

I am not sure why you have to use a counter.  Can you query the status of each of the "zones"?  If so, then you can build my sprinkler logic into the responses to switch the zones on and off, and call those responses exactly as you say above?



 Posted: Sunday Oct 23rd, 2016 09:31 pm
   PM  Quote  Reply 
5th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Thank cgitrow. Querying the status of zones needs a loop, wheras, doing the response only when the scs temp changes (sensor response) avods the need for a loop I think,

What I think is tripping me up now is I am confused over how/when a value of a counter is negaive (less than 0) or positive.

I have a counter value now showing 65534 ? Is that a negative value, can someone explain these values to me, so I can kick myself for it being so obvious ?



 Posted: Sunday Oct 23rd, 2016 09:31 pm
   PM  Quote  Reply 
6th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Thank cgitrow. Querying the status of zones needs a loop, wheras, doing the response only when the scs temp changes (sensor response) avods the need for a loop I think,

What I think is tripping me up now is I am confused over how/when a value of a counter is negaive (less than 0) or positive.

I have a counter value now showing 65534 ? Is that a negative value, can someone explain these values to me, so I can kick myself for it being so obvious ?



 Posted: Sunday Oct 23rd, 2016 09:35 pm
   PM  Quote  Reply 
7th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

if counter living_stback_tmp>=0 and flag living heat 0 and counter vheatliving = 0
Do heat living on.

Now, my values are

ivigstbck = 65534
flag living heat = on
counter vheatliving =o

But the resonse do heat living on is not being triggered ?

I am fautly ure this is down to my interpretation of the counter value being



 Posted: Sunday Oct 23rd, 2016 11:44 pm
   PM  Quote  Reply 
8th Post
Ingo
UCM Pi Users


Joined: Sunday Jan 21st, 2007
Location: South Africa
Posts: 557
Status: 
Offline

  back to top

65534 looks a bit suspect. Comfort uses a signed 16-bit value between -32768 and +32767. EG 0080 = -32768 and FF7F = 32767.



 Posted: Tuesday Oct 25th, 2016 08:26 pm
   PM  Quote  Reply 
9th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

double post

Last edited on Wednesday Oct 26th, 2016 03:23 pm by wexfordman



 Posted: Tuesday Oct 25th, 2016 08:26 pm
   PM  Quote  Reply 
10th Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Hi
Okay I seem to be having some success, in that I can now get comfort to turn on the heating, and turn it off when the temp gets to a set value (based on a counter). I have done this by using the below response which is triggered by the change in scs temp value.
My aim here is
1) A counter LivingTempSetting, is used to set the required temp for the living area. It can be adjusted via the comfort APP.2)Get the Hall scs sensor value, convert to deg celcius3)Load it back in to the sensor register.4)Then take the new  sensor value (which is now in celcius), convert it to a negative value, and load it into a new counter called setback temp. 5) The setback temp is then is then added to the living temp setting6) I then add the lastactionvlaue  to my setback hysteresis value (set to -2) and load back into my setbacktmp counter. I should at this point have the setbacktmp counter as a negative or positive value depending on if the hall scs sensor was lower or higher that the livingtemp setting counter.





From these sums, I expect either a negative or positive value in setback temp and a 


7) I then run response living temp allign


[img][/img]
 However, the heating does not appear to be coming back on after it drops below the setback temp ?

Last edited on Wednesday Oct 26th, 2016 03:22 pm by wexfordman



 Current time is 09:42 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems