Size:
19.68 Mb
Download

Message Service Transmission Delay

Section 10-5

CPU Bus Unit Service

Processing Time (Local

Node)

For details, refer to the CPU Unit’s Operation Manual.

The following table shows the CPU Bus Unit service processing time, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

Set peripheral servicing time

 

Default: 4% of CPU Unit cycle time

Priority peripheral servicing

 

(10% for CJ2 CPU Units)

Parallel processing with syn-

 

chronous memory access

 

 

 

Parallel processing with asyn-

1 ms max.

chronous memory access

 

 

Note CJ2 CPU Units support only Normal Mode.

 

For details, refer to the CPU Unit’s Operation Manual.

Send Processing

(Number of words being transferred × 0.002) + 0.550 ms

Transmission Delay

The transmission delay time depends on the baud rate set for the EtherNet/IP

 

Unit or built-inEtherNet/IP port, as shown in the following table. (There may

 

be additional delays due to the other devices in the network, such as switch-

 

ing hubs.)

 

 

 

 

 

Baud rate

Delay time

 

 

 

 

100Base-TX

(Number of words being transferred × 0.0013) + 0.0118 ms

 

 

 

 

10Base-T

(Number of words being transferred × 0.0019) + 0.0157 ms

Receive Processing

CPU Bus Unit Service

Cycle (Remote Node)

(Number of words being transferred × 0.003) + 0.704 ms

The following table shows the CPU Bus Unit service cycle, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

One CPU Unit cycle time

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice instruction execution

 

built-inEtherNet/IP

time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

One CPU Unit cycle time

 

built-inEtherNet/IP

 

 

port is not given

 

 

priority.

 

 

 

 

Parallel processing with syn-

One CPU Unit cycle time

chronous memory access

 

 

 

 

Parallel processing with asyn-

0.2 ms + peripheral servicing time (1 ms max. for

chronous memory access

peripheral servicing of each Special I/O Unit, CPU

 

Bus Unit, peripheral port, RS-232Cport, and Inner

 

Board)

 

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

295

Message Service Transmission Delay

Section 10-5

CPU Bus Unit Service

Processing Time (Remote

Node)

Note

The following table shows the CPU Bus Unit service processing time, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

Set peripheral servicing time

 

Default: 4% of CPU Unit cycle time

 

(10% for CJ2 CPU Units)

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice peripheral servicing

 

built-inEtherNet/IP

execution time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

Set peripheral servicing time

 

built-inEtherNet/IP

(Default: 4% of CPU Unit cycle

 

port is not given

time)

 

priority.

 

 

 

 

Parallel processing with syn-

Set peripheral servicing time

chronous memory access

Default: 4% of CPU Unit cycle time

 

 

(10% for CJ2 CPU Units)

 

 

 

Parallel processing with asyn-

1 ms max.

 

chronous memory access

 

 

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

Depending on the actual operating environment, the transmission time may be longer than the one calculated with the equations given here. The following factors can cause longer transmission times: other traffic on the network, window sizes of network nodes, other traffic at the EtherNet/IP Unit or built-inEtherNet/IP port itself (e.g., simultaneous tag data link communications), and the system configuration.

Example Calculation

In this example, SEND(090) is used to send 256 words of data between two

 

PLCs. The maximum transmission delay is calculated based on the following

 

operating conditions.

• Local node’s CPU cycle time: 10 ms

• Local node’s CPU execution mode: Normal

• Local node’s CPU peripheral servicing time: Default (4%)

• Remote node’s CPU cycle time: 5 ms

• Remote node’s CPU execution mode: Normal

• Remote node’s CPU peripheral servicing time: Default (4%)

• Baud rate: 100Base-TX

Item

 

Calculated value

 

 

CPU Bus Unit service cycle (local

10 ms

node)

 

 

 

 

CPU Bus Unit service processing

0.4 ms

time (local node)

 

 

 

 

 

Send processing

(256

0.002) + 0.550 = 1.062 1.1 ms

Transmission delay

(256

0.0013) + 0.0118 = 0.3446 0.3 ms

Receive processing

(256

0.003) + 0.704 = 1.472 1.5 ms

CPU Bus Unit service cycle (remote

5 ms

 

node)

 

 

 

 

CPU Bus Unit service processing

0.2 ms

time (remote node)

 

 

 

 

Maximum transmission delay

10 + 0.4 + 1.1 + 0.3 + 1.5 + 5 + 0.2 = 18.5 ms

 

 

 

296

 

Message Service Transmission Delay

 

 

 

 

 

 

 

 

 

 

Section 10-5

