Size:
19.68 Mb
Download

Using FINS Applications

Section 8-5

8-5-2FinsGateway

FinsGateway Ver. 2003 must be used to communicate using FINS/TCP between applications serving as communications drivers and CS1W-EIP21,CJ1W-EIP21,CJ2H-CPU@@-EIP,orCJ2M-CPU3@EtherNet/IP Units.

FinsGateway Ver. 3.@ or lower versions can be used, however, when communicating by the FINS/UDP method only.

Overview of Setup Methods

1. Starting FinsGateway Settings

Select FinsGateway FinsGateway Setup to start the FinsGateway Setup.

2. ETN_UNIT Driver Setup

1.Double-clickonETN_UNIT in the settings for the network and Unit. The following ETN_UNIT Properties Window will be displayed.

• Network Tab Page

• Network number

Set the network number for the personal computer

 

(Ethernet port).

• Local node address

Set the personal computer (Ethernet port) node

 

address (1 to 254) on the Ethernet network.

• Communication unit number

Set the unit number in decimal (16 to 31) for the per-

 

sonal computer (Ethernet port).

215

Using FINS Applications

Section 8-5

• Communication Unit Tab Page

• UDP port number

Set the local UDP port number for the personal com-

 

puter (Ethernet port). The default is 9600.

• Priority Network Card

If multiple Network Cards are mounted at the personal

 

computer, select the Network Card that is to be given

 

priority.

FINS - IP address converSet the IP address conversion method. sion

UDP Nodes Tab Page: Automatic Generation Method (Dynamic or Passive)

216

Using FINS Applications

Section 8-5

• UDP Nodes Tab Page: IP Address Table Method or Combined Method

Click the Add Button, and then set the IP address table in the following Ethernet Node Definition Dialog Box.

• Node address:

Set the remote FINS node address.

• IP address:

Set the remote IP address.

217

Using FINS Applications

Section 8-5

• TCP Nodes Tab Page

Click the Add Button, and then set the IP address table in the following Ethernet Node Definition Dialog Box.

• Node address:

Set the remote FINS node address.

• IP address:

Set the remote IP address.

• Destination port number:

Set the FINS/TCP port number for the remote node.

 

Normally the PLC's default setting of 9600 should be

 

specified.

Keep-alivesetting:

Sets the keep-alivefunction. Normally this should be selected.

3. Starting FinsGateway ETN_UNIT Service

Select ETN_UNIT from Services under the Basic Tab in the FinsGateway Setup Window, and then click the Start Button.

218

Using FINS Applications

Section 8-5

System Configuration Example 3: Connecting the CX-ProgrammerOnline Using the FINS/TCP Method

In this example, an online connection is made by FINS/TCP to a PLC on an

Ethernet network (PLC1 in the diagram below) from a CX-Programmer/CX-

Integrator connected to the Ethernet network.

Conditions

• FINS/TCP method

CX-Programmer/CX-Integrator

 

 

 

 

 

 

 

 

 

 

Node number: 1

 

EtherNet/IP Unit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IP address: 192.168.250.1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IP address conversion: Automatic generation method (dynamic)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FinsGateWay Version 2003

 

 

 

 

 

 

EtherNet/IP Unit node number: 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EtherNet/IP Unit IP address: 192.168.250.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ethernet port

 

 

 

 

 

 

 

 

Target: PLC1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ethernet or EtherNet/IP (Network number: none)

FINS/TCP method

CX-Programmer'sChange PLC Dialog Box

Settings for target PLC (PLC1)'s Change PLC Dialog Box

Setting

 

 

 

 

 

PLC name

 

 

 

PLC1

 

 

 

Network classification

 

FinsGateway

 

 

 

 

 

Network Tab

FINS destination

 

Network number

0

Page

 

 

 

 

 

 

Node address

2

 

 

 

 

 

 

 

 

 

Frame length

 

2,000 bytes

 

 

 

 

 

Response monitor time

 

2 seconds

 

 

 

 

 

CX-Programmer'sFINS/TCP Tab Page in Edit Parameters Dialog Box

Item

Setting

 

 

FINS/TCP Port

Default (9600)

 

 

IP Router Table

None

 

 

Not set. (All defaults are used.)

FinsGateway ETN_UNIT Setup

TCP Nodes Tab Page: Ethernet Node Definition Dialog Box

Item

Setting

 

 

Node address

2

 

 

IP address

192.168.250.2

 

 

Destination port number

9600

 

 

Keep-alivesetting

Selected (yes)

 

 

219

Communicating between OMRON PLCs

Section 8-6

8-6Communicating between OMRON PLCs

FINS commands can be sent from the CPU Unit of a PLC by using the

SEND(090), RECV(098), and CMND(490) instructions.

SEND(090): Writes I/O data from the local node to another node. RECV(098): Reads I/O data from another node to the local node. CMND(490): Issues FINS commands for controlling operations such as sending and receiving I/O memory data to and from other nodes, reading information regarding other nodes, and so on.

8-6-1Communications Specifications

The following table shows the specifications for PLC communications using the SEND(090), RECV(098), and CMND(490) instructions.

Item

 

Specifications

 

 

 

Destination

1:1

SEND(090), RECV(098), CMND(490) instructions

 

1:N

SEND(090), CMND(490) instructions (broadcasting)

 

 

Data length

SEND(090):

 

990 words (1,980 bytes) max.; broadcasting:

 

727 words (1,454 bytes)

 

RECV(098):

 

990 words (1,980 bytes) max.

 

CMND(490):

 

1,990 bytes max.; broadcasting: 1,462 bytes (after FINS com-

 

mand code)

 

 

Data contents

The following data is sent and received with the execution of

 

each instruction.

 

SEND(090):

 

Sends request for remote node to receive data, and receives

 

response data.

 

RECV(098):

 

Sends request for remote node to send data, and receives

 

response data.

 

CMND(490):

 

Sends any FINS command and receives response data.

 

 

Communications

Ports 0 to 7 (Eight transmissions can occur simultaneously.)

port number

 

 

 

 

 

Response moni-

0000:

 

tor time

2 s (default)

 

0001 to FFFF:

 

0.1 to 6,553.5 s in 0.1-sincrements (specified by user)

 

 

Number of retries

0 to 15 retries

 

 

 

Note 1. The maximum data length is limited to 512 bytes for data exchange between the PLC and SYSMAC LINK Systems or the PLC and SYSMAC BUS/2 Remote I/O Systems.

2.When broadcasting, do not require a response. Use the FINS/UDP method for broadcasting.

220

Communicating between OMRON PLCs Section 8-6

8-6-2PLC Communications Data Areas

The following table shows the I/O data areas involved when SEND(090) and

RECV(098) are used.

Area

Range

 

 

CIO Area

CIO 0000 to CIO 6143

 

 

Work Area

W000 to W511

 

 

Holding Area

H000 to H1535

 

 

Auxiliary Area

A000 to A959 (See note 1.)

 

 

Timer Area

TIM0000 to 4095

 

 

Counter Area

CNT0000 to 4095

 

 

DM Area

D00000 to D32767

 

 

EM Area

E00000 to E32767 (See note 2.)

 

 

Note 1. Data cannot be written to words A000 to A447 in the Auxiliary Area.

2.A maximum of 13 banks in the EM Area can be used for a CS1/CJ1 CPU Unit. A maximum of 25 banks in the EM Area can be used for a CJ2H CPU Unit. A maximum of 4 banks in the EM Area can be used for a CJ2M CPU Unit. For details regarding the EM Area, refer to the operation manual for the PLC that is used. Refer to the operation manual for your CPU Unit to confirm EM Area support.

221

Communicating between OMRON PLCs Section 8-6

8-6-3Using SEND(090), RECV(098), and CMND(490)

 

Make the settings shown below when using the SEND(090), RECV(098), and

 

CMND(490) instructions in the user’s ladder-diagramprogram in the PC.

SEND(090)

The SEND(090) instruction sends the data in n number of words, starting from

 

the beginning word S at the local node, to the words starting from the begin-

 

ning word D at the remote destination node (node address N).

(@)SEND(90)

S

D

C

 

 

Local node

Destination node number N

15

0

15

0

S→

 

 

Number

D→

 

 

n

 

 

 

 

 

 

 

 

 

of words

 

 

 

 

 

 

 

 

 

 

 

 

 

(n)

 

 

 

 

 

 

 

 

 

 

 

 

S: Local node beginning word

D: Destination beginning word

C: First word of control data (below)

15

0

15

10

8 7

3

0

C

C+3

0

 

 

0

 

Number of words (n)

0001 to 03DE (Hex): 1 to 990 words

 

15

11

8 7

0

C+1

0

 

0

 

 

Destination network number

 

 

00 (Hex):

Local network

 

 

01 to 7F (Hex):

1 to 127

15

11

8 7

0

C+2

 

 

C+4

Number of retries

0 to F (Hex): 0 to 15 retries Communications port number: 0 to 7

Response

0:Required.

1:Not required.

Destination unit address

00 (Hex):

CPU Unit

10 to 1F: (Hex):

Unit #0 to #15

E1 (Hex):

Inner Board

FE (Hex):

Unit connected to network

Destination node number N

 

00 to FE (Hex): 0 to 254

 

The same data can be broadcast to all nodes on the network by setting the destination node number to FF (Hex).

Response monitor time 0000 (Hex): 2 s

0001 to FFFF (Hex): 0.1 to 6,553.5 s (in units of 0.1 s)

The range of node addresses is different for networks other than Ethernet.

Note The message service does not guarantee that a message will reach the destination node. A message may be lost during transmission due to factors such as noise. To prevent this from occurring when using message services, it is common to set up retry processing at the node from which instructions are issued. With the SEND(090), RECV(098), and CMND(490) instructions, retry processing is executed automatically by specifying the number of retries, so specify a number other than 0.

222

 

Communicating between OMRON PLCs

Section 8-6

RECV(098)

With the RECV(098) instruction, the data in m number of words, starting from

 

 

the beginning word S at the remote node (node address M) is received at the

 

 

words starting from the beginning word D at the local node.

 

Local node

15 0

D→ m

 

(@)RECV(98)

 

 

 

 

 

 

 

S

S: Remote node beginning word

 

D

D: Local beginning word

 

C

C: First word of control data (below)

Remote node number N

15 0 S→

Number of words

(m)

15

0

15

10

8 7

3

0

C

C+3

0

 

 

0

 

Number of reception words (m) 0001 to 03DE (Hex): 1 to 990 words

 

15

11

8 7

0

C+1

0

 

0

 

 

 

Destination network number

 

 

00 (Hex):

 

Local network

 

 

01 to 7F (Hex):

1 to 127

15

11

8 7

0

 

C+2

 

 

 

C+ 4

Number of retries

0 to F (Hex): 0 to 15 retries Communications port number: 0 to 7

Response

0:Required.

1:Not required.

Destination Unit address

00 (Hex):

CPU Unit

10 to 1F: (Hex):

Unit #0 to #15

E1 (Hex):

Inner Board

FE (Hex):

Unit connected to network

Remote node number M (send source) 00 to FE (Hex): 0 to 254

Response monitor time 0000 (Hex): 2 s

0001 to FFFF (Hex): 0.1 to 6,553.5 s (in units of 0.1 s)

The range of node addresses is different for networks other than Ethernet.

Note The message services function does not guarantee that a message will reach the destination node. A message may be lost during transmission due to factors such as noise. In order to prevent this from occurring when using message services, it is common to set up retry processing at the node from which instructions are issued. With the SEND(090), RECV(098), and CMND(490) instructions, retry processing is executed automatically by specifying the number of retries, so specify a number other than 0.

223

Communicating between OMRON PLCs

Section 8-6

CMND(490)

(@)CMND(490) S

D

C

The CMND(490) instruction sends n bytes of command data, starting from the beginning word S at the local node, to the node at node address N. the data in m number of words, starting from the beginning word S at the remote node (node address M) is received at the words starting from the beginning word D at the local node.

 

 

 

 

 

Local node

Destination node number N

15

0

 

 

S

 

 

 

 

 

Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Com-

 

Interpretation

 

 

 

 

 

 

mand

 

 

(S−1)

 

 

data: n

 

 

n

 

 

bytes

 

 

+

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Response

 

 

 

 

 

 

 

 

 

D

 

 

 

 

Re-

 

Execution

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

sponse

 

 

(D−1)

 

 

data: m

 

 

m

 

 

bytes

 

 

+

 

 

 

 

2

 

 

 

 

 

 

 

S: Beginning command storage word

D: Beginning response storage word

C: First word of control data (below)

15

0

C

Number of bytes of command data (n) 0000 to 07C6 (Hex): 1 to 1,990 bytes

15

0

C+1

Number of bytes of response data (m) 0000 to 07C6 (Hex): 1 to 1,990 bytes

 

15

11

8 7

0

 

15

10

8 7

3

0

C+2

0

 

0

 

C+4

0

 

 

0

 

 

Destination network number

 

 

00 (Hex):

Local network

 

 

01 to 7F (Hex):

1 to 127

15

8 7

0

 

C+3

Destination Unit address

Number of retries

0 to F (Hex): 0 to 15 retries Communications port number: 0 to 7

Response

0:Required.

1:Not required.

00 (Hex):

CPU Unit

15

10 8 7

3

0

10 to 1F: (Hex): Unit #0 to #15

C+5

 

 

 

E1 (Hex):

Inner Board

 

 

 

 

 

 

 

FE (Hex):

Unit connected to network

 

 

Response monitor time

 

 

 

 

0000 (Hex): 2 s

Destination node number N

00 to FE (Hex):

0 to 254

The same data can be broadcast to all nodes on the network by setting the destination node number to FF (Hex).

0001 to FFFF (Hex): 0.1 to 6,553.5 s (in units of 0.1 s)

The range of node addresses is different for networks other than Ethernet.

Note The message services function does not guarantee that a message will reach the destination node. A message may be lost during transmission due to factors such as noise. In order to prevent this from occurring when using message services, it is common to set up retry processing at the node from which instructions are issued. With the SEND(090), RECV(098), and CMND(490) instructions, retry processing is executed automatically by specifying the number of retries, so specify a number other than 0.

224

Communicating between OMRON PLCs

Section 8-6

 

 

 

 

Commands Addressed to CS/CJ-seriesCPU Units

 

 

 

 

The following table provides a list of FINS commands that can be processed

 

 

 

 

by a CS/CJ-seriesCPU Unit. For details, refer to theCS/CJ-series Program-

 

 

 

 

mable Controllers Communications Commands Reference Manual (W342).

 

 

 

 

For details on FINS commands that can be processed by the EtherNet/IP Unit

 

 

 

 

or built-inEtherNet/IP port, refer toAppendix E FINS Commands Addressed

 

 

 

 

to EtherNet/IP Units or Built-in EtherNet/IP Ports.

 

 

 

 

 

 

Usage

Command

 

Name

Function

 

 

code

 

 

 

 

 

 

 

 

 

 

 

MR

 

SR

 

 

 

 

 

 

 

 

 

 

I/O memory area

01

 

01

 

MEMORY AREA READ

Reads the contents of consecutive I/O

access

 

 

 

 

 

memory area words.

 

 

 

 

 

 

 

 

01

 

02

 

MEMORY AREA WRITE

Writes the contents of consecutive I/O

 

 

 

 

 

 

memory area words.

 

 

 

 

 

 

 

 

01

 

03

 

MEMORY AREA FILL

Writes the same data to the specified

 

 

 

 

 

 

range of I/O memory area words.

 

 

 

 

 

 

 

 

01

 

04

 

MULTIPLE MEMORY AREA READ

Reads the contents of specified non-

 

 

 

 

 

 

consecutive I/O memory area words.

 

 

 

 

 

 

 

 

01

 

05

 

MEMORY AREA TRANSFER

Copies the contents of consecutive I/O

 

 

 

 

 

 

memory area words to another I/O

 

 

 

 

 

 

memory area.

 

 

 

 

 

 

 

Parameter access

02

 

01

 

PARAMETER AREA READ

Reads the contents of consecutive

(registered I/O

 

 

 

 

 

parameter area words.

tables, routing

 

 

 

 

 

 

02

 

02

 

PARAMETER AREA WRITE

Writes the contents of consecutive

tables, etc.)

 

 

 

 

 

 

 

parameter area words.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

02

 

03

 

PARAMETER AREA FILL (CLEAR)

Writes the same data to the specified

 

 

 

 

 

 

range of parameter area words.

 

 

 

 

 

 

 

Program area

03

 

06

 

PROGRAM AREA READ

Reads the UM (User Memory) area.

access

 

 

 

 

 

 

03

 

07

 

PROGRAM AREA WRITE

Writes to the UM (User Memory) area.

 

 

 

 

 

 

 

 

 

 

 

03

 

08

 

PROGRAM AREA CLEAR

Clears the UM (User Memory) area.

 

 

 

 

 

 

 

Operating mode

04

 

01

 

RUN

Changes the CPU Unit’s operating

changes

 

 

 

 

 

mode to RUN or MONITOR.

 

 

 

 

 

 

 

 

04

 

02

 

STOP

Changes the CPU Unit’s operating

 

 

 

 

 

 

mode to PROGRAM.

 

 

 

 

 

 

 

Machine configura-

05

 

01

 

CPU UNIT DATA READ

Reads CPU Unit data.

tion reading

 

 

 

 

 

 

05

 

02

 

CONNECTION DATA READ

Reads the model numbers of the device

 

 

 

 

 

 

 

 

 

corresponding to addresses.

 

 

 

 

 

 

 

Status reading

06

 

01

 

CPU UNIT STATUS READ

Reads the status of the CPU Unit.

 

 

 

 

 

 

 

 

06

 

20

 

CYCLE TIME READ

Reads the maximum, minimum, and

 

 

 

 

 

 

average cycle time.

 

 

 

 

 

 

 

Time data access

07

 

01

 

CLOCK READ

Reads the present year, month, date,

 

 

 

 

 

 

minute, second, and day of the week.

 

 

 

 

 

 

 

 

07

 

02

 

CLOCK WRITE

Changes the present year, month, date,

 

 

 

 

 

 

minute, second, or day of the week.

 

 

 

 

 

 

 

Message display

09

 

20

 

MESSAGE READ/CLEAR

Reads and clears messages, and reads

 

 

 

 

 

 

FAL/FALS messages.

 

 

 

 

 

 

 

Access rights

0C

 

01

 

ACCESS RIGHT ACQUIRE

Acquires the access right as long as no

 

 

 

 

 

 

other device holds it.

 

 

 

 

 

 

 

 

0C

 

02

 

ACCESS RIGHT FORCED ACQUIRE

Acquires the access right even if

 

 

 

 

 

 

another device already holds it.

 

 

 

 

 

 

 

 

0C

 

03

 

ACCESS RIGHT RELEASE

Releases the access right that has been

 

 

 

 

 

 

acquired.

 

 

 

 

 

 

 

Error log

21

 

01

 

ERROR CLEAR

Clears errors or error messages.

 

 

 

 

 

 

 

 

21

 

02

 

ERROR LOG READ

Reads the error log.

 

 

 

 

 

 

 

 

21

 

03

 

ERROR LOG POINTER CLEAR

Clears the error log pointer.

 

 

 

 

 

 

 

225

Communicating between OMRON PLCs

Section 8-6

 

 

 

 

 

 

Usage

 

Command

Name

Function

 

 

 

code

 

 

 

 

 

 

 

 

 

MR

 

SR

 

 

 

 

 

 

 

 

 

File memory

22

 

 

01

FILE NAME READ

Reads file memory data.

 

 

 

 

 

 

 

 

22

 

 

02

SINGLE FILE READ

Reads a specified length of file data

 

 

 

 

 

 

from a specified position within a single

 

 

 

 

 

 

file.

 

 

 

 

 

 

 

 

22

 

 

03

SINGLE FILE WRITE

Writes a specified length of file data

 

 

 

 

 

 

from a specified position within a single

 

 

 

 

 

 

file.

 

 

 

 

 

 

 

 

22

 

 

04

FILE MEMORY FORMAT

Formats (initializes) the file memory.

 

 

 

 

 

 

 

 

22

 

 

05

FILE DELETE

Deletes specified files stored in the file

 

 

 

 

 

 

memory.

 

 

 

 

 

 

 

 

22

 

 

07

FILE COPY

Copies files from one file memory to

 

 

 

 

 

 

another file memory in the same sys-

 

 

 

 

 

 

tem.

 

 

 

 

 

 

 

 

22

 

 

08

FILE NAME CHANGE

Changes a file name.

 

 

 

 

 

 

 

 

22

 

 

0A

MEMORY AREA–FILETRANSFER

Transfers or compares data between the

 

 

 

 

 

 

I/O memory area and the file memory.

 

 

 

 

 

 

 

 

22

 

 

0B

PARAMETER AREA–FILETRANSFER

Transfers or compares data between the

 

 

 

 

 

 

parameter area and the file memory.

 

 

 

 

 

 

 

 

22

 

 

0C

PROGRAM AREA–FILETRANSFER

Transfers or compares data between the

 

 

 

 

 

 

UM (User Memory) area and the file

 

 

 

 

 

 

memory.

 

 

 

 

 

 

 

 

22

 

 

15

CREATE/DELETE DIRECTORY

Creates or deletes a directory.

 

 

 

 

 

 

 

Debugging

23

 

 

01

FORCED SET/RESET

Force-setsorforce-resetsbits, or

 

 

 

 

 

 

releases force-setstatus.

 

 

 

 

 

 

 

 

23

 

 

02

FORCED SET/RESET CANCEL

Cancels all bits that have been force-set

 

 

 

 

 

 

or force-reset.

 

 

 

 

 

 

 

8-6-4Writing Programs

Programs incorporating the SEND(090), RECV(098), and CMND(490) instructions are generally created using the Communications Port Enabled Flag and the Communications Port Error Flag as input conditions. CS/CJseries CPU Units have eight communications ports. Only one instruction can be executed at any given port at one time, however, so the program must not overlap the use of any of the ports. A program example is provided below.

Communications port

EtherNet/IP Unit

CPU Unit

 

 

Instruction 1

 

Instruction 2

 

Instruction 3

 

Instruction 4

 

Instruction 5

 

Instruction 6

 

Instruction 7

 

Instruction 8

There are eight communications ports, so up to eight communications instructions can be executed at a time. The number of messages that can be sent or received with a single CPU Bus Unit service, though, is not more than two each for the CPU Unit to the EtherNet/IP Unit and for the EtherNet/IP Unit to the CPU Unit.

226

Communicating between OMRON PLCs

Section 8-6

Execution

Communications

C

condition

Port Enabled Flag

 

 

KEEP(011) A

Reset B

 

 

A

 

 

 

 

Operand,

 

 

control data

 

 

created with

 

 

@MOV and

 

 

@XFER.

 

 

Communications

 

 

instructions

 

 

@SEND

 

 

@RECV

 

 

@CMND

 

Communications

 

A

Port Enabled Flag

 

 

DIFU(013) B

 

 

A

Communications

 

Port Error Flag

 

Execution

Communications

 

condition

Port Enabled Flag

A

 

 

 

 

KEEP(011) C

Reset D

 

 

 

(Continued in same way.)

 

Input A remains ON from start to completion of communications instruction.

Creates operand and control data in a given area.

Executes communications instructions.

Creates reset input. (Turns reset B ON after execution of communications instruction.)

Send Error Flag display (Retry can be executed.)

Exclusive control so execution is not simultaneous.

Use exclusive control so that no other communications instructions are started before execution of the above communications instruction is complete.

The execution status of the SEND(090), RECV(098), and CMND(490) instructions is always reflected by the communications flags (i.e., the Communications Port Enabled Flag and the Communications Port Error Flag). The CS/ CJ-seriesCPU Unit’s communications flags are allocated in the Auxiliary Area as shown in the following table.

Flag name

 

Address

Contents

 

 

 

 

 

Word

Bits

 

 

 

 

 

Communications Port

A202

Bit 7: Port 7

OFF: Execution enabled

Enabled Flag

 

Bit 6: Port 6

(being executed)

 

 

Bit 5: Port 5

ON: Execution disabled

 

 

Bit 4: Port 4

 

 

(not being executed)

 

 

Bit 3: Port 3

 

 

 

 

 

Bit 2: Port 2

 

 

 

Bit 1: Port 1

 

 

 

Bit 0: Port 0

 

 

 

 

 

Communications Port

A219

Bit 7: Port 7

0: Normal completion

Error Flag

 

Bit 6: Port 6

1: Abnormal completion

 

 

Bit 5: Port 5

 

 

 

Bit 4: Port 4

 

 

 

Bit 3: Port 3

 

 

 

Bit 2: Port 2

 

 

 

Bit 1: Port 1

 

 

 

Bit 0: Port 0

 

 

 

 

 

Note InCS/CJ-seriesPLCs, communications ports 0 to 7 are also used when executing the PCMR(260) (PROTOCOL MACRO), TXDU(256), and RXDU(255) instructions, so these flags are shared by SEND(090), RECV(098), CMND(490), PCMR(260), TXDU(256), and RXDU(255).

SEND(090), RECV(098), and CMND(490) cannot be executed at a communications port if PCMR(260) TXDU(256), or RXDU(255) is being executed at that port.

227

Communicating between OMRON PLCs

Section 8-6

Communications Port

Completion Codes

The status of a SEND(090), RECV(098), and CMND(490) instruction after execution is reflected as a communications port completion code, in one word (two bytes) of data as shown in the following table. (The value is 0000 during instruction execution.) The recorded status is saved until execution of the next instruction.

Word

Contents

 

 

A203

Communications Port 0 Completion Code

 

 

A204

Communications Port 1 Completion Code

 

 

A205

Communications Port 2 Completion Code

 

 

A206

Communications Port 3 Completion Code

 

 

A207

Communications Port 4 Completion Code

 

 

A208

Communications Port 5 Completion Code

 

 

A209

Communications Port 6 Completion Code

 

 

A210

Communications Port 7 Completion Code

 

 

The meanings of the communications port completion codes are the same as those for FINS commands and responses. Bits 08 to 15 in the communications port completion code correspond to the first byte of the response code, and bits 00 to 07 correspond to the second byte. For details, refer to 14-6 Troubleshooting with FINS Response Codes.

Communications Port Error Flag and Completion Codes CMND(490)

Errors that occur when CMND(490) is used generate a Communications Port Error Flag and are recorded in a communications port completion code only in the following cases:

When a response timeout error has occurred.

When the number of communications data bytes exceeds the maximum value for the Unit (i.e., 2,000 bytes for the EtherNet/IP Unit or built-inEtherNet/IP port).

When the actual number of response bytes is greater than the number of reception bytes that has been set. (The response is not stored in this case.)

Errors other than these are recorded in the response codes of the responses stored from the beginning response storage word onwards. Be careful of these, because there are no Communications Port Error Flags and they are not recorded in a communications port completion code.

Timing of Communications Flag Changes

The Communications Port Enabled Flag remains OFF during communications and turns ON when they are completed (regardless of whether or not an error occurs).

The Communications Port Error Flag retains its status until the next transmission or reception.

The Communications Port Error Flag turns OFF with the execution of the next communications instruction even if there was an abnormal completion.

228

Communicating between OMRON PLCs

 

 

 

 

 

 

 

 

 

Section 8-6

Example

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Communications Port Enabled Flag

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Communications instruction:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction 1

 

 

Instruction 2

 

 

 

Instruction 3

SEND(090), RECV(098), CMND(490)

 

 

 

being executed.

 

 

being executed.

 

 

 

being executed.

Communications Port Error Flag

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Communications Port

 

0000

 

0000

 

 

 

0000

 

 

 

 

 

 

 

 

 

 

 

Completion Code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Completion

 

 

 

 

0202

 

0000 (Normal completion)

 

 

 

 

 

0000 (Normal completion)

(Unit address setting error)

 

 

 

 

 

 

 

 

 

 

 

 

229

Communicating between OMRON PLCs

Section 8-6

8-6-5Program Example

Execution condition A20207

000000 (See note 1.)120002

120001

120000

120000 A20207 (See note 1.)

S

KEEP 120000

R

@MOV(21)

#000A

D00000

@MOV(21)

#0002

D00001

@MOV(21)

#0400

D00002

@MOV(21)

#0705

D00003

@MOV(21)

#0064

D00004

@XFER(70)

#000A

0000

D00010

@SEND(90)

D00010

D00020

D00000

DIFU(13)

120001

120000 A21907

121000

When the Communications Port Enabled Flag for port 7 is ON, and RECV(098) is not being executed, the send execution program will start when execution condition CIO 000000 turns ON.

Input CIO 120000 remains ON from the start of SEND(090) execution until completion.

Control Data Creation

Word

Contents

Meaning

 

 

 

 

D0000

00

0A

Number of send words = 10

D0001

00

02

Destination network number = 2

D0002

04

00

Destination node number = 4

 

 

 

Destination unit address = 0

D0003

07

05

Response required.

 

 

 

Communications port No. used = 7

 

 

 

Number of retries = 5

 

 

 

 

D0004

00

64

Response monitor time = 10 s

 

 

 

 

Send Data Creation

Ten words of data from word CIO 0000 is stored from D00010 onwards.

Ten words of data from D00010 at the local node is sent to D00020 onwards at network number 2, node number 4, unit address 0 (the PLC).

Reset Input Creation

Send Error Display

(Continued on next page.)

230

Communicating between OMRON PLCs

Section 8-6

(Continued from previous page.)

Execution

condition A20207

000001 (See note 1.)120000

120003

120002

120002 A20207 (See note 1.)

120002 A21907

120002 120003 A21907

S KEEP 120002

R

@MOV(21)

#0010

D00005

@MOV(21)

#0003

D00006

@MOV(21)

#2000

D00007

@MOV(21)

#0705

D00008

@MOV(21)

#0000

D00009

@RECV(98)

A100

2000

D00005

When the Communications Port Enabled Flag for port 7 is ON, and SEND(090) is not being executed, the transmission execution program will start when execution condition CIO 000001 turns ON.

Input CIO 120002 remains ON from the start of RECV(098) execution until completion.

Control Data Creation

Word

Contents

Meaning

 

 

 

 

D0005

00

10

Number of reception words = 16

D0006

00

03

Source network number = 3

 

 

 

 

D0007

20

00

Source node number = 32

 

 

 

Source unit address = 0

 

 

 

 

D0008

07

05

Response required.

 

 

 

Communications port No. used = 7

 

 

 

Number of retries = 5

 

 

 

 

D0009

00

00

Response monitor time = Default

 

 

 

 

A total of 16 words of data beginning from word A100 at network number 3, node number 32, unit address 0 (the PLC) is received at word CIO 2000 onwards of the local node.

DIFU(13)

120003

121001

@XFER(70)

#0016

2000

D00040

Reset Input Creation

Reception Error Display

Reception Data Processing

If there is no reception processing completion error, the 16 words of data received from word CIO 2000 onwards is stored at D00040 onwards.

Note 1. WithCS/CJ-seriesPLCs, the Communications Port Enabled Flags at bits 0 to 7 in word A202 turn OFF even when the PCMR(260) instruction is being executed using the ports corresponding to those flags.

2.Before using the sample program as is, confirm that the memory areas (words and bits) used in the sample program are not already being used in the user program o r by Special I/O Units.

231

Precautions on High Traffic in FINS Communications

Section 8-7

8-7Precautions on High Traffic in FINS Communications

When applications are constructed using FINS communications services, communications errors (from multiple response timeouts) may occasionally occur due to high traffic, depending on the system configuration and the application programs. This section describes precautions for systems with high traffic in FINS communications.

Conditions for High Traffic

A heavy communications load may occur at an EtherNet/IP Unit or built-inEtherNet/IP port if FINS messages and CIP messages from multiple nodes are concentrated on that EtherNet/IP Unit orbuilt-inEtherNet/IP port. The EtherNet/IP Unit orbuilt-inEtherNet/IP port and the CPU Unit may have insufficient processing capacity for the volume of FINS messages (commands) that are coming from the network.

For example, suppose that approximately 20 ms are required to process a single FINS frame (i.e., 20 ms from the time that the command is received at the EtherNet/IP Unit or built-inEtherNet/IP port until a response is sent). If 100 or more FINS frames (commands) are received at once from multiple communicating nodes, it will take approximately 2 seconds to send a response to the last command. If a timeout is set at the remote node for 2 seconds or less, then a timeout will be generated. A retry will begin due to the timeout, and the traffic to the EtherNet/IP Unit orbuilt-inEtherNet/IP port will thus be increased even further, until ultimately the responses to all the nodes will be too slow. At this point, the system is overloaded.

Avoiding Errors due to High Traffic

To avoid high traffic from FINS communications, the communications load must be kept down to a reasonable level. To accomplish this, follow the procedure below.

1.Specify the node where FINS frames seem to be concentrated.

2.Estimate the total processing time for all of the FINS frames processed at that node. (For details, refer to 10-5-1 Maximum Transmission Delays (Excluding Delays in the Network).)

3.Set the timeout value for all of the SEND(090), RECV(098), and CMND(490) FINS commands at all the remote nodes to at least 1.5 times the total processing time for all of the FINS frames.

4.As much as possible, implement communications traffic testing up to the point of actual system operation. If any problem occurs, adjust the traffic.

5.If a commercially-availableprotocol analyzer can be used, then the actual FINS frame processing time (i.e., the time from when a command is received at the EtherNet/IP Unit orbuilt-inEtherNet/IP port until a response is sent) can be measured under high traffic conditions and the communications traffic can be further adjusted as required.

232

SECTION 9

Message Communications

This section describes message communications using FINS commands sent from the ladder program in the CPU Unit of the PLC.

9-1

Sending Explicit Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

234

 

9-1-1

Sending Explicit Messages Using CMND(490). . . . . . . . . . . . . . . .

243

9-2

Receiving Explicit Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

248

 

9-2-1

List of PLC Object Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

249

233

Sending Explicit Messages

Section 9-1

9-1Sending Explicit Messages

CS/CJ-seriesEtherNet/IP Units andbuilt-inEtherNet/IP ports can send explicit messages. Only CIP unconnected message (UCMM) communications can be used to send explicit messages. Explicit messages can be sent to the following destinations.

EtherNet/IP Units made by other manufacturers

Other PLCs with a CS/CJ-seriesEtherNet/IP Unit orbuilt-inEtherNet/IP port

Example

CS/CJ-seriesEtherNet/IP Unit

CS/CJ-seriesCPU Unit

Other manufacturer's

EtherNet/IP node

 

 

 

Explicit messages can be sent

 

 

 

 

 

 

 

Explicit message

 

Ethernet (EtherNet/IP)

 

CS/CJ-seriesEtherNet/IP Unit

CS/CJ-series

CPU Unit

When the destination is another company’s EtherNet/IP node, an explicit message can be sent to the EtherNet/IP Unit or built-inEtherNet/IP port using FINS command code 28 01 or 28 10, through the Connection Manager class’s Unconnected Send service, as shown in the following diagram.

CPU Unit

 

 

Other company's

 

EtherNet/IP Unit

EtherNet/IP node

Explicit

FINS

FINS

Explicit

message

header

header

message

CMND

 

 

EtherNet/IP

(490)

 

 

Note: Use 28 01 for the

 

network

FINS command code.

 

 

FINS

Response

FINS

Response

header

header

 

 

 

 

 

When sending an explicit message, set the local node’s EtherNet/IP Unit or built-inEtherNet/IP port as the destination of the FINS command, and not the actual destination (other company’s EtherNet/IP node). Specify the node address of the actual destination in the command data of the explicit message send command.

There are two ways to send an explicit message send command:

1,2,3... 1. CIP UCMM MESSAGE SEND command (28 10)

Messages can be routed through multiple CIP network layers. (Messages can be routed through 16 network levels. The explicit message send command may time out if routing is attempted for more than 16 networks.

2.EXPLICIT MESSAGE SEND command for DeviceNet Units (28 01)

This command is compatible with the DeviceNet Unit’s explicit message send command (28 01) in the ladder program. The message must be sent

234