Level switch
Couldn't load pickup availability
Description
The FB_LevelSwitch function block represents a level switch with realistic contact mapping. It detects whether a defined level has been reached ( #FloatSwitch
) and sets normally closed ( #Out_13_14
) or normally open ( #Out_21_22
) contacts accordingly, with virtual enable inputs ( #Input_13
, #Input_21
) controlling the output. A simulation mode allows testing of the logic without actual sensor connection; reset and deactivation ensure safe basic states.
Note: This logic serves as a template. Before productive use, it must be integrated, tested, and approved by qualified personnel. Inadequate integration may result in incorrect level evaluation or unexpected switching behavior.
How it works
Reset
With #Reset
, the outputs are brought into a defined safe state: the normally closed contact is open, the normally open contact is closed. The status indicates Reset, and errors are reset.
Disabled
If #Enable
is not set, both outputs are inactive. The block behaves passively without error indication or switching action.
Simulation mode
In simulation mode, the level signal ( #FloatSwitch
) is mapped directly to the outputs: the normally closed contact follows the status, the normally open contact is inverted. The virtual inputs are not required.
Real operation
In real-time operation, virtual inputs act as releases:
-
#Out_13_14
(opener) is only active if#Input_13
is set and the level is reached. -
#Out_21_22
(normally open) is only active if#Input_21
is set and the level is not reached (inverted).
At the end, the status and diagnostics are reset if there are no errors.
Technical details
-
Inputs:
#Enable
,#Reset
,#SimMode
,#FloatSwitch
,#Input_13
,#Input_21
-
Outputs:
#Out_13_14
(NC),#Out_21_22
(NO) - Logic: Level monitoring with release via virtual inputs and simulation mode
-
Status & Diagnosis:
#Error
,#Status
,#Diagnostic
- Modes: Reset, Disabled, Simulation, Real-time
Possible applications
- Level monitoring in tanks, containers or level systems
- Virtual release for testing and validation purposes without real sensors
- Integration into higher-level control and alarm chains for status feedback
- Simulation of switching behavior at different water levels
Note: Before productive use, a technical inspection and approval by qualified personnel is required.
compatibility
- Can be used in PLC systems with SCL support (e.g. Siemens TIA Portal)
- Modular integration into process and diagnostic systems
- Simulation mode enables testing without real level change
- Safe basic state in deactivated state
Scope of delivery
You will receive:
- An SCL file with the implemented function block FB_Levelswitch
- Complete declaration of all inputs/outputs and internal states
- Annotated structure for quick adaptation
- Quick guide for integration into existing automation projects
The download link will be provided after purchase.
Support
I support you with:
- Adjustment of level conditions and release logic
- Integration into control or alarm chains
- Simulation before real operation
- Special extensions for individual requirements
Contact is possible via shop message or email. Customized adjustments are available as an option.