Redundant2 (FB)

FUNCTION_BLOCK Redundant2

Short Descritpion

Redundant control of two devices similar in type
Influencing factors: requirements, operating hours, operating and fault states
Typical application: Definition of the lead and follower pump

Portrayal

../_images/Redundant2_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

xEnOne BOOL    

Requirement - lead device

xEnTwo BOOL    

Requirement - Lead and follower 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    

Enable - sequence control after operating hours

Outputs

Name

Datatype

Range

Init-Value

Function

iCurrentSequence INT    

Current device sequence

xCmd1 BOOL    

Enable - Device 1

xCmd2 BOOL    

Enable - Device 2

xErr BOOL    

Fault output

Setpoints / Parameters

Name

Datatype

Range

Init-Value

Function

xConOperatingHours BOOL   TRUE

Enable - Follower device after Operation hours

xEnFb BOOL   TRUE

Enable - Use of the operation messages

wTolerance WORD   100

Limit value - Operating hours difference

Functional Description

General

This function block is used for the redundant control of two devices similar in type depending on the influencing variables
Requirements (xEnOne and xEnTwo), operating hours (uiOperatingHours1 and uiOperatingHours2), operating states (xFb1 and xFb2)
and fault states (xAlarm1 and xAlarm2). The release of the lead and, if necessary, the follower device is defined internally and under
consideration of the iCurrentSequence current sequence transferred to the xCmd1 or xCmd2 device outputs.

xEnOne and xEnTwo requirements

They are used to define whether only the lead device or the lead and the follower device should be requested.

xEnOne xEnTwo

Lead device

Follower device

Notes

FALSE FALSE FALSE FALSE

No requirement

TRUE FALSE TRUE FALSE

Requirement - lead device

X TRUE TRUE TRUE

Requirement - Lead and follower device

Legend: X = Undefined

Fault output xErr

It indicates a discrepancy between the requirements and the fault states of the devices.
The constellations are described in the function table that activate the xErr output (= TRUE), that is, indicate a fault.
In all other cases, the xErr output is not active (= FALSE).
xEnOne xEnTwo xAlarm1 xAlarm2 xErr

Notes

TRUE X TRUE TRUE TRUE

Requirement - Lead device and both devices are faulty

X TRUE TRUE X TRUE

Requirement - Lead device and follower device and at least one device is faulty

X TRUE X TRUE TRUE

Requirement - Lead device and follower device and at least one device is faulty

Legend: X = Undefined

Output iCurrentSequence

It always displays 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 2)

Setpoint / Parameter xConOperatingHours

In the TRUE state, the sequential switching is triggered for each execution of the function block in dependency on the operating hours and operating messages
(at xEnFb = TRUE) of Devices 1 and 2. In the FALSE state, the sequential switching can only be triggered by a rising edge at the
xUpdate input.

Setpoint / Parameter xEnFb

In the TRUE state, the operating states of the Devices 1 and 2 are evaluated and taken into account in the sequential switching.
In the FALSE state, the device outputs of Devices 1 and 2 are evaluated and taken into account in the sequential switching.

Setpoint / Parameter wTolerance

This setpoint determines the maximum operating hours difference before a switching over of the lead and follower device on the basis of the operating hours.

Determination of the lead and follower device

High priority switching over depending on the fault status of devices 1 and 2

xAlarm1 xAlarm2

Lead device

Follower device

Notes

FALSE FALSE

not influenced

not influenced

Both devices without fault

TRUE FALSE

Device 2

Device 1

Device 1 faulty

X TRUE

Device 1

Device 2

Device 2 faulty

Legend: X = Undefined

Low priority switching over depending on the operating hours, operating messages (xEnFb = TRUE)

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

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

xConOperatingHours xUpdate

Conditions

Lead device

FALSE FALSE, TRUE, H/L  

No re-evaluation

TRUE FALSE, TRUE, H/L

Identical operating messages (xEnFb = TRUE) or identical enable outputs (xEnFb = FALSE) of the devices

Device with fewer operating hours

TRUE FALSE, TRUE, H/L

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

Change to the device with a lower number of operating hours, if the difference in operating hours > wTolerance.

FALSE L/H

uiOperatingHours1 = uiOperatingHours2 = 0 (No operating hours available)

Change of the lead device with the follower device

FALSE L/H

uiOperatingHours1 or uiOperatingHours2 > 0

Device with fewer operating hours

Legend: L/H ... Rising edge, H/L ... falling edge

Device outputs xCmd1 and xCmd2

The device outputs are finally defined as follows:

Lead device = Device 1

xCmd1 = TRUE: The lead device is requested and at least one device is requested and device 1 is not disturbed

xCmd2 = TRUE: The lead device is requested and at least one device is requested and device 2 is not disturbed

Lead device = Device 2

xCmd1 = TRUE: The follower device is requested and at least one device is requested and device 1 is not disturbed

xCmd1 = TRUE: The lead device is requested and at least one device is requested and device 2 is not disturbed

Visualization




Information

Element

Authors

Date

Version

Notes

Function

Adam Bartod 09.2016 1.0

Initial version

Programming

Adam Bartod 09.2016 1.0

Initial version

Test Jochen Reu 10.2017 1.0

Initial version

Documentation

Jochen Reu 10.2017 1.0

Initial version

Codesys

InOut:
Scope Name Type Initial Comment
Input xEnOne BOOL  

Requirement - lead device

xEnTwo BOOL  

Requirement - Lead/follower 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  

Comparison of operating hours at edge

xConOperatingHours BOOL TRUE

Enable - continuous comparison of operating hours

xEnFb BOOL TRUE

Use of FALSE = Enable; TRUE = Operating message

wTolerance WORD 100

Limit value - operating hours difference for direct sequence change when only one device is in operation

Output iCurrentSequence INT  

Current device sequence

xCmd1 BOOL  

Enable - Device 1

xCmd2 BOOL  

Enable - Device 2

xErr BOOL  

Fault output