Redundance2

Redundance2 (FB)

FUNCTION_BLOCK Redundance2

Short description

Redundant control of two identical devices Influencing factors: requests, operating hours, running and fault states Typical application: determination of lead and standby pump\

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xEnOne

BOOL

Request - lead device

xEnTwo

BOOL

Request - lead and standby device

xFb1

BOOL

Operation - device 1

xFb2

BOOL

Operation - device 2

xAlarm1

BOOL

Fault - device 1

xAlarm2

BOOL

Fault - device 2

uiOperatingHours1

UDINT

Operating hours - device 1

uiOperatingHours2

UDINT

Operating hours - device 2

xUpdate

BOOL

Input - follow switching by operating hours

Outputs

Name
Data type
Value range
Initial value
Function

iCurrentSequence

INT

Current device sequence

xCmd1

BOOL

Enable - device 1

xCmd2

BOOL

Enable - device 2

xErr

BOOL

output - fault

Setpoints / Parameters

Name
Data type
Value range
Initial value
Function

eModeRedundance

eOpModeRedundance

eOpModeRedundance.Auto, eOpModeRedundance.ForceComponent1, eOpModeRedundance.ForceComponent2

eOpModeRedundance.Auto

Operating mode of sequence determination

xConOperatingHours

BOOL

TRUE

Enable - follow switching by operating hours

xEnFb

BOOL

TRUE

Enable - use of operation messages

wTolerance

WORD

100

Limit - operating hours difference

xIgnoreAlarmXFollowerDevice

BOOL

FALSE

Parameter to ignore the fault state of the follower device ( TRUE = ignore )

Function description

General

This function block is used for the redundant control of two identical devices depending on the influencing factors requests ( xEnOne and xEnTwo ), operating hours ( uiOperatingHours1 and uiOperatingHours2 ), running states ( xFb1 and xFb2 ), fault states ( xAlarm1 and xAlarm2 ) and the operating mode for sequence determination ( eModeRedundance ). The enablement of the lead and, if necessary, the standby device is determined internally and, taking into account the current sequence iCurrentSequence is transferred to the device outputs xCmd1 and xCmd2 overwritten. \

Requests xEnOne and xEnTwo

They are used to determine whether only the lead device or both the lead and the standby device should be requested. \

xEnOne

xEnTwo

Lead device

Follower device

Note

FALSE

FALSE

FALSE

FALSE

No request

TRUE

FALSE

TRUE

FALSE

Request - lead device

X

TRUE

TRUE

TRUE

Request - lead and standby device

Legend: X = Indeterminate\

Output fault xErr

It indicates a discrepancy between the requests and the fault states of the devices. The function table describes the constellations that activate the output xErr ( = TRUE ), i.e. indicate a fault. In all other cases the output xErr is not active ( = FALSE ).\

xEnOne

xEnTwo

xAlarm1

xAlarm2

xErr

Note

TRUE

X

TRUE

TRUE

TRUE

Request - lead device and both devices faulty

X

TRUE

TRUE

X

TRUE

Request - lead and follower device and at least one device faulty

X

TRUE

X

TRUE

TRUE

Request - lead and follower device and at least one device faulty

Legend: X = Indeterminate\

Output iCurrentSequence

It always shows the current sequence of the two devices. The first digit always indicates the device number of the lead device ( example: iCurrentSequence = 1X … lead device = device 1 ) The second digit always indicates the device number of the follower device. ( example: iCurrentSequence = X2 … follower device = device 2 )\

Setpoint / parameter xConOperatingHours

In the TRUE state the follow switching is triggered on each execution of the function block depending on the operating hours and operation messages ( when xEnFb = TRUE ) of devices 1 and 2. In the FALSE state the follow switching can only be triggered by a rising edge at the input xUpdate . \

Setpoint / parameter xEnFb

In the TRUE state the running states of devices 1 and 2 are evaluated and considered in the follow switching. In the FALSE state the device outputs of devices 1 and 2 are evaluated and considered in the follow switching.\

Setpoint / parameter wTolerance

This setpoint determines the maximum operating hours difference before switching the lead and the follower device based on operating hours. \

Setpoint / parameter eModeRedundance

