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 PM without spaces and diacritic
- folder for projects – path without spaces and diacritic
- items located in the PM folder
- location of PmProj
 
- How to run the applications
- click on .pra, from promotic.exe, command line .exe with parameter .pra
 
- 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
- content of application PRA file
- PmWorkspace – explanation and example (frame size 20px, 20%, *)
- explain PmRoot, PmWeb
- usage of PmFolder in PmRoot and PmFolder
 
- Create /BoilerPlant/Boiler1/Data
- variables Temperature, Power - data types
 
- Create /BoilerPlant/Boiler1/Boiler
- PmiBar, PmiText for Temperature
- PmiSlider, PmiText enable editing in item (for Power)
- do not create data bindings in PreCfg - explain compound graphic items
- formatting text/numbers according to C language

Part 2.

- INFO system
- detecting errors in application, communication debugging, DEBUG window
- entering temperature via INFO system, for developers, not for operators
- max. 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 reading, writing): 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...Then...Else, absolute/relative paths
- local variables – existence, effect on project size
- wizards for VBScript commands (Set, Dim)
- Undo/Redo
- wizard
- rem, '
Example:
pMe.Pm("../Data/#vars/Temperature").Value = pMe.Pm("../Data/#vars/Temperature").Value + 3
  
Dim oTemp
Set oTemp = pMe.Pm("../Data/#vars/Temperature")
'pMe.Pm("../Data/#vars/Temperature").Value = pMe.Pm("../Data/#vars/Temperature").Value + 3
If oTemp.Value < 100 Then
   oTemp.Value = oTemp.Value + 3
Else
  oTemp.Value = 0
End If
 
- Page Events (two parameters)
- pMe.Pm – interface inheriting

Part 3.

- Trends
- create of /BoilerPlant/Boiler1/PmTrend for Temperature and Power
- PmTrend for saving and offering also for GetData, statistics, SaveToFile, etc.
- create of /BoilerPlant/PanelTrend from PROMOTIC object preconfigurations
- TrendsView
- demonstration of trend setup in runtime, saving the setup TG
- setup in 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 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
- insensitivity = 4 (+2/-2)- page Data/Extension
- if no change then save after 3600 seconds
- delayed disc writing – number of intervals from memory buffer to disc
- switch trends back to dBase

Part 4.

- PmPanel
– what is it, parameters, how to open – example
- when items exist in PmPanel, how to detect
- seznam obrazů – Ctrl+O
- in MainPanel create PmiText (editing on spot enabled) and PmiWEdit with PP binding to variable Power
– controls, current item x marked item,
- group operations with Shift key
- copying with Ctrl key
- layers not available -> order of items – pressing "O" key over current item
 
- Graphic items as objects
- access to items from script
- why not ot use graphic items in the application editor
- necessary to detect whether the panel is open
- only for local applications, not on WEB
- Pmi items vs. PmiW items
- multi editing
- PmiItem – parent of graphic items
- where to find complete graphic item interface
- Compound graphic items
 
- OpenView
- how to call - method of PmWorkspace and PmPanel object
- method parameters
- button for opening panels
pMe.PmPanel.OpenView("../../PanelTrend", "", ""); pMe.PmPanel.OpenView("../Boiler_1/Boiler", "", "");
- using in other graphic items – onMousePress event
- in MainPanel image with boiler, open Boiler on click
doubleclick in onMousePress event:
if (pEvent.Action == 2) // doubleclick
{
  pMe.PmPanel.OpenView("/BoilerPlant/Boiler_1/Boiler", "", "");
}
- In Boiler panel create button for ../MainPanel
pMe.PmPanel.OpenView("/MainPanel", "", "");
 
- Methods of data input into PROMOTIC:
- other ways (example with script from documentation):
- PmForm, example PmiButton + Action "Open form window"
- modal window (OpenViewModal vs OpenView)
- into MainPanel insert panel ModalDlg (General modal window)
 
- Types of data bindings in PROMOTIC applications:
- change bar colour - use binding
- GP - Binding to the property of graphic item (PmiButtonTwo, propeller, flame – animation enabled)
 
- List of graphic items
- PmiRasterImage
- SVG and other (raster) formats
- where to store own images - Resource
- PmiAnimImage
- animated GIF
- advantages (simple, WEB)
- PmiWAnimate
- multimedia files
- disadvantages (CPU, codecs, WEB)
- what to use for (videotutorias)
- pipes – activate animation, possible to use binding, WEB
- PmiCanvas at the end
- principle + example (e.g. triangle from Elemental)
- Draw page
- always JavaScript, when being executed
- limited access outside the item
- meters
- static vs dynamic section
- graphs, HVAC

Part 5.

- Alarms/Events
- create of /BoilerPlant/Boiler1/PmAlarm
- Data extensions type ExtAlarmAnalog for temperature
- advantages and limitations of ExtAlarmAnalog
- single alarm for all states
- once terminated cannot be confirmed
 
- VBScript
- create new vars Pressure_1-3 in PmData (where temperature), possible to trend
- emulate pressure values
- cycle For...Next - wizard
- Select Case - (existing ToolBar)
- use PmKey (F2)
Example 1:
Dim oData, i, oAlm
Set oData = pMe.Pm("../Data")
Set oAlm = pMe.Pm("../Alarms")
  
For i=1 To 3
  oData.Item("Pressure" & i).Value = rnd * 100
  ' oData.Item(i + 2).Value = rnd * 100 (necessary to know the variable index in PmData)
