T19_INT_SCHEDULER_BASE
PROGRAM TEST_T19_BASE VAR FB : LIB.HVAC.V1_1.T19_INT_SCHEDULER_BASE := (TPGVALUE := [(STARTTIME := 0, STATE := 0), (STARTTIME := 1630, STATE := 7), (STARTTIME := 1750, STATE := 0), (STARTTIME := 3070, STATE := 7), (STARTTIME := 3190, STATE := 0), (STARTTIME := 65535, STATE := 0)]); DT1:DT; INT1:UINT; END_VAR DT1:=getlocaltime(); FB(CURRENTTIME:=DT1, OUT=> INT1); END_PROGRAM
LIB\HVAC
V1.1
Time scheduler is a source of an integer variable which value changes according to a weekly schedule with maximum 42 events (changes of state). This scheduler doesn't support exceptions. Exceptions are implemented in T19_INTEGER_SCHEDULER.
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 | UINT | Output value if en=false |
OUT | UINT | 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 integer value. The possible scheduler states are defined 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 T17_BOOLEAN_SCHEDULER for boolean (on/off) output, and T18_REAL_SCHEDULER for direct outout of analogue setpoints.) At the image below, T19 is used to switch between Off / Stage 1 / Stage 2 / CO2 control modes. In the CO2 mode, the fan stages are changed according to the CO2 concentration in the room.
In the editor there is a morning purge at 7:00 with Stage 2, Stage 1 is active in the morning and in the evening, while in the daytime the CO2 control is active.