WSCH – Weekly schedule
Block SymbolLicensing group: STANDARD
Function Description
The WSCH function block is a weekly scheduler for e.g. heating (day, night, eco),
ventilation (high, low, off), lighting, irrigation etc. Its outputs can be used for switching
individual appliances on/off or adjusting the intensity or power of the connected
devices.
During regular weekly schedule the outputs iy and y reflect the values from the wst table. This table contains triplets day-hour-value. E.g. the notation [2 6.5 21.5] states that on Tuesday, at 6:30 in the morning (24-hour format), the output y will be set to 21.5. The output iy will be set to 22 (rounding to nearest integer). The individual triplets are separated by semicolons.
The days in a week are numbered from 1 (Monday) to 7 (Sunday). Higher values can be used for special daily schedules, which can be forced using the fsch input or the specdays table. The active daily program is indicated by the isch output.
Alternatively it is possible to temporarily force a specific output value using the val input and a rising edge at the SET input (offon). When a rising edge occurs at the SET input, the val input is copied to the y output and the isch output is set to 0. The forced value remains set until:
- the next interval as defined by the wst table, or
- another rising edge occurs at the SET input, or
- a different daily schedule is forced using the fsch input.
The list of special days (specdays) can be used for forcing a special daily schedule at given dates. E.g. you can force a Sunday daily schedule on holidays, Christmas, New Year, etc. The date is entered in the YYYYMMDD format. The notation [20160328 7] thus means that on March 28th, 2016, the Sunday daily schedule should be used. Individual pairs are separated by semicolons.
The trem and ynext outputs can be used for triggering specific actions in advance, before the y and iy are changed.
The iy output is meant for direct connection to function blocks with Boolean inputs (the conversion from type long to type bool is done automatically).
The nmax parameter defines memory allocation for the wst and specdays arrays. For the wst list can contain up to 100 triplets day-hour-value. In typical applications there is no need to modify the nmax parameter.
Inputs
SET | Trigger for setting the y and iy outputs | Bool |
val | Temporary value to set the y and iy outputs to | Double (F64) |
fsch | Forced schedule | Long (I32) |
|
|
|
Outputs
iy | Integer output value | Long (I32) |
y | Output value | Double (F64) |
isch | Daily schedule identifier | Long (I32) |
trem | Time remaining in the current section (in seconds) | Double (F64) |
ynext | Output in the next section | Double (F64) |
Parameters
tz | Timezone 1 | Long (I32) |
|
|
|
nmax | Allocated size of arrays 10 1000000 100 | Long (I32) |
wst | Weekly schedule table (list of triplets day-hour-value) [1 0.01 18.0; 2 6.0 22.0; 2 18.0 18.0; 3 6.0 22.0; 3 18.0 18.0; 4 6.0 22.0; 4 18.0 18.0; 5 6.0 22.0; 5 18.0 18.0; 6 6.0 22.0; 6 18.0 18.0; 1 0.01 18.0] | Double (F64) |
specdays | List of special days (list of pairs date-daily program) [20150406 1; 20151224 1; 20151225 1; 20151226 1; 20160101 1; 20160328 1; 20170417 1; 20180402 1; 20190422 1; 20200413 1] | Long (I32) |
[Previous] [Back to top] [Up]
2023 © REX Controls s.r.o., www.rexygen.com