Description
This compact function block controls a motor with safety enable, monitors a light curtain for interruptions, and provides a manual acknowledgment function. It reports faults via the status text and ensures that the motor only runs in a safe state and after acknowledgment. The code is written in SCL and can be used directly in the TIA Portal.
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
-
Fault (
NotHalt=TRUE
∨FreigabeBetrieb=FALSE
∨Lichtvorhang_UNTERBROCHEN=TRUE
):
Engine_ON = FALSE, Warning light = TRUE, Error_noted = TRUE → Acknowledgement required -
Acknowledgement (edge FALSE→TRUE at
Quittierung
):
if light curtain is free, then error_noted = FALSE, acknowledgement_active = TRUE -
Operation (
StartSignal=TRUE
∧ no error_noted):
Motor_ON = TRUE, otherwise remains locked
Technical details
-
Priority :
NotHalt
&FreigabeBetrieb
abort immediately -
Edge detection : internal flag
Quittierung_alt
for rising edge - Inputs : StartSignal, EmergencyStop, EnableOperation, LightCurtain_INTERRUPTED, Acknowledgement
- Outputs : Engine_ON, Warning light, Error, Error_noted, Acknowledgement_active
-
Abort : in case of error via
RETURN
Possible applications
Safe motor control behind light curtains (conveyor belts, gantry axes, rotating bodies), retrofit and training environments.
compatibility
Siemens S7-1200/S7-1500, TIA Portal ≥ V13 (V16+ recommended for HMI/PLCSIM)
Scope of delivery
.scl
file with input/output declarations, error and acknowledgement logic including pre-registration flag, header comments and download link.
Support
Adjustment of the acknowledgment logic, sensor parameters and HMI visualization – via email or shop support.