Temperature control with fan & heater
Couldn't load pickup availability
Description
This compact function block ensures reliable room climate control by monitoring temperature values, switching the heating on or off as needed, and controlling the ventilation both automatically and manually. The code, written in Structured Control Language (SCL), is immediately deployable in the Siemens TIA Portal—perfect for living spaces, offices, or simple process environments.
Note: All modules are designed exclusively as a learning and optimization basis and are not approved for live operation. System modules, in particular, must be finally tested and commissioned by qualified personnel before productive use.
How it works
Right at the beginning, the module checks the temperature measurement for plausibility. If the value is outside the permitted range (below 0 or above 50 °C), a sensor error is detected: Heating and ventilation are deactivated, and the logic is terminated.
In automatic mode, the heating switches on when the current temperature is below the defined setpoint, the window is closed, and automatic mode is active. The ventilation reacts to high temperatures – it is automatically activated when a configurable threshold is exceeded. Alternatively, it can be switched on manually at any time using a button.
At the end, the block outputs the current states of heating and ventilation in the form of status variables – ideal for visualization in the HMI.
Technical details
- Sensor validation: simple limit value test (0…5000 = 0…50 °C)
- Heating logic: only active when the set temperature is not reached, the window is closed and automatic mode is activated
- Ventilation: reacts either to overtemperature or manual button press
- All outputs: clearly defined BOOL signals
- Fail-safe: immediate stop of all outputs in case of sensor error
Possible applications
- Room air conditioning in residential or office spaces
- Temperature control in technical rooms, laboratories or test setups
- Introduction to control engineering for training courses or training stations
- Preliminary stage to more complex HVAC control strategies in modular systems
compatibility
- Supports Siemens S7-1200 and S7-1500 controllers
- Compatible with TIA Portal from version V13
- Recommended: V16+ for HMI, PLCSIM and comprehensive visualization options
Scope of delivery
You will receive the complete .scl file, including all variable declarations, limits, window and button logic, and extensively commented code sections. The download link will be activated immediately after purchase.
Support
I am happy to help with:
- adjusting temperature or threshold values
- integration into existing systems
- the extension to include time control or HMI visualization
Contact us at any time via email or the shop – together we will adapt the module to your requirements.