Event based on 1Wire thermometer

macesko
Posts: 4
Joined: Sun Jan 03, 2016 12:17 pm

Event based on 1Wire thermometer

Postby macesko » Tue Jan 05, 2016 1:24 pm

Hi, can you please advise me how to create automation event triggered different temperature level on thermometer. I can't find it in tutorial. Does any documentation exist?

Thank you for assistance.
tomas_hora
Site Admin
Posts: 298
Joined: Wed Oct 29, 2014 9:56 am

Re: Event based on 1Wire thermometer

Postby tomas_hora » Wed Jan 06, 2016 9:25 am

Hello, mervis is not event-driven system so you have to look at as a program that runs in an infinite loop. So whatever you create in your programs is evauated in every run of the loop (the duration of the loop is cca 20ms depending on complexity of your program).

So for example to decide whether to heat or not, you add a function block (eg. gt, lt,...) to compare selected temperature from the global variables and depending on the output of the block (True/False) you decide what to do next...

Hope it helps.
macesko
Posts: 4
Joined: Sun Jan 03, 2016 12:17 pm

Re: Event based on 1Wire thermometer

Postby macesko » Wed Jan 06, 2016 11:10 am

Ok. It helps.

Can you advice me how to run program in a loop?

M
tomas_hora
Site Admin
Posts: 298
Joined: Wed Oct 29, 2014 9:56 am

Re: Event based on 1Wire thermometer

Postby tomas_hora » Thu Jan 07, 2016 9:03 am

Anything you do in Mervis runs in loop. Make sure to check the basic program example in the documentation https://files.unipi.technology/index.ph ... umentation

Return to “Mervis”

Who is online

Users browsing this forum: No registered users and 1 guest