Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmKoyo - Driver for communication with Koyo Electronics PLC devices

This driver is used for communication with Koyo Electronics PLC devices. See also Communication with Koyo Electronics PLC devices.
 
Before using this driver in the PROMOTIC application it is highly recommended to read the chapter: Communicaton using the PROMOTIC drivers.
 
Basic properties of the driver:
- Using this driver is bound to purchase the license: PmKoyo. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- Driver communicates with the Direct Logic devices from the Koyo Electronics company (of DL 205,305,405,05,06 series) by the DirectNET protocol.
- The communication is done via standard serial link (COM1, COM2 ...).
- The PROMOTIC application is the MASTER (i.e. it initiates the data transfer) from this communication point of view.
- The driver is incorporated into the PROMOTIC system by means of the PmComm object.

Driver supports to usage of PmCommMsg object. The PmCommData object cannot be used.

For easy integration of this driver into the application it is handy to use: Preconfigurations in group "Koyo PLC"

 

Recommended parameters values:

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

The communication description by the PmCommMsg objects

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 PmCommMsg > Parameters > Message parameters configurator:
Data typeDefines the data type to be read from/written into the PLC. 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 is enabled. Input, output, code memory, data memory, counters, state bits, TMR, CTR, etc.

One value of such type is represented by 16 bits in the PLC (values 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. This means that if we want to change one output, we must know the state of remaining seven ones and change all of them at a time.

One value of such type is represented by a single bit in the PLC. In the PROMOTIC application it is saved in 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. This means that if we want to change one output, we must know the state of remaining seven ones and change all of them at a time.

One value of such type is represented by a single bit in the PLC. In the PROMOTIC application it is saved in 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.

One value of such type is represented by 8 bits in the PLC (values 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.

One value of such type is represented by 8 bits in the PLC (values 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.

One value of such type is represented by 16 bits in the PLC (values 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 (in contradistinction to the 205,405 devices).

One value of such type is represented by a single bit in the PLC. In the PROMOTIC application it is saved in 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.

One value of such type is represented by 8 bits in the PLC (values 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 read from/written to the PLC is defined here. The data is generated automatically into the Data-received or Data-sent page.
Transfer directionDefines whether the data is to be written to or read from the PLC.
Write - The data will be written into the PLC.
Read - The data will be read from the PLC.
For each data type the following variables are created on Data-sent and Data-sent pages of the PmCommMsg object:
There are following variables on the Data-sent page:
Slave - The PLC address for communication is entered here.
Addr - The address of the first requested variable is enterd here. For V-Memory, the DirectNet Reference Address is entered here (address of individual memory location that is used in the PLC).

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 page:
Data0.. - The received values are stored here. These variables are valid only for Transfer direction = Read.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice