PmCommMsg - Deatiled object description

See: Object PmCommMsg
The object is generated by the type of the communication protocol set by the PmComm object. That's why it is advisable to create the PmCommMsg object after the configuration of the PmComm object.
The object includes two groups of variables. One serves for the specification of the sending data (see the Data-sent page) and the other serves as receiving data from the communication (see the Data-received page).

It is possible to access these variables even by the script (See property WriteVars and ReadVars).

For example:
- writing into the first (zero-based index) variable for sending data:
pMe.Pm("/Comm/Msg1").WriteVars.Item(0) = 3.14
- reading the third (zero-based index) variable for receiving data:
a = pMe.Pm("/Comm/Msg1").ReadVars.Item(2)
#rcvvars and #sndvars identificators:

In the PmCommMsg object, the #rcvvars and #sndvars identificators are used for accessing the data subobjects (of the Var type) defined on Data-received and Data-sent pages. This identifier can be used in methods working with application object tree (e.g. for the Pm method), or for the PP binding in the application and in panels. For example the Pm("/Comm/Msg1/#rcvvars/aaa") method returns the received data item aaa from the object named Msg1 that is of the PmCommMsg type.

PmCommMsg and PmCommData objects comparation:
- The PmCommMsg 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 PmCommMsg objects must be created, because the current protocol does not support receiving both registers and counters in one message.
- Can be used for all drivers except for the PmS7 driver.
- The PmCommData object:
- compared to the PmCommMsg 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.
- so far this object can be used only for following drivers: PmModbusMr, PmS7, PmSBUS, PmMBus, PmIEC8705, PmMelsecQA, PmMelsecFXS, PmABradleyDF1, PmFatek and PmTeco. For some drivers the PmCommData object cannot be used based on the principles (e.g. for the PmChar 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 PmCommMsg object).
PROMOTIC 8.3.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice