Promotic

PmKoyo - Driver for communication with PLC devices by the Koyo Electronics company

This driver serves for communication with PLC devices by the Koyo Electronics company. See also Communication with PLC devices by the Koyo Electronics company.

Before using this driver in the PROMOTIC application it is highly recommended to watch "PROMOTIC video tutorial 4 - Communication drivers".

Basic properties of the driver:
- Usage of this driver requires purchase of the PmKoyo 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 driver communicates with Direct Logic PLC devices by the Koyo Electronics company (of DL 205,305,405,05,06 series) by the DirectNET protocol.
- The communication is done for serial link (COM1, COM2 ...).
- The PROMOTIC application is the Master (it means that it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmaComm object.
The driver supports the usage of the PmaCommMsg object. The PmaCommGroup object cannot be used.
For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Koyo - PLC device"


Recommended values of the PmaComm object parameters:

Description and recommended values for the Protocol parameters:
Response receipt timeoutThe time (in milliseconds) the driver is waiting for the response on sending the message.
If no response comes during this time, then the transmission of the message is terminated (the onEndOfTransfer event is triggered with error 24 or 66).
ModeThere are two modes used with the DirectNET protocol. This only applies to a Host master (in the PROMOTIC application), since the PLC device has the capability to automatically detect the data transfer mode.
HEX - Recommended mode that optimises the ammount of transferred bytes by transforming the data into Hexa bytes.
ASCII - This mode uses double the number of bytes than the HEX mode. Therefore it is not recommended for transmission large ammouns of data.


The communication description by means of the PmaCommMsg object

For detailed description of individual messages and addresses of inputs, outputs, counters, etc. see the Koyo device documentation, chapter 6 and appendixes D,E,F.
Description of the "PmaCommMsg > Parameters > Message parameters" configurator:
Data typeSpecifies the data type to be written/read from the PLC device. The first four types are designed for DL 205/405/05/06 PLC. For the older model DL305 the last four types are used.
31 - V memory, T/C current value - By this message an access to any information in the PLC device is enabled. Input, output, code memory, data memory, counters, state bits, TMR, CTR, etc.
In the PLC device one value of such type is represented by 16 bits (value from 0 to 65535). In the PROMOTIC application it is saved as the Long data type.
32 - Inputs (X,GX,SP) - This message is the subset of the message (31). By this message an access to inputs and special relays is enabled.
We address always eight inputs or outputs together. It means that if we want to change one output, then we must know the state of remaining seven ones and change all of them at a time.
In the PLC device one value of such type is represented by a single bit. In the PROMOTIC application it is saved as the Boolean data type.
33 - Outputs (Y,C,Stage,T/C bits) - This message is the subset of the message (31). By this message an access to outputs, state bits of counters, state bits of timers and state bits is enabled.
We address always eight inputs or outputs together. It means that if we want to change one output, then we must know the state of remaining seven ones and change all of them at a time.
In the PLC device one value of such type is represented by a single bit. In the PROMOTIC application it is saved as the Boolean data type.
39 - Diagnostic status - By this message we get all PLC diagnostic. The last error, number of successful messages, number of failed messages, number of retries, etc.
In the PLC device one value of such type is represented by 8 bits (value from 0 to 255). In the PROMOTIC application it is saved as the Byte data type.
31 (DL305) - Data registers - By this message an access to data registers is enabled.
In the PLC device one value of such type is represented by 8 bits (value from 0 to 255). In the PROMOTIC application it is saved as the Byte data type.
31 (DL305) - T/C accumulator - By this message an access to accumulator of counters and timers is enabled.
In the PLC device one value of such type is represented by 16 bits (value from 0 to 65535). In the PROMOTIC application it is saved as the Long data type.
33 (DL305) - I/O, internal relays, shift register bits - By this message an access to inputs and special relays, counters and timers is enabled. At this message it is possible to address individual bits separately (contrary to the 205,405 devices).
In the PLC device one value of such type is represented by a single bit. In the PROMOTIC application it is saved as the Boolean data type.
39 (DL305) - Diagnostic status - By this message we get all PLC diagnostic. The last error, number of successful messages, number of failed messages, number of retries, etc.
In the PLC device one value of such type is represented by 8 bits (value from 0 to 255). In the PROMOTIC application it is saved as the Byte data type.
The number of dataThe ammount of data to be written/read from the PLC device is defined here. The data are generated automatically into the Data-received or Data-sent page.
Transfer directionSpecifies whether the data is to be written or read from the PLC device.
Write - The data will be written into the PLC device.
Read - The data will be read from the PLC device.
For each data type the following variables are created on Data-sent and Data-received tabs of the PmaCommMsg object:
There are following variables on the "Data-sent" tab:
Slave - The device address to communicate with, is entered here.
Addr - The address of the first requested variable is entered here. For V-Memory, the DirectNet Reference Address is entered here (address of individual memory location that is used in the PLC device).
Caution: This is not the V-memory direct address! In the PLC documentation appendix the V-Memory maps are published for each PLC type together with DirectNet Reference Address conversion process.
Data0.. - The values to be sent are entered here. These variables are valid only for Transfer direction = Write.
There are following variables on the "Data-received" tab:
Data0.. - The received values are stored here. These variables are valid only for Transfer direction = Read.

History:
Pm8.00.06: Fixed bug: It was not possible to edit the message parameters in the application editor.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.