Door control with numeric code
Couldn't load pickup availability
Description
You are looking for an SCL function block for door release via numeric keypad with code verification, time-controlled release, failed attempt counting, and locking logic. It can be run directly in the Siemens TIA Portal for flexible and secure access control.
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
- Step 1: Emergency stop active or time release missing → Reset door release and LEDs, stop timer, RETURN
- Step 2: Edge detection of the OK button → only react to rising edge
- Step 3: Code comparison
- correct → release door, OK LED on, reset attempt counter, start timer
- wrong → error LED on, attempt counter++, trigger alarm after 3 attempts
Reset edge after releasing the OK button - Step 4: Time-controlled reset → Timer expired → Reset door release and OK LED, stop timer
Technical details
• Inputs: Emergency stop, time release, keyboard inputs, OK button (cyclic)
• Timer #TimerRelease (PT=T#5s) for release duration
• Variable #VersuchCounter counts failed attempts, from 3 → #Alarm
• Edge detection via internal Bool #AcknowledgeEdge
• RETURN in case of security breach interrupts logic immediately
Possible applications
• Access control in industrial and office buildings
• Retrofitting existing locking systems with time-controlled release
• PLC training on access concepts
• Live demos at trade fairs and in training labs
compatibility
• Siemens S7-1200 & S7-1500
• TIA Portal V13 and higher; recommended V16+ for HMI integration and PLCSIM
Scope of delivery
• .scl file with input/output declarations, internal variables and release timer
• Download link directly after purchase
Support
I'm happy to adapt the module to other keyboard layouts, additional authentication methods, network logging, or remote monitoring, and I can provide support with HMI integration. Feel free to contact me anytime via shop message or email.