Example is placed in the folder: /Pm/Examples/Commun/IEC8705/IEC8705_101
The file IEC8705.pra
is an example of using
-101 communication driver
(for serial link) in the PROMOTIC system.
For simple understanding the example, the knowledge about the PmComm
Promotic object is needed.
The exampe has one panel opened from PmWorkspace
after application launch
- it is defined on the Frames
in the "main"
edited in the Viewer of component
There are buttons in the panel that launch the PmFolder
via the onButtonUp
All reports are stored by Debug
in the INFO system Debug_info
A large amount of important information can also be found
(statistics, the content of currently transmitted data, etc.)
and also in the PmRoot
All communication example is in Comm
and this consists from the subobjects:
The object of the PmComm
type has set the PmIEC8705
There are the following subobjects in this object:
- "MrConnect", "MrDataSend45", "SlConnect" ..
Objects of the PmCommMsg
type that represent the concrete communication messages.
In these objects the onEndOfTransfer
event is filled.
Here is the sample how to read the received data and how to check if the transfer was successful.
This timer solves errors and interruptions of communication.
It sets the variables in the ErrorData
Additional important methods are Initialise
in the Methods
page of the "/Comm"
that are used for initialization (reinitialization)
and the information about transmission end (for the ErrorTimer