Scheduler details

Scheduler alarm class

The scheduler is using the alarm class scAlarm for sending the reminder alarms.

Scheduler data point types

The internal data point types _Sc and _ScCom are used by the scheduler. While the _Sc data point type represents the schedules the _ScCom is responsible for conducting the communication between the runtime script and the other scheduler sections. The _Sc data point type is built by general settings, the actions parameters and the schedule condition (the _TimedFunc data point type is referenced here).

Data point type _Sc

General settings

Element Data type Meaning
name langString Name of the program.
type string Type of the program.
result bool Is the program condition fulfilled or not.
specDayList langString Selected special day list.
logEntry bool Make an entry in the log file or not.
specDayMode int Special day mode.
command int Triggers the action types on, off and single
mode bool Actual status (active, inactive).

Actions-dpeList

Element Data type Meaning
dpes dyn_string List of the data point elements to be set.
dpeValuesON dyn_string ON values list of the data point elements to be set. These apply only to ON/OFF operation.
dpeValuesOFF dyn_string OFF values list of the data point elements to be set. These apply only to ON/OFF operation.
dpeValues dyn_string Value list of the data point elements to be set. Apply only to non-ON/OFF operation.
active bool The actions data point list chosen or not.

Actions-recipe

Element Data type Meaning
active bool Recipe action chosen or not.
recipeTypeOn string Recipe type for the ON event. Applies only to ON/OFF operation/handling
recipeNameOn string Recipe name for the ON event. Applies only to ON/OFF operation/handling.
recipeTypeOff string Recipe type for the OFF event. Applies only to ON/OFF operation/handling.
recipeNameOff string Recipe type for the OFF event. Applies only to ON/OFF operation/handling.
recipeType string Recipe type for the event. Applies only to non-ON/OFF operation/handling.
recipeName string Recipe type for the event. Applies only to non-ON/OFF operation/handling.

Actions-popUp

Element Data type Meaning
text langString Configured message text
uiNums dyn_string List of the UIs to be informed.
users dyn_string List of the users to be informed.
active bool Pop-up action chosen or not.

Actions-reminderAlarm

Element Data type Meaning
text langString Alarm text.
active bool Reminder Alarm chosen or not.
alarmS bool DPE with alarm handling for single event.
alarmD int DPE with alarm handling for ON/OFF event.

Actions-script

Element Data type Meaning
path string Path of the invoked script. Applies only when not in ON/OFF operation.
active bool Action script chosen or not.
pathOn string Path of the invoked ON script. Applies only to ON/OFF operation.
pathOff string Path of the invoked OFF script. Applies only to ON/OFF operation.

Time

Element Data type Meaning
vcDpeString string Additional value condition-DPE-String.
vcValue string Additional value condition-Value.
vcRelOp int Additional value condition-logical operator.
timesWeekTable Contains the times of weekdays. Applies only to the type "Week".
timesFreeScheduler dyn_time Contains the times the timedFunc() is filled with. Applies only to the type "Free" and is not used in periodical events.
conditionType int Contains the condition types that are possible in "free" (single, periodic, time list, on/off list, advanced)
vcActive bool Additional value condition chosen or not.
linkAVC bool Contains a config which enables the mathematical links with other data point elements. The additional value condition is configured in this config.

Reaction

Element Data type Meaning
dpe string DPE-String for the data point the comparison conditions apply to.
valTyp int DPE-String for the data point the comparison conditions apply to.
value string Value for the comparison condition "Single value". Value or dpe2 can be chosen.
relOp int The logical connection of value conditions in the reaction program. Applies only to "Single Range" operation.
valueON string Value for the ON comparison condition of the "Value Range" selection.
relOpON int Comparison operator for the ON comparison condition of the "Value Range" selection.
valueOFF string Value for the OFF comparison condition of the "Value Range" selection.
relOpOFF int Comparison operator for the OFF comparison condition of the "Value Range" selection.
dpe2 string Comparison data point for the "Single Range" selection.
link bool Link for the "Single Value" selection. The links are created in the plans when initializing and changing. This means that the reaction condition is configured as dp_func which returns the values TRUE or FALSE every time one or both data points change.
linkON bool Link for the "Value Range" selection (ON condition)
linkOFF bool Link for the "Value Range" selection (OFF condition)

Data point type _ScCom

General settings

Element Data type Meaning
transfer string Last created resp. changed schedules are noted on this DPE. This way the control script can respond appropriate to the change.
actionLog dyn_string Contains the latest 100 actions.
mainState string Helps to represent the load status of the main tables.
msgNo unsigned Contains the current pop-up number.
action string The most active action is noted here.

SpecDays-List

Element Data type Meaning
DayNames dyn_langString Contains the name list of special days.
DayDates dyn_time Contains the date list of special days.

SpecDays-configurations

Element Data type Meaning
ConfigNames dyn_langString Contains the names of special days list.
ConfigDayCodes dyn_String Contains the day codes of special days. Presently not in use.
ConfigDayDates dyn_string Contains the date lists of special days lists.

Control functions

Function + Syntax Description
int sc_readProgram(string dp) Reads the program. Panel global variables are used in this function. For detailed information, see wincc_oa_path/scripts/libs/ sched.ctl
int sc_writeProgram(string dp) Writes on a data point. Panel global variables are used in this function. For detailed information, see wincc_oa_path/scripts/libs/ sched.ctl
int sc_copyProgram(string &dp) Copies a schedule.
int sc_activateProgram(string dp) Activates a program.
void sc_activateAllPrograms(int &iErr) Activates all programs.
int sc_deactivateProgram(string dp) Deactivates a program.
void sc_deactivateAllPrograms(int &iErr) Deactivates all programs.
void sc_deleteProgram(string dp, int &iErr) Deletes a program.
int sc_deleteAllPrograms() Deletes all programs (_Sc data points).
void sc_createNewProgramName(string &dp, int &iErr) Creates a new name for a program (schedule). This must not be longer than 64 characters.
void sc_getAllPrograms(dyn_string &dsAllProgs) Gets all programs.
int sc_deleteSpecialDay(time dayDate) Deletes one specific special day.
int sc_deleteAllSpecialDays(string dataPoint) Deletes all special days.
int sc_readAllSpecialDays(dyn_time &dayDates, dyn_langString &dayNames) Reads all special days.

int sc_writeSpecialDay(string dataPoint,

langString paraDayName,

time paraDayDateReal,

bool editOrNew = TRUE,

time dateRealEdit = makeTime(1970,1,1,1))

Creates a special day.
int sc_deleteSpecialDayList(string dataPoint, langString paraConfigName) Deletes a special day list configuration.
int sc_writeSpecialDayList(string dataPoint, langString paraConfigName, string paraConfigDayDates, string paraConfigDayCodes = "") Saves or changes a configuration of a special day list.
int sc_readSpecialDayList(string dataPoint, string configName, dyn_langString &dn, dyn_string &dd, dyn_int &dc) Reads the configuration data of a special day list.