Next
 
- Data extensions of ExtAlarmAnalog type for Pressure_1
(Deactivation type = 2, limits: 5,10,90,95)
- alarms in scripts
- PmKey, alarming Pressure_2
Example 2:
If oData.Item("Pressure_2").Value < 5 Then
  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"
End If
 
- Intelligent methods ActivateNew/Inactivate – If the alarm exists/dies not exist -> it is created/it is not created
 
- PmiButtonTwo for Status
- with icon – State0
- on/off - bit 0
- MAN/AUTO – bit 1
 
- PmiRasterImage (lightbulb) - indicating boiler malfunction - Status, bit 2
- 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
 
- PmData
- Implicit properties
- example PmData.Item("...").Value
- possible without data bindings
- Transformation and conversion functions (CDbl, TransformValue, ArrayOper ..)
 
 
- VBScript/VisualBasic vs JavaScript
- what is an object: properties/methods/events
- how to use these in PROMOTIC
- parameters of methods with () – the method returns values, without () – method does not return any values
- VBScript language
- subset of VisualBasic = limitation -> therefore the global object Pm was introduced
- Global object Pm, Debug in PmTimer object
Pm.Debug "Current time: " & Pm.Time
- PROMOTIC documentation
- full index
- references to methods/properties in examples
- property or method name – direct link to help
 
- Global methods and variables
- creating method Add with two parameters
Debug in method body:
Dim c
c = a + b
Pm.Debug "Method 'Add': " & c, 2
pResult = c
calling the method in PmKey:
- with no return value
Pm.Methods.Add 3.14159, 2.78456
- with return value
Pm.Debug "PmKey-add: " & Pm.Methods(2, 5.3), 2
pMe.Pm("../Boiler").Methods.Add 5, 2
 
- PmFolder Methods
in PmPanel Boiler create method GetData
Example 3:
Dim aValues(), i
ReDim aValues(30)
For i = 0 To 30
  aValues(i) = Rnd * 100
Next
pResult = aValues
 
- PmPanel Methods
button in panel calling the method for different tests (onButtonUp)
Example 4:
var aRes = pMe.PmPanel.Methods.GetData();
if (Pm.IsValid(aRes))
{
  Pm.Debug(aRes, 3);
  Pm.Debug("Value 0: " + aRes.GetItem(0), 2);
}
 
- functional in WEB applications
- how to call such methods (application vs. panel)
 
- Access management
- user groups
- user definition
- system groups, users
- default setup of the application
- user Oper after start – why
- example how it works without
- Page Permissions
- have objects where it is relevant
- everything that goes into the WEB
- access management in graphic items
- in on/off button, Control enabled - UP/TestInGroup("$ADMIN")
 

Part 6.

- Communication
- Pm.FileText...
- important: do not use absolute paths but PROMOTIC path to files and folders
- Macro expression $path
- - only from PmDoc working with files:
- PmDll
- container for DLL library, Fce property
- can call functions, events not supported
- PmActiveX
- container for library ActiveX, Acx property
- can use properties, methods and events of ActiveX library
- ExtDdeClient
(mention DDE)
- ExtOpcClient
- 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 OpcClient, Item ID: numeric.sin.double, k:1, d:2, q:50
- then add Trend extension
- PmComm, PmModem, 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.1.240

Part 7.

-Parameters + PmPrototype/PmInstance
- how to design applications that contain multiple similar objects (boilers)
- always create 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)
- PROMOTIC object parameters
- example of folder Boiler1
- parametrize PmPanel, PmData, PmTrend, PmAlarmEvent,... (name to be displayed, group ID, WEB addresses etc.)
- parametrize script in PmTimer
Example:
Dim oTemp, nInt
Set oTemp = pMe.Pm("../Data/#vars/Temperature")
'pMe.Pm("../Data/#vars/Temperature").Value = pMe.Pm("../Data/#vars/Temperature").Value + 3
nInt = Pm.ToNumber(pMe.GetPar("boil"))
If oTemp.Value < 100 Then
  oTemp.Value = oTemp.Value + nInt + 2
Else
  oTemp.Value = 0
End If
Pm.Debug "Now: " & Pm.Time
 
- copy Boiler1 to Boiler2 and change parameter
- using parameters in PmPrototype/PmInstance
- 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)
- graphic item parameters
- parameters are evalueated during compilation
- in ../BoilerPlant/ create PmPanel "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 PmiPrototype
- 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 item
 
- Thin client
- principles of creating Web applications
- application editor objects are not available in graphic item scripts
- local application (on server), panel on the client side
- accessible only via panel methods
- for other browsers transform the panel to JavaScript, all scripts
- Full client
- Data/Web klient
- Basic concept of Pm projects
- 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 PmObjects
- PROMOTIC components
- 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
- MoveFirst/MoveLast
- MoveNext/MovePrev
- why not to use Move and MoveTo
- how to avoid errors while navigating through the table (IsBOE, IsEOF)
- access record values (FieldValues, Fields)
- basic SQL command of the select type
- SQL language – not included in this training
- transaction - explain, usage
- no example
- PmAdo
- ADO ConnectionString property – where to find
- MS objects available in PROMOTIC
- debugging in Ado
- examples of database usage
– application Examples/Others/AppDb
- application "Examples in application" from the Welcome screen
- Sales information
- PROMOTIC pricelist
- PROMOTIC versions
– 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 Enabled/Disabled
- 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, ...
- 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