FB_DailyScheduler
Function block for triggering actions every n-th day of the year.
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
uiPeriodicity : UINT;
uiBegin : UINT;
eStartEnd : E_StartEnd;
stStartEnd : ST_StartEnd;
stSystemtime : TIMESTRUCT;
uiPeriodicity: Periodicity or interval. May be within the range 1...365.
uiBegin: Starting value for the day counter. May be within the range 1...365.
Example1:
uiPeriodicity = 5,
uiBegin = 2: Switching events on 2 Jan., 7 Jan. 12 Jan. etc.
Example2:
uiPeriodicity = 3,
uiBegin = 1: Switching events on 1 Jan., 4 Jan. 7 Jan. etc.
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 |