This preconfiguration can be activated when creating a new object (e.g. by "New object ..."
in the local object menu or by pressing the Insert
key after selecting the object) and is included in the group: "/ Technology / Schedulers"
- The preconfiguration creates an object of the PmaFolder
type. The main object name is preconfigured to "Schedule"
- The preconfiguration is created including the panel (object of the PmaPanel
type) is functional also as Web panel
with default objects PmaPanel
allows to set and save a schedule separately for several devices in two programs. This will ensure that each day in the scheduled time interval the value of the appropriate variable will be set for each device.
In the panel (ScheduleWeek
) there are objects PmgButton
and objects for entering the display of schedule values.
In the onPanelStartEnd
event, the "LoadData
" method is called which has the number of the valid current program in the parameter detected by the GetProgram
method. The "LoadData"
method then loads and processes the stored values into the graphic objects.
The state of the scheduler is written into the ScheduleDevice.json
file in the Cfg
folder of the application. This file is in the JSON
format and has preset schedules for three devices called fan_1
. The names of these devices can be modified as needed. You can also change the number of monitored devices by copying or deleting the appropriate section in the file.
object has the Schedule
variable of the String
type and contains a copy of the schedule stored in the Schedule.json
object in the "SetState"
method compares the current time with the schedule for each device. This current state is passed to the SetDevices
method in the devices
parameters. This method must be modified for the application purpose.
These configurators can be set before the preconfiguration is created:
|The name of created object||Name of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
|Enable as Web component||Specifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
|PmaWeb object||Path in the Pma objects tree to the object PmaWeb, PmaWebFolder or PmaWebLang where the registration is carried out.
Macro expression can be used for input (it is evaluated after the application is launched).
After the preconfiguration is created, the "PmaPanel > Web server > PmaWeb object" configurator will be set to this value.