Size:
19.68 Mb
Download

Using File Memory

Section 11-7

11-7Using File Memory

There are two media that can be used to store files in memory for CS/CJseries PLCs:

Memory Cards

EM File Memory

CPU Unit

File

Memory Card

File

File

EM File

Memory

File

11-7-1

File Memory

 

 

 

 

 

 

 

 

Media

 

Memory type

Capacity

Model

File data recognized by CPU Unit

 

 

 

 

 

 

CS/CJ-

 

Flash memory

8 MB

HMC-EF861

• Complete user program

series

 

 

 

 

• Specified portions of I/O Memory

 

 

15 MB

HMC-EF171

Memory

 

 

 

 

• Parameter area data (e.g. PLC

 

 

30 MB

HMC-EF371

Cards

 

 

 

 

Setup)

 

 

 

 

 

 

 

 

 

EM File

 

RAM

Max. capacity of EM Area

All EM Area banks

 

Memory

 

 

in CPU Unit

from specified bank in

 

 

 

 

 

I/O Memory (specified

 

 

 

 

 

in PLC Setup)

 

11-7-2

File Types

 

 

 

File Names

Files are distinguished by assigning file names and extensions. The following characters can be used in file names and extensions:

Alphanumeric characters: A to Z and 0 to 9. (Names converted to all-caps)! & $ # ’ [ ] - ^ ( ) _

The following characters cannot be used in files names and extensions:

, . / ? * ” : ; < > = + (spaces)

File names are not case sensitive and will be converted to all-capsin the PLC file system. File names can be up to 8 character long with3-characterextensions. An error will occur if a file name or extension is too long. The first period

(.) in a file name will be taken as the delimiter between the file name and extension. Extensions are determined by the file type.

Directories

Up to five levels of directories (including root as the first level) can be created as file storage locations. A maximum of 65 characters can be used in directory names.

315

Using File Memory

 

 

 

 

Section 11-7

File Names Handled by CPU Unit

 

 

 

 

 

The files described in the following table can be read or written by the CPU

 

 

Unit.

 

 

 

 

 

 

 

 

 

File type

File name

 

Extension

Contents

Description

 

 

 

 

 

 

 

Data file

 

********

 

.IOM

Specified ranges of

• Contains word (16-bit)data from a starting

 

 

 

 

 

I/O Memory

word through an end word in one memory

 

 

 

 

 

 

area.

 

 

 

 

 

 

• The following areas can be used: CIO, HR,

 

 

 

 

 

 

WR, AR, DM, and EM.

 

 

 

 

 

 

Program file

********

 

.OBJ

Complete user pro-

• Contains all the programs for cyclic tasks

 

 

 

 

 

gram

and interrupt tasks, as well as task infor-

 

 

 

 

 

 

mation for one CPU Unit.

 

 

 

 

 

 

Parameter area file

********

 

.STD

• PLC Setup

• Contains all of the parameter data for one

 

 

 

 

 

• Registered I/O

CPU Unit.

 

 

 

 

 

tables

• There is no need for the user to distinguish

 

 

 

 

 

• Routing tables

the various types of data contained in the

 

 

 

 

 

• CPU Bus Unit

file.

 

 

 

 

 

• The file can be automatically read to or

 

 

 

 

 

Setup and other

 

 

 

 

 

setup data

written from the CPU Unit simply by speci-

 

 

 

 

 

 

fying the extension (.STD)

Files

Data files

AUTOEXEC

 

.IOM

I/O Memory data for

• There does not necessarily need to be a

trans-

 

 

 

 

the specified number

data file in the Memory Card when the

ferred at

 

 

 

 

of words starting from

automatic file transfer function is used at

startup

 

 

 

 

D20000

startup.

 

 

 

 

 

 

• The AUTOEXEC.IOM file always contains

 

 

 

 

 

 

DM Area data starting at D20000.

 

 

 

 

 

 

• All data in the file will be transferred to

 

 

 

 

 

 

memory starting at D20000 at startup.

 

 

 

 

 

 

 

 

Program

AUTOEXEC

 

.OBJ

Complete user pro-

• There must be a program file in the Mem-

 

files

 

 

 

gram

ory Card when the automatic file transfer

 

 

 

 

 

 

function is used at startup.

 

 

 

 

 

 

• Contains all the programs for cyclic tasks

 

 

 

 

 

 

and interrupt tasks, as well as task infor-

 

 

 

 

 

 

mation for one CPU Unit.

 

 

 

 

 

 

 

 

Parameter

AUTOEXEC

 

.STD

• PLC Setup

• There must be a parameter file in the

 

area file

 

 

 

• Registered I/O

Memory Card when the automatic file

 

 

 

 

 

tables

transfer function is used at startup.

 

 

 

 

 

• Routing tables

• Contains all of the parameter data for one

 

 

 

 

 

• CPU Bus Unit

CPU Unit.

 

 

 

 

 

• There is no need for the user to distinguish

 

 

 

 

 

Setup and other

 

 

 

 

 

setup data

the various types of data contained in the

 

 

 

 

 

 

file.

 

 

 

 

 

 

• All parameters in the file will be automati-

 

 

 

 

 

 

