Temperature Setpoint with Deadband
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in
Briefing
A process heater must maintain a temperature at an operator-selected setpoint. The operator selects one of three presets using two toggle switches: | SP_SEL_A | SP_SEL_B | Setpoint | |----------|----------|---------| | OFF | OFF | 60 °C | | ON | OFF | 60 °C | | OFF | ON | 80 °C | | ON | ON | 100 °C | Turning the heater on/off at exactly the setpoint would cause rapid chatter. A **deadband** of ±2 °C prevents this: the heater turns **on** when temperature drops to (SP − 2 °C) and turns **off** when it rises to (SP + 2 °C). The physics engine computes these comparisons and publishes: - **BELOW_SP** — temperature is below (setpoint − 2 °C) — should turn heater ON - **ABOVE_SP** — temperature is above (setpoint + 2 °C) — should turn heater OFF Your task: use START/STOP for a RUN latch; latch HEATER ON when running and BELOW_SP is true; latch HEATER OFF when ABOVE_SP or STOP.
Objectives
- Latch RUN_BIT on START, drop on STOP
- HEATER latches ON (S=) when RUN_BIT AND BELOW_SP
- HEATER latches OFF (R=) when ABOVE_SP or STOP
Hints
- Use S= and R= coils for HEATER so it stays on between deadband crossings
- | RUN_BIT AND BELOW_SP | S= HEATER ;
- | ABOVE_SP OR STOP | R= HEATER ; (the OR condition is a single parallel rung)
I/O Table
Inputs
STARTStart push-button
BOOL · %I0.0
STOPStop push-button
BOOL · %I0.1
SP_SEL_ASetpoint selector bit A
BOOL · %I0.2
SP_SEL_BSetpoint selector bit B
BOOL · %I0.3
TEMP_PVProcess temperature (°C)
REAL · %IW0
BELOW_SPPhysics: temperature below (SP − 2°C)
BOOL · %I0.4
ABOVE_SPPhysics: temperature above (SP + 2°C)
BOOL · %I0.5
Outputs
HEATERHeater contactor
BOOL · %Q0.0
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1START at ambient → HEATER latches on (below setpoint)
At ambient (20°C), well below 60°C setpoint, START → HEATER must latch on
- #2STOP immediately turns HEATER off
While heater is on, pressing STOP drops it within one scan
- #3HEATER cycles: ON below deadband, OFF above deadband, stays on in between
Verify heater latches on when BELOW_SP and latches off when ABOVE_SP
Related scenarios
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in