RECV(098) Instruction

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Execution of RECV(099)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in user program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPU Bus Unit service cycle

 

 

 

 

 

 

 

 

CPU Bus Unit service cycle

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Local node, 1)

 

 

 

 

 

 

 

 

(Local node, 2)

 

 

 

 

 

 

 

 

CPU Bus Unit service processing time

 

 

 

 

 

 

 

 

 

 

CPU Bus Unit service

 

 

 

 

 

 

 

(Local node, 1)

 

 

 

 

 

 

 

 

 

 

processing time (Local node, 2)

 

 

 

 

 

 

 

 

 

Send processing

 

 

 

 

 

 

 

 

 

 

 

CPU data set

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Transmission delay

 

 

 

 

 

 

 

 

 

 

(Command)

 

 

 

 

 

 

(Response)

 

processing

 

 

 

 

 

 

 

 

 

 

 

Transmission delay

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Transmission delay

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Command)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Response)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Receive processing

 

 

Send processing

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Command)

 

 

(Response)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPU Bus Unit service processing time

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Remote node)

 

 

 

CPU Bus Unit service cycle (Remote node)

Maximum transmission delay

CPU Bus Unit Service

Cycle (Local Node, 1)

CPU Bus Unit Service

Processing Time (Local

Node, 1)

Maximum transmission delay =

CPU Bus Unit service cycle (Local node, 1)

+CPU Bus Unit service processing time (Local node, 1)

+Send processing (Command)

+Transmission delay (Command)

+Receive processing (Command)

+CPU Bus Unit service cycle (remote node)

+CPU Bus Unit service processing time (remote node)

+Send processing (Response)

+Transmission delay (Response)

+Receive processing (Response)

+CPU Bus Unit service cycle (Local node, 2)

+CPU Bus Unit service processing time (Local node, 2)

The following table shows the service cycle, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

Normal Mode (See note.)

One CPU Unit cycle time

Priority peripheral servicing

 

Parallel processing with syn- 0.2 ms + peripheral servicing time (1 ms max. for

chronous memory access

peripheral servicing of each Special I/O Unit, CPU

Parallel processing with asyn-

Bus Unit, peripheral port, RS-232Cport, and Inner

Board)

chronous memory access

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

The following table shows the CPU Bus Unit service processing time, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

Normal Mode (See note.)

Set peripheral servicing time

Priority peripheral servicing

Default: 4% of CPU Unit cycle time

 

(10% for CJ2 CPU Units)

Parallel processing with syn-

1 ms max.

chronous memory access

 

Parallel processing with asyn-

 

chronous memory access

 

Note CJ2 CPU Units support only Normal Mode.

297

Message Service Transmission Delay

Section 10-5

Send Processing

Transmission Delay

Receive Processing

CPU Bus Unit Service

Cycle (Remote Node)

CPU Bus Unit Service

Processing Time (Remote

Node)

For details, refer to the CPU Unit’s Operation Manual.

Command

0.550 ms

 

 

Response

(Number of words being transferred × 0.002) + 0.550 ms

The transmission delay time depends on the baud rate set for the EtherNet/IP Unit or built-inEtherNet/IP port, as shown in the following table. (There may be additional delays due to the other devices in the network, such as switching hubs.)

Baud rate

 

 

Delay time

 

 

 

 

100Base-TX

Command

0.0118 ms

 

 

 

 

 

Response

(Number of words transferred × 0.0013) + 0.0118 ms

 

 

 

 

10Base-T

Command

0.0157 ms

 

 

 

 

 

Response

(Number of words transferred × 0.0019) + 0.0157 ms

 

 

 

Command

 

0.704 ms

 

 

 

Response

 

(Number of words being transferred × 0.003) + 0.704 ms

The following table shows the CPU Bus Unit service cycle, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

One CPU Unit cycle time

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice instruction execution

 

built-inEtherNet/IP

time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

One CPU Unit cycle time

 

built-inEtherNet/IP

 

 

port is not given

 

 

priority.

 

 

 

 

Parallel processing with syn-

One CPU Unit cycle time

chronous memory access

 

 

 

 

Parallel processing with asyn-

0.2 ms + peripheral servicing time (1 ms max. for

chronous memory access

peripheral servicing of each Special I/O Unit, CPU

 

Bus Unit, peripheral port, RS-232Cport, and Inner

 

Board)

 

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

The following table shows the CPU Bus Unit service processing time, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

4% of CPU Unit cycle time

 

(10% for CJ2 CPU Units)

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice peripheral servicing

 

built-inEtherNet/IP

execution time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

Set peripheral servicing time

 

built-inEtherNet/IP