cally transferred to specified locations in

 

 

 

 

 

 

memory at startup.

Note 1. Refer to information on file memory in theCS/CJ-series Programmable Controllers Operation Manual (W339).

2.All files transferred automatically at startup must have the name AUTOEXEC.

316

Using File Memory Section 11-7

11-7-3Initializing File Memory

Memory

 

Initialization method

 

 

 

Memory

1.

Insert the Memory Card into the CPU Unit.

Cards

2.

Initialize the Memory Card from a Programming Device

 

 

 

(Programming Consoles included).

 

 

 

EM File Mem-

1.

Specify in the PLC Setup the first bank to convert to file memory.

ory

2.

Initialize EM File Memory from the CX-Programmer.

 

 

 

 

11-7-4I/O Memory Data Format

IOM Format

The IOM format is a data format used for binary data specified by the ladder instructions, READ DATA FILE (FREAD(700)) and WRITE DATA FILE (FWRIT(701)), in the CPU Unit.

If five words of data from the I/O memory (1234 hexadecimal, 5678 hexadecimal, 9ABC hexadecimal, etc.) is contained in an attached file in IOM format, the data will be stored in the attached file as shown in the following diagram.

Example: Binary data format with a delimiter after every 10 fields.

I/O memory

 

 

 

 

 

 

 

 

 

 

+0

+1

+2

+3

+4

+5

+6

+7

+8

+9

+0

1234

5678

9ABC

DEF0

1234

5678

9ABC

DEF0

1234

5678

 

 

 

 

 

 

 

 

 

 

 

+10

9ABC

DEF0

1234

5678

9ABC

DEF0

1234

5678

9ABC

DEF0

.IOM file contents

XX

XX

 

XX

12

34

56

78

9A

BC

DE

F0

12

34

48 bytes (Reserved by the system.)

TXT Format

The TXT format is a data format (using tab delimiters) specified by the ladder instructions, READ DATA FILE (FREAD(700)) and WRITE DATA FILE (FWRIT(701)), in the CPU Unit. The format is configured according to the specified FREAD(700) and FWRIT(701) parameters, as follows:

Data format

Use of CRs and CR position

 

 

• Words without delimiters

• No CRs

• Double words without delimiters

• CR after every 10 fields.

• Words delimited by tabs.

• CR after each field.

• Double words delimited by tabs

• CR after every 2 fields.

 

• CR after every 4 fields.

 

• CR after every 5 fields.

 

• CR after every 16 fields.

 

 

If data from the I/O memory (1234 hexadecimal, 5678 hexadecimal, 9ABC hexadecimal, etc.) is contained in an attached file in TXT format, the data will be converted into ASCII format in words or double-words.The words are delimited by inserting tabs ([HT]: 09), and carriage returns (CR) after specified fields ([CR][LF]: 0D0A).

317

Using File Memory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Section 11-7

Example: Data format using words delimited by tabs and CRs after every

 

 

 

 

 

10 fields.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I/O memory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+0

 

 

 

+1

 

 

+2

 

 

 

+3

 

 

 

+4

 

 

 

+5

 

 

+6

 

+7

+8

+9

 

+0

 

1234

 

 

5678

 

9ABC

 

DEF0

 

1234

 

 

5678

 

9ABC

 

DEF0

1234

5678

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+10

 

9ABC

 

DEF0

 

1234

 

5678

 

9ABC

 

DEF0

 

1234

 

5678

9ABC

DEF0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.TXT file contents

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

32

 

33

34

09

35

 

36

37

 

38

09

 

39

41

42

43

 

09

 

 

 

 

 

1

2

 

3

4 [HT] 5

6

7

 

8 [HT] 9

A

B

C [HT]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

 

36

37

38

0D

0A

39

 

41

42

 

43

09

 

 

 

 

 

 

 

 

 

 

 

 

 

5

 

6

7

8 [CR][LF] 9

A

B

C [HT]

 

 

 

 

 

 

 

 

 

 

.TXT file displayed as text

1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678 9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0

@...[HT]: Used to display tab space when displayed as text.

CSV Format

The CSV format is a data format (using comma delimiters) that is specified by ladder instructions, READ DATA FILE (FREAD(700)) and WRITE DATA FILE (FWRIT(701)), in the CPU Unit. The CSV format is configured according to the specified FREAD(700) and FWRIT(701) parameters, as follows:

Data format

Use of CRs and CR position

 

 

Words delimited by commas.

• No CRs

Double words delimited by com-

• CR after every 10 fields.

mas.

• CR after each field.

 

• CR after every 2 fields.

 

• CR after every 4 fields.

 

• CR after every 5 fields.

 

• CR after every 16 fields.

 

 

If word data from the I/O memory (1234 hexadecimal, 5678 hexadecimal, up to DEF0 hexadecimal) is contained in an attached file in CSV format, the word data will be converted into ASCII format in word or double-wordunits. The words are delimited by inserting comma delimiters (',':2C), and CRs after specified fields ([CR][LF]: 0D0A).

318

Using File Memory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Section 11-7

Example: Data format using words delimited by commas with CRs after every

 

 

 

 

 

10 fields.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I/O memory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+0

 

 

 

+1

 

 

+2

 

 

 

+3

 

 

 

+4

 

 

 

+5

 

 

+6

 

+7

+8

+9

 

+0

 

1234

 

 

5678

 

9ABC

 

DEF0

 

1234

 

 

5678

 

9ABC

 

DEF0

1234

5678

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+10

 

9ABC

 

DEF0

 

1234

 

5678

 

9ABC

 

DEF0

 

1234

 

5678

9ABC

DEF0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.CSV file contents

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

32

 

33

34

2C

35

 

36

37

 

38

2C

 

39

41

42

43

 

2C

 

 

 

 

 

1 2 3 4 , 5 6 7 8 , 9 A B C ,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

 

36

37

38

0D

0A

39

 

41

42

 

43

2C

 

 

 

 

 

 

 

 

 

 

 

 

 

5

 

6

7

8 [CR] [LF] 9

A

B

C

,

 

 

 

 

 

 

 

 

 

 

.TXT file displayed as text 1234,5678,9ABC,DEF0,1234,5678,9ABC,DEF0,1234,5678 9ABC,DEF0,1234,5678,9ABC,DEF0,1234,5678,9ABC,DEF0

Note FREAD(700) will not be able to read the last byte in a file that has been written to the Memory Card if the file contains an odd number of bytes. Add 00 hexadecimal to the end of the file if necessary to write an even number of bytes to the Memory Card.

Note The UM and DM Areas contain binary data. Set the data type to binary using thetype command before reading or writing files using FTP. (Refer totype on page 311.)

Note For details on how to use File Memory Instructions, refer to theCS/CJ Series Instructions Reference Manual (W340).

319

FTP File Transfer Time

Section 11-8

11-8FTP File Transfer Time

File transfers using FTP can require 30 or 40 minutes depending on the capacity of the file. Approximate file transfer time are provided in the following table for reference.

All times are in seconds unless otherwise specified.

CS1 CPU Units and CJ1 CPU Units

File system

Memory Card

EM File Memory

 

 

 

 

 

 

CPU Unit status

Operating mode

PROGRAM

RUN

PROGRAM

RUN

 

 

 

 

 

 

 

Cycle time

---

20 ms

---

20 ms

 

 

 

 

 

 

Transfers using

1 KB

0.7 s

6.0 s

0.4 s

2.9 s

put

 

 

 

 

 

30 KB

4.5 s

38.3 s

2.5 s

21.5 s

 

 

 

 

 

 

 

 

60 KB

7.4 s

72.1 s

5.0 s

44.7 s

 

 

 

 

 

 

 

120 KB

14.4 s

141.4 s

11.0 s

120.8 s

 

 

 

 

 

 

Transfers using

1 KB

0.3 s

1.4 s

0.2 s

0.8 s

get

 

 

 

 

 

30 KB

2.8 s

19.3 s

1.9 s

11.4 s

 

 

 

 

 

 

 

 

60 KB

4.9 s

37.6 s

3.8 s

26.7 s

 

 

 

 

 

 

 

120 KB

9.6 s

75.7 s

8.6 s

68.2 s

 

 

 

 

 

 

CS1-HCPU Units,CJ1-HCPU Units,CJ1-RCPU Units,CJ2-HCPU Units, and CJ2M CPU Units

File system

Memory Card

EM File Memory

 

 

 

 

 

 

CPU Unit status

Operating mode

PROGRAM

RUN

PROGRAM

RUN

 

 

 

 

 

 

 

Cycle time

---

20 ms

---

20 ms

 

 

 

 

 

 

Transfers using

1 KB

0.5 s

2.7 s

0.2 s

0.6 s

put

 

 

 

 

 

30 KB

1.8 s

11.6 s

0.7 s

6.6 s

 

 

 

 

 

 

 

 

60 KB

3.2 s

21.1 s

1.5 s

14.0 s

 

 

 

 

 

 

 

120 KB

6.2 s

40.2 s

3.6 s

32.5 s

 

 

 

 

 

 

Transfers using

1 KB

0.2 s

0.3 s

0.2 s

0.2 s

get

 

 

 

 

 

30 KB

1.7 s

4.8 s

1.0 s

4.1 s

 

 

 

 

 

 

 

 

60 KB

2.5 s

9.4 s

2.3 s

9.7 s

 

 

 

 

 

 

 

120 KB

4.9 s

18.8 s

4.9 s

27.0 s

 

 

 

 

 

 

Note 1. The above times assume that the Fixed Peripheral Servicing Time in the PLC Setup is set to the default value of 4%.

2.If the Fixed Peripheral Servicing Time in the PLC Setup is increased, FTP files will be transferred faster.

320

Host Computer Application Example

Section 11-9

11-9Host Computer Application Example

The following procedure provides an example of FTP operations from a host computer. In this example, the following assumptions are made.

The IP address of the EtherNet/IP Unit or built-inEtherNet/IP port is registered in /etc/hosts on the host name as [cs1].

The default FTP login name is being used (CONFIDENTIAL).

A processing results data file called RESULT.IOM already exists on the Memory Card in the CPU Unit.