This setpoint defines the operating mode of sequence determination. In automatic mode the sequence is determined automatically. Forcing the sequence to ForceComponent1 or ForceComponent2 is done by deliberately influencing the internal states of the operating hours counters or the setpoint/parameter wTolerance. The sequence switch in case of a fault therefore remains available. \

eModeRedundance

Lead device

Follower device

Note

eOpModeRedundance.Auto

Automatic determination

Automatic determination

Automatic sequence determination

eOpModeRedundance.ForceComponent1

Device 1

Device 2

Forced sequence device 1 - 2

eOpModeRedundance.ForceComponent2

Device 2

Device 1

Forced sequence device 2 - 1

Determination of lead and follower device

Switching with high priority depending on the fault states of devices 1 and 2

xAlarm1

xAlarm2

Lead device

Follower device

Note

FALSE

FALSE

not affected

not affected

Both devices without fault

TRUE

FALSE

Device 2

Device 1

Device 1 faulty

X

TRUE

Device 1

Device 2

Device 2 faulty

Legend: X = Indeterminate\

Switching with low priority depending on operating hours, operation messages ( xFb ) and enable outputs ( xCmd ) of devices 1 and 2

A reassessment and re-determination with low priority can be triggered in each case as follows:

xConOperatingHours = TRUE and / or rising edge at the input xUpdate

xConOperatingHours

xUpdate

Conditions

Lead device

FALSE

FALSE, TRUE, H/L

no reassessment

TRUE

FALSE, TRUE, H/L

same operation messages ( xFb = TRUE or = FALSE ) or same enable outputs ( xCmd = TRUE or = FALSE ) of the devices

Device with lower operating hours count

TRUE

FALSE, TRUE, H/L

One device in operation ( xFb = TRUE ) or one device enabled ( xCmd = FALSE )

Switch to the device with lower operating hours count if operating hours difference > wTolerance

FALSE

L/H

uiOperatingHours1 = uiOperatingHours2 = 0 ( no operating hours present )

Swap lead and follower device

FALSE

L/H

uiOperatingHours1 or uiOperatingHours2 > 0

Device with lower operating hours count

Legend: L/H … rising edge, H/L … falling edge\

Device outputs xCmd1 and xCmd2

The device outputs are finally determined as follows ( xIgnoreAlarmXFollowerDevice = FALSE ):

Lead device = device 1

xCmd1 = TRUE: The lead device is requested and at least one device is requested and device 1 is not faulty xCmd1 = FALSE: In all other cases

xCmd2 = TRUE: The follower device is requested and at least one device is requested and device 2 is not faulty xCmd2 = FALSE: In all other cases

Lead device = device 2

xCmd1 = TRUE: The follower device is requested and at least one device is requested and device 1 is not faulty xCmd1 = FALSE: In all other cases

xCmd2 = TRUE: The lead device is requested and at least one device is requested and device 2 is not faulty xCmd2 = FALSE: In all other cases

The device outputs are finally determined as follows ( xIgnoreAlarmXFollowerDevice = TRUE and at the same time not both devices are faulty ):

Lead device = device 1

xCmd1 = TRUE: The lead device is requested and at least one device is requested and device 1 is not faulty xCmd1 = FALSE: In all other cases

xCmd2 = TRUE: The follower device is requested and at least one device is requested. xCmd2 = FALSE: In all other cases

Lead device = device 2

xCmd1 = TRUE: The follower device is requested and at least one device is requested xCmd1 = FALSE: In all other cases

xCmd2 = TRUE: The lead device is requested and at least one device is requested and device 2 is not faulty xCmd2 = FALSE: In all other cases

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xEnOne

BOOL

Input

xEnTwo

BOOL

Input

xFb1

BOOL

Input

xFb2

BOOL

Input

xAlarm1

BOOL

Input

xAlarm2

BOOL

Input

uiOperatingHours1

UDINT

Input

uiOperatingHours2

UDINT

Input

xUpdate

BOOL

Input Const

xIgnoreAlarmXFollowerDevice

BOOL

FALSE

Input Const

eModeRedundance

eOpModeRedundance

eOpModeRedundance.Auto

Input Const

xConOperatingHours

BOOL

TRUE

Input Const

xEnFb

BOOL

TRUE

Input Const

wTolerance

WORD

100

Output

iCurrentSequence

INT

Output

xCmd1

BOOL

Output

xCmd2

BOOL

Output

xErr

BOOL

Last updated