Switcher Block (v2.3)
Full Name
Lib.Mervis.v2_3.SwitcherBlock
Description
The auxiliary block is used for general switching functions with an alarm function.
Required Project References
- Lib.Mervis
Usage in ST
program test var switcher: lib.mervis.v2_3.SwitcherBlock; end_var switcher(); end_program
Input and Output Description
Inputs | Name | Data Type | Allowed Range | Retain | Mandatory Connection | Meaning | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OperatingMode | OperatingModeType | Yes | No | Desired operating mode, the off mode is dominant - no other function can start it | |||||||||||||||||||
Demand | bool | No | Yes | Desired state in automatic mode | |||||||||||||||||||
Feedback | usint | 0..2 | No | No |
Feedback on operation - can directly connect feedback of type bool. Can take the following values:
|
||||||||||||||||||
FeedbackManual | bool | No | No | Feedback indicating manual activation (e.g., from the switchboard panel) | |||||||||||||||||||
Failure | bool | No | No | Failure report | |||||||||||||||||||
EmergencyShutdown | bool | No | No | Emergency shutdown | |||||||||||||||||||
OperatingHoursReset | bool | No | No | Reset of operating hours | |||||||||||||||||||
RunDown | time | No | No | Requested run-down time (if zero, the function is inactive) | |||||||||||||||||||
FeedbackTimeout | time | No | No | Interval waiting for active feedback | |||||||||||||||||||
KickFunctionInterval | time | No | No | Interval of the periodic starting function (if zero, the function is inactive) | |||||||||||||||||||
KickFunctionDuration | time | No | No | Run time for periodic starting | |||||||||||||||||||
NotRunAlarmPriority | AlarmPriorityType | No | No | Class of generated alarm | |||||||||||||||||||
FailureAlarmPriority | AlarmPriorityType | No | No | Class of generated alarm | |||||||||||||||||||
EmergencyAlarmPriority | AlarmPriorityType | No | No | Class of generated alarm | |||||||||||||||||||
ControlFlags | uint | 0..15 | No | No |
Bit field defining extended block behavior
|
||||||||||||||||||
AlarmsStatusIn | Lib.Mervis.v1_0.AlarmsStatus | No | No | Combined interface for alarm indication |
Outputs | Name | Data Type | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command | bool | Command | ||||||||||||||||||||||||||||||
AlarmsStatus | Lib.Mervis.v1_0.AlarmsStatus | Combined interface for alarm indication | ||||||||||||||||||||||||||||||
CompositeState | uint |
Bit field describing overall state
|
||||||||||||||||||||||||||||||
OperatingHours | time | Operating hours | ||||||||||||||||||||||||||||||
StartCounter | udint | Start count |
Blocks
Name | Data Type | Retain | Meaning |
---|---|---|---|
AlarmFlag[0] | AlarmPoint | Yes | Indication of NotRunning alarm |
AlarmFlag[1] | AlarmPoint | Yes | Indication of Failure or EmergencyShutdown alarm |
Detailed Function Description
The block integrates commonly used functions for device switching. These functions include:
- Operating mode - Automatic, Manually off, Manually on
- Monitoring feedback and related actions
- Alarm function
- NotRunning - i.e., there is an active Command request and the Feedback is not active
- Failure - Triggered by the activation of the Failure input or EmergencyShutdown
- Periodic starting (e.g., cycling for pumps)
- Run-down after shutdown
- Emergency/immediate shutdown
- Operating hours counting
The command for switching is generated based on the request in automatic mode or if the operating mode is set to On. In the case of an active command, the feedback state is then checked. If it does not become active within the time specified by the FeedbackTimeout input, the NotRunning alarm is generated. The Failure input serves for information about an external fault (e.g., overcurrent protection, frequency converter output). Setting it triggers the Failure alarm. Setting EmergencyShutdown to true leads to immediate command deactivation regardless of the selected operating mode. If the alarm generation from EmergencyShutdown is enabled, its activation (i.e., when the Command output is also active) triggers the Failure alarm.
In automatic mode, the command can also be activated by the expiration of the KickFunctionInterval for periodic starting. The command is activated for a fixed duration of one minute.
If the operation request Demand becomes inactive, the run-down time countdown begins, meaning the Command remains active for the time specified by the RunDown parameter. Only after this period does the command deactivate.