Hello, A customer wants to use PLCnext to control the extractors (0-10V Signal) of an electric transformer according to its temperature (temperature sensor) with a PID control. Could you advise me on the best way to program this PID control in the PLCnext? I mean, 61131 Libs or C++ Libs etc.. Thanks.
Hello Angel, please find the PID FB for PLCnext Controllers in the IEC Library “ControlTechnology” (in PLCnext Store) https://www.plcnextstore.com/#/235 If you would like to implement the PID-Control in C++, I think this example will be useful for you: https://gist.github.com/bradley219/5373998 Please note, in this Example the Task-Cyclic time is not considered, but you can expand it via e.g.
CYCLE : Sampling period corresponding to the cycle of the task where the function or FB is executed. _integral += error * _dt * (CYCLE / 1000.0); Iout = _Ki * _integral Or you can also Implement it in IEC61131 by yourself, please see the following example for P-Control:
Best Regards Eduard
Hi,
besides the standard PID function blocks provided by PLCnext Technology, you may also want to look at the IThE (Industrial Thermoprocess engineering) function block library available in the PLCnext Store:
https://www.plcnextstore.com/permalinks/apps/latest/60002172001128
IThE builds on top of the standard PID control and adds application‑oriented features such as signal conditioning, diagnostics, status handling, limit monitoring, alarms, and HMI‑ready interfaces, which are often required in temperature‑controlled systems.
It works well with classic 0–10 V actuators and temperature sensors
Best Regards Eduard