Update cookies preferences
Promotic

PmaCommMsg - Deatiled object description

See: The PmaCommMsg object

The object is created by the type of the communication protocol set in the PmaComm object. That's why it is advisable to create the PmaCommMsg object after the configuration of the PmaComm object.

The object contains two groups of variables. One serves for the specification of the sending data (see the "Data-sent" tab) and the other group serves as received data from the communication (see the "Data-received" tab).
It is possible to access these variables even in the script (see WriteVars method and ReadVars method). For example:
- writing into the first (zero-based index) variable for sending data:
pMe.Pm("/Comm/Msg1").WriteVars(0).Value = 3.14
- reading the third (zero-based index) variable for receiving data:
a = pMe.Pm("/Comm/Msg1").ReadVars(2).Value


#rcvvars and #sndvars identifiers:
In the PmaCommMsg object, the #rcvvars and #sndvars identificators are used for accessing the variables (of the PmVar type) defined on the Data-received and Data-sent tabs. This identifier can be used e.g. in the Pm method, or in the "PP - Pma object property" data binding. For example the Pm("/Comm/Msg1/#rcvvars/aaa") method returns the received variable aaa from the object named "Msg1" that is of the PmaCommMsg type.

PmaCommMsg and PmaCommGroup objects comparison:
- The PmaCommMsg object:
- 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 reading both registers and counters in one message.
- Can be used for all drivers except for the PmOpcUaClient, PmS7 and PmOmronFINS driver.
- The PmaCommGroup object:
- 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: PmOpcUaClient, PmModbusMr, PmS7, PmSBUS, PmMBus, PmKNX, PmIEC8705, PmMelsecQA, PmMelsecFXS, PmABradleyDF1, PmFatek and PmTeco.
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).
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.