# Schedule

Input scheduler

Timer switch with freely adjustable schedule. The block outputs a state (active/inactive) and an analog value based on the current schedule entry.

Schedule
O
V

# Outputs

IDAbbrevNameTypeDefaultDescription
outputOOutputBOOLEANfalseDigital output: active (true) when schedule entry is on, inactive (false) when off or no entry
valueVValueNUMBER0Analog output: value from the current schedule entry

# Configuration

IDNameTypeDefaultUnitDescription
scheduleScheduleSCHEDULE0Schedule to use for time-based activation

Details:

Subtype: ON_OFF

# State

IDNameTypeDefaultUnitDescription
last_activation_tsLast execution timestampNUMBER0sLast execution timestamp in seconds from epoch
next_activation_tsNext execution timestampNUMBER0sNext execution timestamp in seconds from epoch

# Source Code

View Volang source

extern fn std::next_activation_at() {
    // execute immediately after initialization
    // then follow the schedule entries edges
    if (state::get("next_activation_ts") == 0 and state::get("last_activation_ts") == 0) {
        // wait 10 seconds for all modules to reach steady state
        // TODO: remove the 10 seconds delay after SOF-431 is resolved
        return time::now() + 10
    }
    schedule_id = config::get("schedule")
    return schedule::get_next_activation_ts(schedule_id)
}

schedule_id = config::get("schedule")
output::set("output", schedule::get_entry_type(schedule_id) > 0)
output::set("value", schedule::get_entry_value(schedule_id))

# Working with Schedules

The Schedule block uses an ON/OFF schedule that spans a 24-hour daily cycle. When the current time falls within an active entry, the digital output (O) is true and the analog output (V) carries the entry's numeric value. Outside any entry both outputs reset to their defaults.

The schedule itself does not differentiate between days of the week. To vary behaviour across weekdays, weekends, holidays, or any custom situation, combine the Schedule block with Operation Modes — user-defined modes that give total freedom without limiting you to a fixed weekly grid.

Schedules are configured through a visual timeline editor in Voldeno Studio. The editor uses a 24-hour axis with a default 30-minute grid, but supports single-minute precision.

For a complete guide to schedule types and the visual editor see Voldeno Studio – Schedules.

Timer switch with freely adjustable schedule. The block outputs a state (active/inactive) and an analog value based on the current schedule entry.