Vehicle barrier control
Couldn't load pickup availability
Description
You're looking for a lean SCL function block that handles automatic barrier control with emergency stop protection, limit switch monitoring, and time logic for opening and closing cycles. Runs directly in the Siemens TIA Portal—ideal for parking lot entrances, gate systems, or 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
- Monitor emergency stop: When activated, immediately set MotorOpen and MotorClose to FALSE, alarm flag
- DisplayOpen/DisplayTo show current state
- Step 0 (Idle): Barrier closed, waiting for opening request by button or light barrier
- Step 1: Motor up moves to barrier open limit switch
- Step 2: Start the hold-open time (TimeClose timer) and continue to open when vehicle is detected or the timer is running
- Step 3: After expiration without detection MotorClose moves to BarrierClose limit switch
- After step 3 back to step 0 and ready for new request
Technical details
• Emergency stop signal with highest priority – switches off all drives immediately and sets alarm flag
• Limit switch barrier open/barrier closed to control progress of the FSM
• IEC-TON timer (TimeZu) for precise hold-open time, restarted with each detection or timer cycle
• DisplayOpen and DisplayClosed as TRUE/FALSE outputs for HMI or LEDs
• Compact logic without external timers or subroutines
Possible applications
• Parking entrances and gate systems in industrial halls
• Automated entrances to logistics centers
• Training and demonstration projects on FSM processes and safety concepts
compatibility
• Runs on Siemens S7-1200 and S7-1500
• TIA Portal V13 and higher; recommended V16+ with PLCSIM for comprehensive simulation and HMI testing
Scope of delivery
• .scl file with declarations for inputs/outputs, limit switch signals, timer instance and state variables
• Comment block in the header area for adjusting the hold-open time and wiring of buttons, light barriers and limit switches
• Instant download link after purchase
Support
I can support you with integration into the control system, adjusting time parameters, or adding safety mechanisms and HMI displays. Feel free to contact me anytime via email or shop support.