FB_RoofWindow

FB_RoofWindow 1:

The outputs bWindowOpen or bWindowClose are set through a positive edge at the inputs bOpen or bClose. These remain asserted until the time tTurnOffTime has elapsed, or until the function block receives some other command. Both outputs are immediately reset by a positive edge at the bStop input.

The tSwitchOverDeadTime can be used to prevent damage to the drive motor caused by immediate changes in direction. In most cases, this value is between 0.5 s and 1.0 s. The drive manufacturer can give you a precise value.

Safety position

Moving to the safety position (e.g. in strong wind) can be achieved by setting the input bSafetyPosition. The output bWindowClose is set for the time tTurnOffTime, and the output bWindowOpen is reset. Window operation is disabled as long as the bSafetyPosition input is active.

VAR_INPUT

bClose               : BOOL;
bOpen                : BOOL;
bStop                : BOOL;
bSafetyPosition      : BOOL;
bLimitSwitchClose    : BOOL;
bLimitSwitchOpen     : BOOL;
tTurnOffTime         : TIME := t#60s;
tSwitchOverDeadTime  : TIME := t#400ms;

bClose: Set output bWindowClose and reset output bWindowOpen. The output bWindowClose remains latched.

bOpen: Set output bWindowOpen and reset output bWindowClose. The output bWindowOpen remains latched.

bStop: Reset outputs bWindowClose and bWindowOpen

bSafetyPosition: The safety position is approached. The window is closed for the time tTurnOffTime. Window operation is blocked as long as the input is active.

bLimitSwitchClose: Optional limit switch. If bClose is set and is not set within tTurnOffTimebLimitSwitchClose, bErrorLimitSwitchClose is set.

bLimitSwitchOpen: Optional limit switch. If bOpen is set and is not set within tTurnOffTimebLimitSwitchOpen, bErrorLimitSwitchOpen is set.

tTurnOffTime: If no input is activated, then the outputs are reset after this period of time. The outputs are not automatically reset if the specified duration is 0. The value given here should be about 10% larger than the travel time that is actually measured.

tSwitchOverDeadTime: Dwell time at a change of direction. Both outputs are reset during this period.

VAR_OUTPUT

bWindowOpen             : BOOL;
bWindowClose            : BOOL;
bErrorLimitSwitchClose  : BOOL;
bErrorLimitSwitchOpen   : BOOL;

bWindowOpen: The window opens.

bWindowClose: The window closes.

bErrorLimitSwitchClose: Error relating to the optional limit switch during closing.

bErrorLimitSwitchOpen: Error relating to the optional limit switch during opening.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4020.32

Tc2_BABasic from v3.1.0.0