In this chapter you will learn how to create PROMOTIC objects
in a hierarchical tree of the editor. On the left side of the window
the PROMOTIC objects are being created, on the right side
the properties of selected object can be modified.
The right portion of the window contains configuration pages
(tabs). Each page includes a set of configurators
that can be used for alteration of corresponding object properties.
Exploring the preconfigured objects
In the previous steps you have created a new application and the system has added some objects into the empty application.
You can see those objects on the left side of the screen:
object: Represents the root of your application. On the right side of the window you can modify many properties that refer to the application as a whole (e.g. language version of the application, password, etc.).
object: Represents the main application panel (PmPanel
type object). Later on we will show you how to create and edit such panels.
object: This object (of the PmWeb
type) works as Web server that provides the HTML and XML application pages.
object: It is the application workspace (PmWorkspace
type object). On this desktop, the panels will be opened as default. The workspace is divided into two parts (frames): the upper frame for the toolbar (the "Toolbar"
object) and the bottom frame for panels. The workspace layout can be modified on the Frames
There are some subobjects contained in this object:
- "About" object: A window for displaying the basic application info, for example application description, the supplier and the customer company, PROMOTIC system version, etc..
- "Toolbar" object: A "Toolbar" type window, that is displayed in the upper frame of the workspace (in the Workspace object). There are some basic control items (buttons) preconfigured in this window.
Note:All these preconfigured objects can be modified or removed at any time.
Creation of a New Object
Click by the right mouse button on the left side of the window above the PmRoot
object. From the menu choose the "New object"
item and the "PmFolder – Folder"
suboption (another walkthrough: in the PmRoot
object press the "Insert"
button). In the PmRoot
object will be created a new object of PmFolder
type with the default name "Folder0"
. The editor offers immediately the possibility to rename the object. Rename it to "BoilerPlant"
. If you left the editing mode of the object name by mistake, choose the object and press the F2
key. This will lead you to the editing mode of the object name.
Note: Always use apposite and simple names of the objects. Don't create long names with spaces, diacritic or special characters.
object is a very simle object that groups other objects. It is used mainly for aplication hierechization
, i.e. grouping the application objects into logical subgroups. All items related to our boiler plant will be grouped in such object (folder).
Note: If you want to remove an object, select it in the tree and press the delete key.
Your boiler plant may contain multiple boilers. Therefore, create a new PmFolder
type object, the same way as you did before. But now create it in the "BoilerPlant" object (one level lower) and name it "Boiler1"
. In this phase it is sufficient for you to create just one such object. The objects "Boiler2", etc. can be easily created afterwards by copying or prototyping, once the "Boiler1" object is filled with corresponding content. In the "Boiler1" object, crete a new object of the "PmData type – Data" and name it "Data"
type object is used for storing data values (variables). In the right portion of the window, on the "Data
" page, add two variables into this object: Press the "New"
button and create one variable named "Power"
of the Single
data type. Create the second variable the same way, name it "Temperature"
and use the same data type.
The value data type
defines the cathegory of such value. The value itself may not be reprsented only by numbers. The value may also contain text, date, object etc. The PROMOTIC system uses data types defined by Visual Basic language
For numeric values
, there are severa data types available:
- Byte data type is towards small non-negative integers, the range can be only in the integer interval from 0 to 255 (1 byte information).
- Integer data type is towards ordinary integers in the range from –32768 to +32767 (2 bytes information).
- Long data type is towards very large integers in the range from –big to +big where "big" is approx. 2 billions (4 bytes information).
- Single data type is towards common real numbers (i.e. numbers with a decimal point) in the range approx. from –1.0e38 to +1.0e38 (4 bytes information).
- Double data type is towards very large real numbers in the range approx. from –1.0e308 to +1.0e308 (8 bytes information).
There is only one data type for logical values true
(YES or NOT, 1 or 0):
- Boolean data type with the true and false values (1 byte information not 1 bit, false is 0 numericaly, but beware: true is a non-zero value, i.e. any number but zero 0).
There is one data type for text values
- String data type is towards the texts with maximum length of 2 billions of characters.
There is one data type representing date values
- Date data type holds the value of date and time, that is year, month, day, hour, minute and second (8 bytes information)
There is one data type representing an object
- Object data type represents "a pointer" (a reference) to an existing object somewhere.
In adition to described data types,there is one superior data type Variant
, that dynamicaly adapts its data type according to the stored value.
Now you have created the internal structure of the application (static part) and filled in the object tree of the application. The structure of the application is very simple so far.
Note: The object tree may not be completely visible all the time. Folding/unfolding of the objects in the tree can be done by clicking the + / - to the left of the object name (or by pressing the + / - keys).