save max min values dummy device

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

save max min values dummy device

#1 Post by Dondolo » 18 Nov 2019, 08:32

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?

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: save max min values dummy device

#2 Post by Micha_he » 18 Nov 2019, 09:18

Maybe simple:

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

Flying Domotic
Normal user
Posts: 37
Joined: 27 Aug 2019, 23:57

Re: save max min values dummy device

#3 Post by Flying Domotic » 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)?

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: save max min values dummy device

#4 Post by Dondolo » 18 Nov 2019, 19:30

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

Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Re: save max min values dummy device

#5 Post by Dondolo » 18 Nov 2019, 19:31

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

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests