Operating mode selection
Couldn't load pickup availability
Description
The FB_Operating Mode Selection function block enables safe selection between manual, setup, and automatic modes – taking all relevant safety releases into account. It ensures that only one operating mode can be active at a time and reliably reports errors when multiple modes are selected.
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
Count active selection bits
The logic counts how many selection inputs ( Sel_Hand
, Sel_Einrichten
, Sel_Automatik
) are active.
Check multiple selection
If more than one active selection bit is set, the error flag Fehler
= TRUE and all operating modes remain deactivated.
Priority hierarchy
If exactly one selection bit is active, the priority is Manual > Setup > Automatic. The respective operating mode ( Betrieb_Hand
, Betrieb_Einrichten
, or Betrieb_Automatik
) is only activated if Freigabe_Safety
(and for manual operation, Freigabe_Hand
) is also set.
Operation_active
Betrieb_aktiv
= TRUE as soon as a valid operating mode is active.
Technical details
-
Inputs:
Sel_Hand
,Sel_Einrichten
,Sel_Automatik
,Freigabe_Safety
,Freigabe_Hand
-
Outputs:
Betrieb_Hand
,Betrieb_Einrichten
,Betrieb_Automatik
,Betrieb_aktiv
,Fehler
- Logic via counting active bits, IF/ELSIF structures and AND operations
Possible applications
- Flexible switching between maintenance, manual and automatic operation
- Safety-critical operating mode switching in machine controls
- Training systems for practical teaching of operating mode control
compatibility
- Siemens S7‑1200 & S7‑1500 controllers
- Compatible with TIA Portal from version V13
- Recommended: TIA Portal V16+ for Simulation & HMI
Scope of delivery
You will receive an .scl
file with complete declarations of all inputs and outputs and internal variables. Customization instructions for priority logic and release requirements are included. The download link will be provided immediately after purchase.
Support
I am happy to support you with:
- Adjusting priority logic or release requirements
- Integration of additional operating modes or user roles
- Creation of HMI layouts to visualize the operating mode switching
Contact via shop message or email is possible at any time.