Skip to content
PLCampus
All examples

13Level 4

On/off temperature control of an oven

A temperature transmitter gives an analog signal. The program scales it to degrees Celsius and switches the heater on and off with a ±5 °C hysteresis around 180 °C.

The simulator is designed for computers (screens 1024 px or wider).

Virtual plant

20 °CQ0.0 · Heater0100200300175–185 °CIW0

Temperature: 20 °C

Shown at rest. In the simulator the plant moves according to your program's outputs.

Inputs and outputs

AddressNameDescription
I0.0ONOven switch
IW0TEMP_TRANSMITTERTransmitter analog input: 0–27648 = 0–300 °C (plant)
MD0TEMPERATURETemperature in °C (REAL)
Q0.0HEATERHeater contactor

Program

Ladder diagram (LD)

  1. Rung 1 — Scales the transmitter: 0–27648 → 0–300 °C.

    SCALE→ TEMPERATU…TEMP_TRANSMIT…
  2. Rung 2 — Below 175 °C: heater on.

    ONI0.0<TEMPERATURE175.0SHEATERQ0.0
  3. Rung 3 — Above 185 °C or with the oven off: heater off.

    >TEMPERATURE185.0ONI0.0RHEATERQ0.0

Step by step

  1. 1Press ▶ Run (F5) and turn on ON. Rung 1: SCALE converts the transmitter number (0 to 27648) into degrees (0 to 300 °C).
  2. 2Rung 2: if the temperature drops below 175 °C, the heater turns on (Set). Rung 3: above 185 °C, or when the oven is switched off, it turns off (Reset).
  3. 3Watch the temperature go up and down between the two marks: that band is the hysteresis. Without it, the heater would switch many times per second near the setpoint, wearing out the contactor.
  4. 4In the plant, open the oven door: losses increase and the heater stays on longer.