Switcher Block (v2.3)

Lib.Mervis.v2_3.SwitcherBlock

The auxiliary block is used for general switching functions with an alarm function.

  • Lib.Mervis
program test
    var
        switcher: lib.mervis.v2_3.SwitcherBlock;
    end_var

    switcher();
end_program

Inputs Name Data Type Allowed Range Retain Mandatory Connection Meaning
OperatingModeOperatingModeType  YesNo Desired operating mode, the off mode is dominant - no other function can start it
Demandbool NoYes Desired state in automatic mode
Feedbackusint0..2NoNo Feedback on operation - can directly connect feedback of type bool.
Can take the following values:

Value Meaning
0Feedback inactive
1Feedback active
2Feedback not connected (default value)

FeedbackManualbool NoNo Feedback indicating manual activation (e.g., from the switchboard panel)
Failurebool NoNo Failure report
EmergencyShutdownbool NoNo Emergency shutdown
OperatingHoursResetbool NoNo Reset of operating hours
RunDowntime NoNo Requested run-down time (if zero, the function is inactive)
FeedbackTimeouttime NoNo Interval waiting for active feedback
KickFunctionIntervaltime NoNo Interval of the periodic starting function (if zero, the function is inactive)
KickFunctionDurationtime NoNo Run time for periodic starting
NotRunAlarmPriorityAlarmPriorityType NoNo Class of generated alarm
FailureAlarmPriorityAlarmPriorityType NoNo Class of generated alarm
EmergencyAlarmPriorityAlarmPriorityType NoNo Class of generated alarm
ControlFlagsuint0..15NoNo Bit field defining extended block behavior

Bit Mask Meaning
01If the bit is one, alarms are not evaluated
12Defines the behavior of the Command output when an alarm occurs in automatic mode. If the bit is one, the output is deactivated
24Defines the behavior of the Command output when an alarm occurs in manual mode. If the bit is one, the output is deactivated
38Defines the alarm reaction to the EmergencyShutdown input. If it is one, a failure alarm is triggered
4..15-Unused

AlarmsStatusInLib.Mervis.v1_0.AlarmsStatus NoNo Combined interface for alarm indication

Outputs Name Data Type
Commandbool Command
AlarmsStatusLib.Mervis.v1_0.AlarmsStatus Combined interface for alarm indication
CompositeStateuint Bit field describing overall state

Bit Number Meaning
01Command
12Feedback
If feedback is not connected, it copies the Command state
24ManualMode
38ManualOn
416Demand
532Periodic activation
664Run-down active
7128Failure
8-9-OperatingMode

OperatingHourstime Operating hours
StartCounterudint Start count

Name Data Type Retain Meaning
AlarmFlag[0] AlarmPoint Yes Indication of NotRunning alarm
AlarmFlag[1] AlarmPoint Yes Indication of Failure or EmergencyShutdown alarm

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.

  • © Energocentrum Plus, s.r.o. 2017 - 2024