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 Regler
#1
Hello
I wanted to know if with some scripts or in another way it is possible to have an internal controller in the LogicMachine, or if I have to create everything in a script?

thanks a lot
Reply
#2
Have a look here
https://openrb.com/example-pid-thermostat-with-lm2/
------------------------------
Ctrl+F5
Reply
#3
(25.11.2020, 12:36)Daniel. Wrote: Have a look here
https://openrb.com/example-pid-thermostat-with-lm2/

Hi

I hae see and now i write this code is correct for 3 PID ?

Code:
-- PID VENTILAZIONE SERRA 7
    -- init pid algorithm
    if not p1 then
      p1 = PID:init({
        current = '32/1/22',
        setpoint = '32/1/10',
        -- VEDERE COSA FARE CON
           -- USCITA PILOTA ENTRAMBI AEREOTERMO ?
          output = '32/1/13',
      min = 5,
      max = 50,
      manual = '32/1/19',
      --inverted ='nn/n/nn',
        kp = 1, -- BANDA PROPORZIONALE
      ki = 10    -- INTEGRALE
      --kd = 1  -- DERIVATIVA
    })
    end
    -- run algorithm
    p1:run()

-- PID VENTILAZIONE SERRA 8
    -- init pid algorithm
    if not p2 then
      p2 = PID:init({
        current = '32/1/23',
        setpoint = '32/1/11',
        -- VEDERE COSA FARE CON
           -- USCITA PILOTA ENTRAMBI AEREOTERMO ?
          output = '32/1/14',
      min = 5,
      max = 50,
      manual = '32/1/20',
      --inverted ='nn/n/nn',
        kp = 1, -- BANDA PROPORZIONALE
      ki = 10    -- INTEGRALE
      --kd = 1  -- DERIVATIVA
    })
    end
    -- run algorithm
    p2:run()

-- PID VENTILAZIONE SERRA 9
    -- init pid algorithm
    if not p3 then
      p3 = PID:init({
        current = '32/1/24',
        setpoint = '32/1/12',
        -- VEDERE COSA FARE CON
           -- USCITA PILOTA ENTRAMBI AEREOTERMO ?
          output = '32/1/15',
      min = 5,
      max = 50,
      manual = '32/1/21',
      --inverted ='nn/n/nn',
        kp = 0.5, -- BANDA PROPORZIONALE
      ki = 10    -- INTEGRALE
      --kd = 1  -- DERIVATIVA
    })
    end
    -- run algorithm
    p3:run()

Tank's
Reply
#4
Like this
https://forum.logicmachine.net/showthrea...0#pid18790
------------------------------
Ctrl+F5
Reply


Forum Jump: