Example: How to create an IPIDController program to control temperature
The temperature control program maintains the temperature within the control zone.
Setpoint, process and manipulated values
The following table defines the SP, PV, and MV values used in the temperature control program.
Item | Description |
---|---|
Setpoint (SP) | Measurement of temperature in degrees Celsius that defines the temperature for the control zone. |
Process value (PV) | Must be converted to the same unit as the SP, which is a measurement of degrees Celsius. |
Manipulated value (MV) | Must be converted to an analog value so that it can be output to the PWM to control the heating element. |
Temperature control system
The following diagram and table define the components in the temperature control system that are controlled by the temperature control program the events that occur when the control program runs.
Temperature control system

Sequence of events for temperature control program
The following table identifies the components in the temperature control system and describes the sequence of events that occurs in the system when the temperature control program runs.
No. | Item | Description |
---|---|---|
![]() | Controller output | Sends the MV to the PWM (On/Off). |
![]() | Pulse Width Modulation (PWM temperature controller) | Solid state relay that controls the heating element. |
![]() | Heating element | Increases temperature in the control zone. |
![]() | Resistance temperature detector (RTD) | Measures the temperature in the control zone and sends the PV (RTD signal) to the controller input. |
![]() | Controller input | Receives the PV (RTD signal). |
![]() | PLC program | Converts the PV (RTD signal) to the same unit as the SP (degrees Celsius) and determines the difference between the PV and the SP and adjusts the MV according to the parameter values defined in the P, I and D parameters. |
Example: Function block diagram to control temperature
This function block diagram shows the predefined and user-defined function blocks used in the application to control temperature in a control zone.
Function block diagram to control temperature

Provide Feedback