Voltage relay
Couldn't load pickup availability
Description
The FB_VoltageRelay function block monitors a voltage and evaluates whether it is within a defined range ( #LO_Limit
< #Voltage
< #HI_Limit
). The result is evaluated internally as #tempOK
. The switching behavior can be specifically enabled via virtual inputs for normally closed and normally open contacts ( #Input_13
, #Input_21
). If the voltage is within the valid range, the normally closed contact is activated; if it is outside the valid range, the normally open contact is activated.
Note: This logic is intended as a template. Before productive use, it must be integrated, tested, and approved by qualified personnel. Improper use may result in incorrect switching states.
How it works
Reset
With #Reset
the output is reset to the safe initial state: The normally closed contact signals "Voltage OK," the normally closed contact is deactivated. Status shows Reset.
Disabled
If #Enable
is not set, both contacts are disabled. The block behaves passively without reporting errors.
Active
The measured voltage is checked. If it lies between the limits ( #LO_Limit
and #HI_Limit
), it is considered valid ( #tempOK
= TRUE):
-
#NO_13_14
(normally closed) is only set if#Input_13
is active and#tempOK
is TRUE. -
#NC_21_22
(normally open) is only set if#Input_21
is active and#tempOK
is FALSE (inverted).
The status is set to OK, errors are reset.
Technical details
-
Inputs:
#Enable
,#Reset
,#Voltage
,#LO_Limit
,#HI_Limit
,#Input_13
,#Input_21
-
Internal state:
#tempOK
– TRUE if voltage is within the permissible range -
Outputs:
#NO_13_14
(normally closed),#NC_21_22
(normally closed) -
Status & Diagnosis:
#Error
,#Status
,#DiagnosticCode
- Modes: Reset, Disabled, Normal Operation
- Logic: Area monitoring with conditional output via enabled virtual contacts
Possible applications
- Voltage monitoring with clear switching output when exceeding or falling below the voltage
- Simulation of contact releases without physical hardware for validation
- Integration into control and diagnostic chains to display valid voltage states
- Ensuring defined operating conditions through threshold logic
Note: A complete technical inspection and approval by qualified personnel is required before productive use.
compatibility
- Can be used in PLC systems with SCL support (e.g. Siemens TIA Portal)
- Modular integration into control, safety and diagnostic architectures
- Deactivated state without unwanted switching operations
- Virtual inputs allow preparatory tests without real hardware
Scope of delivery
You will receive:
- An SCL file with the implemented function block FB_VoltageRelay
- Complete declaration of all inputs/outputs and internal states
- Commented logic for quick adaptation
- Quick guide for integration into existing automation projects
The download link will be provided after purchase.
Support
I am happy to support you with:
- Adjusting thresholds and logic
- Integration into higher-level control or monitoring systems
- Pre-check via virtual entrances
- Specific extensions or adaptations
Contact is possible via shop message or email. Extensions are available as optional customizations.