A processing instructions data file called PLAN.IOM already exists on the workstation.

The following procedure transfers the processing results file RESULT.IOM from the Memory Card in the CPU Unit to the workstation and then the processing instructions file PLAN.IOM is transferred from the workstation to the Memory Card in the CPU Unit.

Underlined text is keyed in from the FTP client. The workstation prompt is indicated as $ and the cursor is indicated as ■.

1,2,3... 1. Start FTP and connect to the EtherNet/IP Unit orbuilt-inEtherNet/IP port.

$ ftp cs1 ··· FTP started.

connected to cs1

220 **IPaddress** CS1W-ETN21FTP server(FTP**version**)ready Name(cs1:root): ■

2. Enter the login name.

Name(cs1:root):CONFIDENTIAL ··· Login name 230 Guest logged in.

ftp> ■

3.Make sure the Memory Card is inserted. The MEMCARD directory will be displayed if there is a Memory Card in the CPU Unit.

ftp> ls ··· Make sure the Memory Card is inserted. 200 PORT command successful.

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

226 Transfer complete.

15 bytes received in 0 seconds(**bytes/s) ftp> ■

321

Host Computer Application Example

Section 11-9

 

4.

Change to the MEMCARD directory.

 

ftp> cd MEMCARD

···

Change to MEMCARD directory.

 

250 CWD command successful.

 

ftp> ■

 

 

 

 

5.

Change data type to binary.

 

ftp> type binary ···

Binary data type set.

 

200 Type set to I.

 

 

 

ftp> ■

 

 

 

 

6.

Transfer the file RESULT.IOM to the workstation.

 

ftp> get RESULT.IOM ··· File read. 200 PORT command successful.

150 opening data connection for result.iom (**IPaddress**port#**) (**bytes).

226 Transfer complete.

** bytes received in *.*** seconds (**bytes/s) ftp> ■

7. Write the file PLAN.IOM to the Memory Card.

ftp> put PLAN.IOM ··· File written 200 PORT command successful.

150 opening data connection for plan.iom (**IPaddress**port#**).

226 Transfer complete.

** bytes received in *.** seconds (**bytes/s) ftp> ■

8. End FTP.

ftp> bye ··· FTP ended. 221 Goodbye.

$ ■

322

SECTION 12

Automatic Clock Adjustment Function

This section provides an overview of the automatic clock adjustment function, including details on specifications, required settings, operations from CX-Programmer,and troubleshooting.

12-1

Automatic Clock Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

324

 

12-1-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

324

 

12-1-2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

325

12-2

Using the Automatic Clock Adjustment Function . . . . . . . . . . . . . . . . . . . . .

325

 

12-2-1 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

325

 

12-2-2

Settings Required for Automatic Clock Adjustment Function. . . . .

326

 

12-2-3

Auto Adjust Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

327

12-3

Automatic Clock Adjustment Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

328

12-4

Automatic Clock Adjustment Error Processing . . . . . . . . . . . . . . . . . . . . . . .

328

 

12-4-1

Automatic Clock Adjustment (SNTP) Errors. . . . . . . . . . . . . . . . . .

328

 

12-4-2

Error Log Error Codes for the Automatic Clock Adjustment Function

328

323

Automatic Clock Adjustment

Section 12-1

12-1Automatic Clock Adjustment

12-1-1Overview

The EtherNet/IP Unit or built-inEtherNet/IP port can obtain the clock information from the SNTP server (see note 1) at a particular time or when a designated bit turns ON and then refresh the internal clock information of the CPU Unit to which it is mounted (referred to as the local CPU Unit).

Intranet

SNTP server

Automatic clock adjustment

Ethernet

24: 00: 00

Clock data is obtained from the

SNTP server and written at a particular time or when a designated bit turns ON.

The clock information can be broadcast to other CPU Units on the same Network.

24: 00: 00

EtherNet/IP Unit or

built-inEtherNet/IP port

Note (1) The SNTP (Simple Network Time Protocol) server is used to control the time on the LAN.

(2)An error will occur in the following CPU Units when the automatic clock adjustment function is executed under the conditions shown in the table.

CPU Unit

Conditions

 

 

CPU Units manufactured on or

When the CPU execution mode is set to other

before January 31, 2003 (lot num-

than normal mode (priority peripheral servicing

bers 030131 or earlier):

mode, parallel processing with synchronous

CJ1G-CPU@@H

memory access mode, or parallel processing

CJ1H-CPU@@H

with asynchronous memory access mode).

CS1G-CPU@@H

AND

CS1H-CPU@@H

When the CPU Unit operating mode is set to

 

RUN or MONITOR mode.

 

 

(3)The manufacturing date can be determined from the lot number on the side or top corner of the CPU Unit.

(4)The lot numbers are as follows:

YYMMDDnnnn, in which YY indicates the last two digits of the year, MM the month, DD the day, and nnnn the serial number.

(5)In accordance with SNTP protocol specifications, automatic adjustment will not be possible from February 7, 2036. In EtherNet/IP Units or builtin EtherNet/IP ports, this function will no longer operate from February 7, 2036 (an error message will not be displayed).

324

Using the Automatic Clock Adjustment Function Section 12-2

12-1-2Specifications

Item

Specification

 

 

 

Protocol

SNTP

 

 

 

 

Port number

123 (UDP)

 

 

Can also be set from the CX-Programmerin the Unit Setup.

 

 

Adjustment timing

Automatic (fixed time) and manual (manual only cannot be

 

set)

 

 

 

 

Access to SNTP

Writes the clock information

Obtains the clock information

server

from the SNTP server to the

from the SNTP server set up

 

local CPU Unit.

on the Network, and applies

 

 

the information obtained to

 

 

the local CPU Unit.

 

 

 

Refresh timing

When the automatic clock adjustment switch is turned from

 

OFF to ON and at a specified time.

 

 

 

12-2Using the Automatic Clock Adjustment Function

12-2-1Procedure

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

Refer to Initial Settings on page 34.

2.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 Auto Adjust Time Tab Page of the Edit Parameters Dialog Box.

SNTP server specification (required)

Access to the SNTP server is enabled when writing clock information from the SNTP server to the local CPU Unit when the Automatic Clock Adjustment Switch is turned from OFF to ON and at a set automatic adjustment time.

Automatic clock adjustment setting.

3.To perform automatic clock adjustment manually, turn the Automatic Clock Adjustment Switch from OFF to ON. (The Automatic Clock Adjustment Switch is word n bit 05 in the words allocated in the CPU Bus Unit Area, where n = CIO 1500 + (25 × unit number.)

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

325

Using the Automatic Clock Adjustment Function

Section 12-2

12-2-2Settings Required for Automatic Clock Adjustment Function

The following settings must be set in the Unit Setup when using the automatic clock adjustment function.

CX-

Settings

Setting conditions

Reference

Programmer

 

 

 

tab

 

 

 

Auto Adjust

Server specification

Required.

12-2-3 Auto Adjust

Time

type

 

Time onpage 327

 

 

 

 

 

IP Address

One or the other is

 

 

 

required, depending

 

 

Host name

 

 

on the Server specifi-

 

 

 

 

 

 

cation type setting.

 

 

 

 

 

 

Port No.

Rarely required.

 

 

 

(Change when a set-

 

 

 

ting other than the

 

 

 

default setting of 123

 

 

 

is required.)

 

 

 

 

 

 

Get the time informa-

Required.

 

 

tion from the SNTP

 

 

 

server

 

 

 

 

 

 

 

Auto Adjust Time

Optional

 

 

 

 

 

 

Retry timer

Optional (Change

 

 

 

when the default set-

 

 

 

ting of 10 seconds is

 

 

 

unacceptable.)

 

 

 

 

 

 

Adjust Time

Optional

 

 

 

 

 

DNS (See

IP Address

Required.

3-8 TCP/IP and Link

note.)

 

 

Settings onpage 52

Port No.

Rarely required.

 

 

 

 

(Change when a set-

 

 

 

ting other than the

 

 

 

default setting of 53

 

 

 

is required.)

 

 

 

 

 

 

Retry timer

Optional (Change

 

 

 

when the default set-

 

 

 

ting of 10 seconds is

 

 

 

unacceptable.)

 

 

 

 

 

Note When theServer specification type field in Auto Adjust Time Tab is set toHost name.

326

Using the Automatic Clock Adjustment Function

Section 12-2

12-2-3Auto Adjust Time

The contents in the CPU Bus Unit System Setup that are set for using mail send and receive functions are shown in the CX-Programmer’sEdit Parameters Dialog Box.

Item

Contents

Default

Get the time

Enable to set the CPU Unit's clock to the time at the

Not

information from

SNTP server's clock.

selected

the SNTP

The clock can be changed only for the CPU Unit to

(disabled)

server

 

which the EtherNet/IP Unit or built-inEtherNet/IP port

 

 

 

 

is mounted.

 

 

 

 

Auto Adjust

Set the time at which the SNTP server is to be

0:0:0

Time

accessed to synchronize the clocks.

 

 

When the time that is set here arrives, the SNTP

 

 

server is accessed and the CPU Unit clock is

 

 

adjusted to match the SNTP server clock.

 

 

 

 

Server specifi-

Select whether the SNTP server used for automatic

IP Address

cation type

clock adjustment is to be specified by IP address or

 

 

by host domain name (i.e., by host name).

 

 

 

 

IP Address

Set the IP address for the SNTP server that is to be

0.0.0.0

 

used for automatic clock adjustment.

 

 

This setting is enabled only when server specification

 

 

by IP address has been selected.

 

 

 

 

Host name

Set the host domain name (i.e., the host name) for

None

 

the SNTP server that is to be used for automatic

 

 

clock adjustment.

 

 

This setting is enabled only when server specification

 

 

by host name has been selected.

 

 

 

 

Port No.

Set the port number for connecting to the SNTP

0

 

server that is to be used for automatic clock adjust-

(Number

 

ment. This setting does not normally need to be

123 is

 

changed.

used.)

 

 

 

327

Automatic Clock Adjustment Switch

Section 12-3

 

 

 

 

 

Item

Contents

Default

 

 

 

 

 

Retry timer

Set the time to elapse before retrying when a connec-

0

 

 

tion to the SNTP server fails. This setting does not

(10 s)

 

 

normally need to be changed.

 

 

 

 

 

 

Adjust Time

This sets in the CPU Unit's clock data the time differ-

+0:0

 

 

ence made up from the SNTP server's clock data.

 

 

 

To use the clock data from the SNTP server just as it

 

 

 

is, input 0.

 

 

 

 

 

12-3Automatic Clock Adjustment Switch

Automatic Clock Adjustment Switch (Bit 05 of n)

The Automatic Clock Adjustment Switch is allocated in the CIO Area as shown below. The first word n of the CIO Area is calculated using the following equation.

n = CIO 1500 + (25 × unit number)

The Unit control bit is shown in the following diagram.

15

14

13

12

11

10

09

08

07

06

05

04

03

02

01

00

n

Automatic Clock

Adjustment Switch

When the Automatic Clock Adjustment Switch turns from OFF to ON, the EtherNet/IP Unit or built-inEtherNet/IP port obtains the clock data from the SNTP server on the network, and applies it to the local CPU Unit. After applying the data, the switch automatically turns OFF again.

12-4Automatic Clock Adjustment Error Processing

12-4-1Automatic Clock Adjustment (SNTP) Errors

The following table shows the main causes and remedies for errors that occur in the automatic clock adjustment function (SNTP).

Cause

Correction

 

 

SNTP, DNS server address not set

Reset each server address (IP address or

 

host name).

 

 

SNTP, DNS server communications time-

Inspect the communications path (Ether-

out

Net/IP Unit or built-inEtherNet/IP port,

 

cable connections, hub, router, server),

 

and correct the situation that is causing

 

the error.

 

 

CPU Unit internal clock could not be set

The automatic clock adjustment function

 

is not supported by certain CPU Units

 

(models, lot numbers) if they are in RUN

 

or MONITOR mode.

 

 

12-4-2Error Log Error Codes for the Automatic Clock Adjustment Function

When an error occurs while the EtherNet/IP Unit or built-inEtherNet/IP port is operating, the error code, detailed error code, and time the error occurred are saved in the error log. The following table provides a list of the error codes.

328

Automatic Clock Adjustment Error Processing Section 12-4

The error log can be read by sending FINS commands to the EtherNet/IP Unit or built-inEtherNet/IP port or by using the mail receive function and specifying the ErrorLogRead command.

Error

Meaning

Detailed error code

Correction

EEPROM

code

 

 

 

 

 

 

1st byte

2nd byte

 

 

 

 

 

 

 

 

 

 

 

 

03C1

Server set-

00H: DNS

01: IP address

Set the server

---

 

ting error

03H:

02: Host name

settings correctly

 

 

 

SNTP

based on the

 

 

 

03: Port number

 

 

 

04H: FTP

information in the

 

 

 

06H:

04: Other

detailed error

 

 

 

BOOTP

parameters

code.

 

 

 

07H:

 

 

 

 

 

SNMP

 

 

 

 

 

08H:

 

 

 

 

 

SNMP

 

 

 

 

 

Trap

 

 

 

 

 

09H:

 

 

 

 

 

FINS/

 

 

 

 

 

UDP

 

 

 

 

 

0AH:

 

 

 

 

 

FINS/

 

 

 

 

 

TCP

 

 

 

 

 

 

 

 

 

03C4

Server

00H: DNS

01: Specified

Take either of the

---

 

connection

03H:

host does not

following mea-

 

 

error

SNTP

exist

sures.

 

 

 

04H: FTP

02: No service

• Correct the set-

 

 

 

06H:

 

 

 

at specified host

tings for each

 

 

 

BOOTP

 

 

 

03: Timeout

server.

 

 

 

07H:

 

 

 

• Inspect the com-

 

 

 

04: Closed uni-

 

 

 

SNMP

 

 

 

munications

 

 

 

08H:

laterally by host

 

 

 

path (EtherNet/

 

 

 

SNMP

05: Cannot con-

 

 

 

IP Unit or built-in

 

 

 

Trap

nect because

 

 

 

EtherNet/IP

 

 

 

 

account infor-

 

 

 

 

port), cable con-

 

 

 

 

mation does not

 

 

 

 

nections, hub,

 

 

 

 

match

 

 

 

 

router, server),

 

 

 

 

 

 

 

 

 

06: Host name

and correct the

 

 

 

 

resolution error

situation that is

 

 

 

 

07: Transmis-

causing the

 

 

 

 

error.

 

 

 

 

sion error

 

 

 

 

 

 

 

 

 

08: Reception

 

 

 

 

 

error

 

 

 

 

 

09: Other error

 

 

 

 

 

0AH: Error in

 

 

 

 

 

obtained IP

 

 

 

 

 

address

 

 

 

 

 

 

 

 

03C6

Clock data

0001: Clock data could not

Clear the CPU

---

 

write error

be refreshed because of a

Unit error.

 

 

 

CPU Unit error.

 

 

 

 

 

 

 

 

 

0002: Clock data could not

The automatic

---

 

 

be refreshed because the

clock adjustment

 

 

 

CPU Unit could not write

function is not

 

 

 

clock data in that operation

supported by cer-

 

 

 

mode.

 

tain CPU Units

 

 

 

 

 

(models, lot num-

 

 

 

 

 

bers) if they are in

 

 

 

 

 

RUN or MONI-

 

 

 

 

 

TOR mode.

 

 

 

 

 

(See note.)

 

 

 

 

 

 

 

329

Automatic Clock Adjustment Error Processing

Section 12-4

Note (1) For details on other error log information, refer to theOperation Manual, Construction of Networks: SECTION 14 Troubleshooting and Error Processing.

(2)An error will occur in the following CPU Units when the automatic clock adjustment function is executed under the conditions shown in the table.

CPU Unit

Conditions

 

 

CPU Units manufactured on or

When the CPU execution mode is set to other

before January 31, 2003 (lot num-

than normal mode (priority peripheral servicing

bers 030131 or earlier):

mode, parallel processing with synchronous

CJ1G-CPU@@H

memory access mode, or parallel processing

CJ1H-CPU@@H

with asynchronous memory access mode).

CS1G-CPU@@H

AND

CS1H-CPU@@H

When the CPU Unit operating mode is set to

 

RUN or MONITOR mode.

 

 

(3)The manufacturing date can be determined from the lot number on the side or top corner of the CPU Unit.

(4)The lot numbers are as follows:

YYMMDDnnnn, in which YY indicates the last two digits of the year, MM the month, DD the day, and nnnn the serial number.

330

SECTION 13

Maintenance and Unit Replacement

This section describes cleaning, inspection, and Unit replacement procedures, as well as the Simple Backup Function.

13-1

Maintenance and Replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

332

 

13-1-1

Cleaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

332

 

13-1-2

Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

332

 

13-1-3

Unit Replacement Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

332

13-2

Simple Backup Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

333

13-3

Using the Backup Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

336

331

Maintenance and Replacement

Section 13-1

13-1Maintenance and Replacement

This section describes the routine cleaning and inspection recommended as regular maintenance, as well as the Unit replacement procedure required if an EtherNet/IP Unit needs to be replaced.

13-1-1Cleaning

Clean the EtherNet/IP Unit regularly as described below in order to keep the network in its optimal operating condition.

Wipe the Unit daily with a dry, soft cloth.

When a spot can’t be removed with a dry cloth, dampen the cloth with a neutral cleanser (2% solution), wring out the cloth, and wipe the Unit.

A smudge may remain on the Unit from gum, vinyl, or tape that was left on for a long time. Remove the smudge when cleaning.

!Caution Never use volatile solvents such as paint thinner, benzene, or chemical wipes. These substances could damage the surface of the Unit.

13-1-2Inspection

Inspection Equipment

Normally Required

Equipment

Occasionally Required

Equipment

Inspection Procedure

Be sure to inspect the system periodically to keep it in its optimal operating condition. In general, inspect the system once every 6 to 12 months, but inspect more frequently if the system is used with high temperature or humidity or under dirty/dusty conditions.

Prepare the following equipment before inspecting the system.

Have a standard and Phillips-headscrewdriver, multimeter, alcohol, and a clean cloth.

Depending on the system conditions, a synchroscope, oscilloscope, thermometer, or hygrometer (to measure humidity) might be needed.

Check the items in the following table and correct any items that are below standard.

 

Item

Standard

Inspection

 

 

 

 

Environmental

Ambient and cabinet temperature

0 to 55°C

Thermometer

conditions

 

 

 

Ambient and cabinet humidity

10 to 90% (with no condensa-

Hygrometer

 

 

 

tion or icing)

 

 

 

 

 

 

Dust/dirt accumulation

None

Visual

 

 

 

 

Installation

Are the Units installed securely?

No looseness

Phillips-head

 

 

 

screwdriver

 

 

 

 

 

Are the Ethernet cable connectors

No looseness

Visual

 

fully inserted and locked?

 

 

 

 

 

 

13-1-3Unit Replacement Procedure

 

Replace a faulty EtherNet/IP Unit as soon as possible. If the built-inEtherNet/

 

IP port is faulty, replace the CPU Unit as soon as possible. We recommend

 

having spare Units available to restore network operation as quickly as possi-

 

ble.

Precautions

Observe the following precautions when replacing a faulty Unit.

 

• After replacement, verify that there are no errors with the new Unit.

 

• When a Unit is being returned for repair, attach a sheet of paper detailing

 

the problem and return the Unit to your OMRON dealer.

332

Simple Backup Function

Section 13-2

Note

Settings Required after Unit Replacement

If there is a faulty contact, try wiping the contact with a clean, lint-freecloth dampened with alcohol.

To prevent electric shock when replacing a Unit, always stop communications in the network and turn OFF the power supplies to all of the nodes before removing the faulty Unit.

After a Unit has been replaced, verify that the following steps have been made correctly.

Set the node address and unit number.

Connect the Ethernet cable.

Set the configuration data (parameter settings) again and download them.

13-2Simple Backup Function

Overview

The simple backup function can be used to back up not only all of the data in

 

the CPU Unit, but also all of the data stored in memory in the EtherNet/IP Unit

 

or data for the built-inEtherNet/IP port. All of this data will automatically be

 

backed up to the Memory Card.

 

 

 

 

 

The simple backup function can be used for the following EtherNet/IP Units

 

and built-inEtherNet/IP port.

 

 

 

 

 

 

 

CS-seriesEtherNet/IP Unit(CS1W-EIP21)mounted to a CS1D/CS1-

 

 

 

H CPU Unit

 

 

 

 

 

 

 

CJ-seriesEtherNet/IP Unit(CJ1W-EIP21)mounted to aCJ1-H/CJ1M/

 

 

 

CJ2H-CPU@@-EIPCPU Unit

 

 

 

 

• A built-inEtherNet/IP port on aCJ2H-CPU@@-EIP/CJ2M-CPU3@

 

 

 

CPU Unit

 

 

 

 

 

When the EtherNet/IP Unit’s setup data is written to the Memory Card using a

 

simple backup operation, it is stored in the Memory Card as a Unit/Board

 

backup file with the file name BACKUP@@.PRM. (The @@ digits in the

 

backup file name indicate the unit address of the EtherNet/IP Unit or built-in

 

EtherNet/IP port, which is the unit number + 10 hex.)

 

This backup file is also used when reading data from the Memory Card or

 

comparing data with a file in the Memory Card.

 

 

 

EtherNet/IP Unit

 

 

CPU Unit

Memory Card

 

 

 

 

 

 

 

All data

Power Supply Switch

 

 

 

 

 

 

 

 

 

 

All setup data

Backup

 

 

 

 

Memory Card

 

 

Restore

 

 

 

 

 

 

 

 

 

Compare

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note The following table shows the Units that support the simple backup function. Confirm that the Units being used support the function.

CPU Unit

 

EtherNet/IP Unit

 

 

 

 

 

CS1W-EIP21

 

CJ1W-EIP21

 

 

 

 

CS1D

Yes

 

---

 

 

 

 

CS1-H

Yes

 

---

 

 

 

 

333

Simple Backup Function

Section 13-2

Applications

CPU Unit

 

EtherNet/IP Unit

 

 

 

 

 

CS1W-EIP21

 

CJ1W-EIP21

 

 

 

 

CS1

No

 

---

 

 

 

 

CJ1-H

---

 

Yes

 

 

 

 

CJ1

---

 

No

 

 

 

 

CJ1M

---

 

Yes

 

 

 

 

CJ2H

---

 

Yes

 

 

 

 

CJ2M

---

 

Yes

 

 

 

 

Use the simple backup function when creating a backup data file for the entire PLC (including the CPU Unit, EtherNet/IP Units, built-inEtherNet/IP port, and Serial Communications Units/Boards), or when replacing all the Units.

Backup Sources and

Restore Targets

The data that was backed up with the simple backup function can be restored to Units or built-inports as shown in the following table. Network Configuration designations are given for the model numbers and versions of the backup sources and restore targets.

The model number must be the same for both the backup source and restore target. The CIP revision must be the same or higher.

Restore target

CS1W-EIP21

CJ2B-EIP21

CJ2M-EIP21

CJ1W-EIP21

 

CJ1W-EIP21

 

 

(CJ2)

 

 

 

 

 

 

Backup source

Rev. 1.1

Rev. 2.1

Rev. 2.1

Rev. 2.1

Rev. 2.1

 

 

 

 

 

 

CS1W-EIP21,CJ1W-EIP21

Yes

Yes

No

No

No

Rev. 1.1

 

(See note 1.)

 

 

 

 

 

 

 

 

 

CS1W-EIP21,CJ1W-EIP21

No

Yes

No

No

No

Rev. 2.1

 

 

 

 

 

 

 

 

 

 

 

CJ2B-EIP21

No

No

Yes

No

No

Rev. 2.1

 

 

 

 

 

 

 

 

 

 

 

CJ2M-EIP21

No

No

No

Yes

No

Rev. 2.1

 

 

 

 

 

 

 

 

 

 

 

CJ1W-EIP21(CJ2)

No

No

No

No

Yes

Rev. 2.1

 

 

 

 

 

 

 

 

 

 

 

Note (1) Functions added for revision 2.1 will be set to their default settings.

The number of settings will be increased, so an error will occur in the comparison after data is restored.

(2)Data backed up for revision 1.1 using a simple backup can be restored to an EtherNet/IP Unit or built-inEtherNet/IP port with revision 2.1, but an error will occur in the comparison. When changing the unit version, refer to6-2-18 Changing Devices for information on the Network Configurator device change function.

Operating Methods

Backing Up EtherNet/IP Unit or Built-inEtherNet/IP Port Setup Files to the Memory Card

Set pins 7 and 8 of the DIP switch on the front panel of the CPU Unit as shown in the following table, and press the Memory Card Power Supply Switch for 3 seconds with the Memory Card inserted into the slot. Release the switch when the BUSY indicator lights.

 

DIP switch settings

 

 

 

SW7

 

ON

 

 

 

SW8

 

OFF

 

 

 

334