22.10.2020, 07:39
Use different variable name for each PID. Do a full script restart via disable/enable after making changes.
Code:
if not p1 then
p1 = PID:init({
current = '2/2/0',
setpoint = '2/2/7',
output = '2/2/6'
})
p2 = PID:init({
current = '3/2/0',
setpoint = '3/2/7',
output = '3/2/6'
})
end
-- run algorithm
p1:run()
p2:run()