(Default: 4% of CPU Unit cycle

 

port is not given

time)

 

priority.

 

 

 

 

298

Message Service Transmission Delay

Section 10-5

CPU Bus Unit Service

Cycle (Local Node, 2)

CPU Bus Unit Service

Processing Time (Local

Node, 2)

Note

CPU execution mode

Processing time details

 

 

Parallel processing with syn-

4% of CPU Unit cycle time

chronous memory access

 

 

 

Parallel processing with asyn-

1 ms max.

chronous memory access

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

The following table shows the CPU Bus Unit service cycle, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

One CPU Unit cycle time

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice instruction execution

 

built-inEtherNet/IP

time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

One CPU Unit cycle time

 

built-inEtherNet/IP

 

 

port is not given

 

 

priority.

 

 

 

 

Parallel processing with syn-

One CPU Unit cycle time

chronous memory access

 

 

 

 

Parallel processing with asyn-

0.2 ms + peripheral servicing time (1 ms max. for

chronous memory access

peripheral servicing of each Special I/O Unit, CPU

 

Bus Unit, peripheral port, RS-232Cport, and Inner

 

Board)

 

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

The following table shows the CPU Bus Unit service processing time, which depends on the CPU Unit’s CPU processing mode setting.

CPU execution mode

Processing time details

 

 

Normal Mode (See note.)

4% of CPU Unit cycle time

 

(10% for CJ2 CPU Units)

 

 

 

Priority peripheral servicing

EtherNet/IP Unit or

Time slice peripheral servicing

 

built-inEtherNet/IP

execution time

 

port is given prior-

 

 

ity.

 

 

 

 

 

EtherNet/IP Unit or

Set peripheral servicing time

 

built-inEtherNet/IP

(Default: 4% of CPU Unit cycle

 

port is not given

time)

 

priority.

 

 

 

 

Parallel processing with syn-

4% of CPU Unit cycle time

chronous memory access

 

 

 

 

 

Parallel processing with asyn-

1 ms max.

 

chronous memory access

 

 

 

 

 

Note CJ2 CPU Units support only Normal Mode.

For details, refer to the CPU Unit’s Operation Manual.

Depending on the actual operating environment, the transmission time may be longer than the one calculated with the equations given here. The following factors can cause longer transmission times: other traffic on the network, window sizes of network nodes, other traffic at the EtherNet/IP Unit or built-inEtherNet/IP port itself (e.g., simultaneous tag data link communications), and the system configuration.

299

Message Service Transmission Delay

Section 10-5

Example Calculation

In this example, RECV(098) is used to receive 256 words of data from another

 

PLC. The maximum transmission delay is calculated based on the following

 

operating conditions.

 

Local node’s CPU cycle time: 10 ms

Local node’s CPU execution mode: Normal

Local node’s CPU peripheral servicing time: Default (4%)

Remote node’s CPU cycle time: 15 ms

Remote node’s CPU execution mode: Normal

Remote node’s CPU peripheral servicing time: Default (4%)

Baud rate: 100Base-TX

Item

Calculated value

 

 

CPU Bus Unit service cycle (local

10 ms

node, 1)

 

 

 

CPU Bus Unit service processing

0.4 ms

time (local node, 1)

 

 

 

Send processing (command)

0.550 ms 0.5 ms

Transmission delay (command)

0.0118 ms 0.1 ms

Receive processing (command)

0.704 ms 0.7 ms

CPU Bus Unit service cycle (remote

15 ms

node)

 

 

 

CPU Bus Unit service processing

0.6 ms

time (remote node)

 

 

 

Send processing (command)

(256 0.002) + 0.550 = 1.062 1.1 ms

Transmission delay (command)

(256 0.0013) + 0.0118 = 0.3446 0.3 ms

Receive processing (command)

(256 0.003) + 0.704 = 1.472 1.5 ms

CPU Bus Unit service cycle (local

10 ms

node, 2)

 

 

 

CPU Bus Unit service processing

0.4 ms

time (local node, 2)

 

 

 

Maximum transmission delay

10 + 0.4 + 0.5 + 0.1 + 0.7 + 15 + 0.6 + 1.1 +

 

0.3 + 1.5 + 10 + 0.4 = 40.6 ms

300

SECTION 11

FTP Server

This section describes the functions provided by the FTP server.

11-1

Overview and Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

302

 

11-1-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

302

 

11-1-2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

303

11-2 FTP Server Function Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

303

 

11-2-1

File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

303

 

11-2-2 Connecting to the FTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

304

11-3 Using the FTP Server Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

305

 

11-3-1 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

305

 

