Time scheduler, bool
Block name
T17_BOOLEAN_SCHEDULER
ST call
PROGRAM TEST_T17 VAR FB : LIB.HVAC.V1_0.T17_BOOLEAN_SCHEDULER := (TPGVALUE := [(STARTTIME := 0, STATE := FALSE), (STARTTIME := 210, STATE := TRUE), (STARTTIME := 420, STATE := FALSE)], EXCEPTIONS := [(STARTTIME := 1000, ENDTIME := 2000, STATE := FALSE)]); DT1:DT; BOOL1:BOOL; END_VAR DT1:=getlocaltime(); FB(CURRENTTIME:=DT1, OUT=>BOOL1); END_PROGRAM
Library
LIB\HVAC
Version
V1.0
Description
Time scheduler is a source of a binary signal which changes according to a weekly schedule with maximum 42 events (changes of state). Exception events (exceptions) defined by date, time, and state can be inserted.
The output value is recalculated at 30-second intervals.
Inputs
Input | Type | Description |
CURRENTTIME | DT | Date and time in case that other date and time than system date and time shall be used |
DEFAULTVALUE | BOOL | Output value if en=false |
Outputs
OUT | BOOL | Current time scheduler state |
Description of internal structures
Description | Importance |
STATE | Current state of the time program |
STARTTIME | Minutes from the beginning of the day |
Function
The time scheduler compares current date and time with the definition table and sends the actual state to the output. The output is either true or false. The time scheduler can be edited from IDE or HMI - LCD display, web interface, touchscreen, SCADA or another client).
Application example
Time scheduler is used to enable plant operation according to the operating hours plan, for night depressions, etc. (Use T19_INT_SCHEDULER for multistate output, and T18_REAL_SCHEDULER for direct output of analogue values.)
The image illustrated switching between day and night heating curve. At the daytime the scheduler output is on TRUE, at the nighttime it is on FALSE.
In the editor, the scheduler plan is set up to be TRUE from 6:00 to 22:00, and FALSE otherwise: