Automatic roller shutter with light sensor
Couldn't load pickup availability
Description
This function block controls roller shutters or blinds with automatic brightness detection, limit position monitoring, and manual priority logic. The structured SCL code is ready for use in the Siemens TIA Portal and can be directly integrated into building automation or smart home projects – without any additional customization.
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
First, the brightness sensor is checked for plausible values. If an error occurs (e.g., unrealistic measured values), the control system is deactivated and the system is put into a safe state.
Manual button commands for raising or lowering the light are processed via edge detection (set/reset). At the same time, the automatic control can independently trigger an up or down movement when defined brightness thresholds are reached. Important: Manual inputs always take priority and reliably interrupt the automatic control.
Limit switches stop the drive automatically as soon as the upper or lower position is reached – thus preventing mechanical overrun.
Technical details
- Sensor validation by comparison with definable min/max limits
- Edge trigger (e.g.
rtr_Hoch
,rtr_Runter
) for manual inputs - Automatic control when brightness thresholds are exceeded/undershot
-
ReqJalousie
as central control variable (0 = Stop, 1 = Up, 2 = Down) - Limit switches reset
ReqJalousie
automatically -
RollladenAuf
andRollladenZu
provide clear signals for motor control - Status flag shows whether the automatic function is currently active or manually overridden
Possible applications
Ideal for:
- Shading systems in residential buildings, offices and industrial buildings
- Smart home installations with HMI panel or KNX/BACnet connection
- Training systems or demo systems with a focus on practical automatic logic
compatibility
Runs on Siemens S7-1200 and S7-1500
Compatible with TIA Portal from version V13
Recommended: TIA V16 or higher for PLCSIM tests and visualizations
Scope of delivery
You will receive an .scl file with complete declarations of all inputs/outputs, limits, trigger instances, and logic for limit monitoring. The download link will be available immediately after purchase.
Support
I am happy to help with:
- the adjustment of thresholds and terms
- integration into HMI systems or automation platforms
- the extension with additional functions (e.g. weather station or weekly time program)
Simply contact us via email or shop support.