Promotic
WikipediaLinkedInYoutubeTwitterFacebook

PmKoyo - Driver for communication with Koyo Electronics PLC devices

This driver serves 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: Communication using the PROMOTIC drivers.
 
Basic properties of the driver:
- Usage of this driver requires purchase of the PmKoyo license. With the freeware version PmFree, or when developing the application (with development environment for tersting purposes), this component is always functional.
- The 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 for 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 PmaComm object.

The driver supports to 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 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, then the transfer 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 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 ammount of bytes than the HEX mode. Therefore it is not recommended for transfering large ammouns of data.
 

The communication description by the PmaCommMsg 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 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 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. 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.

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. 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.

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 (contrary 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 written/read from the PLC device is defined here. The data is 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 pages of the PmaCommMsg 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 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" page:
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.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice