PmaCommGroup - Deatiled object description
See: the PmaCommGroup
The object is generated by the type of the communication protocol set in the PmaComm
object. That's why it is advisable to create the PmaCommGroup
object after the configuration of the PmaComm
An addressing identifier is assigned to each variable defined in this object (see "ItemID
" configurator), that positively specifies, how to obtain the variable value from the communication. The object then intelligently separates the variables into optimised communication messages (creates something like invisible PmaCommMsg
type objects) and according to setting in this object takes care of sending or receiving such communication messages.
PmaCommMsg and PmaCommGroup objects comparation:
- The PmaCommMsg
- Is a "low level" object, meaning that the data format in this object is created depending on the communication message type, defined by corresponding protocol. If you want to receive, for example, both registers and counters, then two PmaCommMsg
objects must be created because the current protocol does not support receiving both registers and counters in one message.
- The PmaCommGroup
- Compared to the PmaCommMsg
object, it is on a higher level, because the data in this object are not depending on used protocol. It is possible, for example, to define data for both counters and registers and the object will intelligently assemble this data into communication messages.
- Can be used for following drivers: PmModbusMr
For some drivers the PmaCommGroup object cannot be used based on the principles (e.g. for the PmChar communication driver, because this user defined protocol does not have any general addressing and depends only on the user, what kind of message will be created by the PmaCommMsg object).
In the PmaCommGroup object, the #vars identifer is used in order to enables access to the variables (of the PmVar type) defined on the "Data" page. This identifier can be used e.g. for the Pm method, or for the PP data binding in the application and in panels. For example the Pm("opcdata/#vars/aaa") method returns the variable aaa data item from the object named "commdata" that is of the PmaCommGroup type.
The variables in the PmaData object can use ExtComm and register itself directly into the PmaCommGroup object. Then, on the "PmaCommGroup > Data" page, it is not needed to define any variables.