Functions for Schedule
Type | Format | Description |
Function | GetScheduleState(Schedule Index) | Obtains the active state of a certain schedule. |
Function | GetScheduleSysMem(Schedule Index, Starting Address of SYSTEM MEMORY) | Obtains the time data of a certain schedule. |
Subroutine | ScheduleConfig() | Displays the schedule list dialog box in the Xpanel runtime. |
Subroutine | SetScheduleState(Schedule Index, Active State) | Changes the active state of a certain schedule. |
Subroutine | SetScheduleSysMem(Schedule Index, Starting Address of SYSTEM MEMORY) | Modifies the schedule directly without using the schedule setting window. |
GetScheduleState | Obtains the active state of a certain schedule. | |
Subroutine | n = GetScheduleState(Schedule Index) | |
Description | Returns the active state of a specified schedule. | |
Active State | Description | |
0 | Disable the specified schedule. | |
1 | Enable the specified schedule. | |
Example | Enter the command to obtain the active state of the 1st schedule. Returns value 0 or 1. VAR STATE; STATE = GetScheduleState(1); |
GetScheduleSysMem | Obtains the time data of a certain schedule. |
Function | n = GetScheduleSysMem(Schedule Index, Starting Address of SYSTEM MEMORY) |
Description | Returns the time data of the specified schedule index. To use this command, 7 system memory tags must be registered sequentially. ※ Please refer to the description of the ‘SetScheduleSysMem’ command for configuring tag data. |
Example | Enter the command to obtain the time data of the 1st schedule from the system memory address 0 to 6. TIME = GetScheduleSysMem(1, 0); |
ScheduleConfig | Displays the schedule list dialog box in the Xpanel runtime. |
Subroutine | ScheduleConfig() |
Description | Brings up the ‘Schedule list’ dialog box. The schedule data is stored in the Xpanel system memory. You can change the time settings and active states of each schedule. When double-clicking each item, the ‘Schedule Config’ dialog box will appear. You must click the ‘Save and Close’ button to apply changes. The time data can be changed in the ‘Schedule Config’ dialog box. |
Example | Brings up the schedule list on the screen. |
SetScheduleState | Changes the active state of a certain schedule. | |
Subroutine | SetScheduleState(Schedule Index, Active State) | |
Description | This subroutine is used to change the active state of a specified schedule. | |
Active State | Description | |
0 | Disable the specified schedule. | |
1 | Enable the specified schedule. | |
Example | Activate the 2nd schedule. SetScheduleState(2, 1); |
SetScheduleSysMem | Modifies the schedule directly without using the schedule setting window. | |||
Subroutine | SetScheduleSysMem(Schedule Index, Starting Address of SYSTEM MEMORY) | |||
Description | This subroutine is used to modify the schedule directly without using the ‘Schedule config’ dialog box. To use this command, 7 system memory tags must be registered sequentially. System memory tags must have consecutive addresses. If the system memory is used for recipe as well, the addresses must not overlap with each other. Enter the time data in each system memory tag as shown in the table below. | |||
System Memory | Description | Range of Input Value | ||
0 | Repeat Settings | 0 | Not repeat | |
1 | Annually | |||
2 | Monthly | |||
3 | Daily | |||
4 | End of Month | |||
5 | Hourly | |||
6 | Weekly | |||
1 | Year | Available from 2011 to 2041 | ||
2 | Month | Available from 1 to12 | ||
3 | Date | Available from 0 to 31 | ||
4 | Hour | Available from 0 to 23 | ||
5 | Minute | Available from 0 to 59 | ||
6 | Day | 1 | Sunday | |
2 | Monday | |||
3 | Tuesday | |||
4 | Wednesday | |||
5 | Thursday | |||
6 | Friday | |||
7 | Saturday | |||
Example | Enter the command to change the 1st schedule list to match with the time data saved in the system memory address 0 to 6. SetScheduleSysMem(1, 0); |