Turnstile / access system
Couldn't load pickup availability
Description
This compact SCL function block controls an electromechanical door release via RFID card or manual button and takes a configurable time window into account. It features integrated emergency stop safety shutdown, automatic locking after the release time has elapsed, and error display in the event of unauthorized access. Runs in the Siemens TIA Portal (≥ V13), making it ideal for office, laboratory, or parking area applications.
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
- Time window check: Outside the permitted interval, all release outputs remain inactive
- RFID scan or button pulse → edge detection → activate release if the time window is valid
- TON timer starts (e.g. 5 s) → magnetic lock unlocked, “OK” LED on
- Timer expired or emergency stop activated → Reset enable and “OK” LED
- Passage sensor records access
- Invalid RFID scan outside time window → Error LED permanently, set alarm flag
Technical details
• Emergency stop input with highest priority → immediate deactivation of magnet release and LEDs, set alarm
• Time window control via inverted blocking flag
• Edge detection for RFID OK and button inputs ensures clean input pulse
• Single TON timer controls unlocking duration without external timers
• Outputs for HMI: Display_OK, Display_Error, Access Successful
• Internal flags: ReleaseActive, Alarm – suitable for statistics and logging
Possible applications
• Access control in office buildings, laboratories or parking garages
• Flexible operating modes through RFID/button combination
• Training and demonstration systems for PLC edge detection, timer logic and safety
compatibility
• Siemens S7-1200 & S7-1500
• TIA Portal V13 or higher; recommended V16+ with PLCSIM and HMI panels
Scope of delivery
• .scl file with input/output declarations, edge flags, timer instance and status variables
• Header comments on time window settings, unlocking duration and sensor wiring
• Download link directly after purchase
Support
I'm happy to adjust time slots, integrate additional RFID types, HMI reports, or connect to control systems. Contact me via email or shop support.