Promotic

PROMOTIC full basic training manual for trainers

- Verify that all participans have installed the required PROMOTIC version
- PROMOTIC версия 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 (см. Как to start PROMOTIC runtime application):
- by means of PmManager.exe
- by clicking on .pra
- command line "\Promotic\PmVXXYY\Bin32\PromoticRt32.exe with .pra parameter"


- Create new project
- Preconfigurations - common features
- parameter settings window PreCfg (напр. communication medium Ethernet x COM -> IP x COM port, и т.д.)
- possible to modify later, edit, add, delete
- Enable Web, JavaScript
- Create application of PmRtFree type
- difference between PmRtFree и PmRtTestFree regime
- content of application PRA file
- PmaWorkspace - explanation and example (frame size 20px, 20%, *)
- Explain PmaRoot, PmaWeb
- usage of PmaFolder in PmaRoot и PmaFolder


- Create /BoilerPlant/Boiler1/Data
- variables Temperature (Alt+0176 = °), Power, Status - data types


- Create /BoilerPlant/Boiler1/Boiler
- PmgBarBox, PmgNumber для Temperature
- PmgSliderBox, PmgNumber enable editing in item (для Power)
- do not create data bindings in PreCfg - explain compound Pmg objects

Part 2.

- INFO систем
- 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(parameters))
- 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 размер аппликации
- Wizard для JavaScript statements (for, var)
- Undo/Redo
- Adding comments to script:
// - 1 row
или
/* - 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 "Объект" tab (number of variables)
- the whole training is in PmFree
- The "Events" tab (two parameters)
- pMe.Pm - interface inheriting

Part 3. - Тренды

- Create /BoilerPlant/Boiler1/PmaTrendGroup для Temperature и Power
- PmaTrendGroup for saving and offering also for GetData, statistics, SaveToFile, и т.д.
- PmgTrendViewer
- Demonstration of trend setup в среде runtime, saving the setup TG
- Setting в среде разработки
- Another options (automated reading of TG when panels open, using parameters, и т.д.)

- 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)
- если no change, then save after 3600 seconds
- delayed writing to disk - number of intervals from memory buffer to disk
- switch тренды 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 объект 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(null, "../../PanelTrend", "", "target:main;");
oCreator.Open();
// или
Pm.CreateView(null, "../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(null, "/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(null, "/MainPanel", "", "target:main;").Open();


- Methods of data input into PROMOTIC:
- other ways (example with script from документация):
- 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 - pipeline - activate animation, possible to use binding, Web
- PmgCanvas
- principle + example (напр. triangle from Elementary)
- the "Draw" tab
- always JavaScript, when being executed
- limited access outside the object
- счетчики
- static vs dynamic section
- graphs, air conditioning

Part 5.

Тревоги/События
- Create /BoilerPlant/Boiler1/PmAlarm
- Data extensions of the ExtAlarmAnalog type for temperature
- advantages and limitations of AlarmAnalog
- single тревога for all states
- once terminated cannot be confirmed


- JavaScript
- create new variables Pressure_1-3 in the PmaData object (где температура), 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 для Pressure_1
(Deactivation тип = 2, limits: 5,10,90,95)
- тревоги in the script
- PmaKey, тревога для 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 - Если the тревога exists/dies not exist -> it is created/it is not created


- PmgButtonState для 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 для Power (test whole value on each change)
- Create Data extensions of the ExtEvent type для Status Bit(0), Turn boiler on -> change to true
- Create Data extensions of the ExtEvent type для 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 в системе PROMOTIC
- Parameters of methods with () - the method returns values, without () - method does not return any values
- VBScript language
- Subset of VisualBasic = limitations -> 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);
-
- Документация PROMOTIC
- full index
- references to methods/properties in examples
- property name 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 the 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 аппликации
- user Oper after start - why
- example how it works without
- The "Permission" tab
- have objects where it is relevant
- everything that goes to the Web
- access management in Pmg objects
- in on/off button, Control enabled - UP - Data binding to the property of the logged on user / TestInGroup("$ADMIN")

Part 6. - Коммуникация

- Pm.FileText...
- important: do not use absolute paths but PROMOTIC path to files and folders
- INI файл (IniFileRead, IniFileWrite)
- text файл (FileTextRead, FileTextWrite)
- binary файл (PmBuffer.LoadFromFile, PmBuffer.SaveToFile) - см. 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
(only 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
- для Pressure_2 add extension OpcDa, Item ID: numeric.sin.double, k:1, d:2, q:50
- then add Trend extension
- PmaComm, Ethernet
- Документация и 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 address: 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
- PmaPrototype global (#Global)/local
- easy additional changes
- (almost) identical objects (according to parameters)
- Pma объект parameters
- example of folder Boiler1
- parametrize PmaPanel, PmaData, PmaTrendGroup, PmaAlarmGroup,... (name for displaying, group ID, Web addresses и т.д.)
- 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 global prototype Boiler_Template (vizard)
- Create multiple boiler instances
- P/I in DEVELOP vs RT (how is the content different)
- Pmg объект parameters
- Parameters are evalueated during compilation
- in ../BoilerPlant/ create PmaPanel "BoilerPlant"
- inside create intelligent boiler (температура, название, click, и т.д.)
$.join($.text("appxxx","boiler"),$.par("boil"))
- multilanguage application / editing by Total Commander и т.д.
- copy + change parameters
- graphic prototypes/instances
- PmgPrototype global (#Global)/local
- 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 клиент
- principles of creating Web applications
- Pma objects are not available in scripts of Pmg objects
- 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 клиент
- Data/Web client
- Basic concept of PROMOTIC applications
- 2 applications - communication and visualization
- 2 folders in one project - logic and communication
- then in 3rd folder possible to emulate communications and ban 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
- 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

- Ценник системы PROMOTIC
- Версия PROMOTIC
- single установка = 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
- Ключ программного обеспечения 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)
- Услуги
- tech. support (free vs charged)
- applications
- pilot projects, functional part, complete application, ...
- https://www.promotic.eu
- current версия PROMOTIC
- no registration
- e-shop
- on-line документация always linked to last version
- offered services
- контакты
- MICROSYS контакты
- distributors
- integrators
- references
Навигация:
 
 
- PROMOTIC full basic training manual for trainers
 
 
© MICROSYS, spol. s r. o.