11-3-2 List of Settings Required for the FTP Server Function . . . . . . . . . .

305

 

11-3-3

FTP Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

306

11-4 FTP Server Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

307

11-5

Using FTP Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

308

 

11-5-1

Table of Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

308

 

11-5-2

Using the Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

308

 

11-5-3 Error Messages and FTP Status . . . . . . . . . . . . . . . . . . . . . . . . . . . .

313

11-6

Checking FTP Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

314

 

11-6-1

FTP Status Flag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

314

11-7

Using File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

315

 

11-7-1

File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

315

 

11-7-2

File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

315

 

11-7-3

Initializing File Memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

317

 

11-7-4 I/O Memory Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

317

11-8 FTP File Transfer Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

320

11-9 Host Computer Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

321

301

Overview and Specifications

Section 11-1

11-1Overview and Specifications

11-1-1Overview

The EtherNet/IP Unit or built-inEtherNet/IP port has abuilt-inFTP (File Transfer Protocol) server function, so other computers on the Ethernet can read or write (upload/download) large files in the EM file memory by executing FTP commands from the FTP client software.

FTP can be used for EtherNet/IP Units with unit version 2.0.

Intranet

FTP client

Specify the file and upload or download using FTP commands such as get and put.

Ethernet

Download

Upload

Large file

EtherNet/IP Unit or built-inEtherNet/IP port

Files in the EM File Memory or the

Memory Card mounted to the CPU

Unit.

Note Only one FTP client can connect at the same time.

302

FTP Server Function Details Section 11-2

11-1-2Specifications

Item

 

Specification

 

 

 

 

 

Executable com-

open:

Connects the specified host FTP server.

 

mands

user:

Specifies user name for the remote FTP server.

 

 

 

 

ls:

Displays the Memory Card file names.

 

 

dir:

Display the Memory Card file names and details.

 

 

rename: Changes a file name.

 

 

mkdir:

Creates a new directory in the working directory in the remote host.

 

 

rmdir:

Deletes a new directory from the working directory in the remote host.

 

 

cd:

Changes the Ethernet Unit work directory to the specified directory.

 

 

cdup:

Changes the working directory at the remote host to the parent directory.

 

 

pwd:

Displays the Ethernet Unit work directory.

 

 

type:

Specifies the data type of transferred files.

 

 

get:

Transfers the specified file from the Memory Card to the local host.

 

 

mget:

Transfers multiple files from the Memory Card to the local host.

 

 

put:

Transfers the specified local file to the Memory Card.

 

 

mput:

Transfers multiple local files to the Memory Card.

 

 

delete: Deletes the specified file from the Memory Card.

 

 

mdelete: Deletes multiple files from the Memory Card.

 

 

close:

Disconnects the FTP server.

 

 

bye:

Closes the FTP (client).

 

 

quit:

Closes the FTP (client).

 

 

 

 

Protection

FTP login name consists of 12 letters max. CONFIDENTIAL is the default login name.

 

 

Password consists of 8 characters max.

 

 

 

 

Protocol

FTP (port number: 20/TCP, 21/TCP)

 

 

 

 

 

Number of connec-

1

 

 

tions

 

 

 

 

 

 

 

 

Note

The PLC, however, is unable to read or write files at other nodes using FTP

 

 

because the EtherNet/IP Unit or built-inEtherNet/IP port does not support

 

 

FTP client functions.

11-2FTP Server Function Details

11-2-1File Types

The file system in the CPU Unit that can be accessed by the EtherNet/IP Unit or built-inEtherNet/IP port includes files in any Memory Card mounted in the CPU Unit and files in the EM file memory. The directory tree is shown below.

/: root

MEMCARD: Memory card directory

EM: EM file memory directory

A connection will be initially made to the root directory.

Note 1. The date of the MEMCARD directory displayed for ls or dir commands in the root directory will be the date of the file system volume label.

2.The login date will be displayed for EM files and for MEMCARD if a volume label has not been created.

303

FTP Server Function Details

Section 11-2

11-2-2Connecting to the FTP Server

The host computer must connect to the FTP server before the FTP server functions can be used. The login name and password set in the Unit Setup will be used when connecting. The default FTP login name is “CONFIDENTIAL” and no password is required.

The FTP server in the EtherNet/IP Unit or built-inEtherNet/IP port can connect to only one client at a time. If a client attempts to connect when the FTP server is in use, a message will be returned and connection will be refused.

Note Whengeneral-purposeFTP software is used, files can be transferred and read using a graphical user interface similar to Explorer.

Login Name and Password Setting

