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 heating cooling
#1
Hello to everynone,
I have completed a project using 13 pid control in one script. Everything is working except from the invert function in pid. for example one pid control is the following

if not p then
    p = PID:init({
      current = '0/0/1',
      setpoint = '0/0/2',
      manual = '32/1/1',
      inverted = true,
      output = '32/1/2',
      min=0,
      max=100,
      kp=1,
      ki=1,
      kd=1
    })
  end


p:run()

but when i an writhing false in the field inverted nothing is happened.
how i will invert the logic (heating cooling)?
Thank you in advance
Reply
#2
Restart the script via disable/enable.
Reply
#3
(08.07.2022, 13:22)admin Wrote: Restart the script via disable/enable.

Thank you for your answer,
I intend to have a group adress in this field, But if the disable/ enable is necessary everytime the system goes from heating to cooling and the opposite, what i have to do? is there any way to make this via another script?
Thank you
Reply
#4
You can attach an event script to the heating/cooling mode change and then restart resident PID script like this:
Code:
script.disable('scriptname')
script.enable('scriptname')
Reply


Forum Jump: