T18_REAL_SCHEDULER
PROGRAM TEST_T18 VAR FB : LIB.HVAC.V1_0.T18_REAL_SCHEDULER := (TPGVALUE := [(STARTTIME := 0, STATE := 0), (STARTTIME := 370, STATE := 1), (STARTTIME := 650, STATE := 3), (STARTTIME := 2070, STATE := 8)], EXCEPTIONS := [(STARTTIME := 1000, ENDTIME := 2000, STATE := 3)]); DT1:DT; REAL1:REAL; END_VAR DT1:=getlocaltime(); FB(CURRENTTIME:=DT1, OUT=> REAL1); END_PROGRAM
LIB\HVAC
V1.0
Time scheduler is a source of a real variable which value 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.
Input | Type | Description |
CURRENTTIME | DT | Date and time in case that other date and time than system date and time shall be used |
DEFAULTVALUE | REAL | Output value if en=false |
OUT | REAL | Current time schedule state |
Description | Importance |
STATE | Current state of the time program |
STARTTIME | Minutes from the beginning of the day |
The time scheduler compares current date and time with the definition table and sends the actual state to the output. The output is a real value. The time scheduler can be edited from IDE or HMI - LCD display, web interface, touchscreen, SCADA or another client).
Time scheduler is used to specify variable setpoints in time directly. (Use T19_INT_SCHEDULER for multistate output, like switching between Comfort, Standby, and Off, and boolean scheduler to enable plant operation according to a time schedule.)
At the image below, T18 is used to generate a temperature setpoint for an air handling unit. A correction from a room unit (AHU1_TEMP_CORR) is added, and the result is brought to the air supply PI controller.
In the editor, the basic setpoint is set to 18 °C, and the operation hours setpoint is 21 °C: