Ethernet Protocol

ETHERNET PROTOCOL
The Ethernet Protocol program is one of the special programs that enable the user to define the communication frame of the Ethernet communication module.

Registering the Ethernet Protocol program
Select [File] -> [New Program] -> [Ethernet Protocol] menu.

 

image-20240329-082757.png

 

Enter the Program Name, Program ID and Program Free Space (OnlineEdit Buffer).
Click the [OK] button.

Writing the Ethernet Protocol program
An example program reads 5 words from D00100 of the counterparty’s CIMON PLC (100.100.100.20) using the dedicated service and saves it in 5 words from D00100 of CIMON PLC.
Communication is established using the Ethernet communication module mounted in local base, slot #0.

 

image-20240329-082801.png

 

Register a host:
Register the PLC Ethernet card to read the data. Click [Add Host] button.

 

 

Communication Result: Enter the device (M0000) to save the communication result.
IP Address: Enter the counterparty’s IP (100.100.100.20)
Port Number: Enter the Port Number (10262) to use for communication. The port number in the dedicated service uses TCP (10260) and UDP (10262). Select "UDP."
Click [OK] button.

Receive Header/Tail is used when the entire frame has a header and tail but receives as the header and tail are split. All frames are combined,
from the time the header has been received to the time when the tail is received, to process as a frame (request or response).

 

 

Register a frame (Rx frame for the Word Block Read command):
Select a host and click the [Insert Frame] button. The Frame Setting window will appear as below.

 

 

Frame Name: Enter name to differentiate the frame.
Tx/Rx: Sets the communication direction – sending or receiving.
Auto receive frame: Specifies the frame that corresponds to the response.
Auto Send/Receive: Sending frames will be automatically sent at the specified interval.

Define a frame (Rx frame for the Word Block Read command):
Defines the frame contents to interpret the response frame to the Word Block Read request frame of CIMON PLC.

Define a segment (ID): Sets the ID in the protocol.
In this case, the ID for the dedicated service is "KDT_PLC_M" as shown below.

 

 

Define a segment (Frame No.): Sets the frame number area in the protocol.
Select "Don't care" for the Segment Type since it is not related with the data.
The area designated as "Don't care" will not be compared. Length is 1 byte as shown below.

 

 

Define a segment (Cmd): The command of the ACK response to the Word Block Read is 52h as shown below.

 

 

Define a segment (Res: Reserved area 00h): The reserved area is 00h as shown below.

 

 

Define a segment (Data area: Requesting device): Since 5 words data from D00100 is requested, the requesting device of the response frame is received in D00100 as shown below.

 

 

Define a segment (Data area: Number of requesting data): The number of requesting data is received as 005h since 5 data has been requested.

 

 

Define a segment (Data area: Receiving data): Since requested data is received sequentially, configure as shown below in order to save the received data in D00100 sequentially.

 

 

Define a segment (Check Sum): The checksum area covers the entire frame area.

 

 

Complete defining a frame (Rx frame for Word Block Read):
The communication direction is receiving frame as shown below.

 

 

Define a frame (Tx frame for the Word Block Read command):
Defines the request frame for Word Block Read.

Define a segment (ID): Sets the ID in the protocol.
The ID for the dedicated service is "KDT_PLC_M" as shown below.

 

 

Define a segment (Frame No.): Sets the frame number area in the protocol.
Length is 1 byte as shown below.

 

 

Define a segment (Cmd): The command to the Word Block Read is 52h as shown below.

 

 

Define a segment (Res: Reserved area 00h): The reserved area is 00h as shown below.

 

 

Define a segment (Data area: Requesting device): Since 5 words data from D00100 is requested, the requesting device of the response frame is received as D00100. Set as shown below.

 

 

Define a segment (Data area: Number of requesting data): The number of requesting data is received as 0005h since 5 data is requested.

 

 

Define a segment (Check Sum): The checksum area covers the entire frame area.

 

 

Complete frame registration (Tx frame for Word Block Read):

 

 

Set the communication direction as the sending frame. Also, set the automatic receiving frame after sending so that the system
automatically awaits the receiving of the specified frame (0) after sending. Lastly, set the automatic sending interval as 0.1 second
so that communication is established at every 0.1 second.

Complete frame registration (Word Block Read request and response frame receiving)

 

 

Communication will be established by the protocol program without having another separate scan programming.