Logic Machine Forum
Multiple PID - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2)
+--- Thread: Multiple PID (/showthread.php?tid=558)



Multiple PID - federicocilla71@gmail.com - 16.01.2017

Goodmorning everyone.
I have a problem I can not make more PID function simultaneously.
Can someone help me. Thank you


RE: Multiple PID - admin - 16.01.2017

Like this:
Code:
if not p1 then
  p1 = PID:init({
    current = '1/1/1',
    setpoint = '1/1/2',
    output = '1/1/3'
  })

  p2 = PID:init({
    current = '2/1/1',
    setpoint = '2/1/2',
    output = '2/1/3'
  })
end

p1:run()
p2:run()



RE: Multiple PID - Erwin van der Zwart - 16.01.2017

Hi,

Try this (see attachments)

BR,

Erwin


RE: Multiple PID - federicocilla71@gmail.com - 17.01.2017

good morning, thanks for the kind risposta.ma I can not upload the files you sent me. Can you help me.


RE: Multiple PID - Erwin van der Zwart - 17.01.2017

Hi,

The files are not export/import format but manualy created.

Just open them with a text editor (notepad++ or wordpad or something) and create a user lib called 'pid' and a resident script and past the content manualy to them.

BR,

Erwin


RE: Multiple PID - federicocilla71@gmail.com - 17.01.2017

thank you so much


RE: Multiple PID - federicocilla71@gmail.com - 17.01.2017

still one last question. To slow down a bit the speed of PID how they work the following values? :
     kp = grp.getvalue ('3/3/105'),
     ki = grp.getvalue ('3/3/106'),
     kd = grp.getvalue ('3/3/107'),
Thanks again for your valuable contribution.


RE: Multiple PID - Erwin van der Zwart - 17.01.2017

Hi,

This is project / system configuration related, i would start with 0.3 for all and from there fine tune between 0 to 1 if you need to reduce overshoot or need more agresive loops.

BR,

Erwin