The default login name for FTP is “CONFIDENTIAL” and no password is set for the default login, so login is possible by simply entering “CONFIDENTIAL” as the login name. A user-setlogin name and password can also be set in the User Setup (CPU Bus Unit System Setup).

Login Messages

Status

Message

 

 

Normal

220 xxx.xx.xx.xx yyyyyyyyyy FTP server (FTP Ver-

connection

sion z.zz) ready.

 

xxx.xx.xx.xx: IP address of EtherNet/IP Unit orbuilt-inEther-

 

Net/IP port

 

yyyyyyyyyy: EtherNet/IP Unit orbuilt-inEtherNet/IP port model

 

number (e.g., CS1W-EIP21)

 

z.zz: Firmware version of EtherNet/IP Unit orbuilt-inEtherNet/

 

IP port

 

 

FTP server

221 FTP server busy, Goodbye.

busy

 

Setting Restrictions

The following restrictions apply to login names and passwords.

The login name and password must consist of alphanumeric characters, hyphens, and/or underscores. They are not case sensitive.

A login name consists of 12 characters.

A password consists of 8 characters.

Always set a password when setting a new login name. The login name will not be valid unless a password is set for it.

If a login name is not set or contains illegal characters, the default login name, CONFIDENTIAL, must be used. No password is required and any password that is set will be ignored.

FTP File Transfer Mode

FTP has two file transfer modes: ASCII mode and binary mode. Before starting to transfer files, use the type command (specifies the data type of transferred files) to select the required mode.

Always select binary mode for binary files (extensions .IOM, .STD, or .OBJ) in the CS/CJ-seriesfile memory and other program files (with extensions such as .CXP).

304

Using the FTP Server Function

Section 11-3

11-3Using the FTP Server Function

11-3-1Procedure

1,2,3... 1. Make the basic settings.

Refer to Initial Settings on page 34.

2.When using a user-setFTP login name and password:

With the CX-Programmeronline,right-clickthe EtherNet/IP Unit orbuilt-inEtherNet/IP port in the IO Table Dialog Box of theCX-Programmer,and selectEdit - Unit Setup. Set the following on the FTP Tab Page of the Edit Parameters Dialog Box.

FTP login name

FTP password.

3.Select Transfer to PLC from the PLC Menu and click theYes Button. The setting data will be transferred to the CPU Bus Unit System Setup Area in the CPU Unit.

4.When reading from and writing to the Memory Card: Mount the Memory Card into the CPU Unit.

5.Connect the EtherNet/IP Unit or built-inEtherNet/IP port using the FTP client software.

6.Enter the FTP login name and password set in the Unit Setup and log into the EtherNet/IP Unit or built-inEtherNet/IP port.

Note Once logged in, the ftp commands can be used, such as cd (Change Directory), and get (Obtain File).

7.Search in the following directories for the required file in the Memory Card mounted to the CPU Unit or the EM File Memory.

File memory type

Directory

 

 

Memory Card

\MEMCARD

 

 

EM File Memory

\EM

 

 

8.Download the files.

9.Exit the connection.

Note The EtherNet/IP Unit orbuilt-inEtherNet/IP port will be restarted when the settings data is transferred to the CPU Bus Unit System Setup Area, so that the new settings are read and become effective. Verify that it is safe for the EtherNet/IP Unit orbuilt-inEtherNet/IP port to restart before transferring the settings data.

11-3-2List of Settings Required for the FTP Server Function

Make the following settings for the unit setup when the server function is used.

CX-Programmer

Settings

Setting conditions

Page

tab

 

 

 

 

 

 

 

FTP

Login

User-set(when the default, CON-

306

 

 

FIDENTIAL, is not used)

 

 

 

 

 

 

Password

User-set

 

 

 

 

 

 

Port No.

Rarely required (when the default,

 

 

 

21, is not used)

 

 

 

 

 

305

Using the FTP Server Function

Section 11-3

11-3-3FTP Tab

The CPU Bus Unit System Setup, which is set when using the FTP server function, is shown in the CX-Programmer'sEdit Parameters Dialog Box.

Settings

Setting

Details

Default value

 

 

 

Login

Set the login name to externally connect to

None

 

the EtherNet/IP Unit or built-inEtherNet/IP

(CONFIDENTIAL is

 

port via FTP.

 

used.)

 

 

 

 

 

Password

Set the password to externally connect to the

None

 

EtherNet/IP Unit or built-inEtherNet/IP port

 

 

via FTP.

 

 

 

 

Port No.

FTP port number of the EtherNet/IP Unit or

0

 

built-inEtherNet/IP port.

(21 is used.)

 

This setting does not normally need to be

 

 

 

changed.

 

 

FTP uses two ports: a port for control and a

 

 

port for data transfer. Set the control port

 

 

only. The data transfer port uses the value

 

 

set for the control port –1.

 

 

 

 

306

FTP Server Application Example

Section 11-4

11-4FTP Server Application Example

The following procedure shows how to use the FTP server by connection with the default login name, CONFIDENTIAL. No password is required.

Note The login name and a password must be set in the CPU Bus Setup for the Ethernet Unit in the CPU Unit to use any login name other than CONFIDENTIAL.

Note Whengeneral-purposeFTP software is used, files can be transferred and read using a graphical user interface similar to Explorer.

1,2,3... 1. Make sure that a Memory Card is inserted in the CPU Unit and turn ON the power supply to the PLC. If EM File Memory is to be used, create the EM File Memory.

2.Connect to the FTP server from a computer on the Ethernet by entering the text that is underlined in the following diagram.

IP address of the Ethernet/IP Unit or built-inEtherNet/IP port

$ ftp 150.31.2.83

connected to 150.31.2.83

Results

220 **IPaddress** CJ1W-EIP21FTP server(FTP**version**)ready

Name:CONFIDENTIAL Login name

230 Guest logged in.

3.Enter FTP commands (underlined in the following diagram) to read and write files. The following directory tree is used in this example.

/: root

EM

MEMCARD

ABC (subdirectory)

DEF.IOM (file)

ftp> ls

File names read

200 PORT command successful.

150 opening data connection for ls(**IPaddress**port#**)(0bytes). MEMCARD

EM

226 Transfer complete.

** bytes received in 0 seconds(**bytes/s)

ftp> cd MEMCARD 250 CWD command successful.ftp>get ABC/DEF.IOM 200 PORT command successful.

150 opening data connection for abc/def.iom(**IPaddress**port#**)(**bytes).

226 Transfer complete

**bytes received in *.*** seconds(**bytes/s)

Results

Change to MEMCARD directory

Results

Transfer DEF.IOM from ABC directory

Results

307

Using FTP Commands

Section 11-5

11-5Using FTP Commands

This section describes the FTP commands which the host computer (FTP client) can send to the FTP server of the EtherNet/IP Unit or built-inEtherNet/IP port. The descriptions should also apply to most UNIX workstations, but slight differences may arise. Refer to your workstation’s operation manuals for details.

11-5-1Table of Commands

The FTP commands which can be sent to the EtherNet/IP Unit or built-inEtherNet/IP port are listed in the following table.

Command

Description

 

 

open

Connects the specified host FTP server.

 

 

user

Specifies user name for the remote FTP server.

 

 

ls

Displays the Memory Card file names.

 

 

dir

Display the Memory Card file names and details.

 

 

rename

Changes a file name.

 

 

mkdir

Creates a new directory in the working directory in the remote host.

 

 

rmdir

Deletes a new directory from the working directory in the remote host.

 

 

cd

Changes the Ethernet Unit work directory to the specified directory.

 

 

cdup

Changes the working directory at the remote host to the parent direc-

 

tory.

 

 

pwd

Displays the Ethernet Unit work directory.

 

 

type

Specifies the data type of transferred files.

 

 

get

Transfers the specified file from the Memory Card to the local host.

 

 

mget

Transfers multiple files from the Memory Card to the local host.

 

 

put

Transfers the specified local file to the Memory Card.

 

 

mput

Transfers multiple local files to the Memory Card.

 

 

delete

Deletes the specified file from the Memory Card.

 

 

mdelete

Deletes multiple files from the Memory Card.

 

 

close

Disconnects the FTP server.

 

 

bye

Closes the FTP (client).

 

 

quit

Closes the FTP (client).

 

 

The EtherNet/IP Unit or built-inEtherNet/IP port is considered to be the remote host and the host computer (FTP client) is considered to be the local host.

A remote file is a file on the Memory Card or in EM File Memory in the CPU Unit. A local file is one in the host computer (FTP client).

The parent directory is the directory one above the working directory.

11-5-2Using the Commands

open

Format

open [IP_addressor host_name_of_FTP_server]

Function

Connects the FTP server. Normally when the FTP client is booted, the FTP server IP address is specified to execute this command automatically.

308

 

Using FTP Commands

Section 11-5

user

 

Format

 

 

 

user [user_name]

Function

 

 

 

Specifies the user name. Specify the FTP login name set in the EtherNet/IP

 

 

Unit or built-inEtherNet/IP port system setup. The default FTP login name is

 

 

“CONFIDENTIAL.”

 

 

If a non-defaultlogin name is used, it must be followed by the password. In

 

 

this case, enter the FTP password set in the system setup.

 

 

The user name is automatically requested immediately after connection to the

 

 

FTP server.

ls

 

Format

 

 

 

ls [-l] [REMOTE_FILE_NAME[local_file_name]]

Function

 

 

 

Displays the remote host (Memory Card or EM File Memory) file names.

 

 

Set the switch [-l]to display not only the file names but the creation date and

 

 

size as well. If the switch is not set, only the file names will be displayed.

 

 

You can specify a file name in the Memory Card or EM File Memory if desired.

 

 

If a local file name is specified, the file information will be stored in the speci-

 

 

fied file in the host computer.

dir

 

Format

 

 

 

dir [REMOTE_FILE_NAME[local_file_name]]

Function

 

 

 

Displays the file names, date created, and size of the files in the remote host

 

 

(Memory Card or EM File Memory). It displays the same information as com-

 

 

mand [ls -l].

 

 

Specify a file name in the Memory Card or EM File Memory as the remote file

 

 

name.

 

 

If a local file name is specified, the file information is stored in the specified file

 

 

in the host computer.

rename

 

Format

 

 

 

rename CURRENT_FILE_NAME NEW_FILE_NAME

Function

 

 

 

Changes the specified current file name to the specified new file name.

 

 

rename can be used only to change the file name. It cannot be used to move

 

 

the file to a different directory.

309

Using FTP Commands

Section 11-5

mkdir

 

Format

 

 

mkdir DIRECTORY_NAME

Function

 

 

Creates a directory of the specified name at the remote host (Memory Card or

 

EM File Memory).

 

An error will occur if a file or directory of the same name already exists in the

 

working directory.

rmdir

 

Format

 

 

rmdir DIRECTORY_NAME

Function

 

 

Deletes the directory of the specified name from the remote host (Memory

 

Card or EM File Memory).

 

The directory must be empty to delete it.

 

An error will occur if the specified directory does not exist or is empty.

pwd

 

Format

 

 

pwd

Function

 

 

Displays the remote host’s (Ethernet Unit) current work directory.

cd

 

Format

 

 

cd [directory_name]

Function

 

 

Changes the remote host (Ethernet Unit) work directory to the specified

 

remote directory.

 

The files in the Memory Card are contained in the MEMCARD directory under

 

the root directory (/). The files in EM File Memory are contained in the EM

 

directory under the root directory (/). The root directory (/) is the directory

 

used when logging into the EtherNet/IP Unit or built-inEtherNet/IP port. No

 

MEMCARD directory will exist if a Memory Card is not inserted in the PLC or

 

if the Memory Card power indicator is not lit. No EM directory will exist if EM

 

File Memory does not exist.

cdup

 

Format

 

 

cdup

Function

 

 

Changes the working directory at the remote host to the parent directory (one

 

directory above the current working directory).

310

Using FTP Commands

Section 11-5

type

Format

type data_type

Function

Specifies the file data type. The following data types are supported:

ascii: Files are transferred as ASCII data binary (image): Files are transferred as binary data.

All files are treated by the PLC as binary files. Before reading or writing any files, always use the type command to set the file type to binary. File contents cannot be guaranteed if transferred as ASCII data.

The default file type is ASCII.

get

Format

get FILE_NAME[receive_file_name]

Function

Transfers the specified remote file from the Memory Card or EM File Memory to the local host.

A receive file name can be used to specify the name of the file in the local host.

mget

Format

mget FILE_NAME

Function

Allows the use of a wildcard character (*) to transfer multiple remote files from the Memory Card or EM File Memory to the local host.

put

Format

put file_name[DESTINATION_FILE_NAME]

Function

Transfers the specified local file to the remote host (Memory Card or EM File

Memory).

A destination file name can be used to specify the name the file is stored under in the Memory Card or EM File Memory.

Any existing file with the same name in the remote host (Memory Card or EM

File Memory) will be overwritten by the contents of the transferred file.

If an error occurs during file transfer, the file being transferred will be deleted and the transmission will end in an error.

mput

Format

mput FILE_NAME

Function

Allows the use of a wildcard character (*) to transfer multiple local files to the remote host (Memory Card or EM File Memory).

311

Using FTP Commands

Section 11-5

Any existing file with the same name in the remote host (Memory Card or EM

File Memory) will be overwritten by the contents of the transferred file.

If an error occurs during file transfer, the file being transferred will be deleted and the transmission of that file will end in an error. However, mput execution will continue and remaining files will be transferred.

delete

Format

delete FILE_NAME

Function

Deletes the specified remote file from the Memory Card or EM File Memory.

mdelete

Format

mdelete FILE_NAME

Function

Allows the use of a wildcard character (*) to delete multiple remote files from the Memory Card or EM File Memory.

close

Format

close

Function

Disconnects the FTP server of the EtherNet/IP Unit or built-inEtherNet/IP port.

bye

Format

bye

Function

Ends the FTP (client).

quit

Format

quit

Function

Ends the FTP (client).

312

Using FTP Commands

Section 11-5

11-5-3Error Messages and FTP Status

Error Messages

The error messages returned by the EtherNet/IP Unit or built-inEtherNet/IP port are listed in the following table.

Message

Meaning

 

 

PPP is a directory.

The path name indicated at PPP is a directory.

 

 

PPP is not a directory.

The path name indicated at PPP is not a directory.

 

 

Another unit has access authority

Another Unit currently has the access right.

(FINS error 0 x 3001).

 

 

 

Bad sequence of commands.

The RNFR command has not been executed.

 

 

Can't create data socket (X.X.X.X, YY).

A socket cannot be created.

 

 

Cannot access to device (FINS error 0 x 250F).

A file device error has occurred.

 

 

Cannot get memory blocks.

A message memory block cannot be allocated.

 

 

Command format error (FINS error 0 x 1003).

The command format is incorrect.

 

 

Connect error.

A connection error has occurred.

 

 

Directories of old and new paths are not same.

The directories before and after changing the name are different.

 

 

Directory name length exceeded max. size.

The directory name is too long.

 

 

Directory not empty (FINS error 0 x 2108).

The directory must be empty to delete it.

 

 

Fatal error (FINS error 0 x 1101).

A parameter error has occurred.

 

 

Fatal error (FINS error 0 x 1103).

 

 

 

File or directory already exists.

The specified file or directory name already exists.

 

 

File or directory already exists

 

(FINS error 0 x 2107).

 

 

 

File or directory name illegal.

The file or directory name is incorrect.

 

 

File or directory name illegal

 

(FINS error 0 x 110C).

 

 

 

File read error (FINS error 0 x 1104).

An error occurs when reading the file.

 

 

File read error (FINS error 0 x 110B).

 

 

 

File write error (FINS error 0 x 2106).

An error occurs when reading the file.

 

 

File write error (FINS error 0 x 2107).

 

 

 

FINS error MRES 0 x XX: SRES 0 x XX.

Some other FINS error has occurred.

 

 

Length of directory name too long.

The path name of the directory is too long.

 

 

No space to create entry (FINS error 0 x 2103).

There are too many files to create a new one.

 

 

No such device (FINS error 0 x 2301).

The file device cannot be found.

 

 

No such file or directory.

The specified file or directory does not exist.

 

 

No such file or directory (FINS error 0 x 2006).

 

 

 

No such file or directory (FINS error 0 x 2106).

 

 

 

Not enough memory.

The communications buffers are full.

 

 

Not enough space in the system.

The file device is full.

(FINS error 1104).

 

 

 

PLC communication error (timeout).

File access timed out.

 

 

Socket canceled.

The socket was canceled.

 

 

Socket error NN.

A socket bind error occurred. The error code will be given at NN.

 

 

Socket receive error NN.

A data reception error occurred. The error code will be given at NN.

 

 

Socket send error NN.

A data send error occurred. The error code will be given at NN.

 

 

Timeout (900 seconds): closing control connection.

The connection was closed because the client did not respond for

 

15 minutes.

 

 

Too many open files.

Too many sockets have been created.

 

 

Write access denied.

Writing is not possible.

 

 

Write access denied. (FINS error 0 x 2101).

 

 

 

313

Checking FTP Status

Section 11-6

PPP: Path name

XXX: IP address

YY:Port number

MM:FINS error code

NN:Socket error code

11-6Checking FTP Status

11-6-1FTP Status Flag

The current status of the FTP server can be obtained from the service status in the words allocated to the EtherNet/IP Unit in the CPU Bus Unit Area in the CIO Area. The word containing the FTP Status Flag can be computed as follows: CIO 1500 + (25 x unit number) + 13

15

14

13

 

12

11

10

 

9

 

8

 

7

 

6

 

5

 

4

 

3

 

2

 

1

 

0

 

n+13

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FTP Status Flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Meaning

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bit 00

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

FTP server busy (a user is connected)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

FTP server free

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note 1. File operations for files on the Memory Card are performed during FTP communications. Do not remove the Memory Card or turn OFF power to the PLC while FTP is being used.

2.When using File Memory Instruction from the program in the CPU Unit, program exclusive control using the FTP Status Flag so that the same data is not manipulated simultaneously by more than one instruction.

314