Example is placed in the folder: /Pm/Examples/Commun/IEC8705/IEC8705_101
. The file IEC8705.pra
is an example of using the PmIEC8705
-101 communication driver (for serial link) in the PROMOTIC system. For simple understanding the example, the knowledge about the PROMOTIC objects PmComm
The example has one panel opened from PmWorkspace
after application launch - it is defined on the Frames
page in the "main"
frame edited in the Viewer of component
configurator. There are buttons in the panel that launch the PmFolder
methods via the onButtonUp
event. All reports are stored by Debug
method in the INFO system Debug_info
item. A large amount of important information can also be found in COMM
INFO item (statistics, the content of currently transmitted data, etc.) and also in the PmRoot
All communication example is in Comm
type) and this consists from the subobjects:
: The object of the PmComm
type has set the PmIEC8705
protocol. 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.
type object. 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"
object, that are used for initialization (reinitialization) and the information about transmission end (for the ErrorTimer