FB_BA_CalenderXXCh

FB_BA_CalenderXXCh 1:

Yearly scheduler with 1, 7 or 28 channels.

The function block FB_BA_Calender07Ch is described as an example.

This function block is used to enter periods such as school holidays or company holidays.
The function block is enabled by the input variable bEnable.
The input stSsyTi is linked to the current system time.
If the time switching condition is fulfilled, output bQ is set.
Within the calendar, a time period is described by a switch-on date [day, month, hour, minute] and a switch-off date [day, month, hour, minute].

A switch-on period is only active if the variable bEn of the channel is set to TRUE.
For irregular but recurring periods, the variable bResetAfterOn can be set to TRUE. The enable parameter bEn is then automatically reset to FALSE after the time has elapsed.

FB_BA_CalenderXXCh 2:

The switch-on and switch-off points of a channel must be in the same year. The switch-off point must not be earlier than the switch-on point. Otherwise the switch-off point is automatically corrected and set to the same value as the switch-on point.
If the switch-on point is equal to the switch-off point, the channel remains off.

VAR_INPUT

bEn                : BOOL;
stSysTi            : TIMESTRUCT;

bEn: General function block enable.

stSysTi: Structure with the local NT system time (see TIMESTRUCT).

VAR_IN_OUT

arrChannel: ARRAY [1..7] OF ST_BA_CalendarChannel;

arrChannel: Yearly scheduler; with the single-channel function block, the name of the variable is stChannel (see ST_BA_CalenderChannel). Internally limited to the respective number of possible channels via the variable cBA_NumOfChannels.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0