FB_MonthlyScheduler1
Function block for triggering actions on a certain day of the week in certain months.
The function block triggers switching when the switching time is passed. Subsequent modification of the switching events or the time is therefore not permitted. |
VAR_INPUT
arrActiveMonth : ARRAY[1..12] OF BOOL;
uiActiveWeekday : UINT;
eStartEnd : E_StartEnd;
stStartEnd : ST_StartEnd;
stSystemtime : TIMESTRUCT;
arrActiveMonth: Month in which an action is to be triggered - arrActiveMonth[1]=>January .. arrActiveMonth[12]=>December. Multiple selections are possible.
uiActiveWeekday: Day of the week on which an action is to be triggered in the selected months. 0=Sunday ... 6=Saturday. Multiple selections are not possible; the maximum value is 6
eStartEnd: Selection of the start/end definition (see E_StartEnd).
stStartEnd: Structure with the parameters defining the start and end. Unused variables, for example the duration for the selection of start/end time, are ignored internally (see ST_StartEnd).
stSystemtime: Current time in TIMESTRUCT format. It is important to count every second.
VAR_OUTPUT
bOut : BOOL;
bTriggerOn : BOOL;
bNoEventNextYear : BOOL;
bError : BOOL;
nErrorId : UDINT;
bOut: Control output that is switched on or off by the start and end event.
bTriggerOn: Trigger output for switch-on events. This output is intended for logging switch-on events. If two switch-on events occur consecutively they would not be detected via the control output bOut, since this output would remain TRUE. See also time overlaps in the overview.
bNoEventNextYear: No day matching the parameterization was found within the next 366 days.
bError: This output is set to TRUE if the parameterization is faulty. The command-specific error code is contained in nErrorId. Reset to FALSE once the parameterization is correct.
nErrorId: Contains the command-specific error code. Reset to 0 once the parameterization is correct. See Error codes.
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4020.32 | Tc2_BABasic from v3.1.0.0 |