In the PROMOTIC system, there are many ways to define a variable. All PROMOTIC variables can be divided into two basic groups: licenced varables and unlicenced variables. The number of variables in PROMOTIC application defines the size of the application and can be detected in the "Object size and licence
" configurator of the PmaRoot
The licenced variables are:
The UNlicenced variables are:
- Local variables in scripts (created by commands var
How to use licenced variables effectively
Data extensions of variables in the PmaData object allow to:
- define a variable to be trended (ExtTrend
) - therefore additional variable does not have to be defined in the PmaTrendGroup
- define a variable to connect to communication driver (ExtComm
) - therefore additional variable does not have to be defined in the PmaCommGroup
- define a variable to communicate via OPC (ExtOpcDa
) - therefore additional variable does not have to be defined in the PmaOpcDaClientGroup
Columns "Read only" in the PmaDataTable object
Each cell of the table is counted into the application size for the purpose of licencing. But if a column of table in the PmaDataTable object is marked as "Read only", then the cells in this column are not counted into application size. This allows application designers to use such object for storing non-changing configuration values while the number of licenced variables is kept low. From the functional point of view this means that columns marked "Read only" can be written only once. Limitations of individual methods of the PmaDataTable object caused by "Read only" columns are explained in remark of this method..
Variables in the PmaCommMsg object of the PmChar communication
communication driver allows to assemble communication data in the PmaCommMsg
object. Both data to be sent (on the "Data-sent
" tab) and data to be received (on the "Data-received
The variables on both these tabs are licenced.
If you need to assemble a complex message containing many variables then all these variables do not have to be defined on those tabs. There can be just one variable of the String
type on each tab.
- The variable on the "Data-sent
" tab can be set in the script before sending the message. Values from other variables located in other objects can be used.
- The variable on the "Data-received
" tab can be read in the onEndOfTransfer
event. After reading the value, the received String
can be processed in order to get m,ultiple values that are then written into multiple other variables located in other objects.
This way you can use just a single variable in order to send/receive multiple data values.
If the communication is not character based but binary then it can be set to receive such data into the PmaCommMsg
object in the form of HexaString
- see Binary data transfer