Posted: Friday Jun 24th, 2011 11:15 pm |
|
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 comfort to store in a counter, the highset recorded temp from an scs!! Here is what I have done
1) The SCS temp is converted to celsius and imported into counter kitchentemp.
2) I have a second counter, maxkitchemtemp, which is the counter that I aim to use to store the highest recorded kitchen temp.
3) I have a response activated by sensor8 response written as follows
Get Counter MaxTempKitch
Subtract Kitchentemp
If LastActionValue < 0 Then
Copy Counter Kitchentemp To MaxTempKitch
End If
So in theory, if maxkitchentemp is currently 15, and kitchentemp is 21, then
get maxkitchen temp = 15
subtract kithchen temp of 24 (15-24=-9)
lastaction value is now less than 0, so
copy kitchentemp counter (24) to maxkitchentemp counter.
In theory, after this, maxkitchentemp should be 24, buit it is not.
Any help would be appreciated.
Regards,
Eamon
|
Posted: Wednesday Jun 29th, 2011 02:06 am |
|
2nd Post |
leonchue
Cytech
Joined: | Monday Aug 7th, 2006 |
Location: | Singapore |
Posts: | 71 |
Status: |
Offline
|
back to top
|
Try replacing your line
"If LastActionValue < 0 Then"
with this
"If LastActionValue >=128 Then"
It should work this time
|
Posted: Wednesday Jul 13th, 2011 01:25 pm |
|
3rd Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
Hi Leone,
At last, I finally got round to doing what you said... and it worked!! Not sure why, could you clarify ?
Also, the next thing I wanted to do was time stamp the event. So I have created counters for day, month and year and added it to the response as follows:-
Get Counter MaxTempKitch !
Subtract Kitchentemp
If LastActionValue >= 128 Then
Copy Counter Kitchentemp To MaxTempKitch
GetParameterValue Day
Set Kitchendate
GetParameterValue Month
Set kitchenmonth
GetParameterValue Year
Set kitchenyear
End If
Only thing is, my day, month and year counters remain empty!!
|
Posted: Thursday Jul 14th, 2011 01:33 am |
|
4th Post |
leonchue
Cytech
Joined: | Monday Aug 7th, 2006 |
Location: | Singapore |
Posts: | 71 |
Status: |
Offline
|
back to top
|
GetParameterValue Day
Set Kitchendate
GetParameterValue Month
Set kitchenmonth
GetParameterValue Year
Set kitchenyear
This part should work, unless the max temp is not triggered. Maybe your modified program has not been downloaded into the system (ie. Comfort and CWM) or the wrong counters are referenced in CWM?
Just a suggestion, maybe you may want to have a "max temp reset to 0" button/response. Useful for debugging purposes as well
|
|