Before using this driver in the PROMOTIC application it is highly recommended to watch "
- Usage of this driver requires purchase of the
PmModbus licence. When developing the application in the freeware mode
PmFree, or with
development environment and while testing it in runtime, this component is always functional.
The communication description by means of the PmaCommMsg object
The description of the protocol functions:
Each of eight messages can be started only once. It means that in the PROMOTIC system only eight messages can be defined together. If we need to read different memory fields, then the communication proceeds as follows:
- Master sends a query on the memory.
- In the
onDataReceive event the designer finds out from the "
Data-received" tab which address and the data amount are required from the
Master and it fills the "
Data-sent" tab by them. If it doesn't have the data available, then it sets the "
Validity" item to
false (invalid data), otherwise it sets this item to
true (valid data) on the "
Data-sent" tab.
- The communication finds out if the "Validity" differs from false and it sends the appropriate data to the Master.
Note: If the "
Validity" is set to
true and the "
Data-received" tab isn't filled in the
onDataReceive event, then the communication sends always the same data to the
Master, regardless of the address that is requested by the
Master.
Caution! If the "
Validity" item is set to
false, then the communication DOESN'T ANSWER the request !
List and description of communication messages:
01 - Read Coil Status (Read Output Bits): This message reads n output states (1-bit values)
02 - Read Input Status (Read Input Bits): This message reads n input states (1-bit values)
03 - Read Holding Registers (Read Output Registers): This message reads n output registers (16-bits values)
04 - Read Input Registers: This message reads n input registers (16-bits values)
05 - Force Single Coil (Write 1 Bit): This message writes into one state (1-bit value)
06 - Preset Single Register (Write 1 Register): This message writes into one register (16-bits value)
15 - Force Multiple Coils (Write n Bits): This message writes into n states (1-bit values)
16 - Preset Multiple Registers (Write n Registers): This message writes into n registers (16-bits values)