====== Time scheduler, real ====== {{:en:mervis-ide:35-help:t18.png}} ===== Block name ===== T18_REAL_SCHEDULER ===== ST call ===== 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 ===== Library ===== LIB\HVAC ===== Version ===== V1.0 ===== Description ===== 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. ===== 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|REAL|Output value if en=false | ===== Outputs ===== |OUT|REAL|Current time schedule 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 a real value. 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 specify variable setpoints in time directly. (Use [[en:mervis-ide:35-help:035-software_basic:060-libraries:040-hvac:020-time-programs:015-t19_int_scheduler|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.\\ {{:en:mervis-ide:35-help:t18_example.png}} In the editor, the basic setpoint is set to 18 °C, and the operation hours setpoint is 21 °C: {{:en:mervis-ide:35-help:t18_example2.png}}