Page 1 of 1

save max min values dummy device

Posted: 18 Nov 2019, 08:32
by Dondolo
Hi ,

I want to save the max and min temperatures.
The period should not be considered in the first step.

I store the max and min values in a dummy device and compare them to the current temperature.

// max values
If [MaxMin#Max]<[Unterstand_oben#Temperature]
TaskValueSet 3,1,[Unterstand_oben#Temperature]
Endif

//min values
If [MaxMin#Min]>[Unterstand_oben#Temperature]
TaskValueSet 3,2,[Unterstand_oben#Temperature]
Endif

At Max values it works but with the min value is 0.
And the value is not overwritten with the current value.

I am currently resolving this at boot time

on System#Boot do
timerSet,1,10
TaskValueSet 3,2,100 // min values unrealistic
TaskValueSet 3,4,100 // min values unrealistic
endon

Who knows a much better solution?

Re: save max min values dummy device

Posted: 18 Nov 2019, 09:18
by Micha_he
Maybe simple:

if [MaxMin#Min]>[Unterstand_oben#Temperature] or [MaxMin#Min]=0

Re: save max min values dummy device

Posted: 18 Nov 2019, 10:05
by Flying Domotic
You may perhaps get sometimes a zero value, that stays as minimum (unless you get lower values, like negative ones)?

Re: save max min values dummy device

Posted: 18 Nov 2019, 19:30
by Dondolo
Micha_he wrote: 18 Nov 2019, 09:18 Maybe simple:

if [MaxMin#Min]>[Unterstand_oben#Temperature] or [MaxMin#Min]=0
Oh, yes looks simple.
I will try, thank you

Re: save max min values dummy device

Posted: 18 Nov 2019, 19:31
by Dondolo
Flying Domotic wrote: 18 Nov 2019, 10:05 You may perhaps get sometimes a zero value, that stays as minimum (unless you get lower values, like negative ones)?
yes, I want to try it out