This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

PID thermostat with LogicMachine
#2
Hi Claudio,

You can put a event based script on the 1 byte output and write a bit output to another object

Code:
output = event.getvalue()
if output > 0 then
   -- Get value of object to avoid write true on each 1-100 value
   bitvalue = grp.getvalue('yourbitobject')
   if bitvalue == false then
      grp.write('yourbitobject', true)
   end
else
   -- Get value of object to avoid write false on each 0 value
   bitvalue = grp.getvalue('yourbitobject')
   if bitvalue == true then
      grp.write('yourbitobject', false)
   end
end

BR,

Erwin van der Zwart
Reply


Messages In This Thread
RE: PID thermostat with LogicMachine - by Erwin van der Zwart - 12.09.2016, 15:03

Forum Jump: