Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PROMOTIC full basic training manual for trainers

- Verify that all participans have installed the required PROMOTIC version
- PROMOTIC version to be used for training

Part 1.

- How to install PROMOTIC
- path to \Promotic without spaces and diacritic
- folder for projects (\Promotic\Apps) - path without spaces and diacritic
- items located in the \Promotic folder
- location of \Promotic\Apps
 
- How to run the applications (see How to start PROMOTIC runtime application):
- by means of PmManager.exe
- click on .pra
- command line "\Promotic\PmVXXYY\Bin32\PromoticRt32.exe with .pra parameter"
 
- Create new project
- Preconfigurations - common features
- parameter settings dialog PreCfg (e.g. communication medium Ethernet x COM -> IP x COM port, etc.)
- possible to modify later, edit, add, delete
- Enable Web, JavaScript
- Create application of PmRtFree type
- difference between PmRtFree and PmRtTestFree regime
- content of application PRA file
- PmaWorkspace - explanation and example (frame size 20px, 20%, *)
- Explain PmaRoot, PmaWeb
- usage of PmaFolder in PmaRoot and PmaFolder
 
- Create /BoilerPlant/Boiler1/Data
- variables Temperature (Alt+0176 = °), Power, Status - data types
 
- Create /BoilerPlant/Boiler1/Boiler
- PmgBar, PmgNumber for Temperature
- PmgSlider, PmgNumber enable editing in item (for Power)
- do not create data bindings in PreCfg - explain compound Pmg objects
- formatting text/numbers according to C language

Part 2.

- INFO system
- Detecting errors in the application, communication debugging, DEBUG window
- Entering temperature in the INFO system, for designers, not for users
- Maximum number of windows = 4 (all are dependent on main window but all have their own refresh)
 
- Launching the application in the Web browser for the first time (localhost, 127.0.0.1)
- disable antivirus software
 
- What is na object? Human example:
- properties (for read and write): age, sex, height
(a=obj.Value, obj.Value=12.5)
- property parameters: tooth, which one?
(b=obj.property(parametrs))
- methods (can be executed): go with parameter to
- events (happen - inform regarding object state): go to the door and confir you are there
 
- Timer /BoilerPlant/Boiler1/Timer 1 sec
 
- Temperature emulation script
- increase font size
- local menu of script editor
- using wizard for object linking
- script without variables - explanation of ineffective scripts
- if...else, absolute/relative paths
- local variables - existence, effect on application size
- Wizard for JavaScript statements (for, var)
- Undo/Redo
- Adding comments to script:
// - 1 row
or
/* - before , */ after script
Example:
JavaScriptSelect and copy to clipboard

//pMe.Pm("../Data/#vars/Temperature").Value = pMe.Pm("../Data/#vars/Temperature").Value + 3;

var oTemp = pMe.Pm("../Data/#vars/Temperature");
if (oTemp.Value < 100)
{
//oTemp.Value += 3
oTemp.Value = oTemp.Value + 3;
}
else
oTemp.Value = 0;
 
- The "Object" tab (number of variables)
- the whole training is in PmFree
- The "Events" tab (two parameters)
- pMe.Pm - interface inheriting

Part 3. - Trends

- Create /BoilerPlant/Boiler1/PmaTrendGroup for Temperature and Power
- PmaTrendGroup for saving and offering also for GetData, statistics, SaveToFile, etc.
- Create /BoilerPlant/PanelTrend from Pma object preconfigurations
- PmgTrendViewer
- Demonstration of trend setup in the runtime mode, saving the setup TG
- Setting in the development environment
- Another options (automated reading of TG when panels open, using parameters, etc.)

- trend time accuracy
- time format (local time/daylight-saving time/ always standard time)
- always show current time in the viewer
- advantages of standard time
- saving method - backups and cyclic,
- different formats,
DO NOT SAVE CHANGES
- data storage optimalization
- simple, changing value
- based on value change rate
- the "Dead band" configurator = 4 (+2/-2)
- if no change, then save after 3600 seconds
- delayed writing to disk - number of intervals from memory buffer to disk
- switch trends back to dBase

Part 4.

- PmaPanel
- what is it, parameters, how to open - example
- when objects exist in the PmaPanel object, how to detect
- seznam obrazů - Ctrl+O
- in MainPanel create PmgString (editing on spot enabled) and PmgWEdit with PP binding to variable Power
- group operations with Shift key
- copying with Ctrl key
- layers not available -> order of objects - pressing "O" key over current item
 
- Pmg objects as objects
- access to Pmg objects in the script
- why not ot use Pmg objects in the editor of Pma objects
- necessary to detect whether the panel is open
- only for local applications, not on Web
- multi editing
- PmgObject - parent of Pmg objects
- where to find complete Pmg object interface
- Compound Pmg objects
 
- CreateView
- the way of calling/opening the PmaPanel object
- method parameters
- button for opening panels
in the onButtonUp event:
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(pMe.PmPanel, "../../PanelTrend", "", "target:main;");
oCreator.Open();
//or
Pm.CreateView(pMe.PmPanel, "../Boiler_1/Boiler", "", "target:main;").Open();
- using in other Pmg objects - the onMousePress event
- in MainPanel image with boiler, open Boiler on click
mouse doubleclick in the onMousePress event:
JavaScriptSelect and copy to clipboard

//mouse doubleclick
if (pEvent.Action == 2)
Pm.CreateView(pMe.PmPanel, "/BoilerPlant/Boiler_1/Boiler", "", "target:main;").Open();
- In Boiler panel create button for ../MainPanel
in the onButtonUp event:
JavaScriptSelect and copy to clipboard

Pm.CreateView(pMe.PmPanel, "/MainPanel", "", "target:main;").Open();
 
- Methods of data input into PROMOTIC:
- other ways (example with script from documentation):
- PmForm, example PmgButton + Action "Open form window (PmForm)"
- modal window (CreateView, modal:1;)
- into MainPanel insert panel ModalDlg (General modal window)
 
- Types of data bindings in the PROMOTIC application:
- change bar color - use binding
- the "GP - Data binding to the property of the Pmg object" data binding (PmgButtonState, propeller, flame - animation enabled)
 
- List of Pmg objects
- PmgRasterImage
- SVG and other (raster) formats
- where to store own images - Resource
- PmgAnimImage
- animated GIF
- advantages (simple, Web)
- PmgVideo
- multimedia files
- disadvantages (CPU, codecs, Web)
- what to use for (videotutorias)
- PmgPipe - pipes - activate animation, possible to use binding, Web
- PmgCanvas
- principle + example (e.g. triangle from Elementary)
- the "Draw" tab
- always JavaScript, when being executed
- limited access outside the object
- meters
- static vs dynamic section
- graphs, air conditioning

Part 5.

Alarms/Events
- Create /BoilerPlant/Boiler1/PmAlarm
- Data extensions of the ExtAlarmAnalog type for temperature
- advantages and limitations of ExtAlarmAnalog
- single alarm for all states
- once terminated cannot be confirmed
 
- JavaScript
- create new variables Pressure_1-3 in the PmaData object (where temperature), possible to trend
- emulate pressure values
- cycle for - wizard
- switch (show existing ToolBar)
- use PmaKey (F2)
Example 1:
JavaScriptSelect and copy to clipboard

var i;
var oData = pMe.Pm("../Data");
for (i = 1; i < 4; i++)
{
oData.Item("Pressure" + i).Value = Pm.Random(0, 10);
//necessary to know the variable index in PmaData
//oData.Item(i + 2).Value = Random(0, 10);
}
 
- Data extensions of the ExtAlarmAnalog type for Pressure_1
(Deactivation type = 2, limits: 5,10,90,95)
- alarms in the script
- PmaKey, alarm for Pressure_2
Example 2:
JavaScriptSelect and copy to clipboard

var oData = pMe.Pm("../Data");
var oAlm = pMe.Pm("../Alarms");

if (oData.Item("Pressure_2").Value < 5)
oAlm.ActivateNew("Pressure_2_ll", "alarm0", "My boiler no. 1", "Pressure 2 in boiler no. 1 too low", oData.Item("Pressure_2").Value);
else
oAlm.Inactivate("Pressure_2_ll");
 
- Intelligent methods ActivateNew/Inactivate - If the alarm exists/dies not exist -> it is created/it is not created
 
- PmgButtonState for Status
- with icon - State0
- on/off - bit 0
- MAN/AUTO - bit 1
 
- PmgRasterImage (lightbulb) - indicating boiler malfunction - Status, bit 2
- data binding T (table)
- data binding T (table)
 
- Create /BoilerPlant/Boiler1/PmEvent
- Create Data extensions of the ExtEvent type for Power (test whole value on each change)
- Create Data extensions of the ExtEvent type for Status Bit(0), Turn boiler on -> change to true
- Create Data extensions of the ExtEvent type for Status Bit(0), Turn boiler off -> change to false
 
- PmaData
- example PmaData.Item("...").Value
- possible without data bindings
- Transformation and conversion methods (ToNumber, TransformValue, ArrayOper, PmBuffer ..)
 
 
- VBScript/VisualBasic vs JavaScript
- What is an object: properties/methods/events
- How to use these in the PROMOTIC system
- Parameters of methods with () - the method returns values, without () - method does not return any values
- VBScript language
- Subset of VisualBasic = limitation -> therefore the global Pm object was introduced
- Global Pm object, the Pm.Debug method in the PmaTimer object
Example3:
JavaScriptSelect and copy to clipboard

Pm.Debug("time:" + Pm.Time);
-
- Documentation PROMOTIC
- full index
- references to methods/properties in examples
- property or method name - direct link to documentation
 
- Global methods and variables
- creating the "Add" method with two parameters
Debug in method body:
JavaScriptSelect and copy to clipboard

var a = 3;
var b = 4;
var c = a + b;
Pm.Debug("Method 'Add':" + c, 2);
return c;
calling the method in the PmaKey object:
JavaScriptSelect and copy to clipboard

//- with no return value
Pm.Methods.Add(3.14159, 2.78456);

//- with return value
Pm.Debug("PmaKey-add:" + Pm.Methods.Add(2, 5.3));
 
- PmaFolder Methods
in PmaPanel Boiler create method GetData
Example 3:
JavaScriptSelect and copy to clipboard

var i;
var aValues = Pm.CreatePmArray().Create(30);
for (i = 0; i < 30; i++)
aValues.SetItem(Pm.Random(0, 100), i);
return aValues;
 
- PmaPanel Methods
button in panel calling the method for different tests (onButtonUp)
Example 4:
JavaScriptSelect and copy to clipboard

var aRes = pMe.PmPanel.Methods.GetData();
if (Pm.IsValid(aRes))
{
Pm.Debug(aRes, 1);
Pm.Debug("Value 0: " + aRes.GetItem(0), 2);
}
 
- are functional in Web applications
- how to call such methods (application vs. panel)
 
- Access management
- user groups
- user definition
- system groups, users
- default setting of the application
- user Oper after start - why
- example how it works without
- The "Permission" tab
- have objects where it is relevant
- everything that goes into the Web
- access management in Pmg objects
- in on/off button, Control enabled - UP - Data binding to the logged user property / TestInGroup("$ADMIN")
 

Part 6. - Communication

- Pm.FileText...
- important: do not use absolute paths but PROMOTIC path to files and folders
- binary file (PmBuffer.LoadFromFile, PmBuffer.SaveToFile) - see example in Help (DLL, PmaComm)
- PmaDll
- container for DLL library, Fce property
- can call functions, events not supported
- PmaActiveX
- container for library ActiveX, Acx property
- can use properties, methods and events of ActiveX library
- ExtDdeClient
(mention DDE)
- ExtOpcDa
- reading data from OPC -> after the connection is established PROMOTIC waits for data that have been modified - these will be sent from CACHE memory
- writing data to OPC -> PROMOTIC writes via (tunnel) directly into the device and the device then returns the value into the CACHE
- example of Graybox OPC simulator
- for Pressure_2 add extension OpcDa, Item ID: numeric.sin.double, k:1, d:2, q:50
- then add Trend extension
- PmaComm, Ethernet
- Documentation and manuals for communication (Allen-Bradley, Simatic, ADAM, ...)
- explanation of data bindings
- Example of PreCfg Communication by the Modbus TCP/IP protocol with TH2E device
- IP addr: 192.168.3.240

Part 7.

- Parameters + PmaPrototype/PmaInstance
- How to design applications that contain multiple similar objects (boilers)
- Create always new structure - time-consuming, non-effective
- Copy + modify parameters
- Faster, need to remember everything that needs to be modified
- Parametrization
- as above but simpler multiplication
- difficult additional changes
- Prototypes/instances - higher level
- easy additional changes
- (almost) identical objects (parameters)
- Pma object parameters
- example of folder Boiler1
- parametrize PmaPanel, PmaData, PmaTrendGroup, PmaAlarmGroup,... (name for displaying, group ID, Web addresses etc.)
- parametrize script in the PmaTimer object
Example:
JavaScriptSelect and copy to clipboard

var nInt = Pm.ToNumber(pMe.GetPar("boil"));
var oTemp = pMe.Pm("../Data/#vars/Temperature");

if (oTemp.Value < 100)
oTemp.Value = oTemp.Value + nInt + 2;
else
oTemp.Value = 0;

Pm.Debug("Now: " + Pm.Time);
 
- Copy Boiler1 to Boiler2 and change parameter
- using parameters in PmaPrototype/PmaInstance
- Content of folder Boiler1 copy to the prototype Boiler_Template
- Create multiple boiler instances
- P/I in DEVELOP vs RT (how is the content different)
- Pmg object parameters
- Parameters are evalueated during compilation
- in ../BoilerPlant/ create PmaPanel "BoilerPlant"
- inside create intelligent boiler (temperature, name, click, etc.)
$.join($.text("appxxx","boiler"),$.par("boil"))
- multilanguage application / editing by Total Commander etc.
- copy + change parameters
- graphic prototypes/instances
- differences compared to Prototypes/Instances in application editor
- move the intelligent boiler to PmgPrototype
- do not forget to remove parameters from boiler
- add new parameter into the prototype/instance boil:0;
- create X instances including parameter value change (for each boiler)
- demonstrate easy modification of the Pmg object
 
- Thin client
- principles of creating Web applications
- Pma objects are not available in Pmg object scripts
- local application (on the server), panel on the client side
- accessible only via panel methods
- for other Web browsers transform the panel to JavaScript, all scripts
- Full client
- Data/Web client
- Basic concept of PROMOTIC applications
- 2 apps - communication and visualization
- 2 folders in one project - logic and communication
- then in 3rd folder possible to emulate communications and ban objects
- Complete list of Pma objects
- Security components:

Part 8. - Working with databases

- Nothing is created, just explain
- Examples on prepared applications
- Database types (file vs server)
- Database basics
- open database, table, close database, table
- navigating in the table
- why not to use Move and MoveTo
- access record values (FieldValues, Fields)
- basic SQL statement of the select type
- SQL language - not included in this training
- transaction - explain, usage
- no example
- The PmaAdo object
- ADO ConnectionString property - where to find
- Microsoft objects available in PROMOTIC
- debugging in Ado
- Examples of database usage
- application Examples/Others/AppDb
- application "Examples in the application" from the Welcome screen

Part 9. - Sales information

- Pricelist of the PROMOTIC system
- PROMOTIC version
- single installation = DEVELOP/RT/FREE
- stable vs development versions
- extension of runtime licences
- only Web/Data clients sold as quantity (number of clients), other licences YES/NO
- distribution of licences
- HW Key
- SW Key with HW components check - not recommended, disadvantages
- NET key - usage
- licence extension
- PmUpgrade10
- only needed for licence extension or for upgrade to newer PROMOTIC version
- Runtime works with no time limitation (application never stops)
- Services
- tech. support (free vs charged)
- applications
- pilot projects, functional part, complete application, ...
- https://www.promotic.eu
- current PROMOTIC version
- no registration
- e-shop
- on-line documentation always linked to last version
- offered services
- contacts
- MICROSYS contacts
- distributors
- integrators
- references
Navigation:
 
 
- PROMOTIC full basic training manual for trainers
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice