Shade (FB)

FUNCTION_BLOCK Shade

Short Descritpion

Control of a Venetian blind drive with open/close commands and central control
Additional functions: Slat adjustment/central control/comfort functions
Typical application: Control of a standard Venetian blind drive

Portrayal

../_images/Shade_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

xButtonUp BOOL    

Requirement - Venetian blind opening via button

xButtonDown BOOL    

Requirement - Venetian blind closing via button

xCentralUp BOOL    

Requirement - Venetian blind opening via central control

xCentralDown BOOL    

Requirement - Venetian blind closing via central control

Outputs

Name

Datatype

Range

Init-Value

Function

xUp BOOL    

Release - Venetian blind opening

xDown BOOL    

Release - Venetian blind closing

Setpoints/parameters

Name

Datatype

Range

Init-Value

Function

tFullMovement TIME   T#30s

Duration of full opening/closing

tPulse TIME   T#600ms

Duration of the pulse for the slat adjustment

tButton TIME   T#900ms

Time period for distinguishing between slat adjustment/complete opening/closing

tWaitReverse TIME   T#2s

Waiting period for switching between opening and closing

Functional description

General

This function block controls a shutter drive with open (xUp) and close (xDown) commands.
It is operated by the button inputs xButtonUp and xButtonDown.
A higher central operation is possible via the inputs xCentralUp and xCentralDown.
The duration of the input operations xButtonUp and xButtonDown determines which function is executed
(Duration <tButton: full opening/closing, duration>= tButton: slat adjustment).
In addition, a forced control of the outputs xUP and xDown takes place, i.e. if the output xUp is active (= TRUE),
At the same time the output xDown is deactivated (= FALSE). This also applies vice versa.
If one of the two keys (xButtonUp = TRUE and/or xButtonDown = TRUE) is pressed during a complete opening/closing,
the opening/closing will be interrupted immediately.

Central control

Each rising edge at the input request - Venetian blind opening via the central control xCentralUp triggers a complete
opening of the blind (xUp * = TRUE and *xDown = FALSE during the period **tFullMovement **).
Each rising edge at the input request - blind closing via central control xCentralDown triggers a complete
closing of the blind (xDown = TRUE and xUp = FALSE during the period **tFullMovement **).
If the inputs for the central control are permanently active (= TRUE), no operation is possible with the xButtonUp and xButtonDown buttons.

Waiting period of switching between opening and closing tWaitReverse

Switching from opening to closing the blind and vice versa can be delayed by this setpoint/parameter.
The value 0.0s allows immediate switching.

Slat adjustment

Slat adjustment is triggered by continuous operation of the control buttons xUp or xDown during a period longer than
a time period for the distinction between slat adjustment/complete opening/closing tButton. While pressing the
respective key, a symmetrical output signal at the assigned output (pause duration = pulse duration = tPulse) is generated.

Full opening/closing

By pressing the respectively associated keys xUp or xDown during a period, full opening/closing becomes smaller
than the time period for the distinction between slat adjustment/complete opening/closing tButton.
At the corresponding output, a signal (state = TRUE) with a duration of tFullMovement is then generated without further influencing.
At the other output, no signal (state = FALSE) is generated during this period.

Visualisation




Information

Element

Authors

Date

Version

Information

Function

Alexander Halter 10.2017 1.0

Initial version

Programming

Adam Bartod 10.2017 1.0

Initial version

Test Alexander Halter 10.2017 1.0

Initial version

Dokumentation Jochen Reu 11.2017 1.0

Initial version

Codesys

InOut:
Scope Name Type Initial Comment
Input xButtonUp BOOL  

Requirement - Venetian blind opening via button

xButtonDown BOOL  

Requirement - Venetian blind closing via button

xCentralUp BOOL  

Requirement - Venetian blind opening via central control

xCentralDown BOOL  

Requirement - Venetian blind closing via central control

Output xUp BOOL  

Release - Venetian blind opening

xDown BOOL  

Release - Venetian blind closing

Input tFullMovement TIME TIME#30s0ms

Duration of full opening/closing

tPulse TIME TIME#600ms

Duration of the pulse for the slat adjustment

tButton TIME TIME#900ms

Time period for distinguishing between slat adjustment/complete opening/closing

tWaitReverse TIME TIME#2s0ms

Waiting period for switching between opening and closing