Promotic

Object PmaComm (Communication)

Description:
The object enables the communication with other computers (mostly with control computers of PLC type) via Ethernet or via the computer's serial port (COM1, COM2,...).

One or more objects PmaCommMsg or PmaCommGroup can be created in the PmaComm object.
This object can be created in objects: PmaRoot, PmaFolder, PmaPrototype. Multiple objects of this type can be created in such objects.
The usage of the PmaComm object requires purchase of the licence for the appropriate communication driver - see List of communication drivers.

The PmaComm object can be used in the application more times, it can be even configured more times with the same protocol (driver).
For serial link each PmaComm object must have defined another communication port. For example, if one PmaComm object communicates through COM1, then next PmaComm object can communicate for example through COM2 (COM3, ...) but it mustn't communicate through COM1.

The PmaComm object specifies what port and protocol will be used for the data transfer. Data required for the transfer are then defined in the PmaCommMsg or PmaCommGroup nested objects.

PmaCommMsg and PmaCommGroup objects comparation:
- 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 receiving 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).
This object inherits properties, methods and events of the PmaObject object.
Properties and methods of this object:
ClosePort Close the serial/ethernet port
GetCount Returns the number of transmissions
GetProtParam Returns some values defined in configurators of the "PmaComm > Parameters" tab
IsConnected Detects whether Ethernet or serial link is connected
OpenPort Open the serial/ethernet port
SetProtParam Sets values in some configurators of the "PmaComm > Parameters" tab
Properties only for serial link:
BaudRate The baud rate of the serial link
ByteSize The number of data bits of the serial link
Dtr Value of DTR signal of the serial link
Parity Value of the transfer parity of the serial link
Rts Value of RTS signal of the serial link
StopBits The number of stopbits of the serial link
Properties and methods inherited from the PmaObject object:
AddEvent Registers a function into selected event
GetInfo Returns the Info object with the specified name
GetOwnedByIndex Returns the subobject defined by its index
GetOwnedByName Returns reference to the subobject defined by its name
GetOwnedByType Array of references to the subobjects
GetOwnedNum Returns number of subobjects in the object
GetPar Reading the value of the Pma object parameter (or its parents)
GetPathName Object name with the path to this object
GetPermission Returns permission of corresponding operation from object
Methods Access to designer's methods of this object
Name Object name (without the path)
Parent Returns reference to the parent object in the tree of Pma objects
Pm Returns reference to the Pma object or to its implementation subobject
RemoveEvent Un-registers the function in the specified event
Root Returns reference to the root application object PmaRoot
Events of this object:
onConnect Is triggered after the successful connection
onDisconnect Is triggered after the connection is closed
Events inherited from the PmaObject object:
onStart Is triggered for each object in the runtime only once at the beginning
onStop Is triggered for each Pma object in the runtime mode only once at the stop of the application
Configuration tabs:
Object General information about the object
Events Definition of object events algorithms
Parameters Communication protocol and parameter setting
Related objects:
PmaCommGroup(Communication data) Definition of the communication data group
PmaCommMsg(Communication message) Format definition of one communication message

History:
Pm8.00.09: Fixed bug: Sometimes the communication stopped and in order to restart it, it was necessary to call the OpenPort method, or restart the application !
Pm9.00.00: Object name changed: PmComm -> PmaComm
PROMOTIC 9.0.17 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