Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 6 of 15

SYSMAC C200H-IDS01-V1/IDS21 ID Sensor Operation Manual: SECTION 2 Operation, pages 36 to 45

Pages 36 to 45 of 114, from SYSMAC C200H-IDS01-V1/IDS21 ID Sensor Operation Manual

The original document is the PDF (1.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Omron C200H-IDS01-V1

Page 36

The User Program Read Command

Section 2-3 The Read command reads data from the internal memory of the Data Carrier. Up to 1024 bytes (512 words) of data can be read at a time. Specify the first address and the number of bytes in hexadecimal. 00

15

5 This field specifies whether the data to be read from the Data Carrier is ASCII characters or hexadecimal code. When ASCII characters are to be read, this field contains code A (41 in ASCII code); when hexadecimal code is to be read, it contains code H (48 in ASCII code).

This is OP (operation) code indicating that the command is Read.

D

R 2

4

4

This code selects a Read/Write Head and is always fixed to 1.

1

A/H 41/48

3

This is OP code represented in ASCII code.

1

ASCII code Specifies the first address of the Data Carrier memory to which data is to be read. Addresses $0000 through $FFFF can be specified in hexadecimal.

Specifies the number of bytes, which can range from $0001 through $0400 (1 through 1024 in decimal), to be read in hexadecimal code. Terminator

* 2

A

0

D

ASCII code

21

Page 37

The User Program Auto Write Command

Section 2-3 The Auto Write command executes when the Data Carrier approaches the Read/Write Head. When the Data Carrier comes within detection range of the Read/Write Head, Auto Write writes data to the internal memory of the Data Carrier. Up to 1024 bytes (512 words) of data can be written at a time. Specify the first address in hexadecimal. 00

15

4 Specifies the type of data to be written, which can be ASCII characters or hexadecimal numbers. Code A (41) specifies ASCII characters, while H (48) specifies hexadecimal numbers.

This is OP (operation) code indicating that the command is Auto Write.

W

A 1

5

3

This is OP code represented in ASCII code. This code selects a Read/Write Head and is always fixed to 1.

1

A/H 41/48

7

1

ASCII code Specifies the first address of the Data Carrier memory to which data is to be written. Addresses $0000 through $FFFF can be specified in hexadecimal.

Write data

• 1024 bytes max. = 512 words

Terminator

* 2

22

A

0

D

ASCII code

Page 38

The User Program

Section 2-3

Auto Read Command

Auto Read executes when the Data Carrier approaches the R/W Head. When the Data Carrier comes within detection range of the R/W Head, Auto Read reads data from the internal memory of the Data Carrier. Up to 1024 bytes (512 words) of data can be read at a time. Specify the first address and the number of bytes in hexadecimal. 00

15 R

A 4 This field specifies whether the data to be read from the Data Carrier is ASCII characters or hexadecimal code. When ASCII characters are to be read, this field contains code A (41 in ASCII code); when hexadecimal code is to be read, it contains code H (48 in ASCII code).

5

1

This is OP (operation) code indicating that the command is Auto Read. 2

This code selects a R/W Head and is always fixed to 1.

1

A/H 3

41/48

1

ASCII code Specifies the first address of the Data Carrier memory to which data is to be read. Addresses $0000 through $FFFF can be specified in hexadecimal. Specifies the number of bytes, which can range from $0001 through $0400, to be read in hexadecimal code.

Terminator

* 2

Clear-all Command

This is OP code represented in ASCII code.

0

A

D

ASCII code

Clear-all clears the Data Carrier’s internal memory, regardless of write protection. The number of command data words are fixed to three. (Refer to 2-3-5 The Data Carrier’s Production Date.) 15

00 C

4

This is OP (operation) code indicating that the command is Clear-all.

A 3

4

1

This code selects a R/W Head and is always fixed to 1.

1

Blank (no specification) 0

0

3

1

ASCII code Terminator

* 2

This is OP code represented in ASCII code.

A

0

D

ASCII code

23

Page 39

The User Program Auto Read/Write Abort

Section 2-3 This command aborts Auto Read and Auto Write. When this command is executed, the ID Sensor Unit is initialized and waits for the next command. 15

00 A

4

This is OP (operation) code indicating that the command is Auto Read/Write Abort.

A 1

4

1

Terminator

* 2

This is OP code represented in ASCII code.

A

0

D

ASCII code

If, after initialization, the ID Sensor Unit receives Auto Read/ Write Abort from the CPU, the Unit recognizes it as an undefined command and waits for further command input from the CPU. While the Unit is waiting for a command, Waiting for Data Carrier (word n+4 bit 01) is ON. Data Management (IDS01-V1 Only) Data Check

By adding a check code to the Data Carrier data, it is possible to detect a data error due to the battery of the SRAM Data Carrier or excessive overwriting operations of the EEPROM Data Carrier. Use the MD-K command to calculate and write the check code to the Data Carrier. Use the MD-C command to collate the check code.

Usage

After data is written to the Data Carrier, use the MD-K command to calculate and add the check code to the data. To check whether or not the Data Carrier’s data is corrupted, use the MD-C command before reading the data and collate the check code.

Write stage

Data right Check code calculation

Read stage

Check code collation Data read

Command

It is possible to calculate, write, or collate the CRC code (see note) in the check area designated by the command. The CRC code is calculated by using the generating function X16 + X12 + X5 + 1. Note CRC stands for cyclic redundancy check. The cyclic redundancy check is an error detection method.

24

Page 40

The User Program

Section 2-3 The number of check area bytes is 256 (0100) maximum and the number of command data words is fixed at 5. 00

15 D

M D

4

K/C

1

4B/43

3

4 Select K to designate data check code calculation and C to designate data check collation.

Memory management command 4 R/W Head no. (fixed to 1) 1 Designates the first address of the check area within the range 0000 through FFFF. Designates the number of check area bytes within the range 0003 through 0100. Terminator

* 2

A

0

D

If the check codes do not coincide, the DC warning bit (word n+4 bit 07) will be turned ON. Command Processing

All the check areas that are designated by the first address and number of bytes except the last two bytes is collectively the calculation objective area. The last two bytes are used as the check code area. If check code calculation or check code writing is designated using processing code K, the CRC of the data in the calculation objective area is calculated and the result is written to the check code area, in which case if the check block is a write protection area, a write protection error will result. If data collation is designated using processing code C, the CRC of the data in the calculation objective area is calculated and the result is compared with the data in the check code area. If they do not coincide, the DC warning bit will be turned ON.

25

Page 41

The User Program

Section 2-3 Address 0000 0001

First address

Check code calculation area (no. of check bytes − 2) No. of area bytes

Check area

CRC (upper digit) CRC (lower digit)

Check code area (2 bytes)

Note The last two bytes of a check area are for the check code area, to which nothing must be written. Management of Overwriting Operations 1

By counting the number of writing operations, it is possible to detect if the EEPROM DC has been overwritten for 100,000 times.

Usage

After writing data to the most frequently used address, renew the number of overwriting operations in order to check the life of the EEPROM. It is possible to overwrite data to each address for 100,000 times. Therefore, it is necessary to count the number of overwriting operations of the most frequently used address. It is also possible to check the life of the EEPROM without renewing the number of overwriting operations.

Right stage

Data right Renewal of the number of writing operations/Life check

Life check stage

26

Life check

Page 42

The User Program

Section 2-3

Command

Add an appropriate number (up to 255 (00FF)) to the data of the address designated by the user in order to judge if the address has been overwritten 100,000 times. If 0 (0000) is added, only the life of the address will be checked. The number of command data words is fixed at 5. 15

00 M

4 Management of the number of writing operations

D

4

L 4

Memory management command

D 4

R/W Head no. (fixed to 1)

1 C

3

1 Designates the first address of the management area within the range 0000 through FFFF (see note). Designates the number of adding operations within the range 0000 through 00FF. Terminator

* 2

A

0

D

Note Designate the first address on the EEPROM DC so that the terminator will be ___0 to ___5 or ___8 to ___D, otherwise an address error will result. When the command is executed and the address is found to have been overwritten 100,000 times, the DC warning bit will be turned ON. Command Processing

Overwriting operation management area consists of three bytes from the first address, to which the appropriate number (up to 255 (00FF)) that the user designates is added. If the result is larger than 100,000, the DC warning bit will be turned ON. If the area has been overwritten 100,000 times, the value in the overwriting operation management area will not be renewed.

First address

Upper digit Middle digit

3 bytes

Lower digit

Management of Overwriting Operations 2

By counting the number of writing operations, it is possible to detect if the DC with EEPROM has been overwritten for the number of operations set by the user.

27

Page 43

The User Program Usage:

Section 2-3 Using the write command, write in advance the number of desired overwriting operations onto the overwriting operation management area of the DC. After writing data to the most frequently used address, renew the number of overwriting operations in order to check the life of the EEPROM. The number of overwriting operations is determined for each address by the DC specifications. Therefore, it is necessary to count the number of overwriting operations of the most frequently used address. It is also possible to check the life of the EEPROM without renewing the number of overwriting operations.

Initialization stage

Writing the number of overwriting operations

Data writing

Write stage

Renewal of the number of writing operations/Life checking

Life checking

Life check stage

Command:

Subtracts an appropriate number [up to 255 (00FF)] from the data of the address designated by the user in order to judge if the address has been overwritten for the number of operations set by the user. If 0 ($0000) is subtracted, only the life of the address will be checked. The number of command data words is fixed to 5. 15

00 M

4 Management of the number of writing operations

D

4

S 5

Memory management command

D 4 1 3

3

R/W Head no. (fixed to 1) 1 Designates the first address of the management area within the range 0000 through FFFF (see note). Designates the number of subtracting operations within the range 0000 through 00FF. Terminator

* 2

A

0

D

Note Designate the first address on the EEPROM DC so that the terminator will be @@@0 to @@@5 or @@@8 to @@@D, otherwise an address error will result.

28

Page 44

The User Program

Section 2-3 When the command is executed and the address is found to have been overwritten for the number of operations set by the user, the Data Carrier warning flag will be turned ON.

Command Processing:

Overwriting operation management area consists of three bytes from the first address, from which the appropriate number is subtracted. If the value set in this area is smaller than 0, the Data Carrier warning flag will be turned ON. If the data in the management area is already 0, the value in the overwriting operation management area will not be renewed.

First address

Upper digit Middle digit

3 bytes

Lower digit

When using a DC with the number of overwriting operations set to 300,000, make the settings as shown below. First address

Upper digit

04

Middle digit

93

Lower digit

2-3-2

3 bytes

E0

Data Carrier Memory The ID Sensor Unit has a memory access space of 64k bytes (0000 to FFFF), the accessible space of which is decided according to the memory capacity of the Data Carrier. The production year and month area, the write protection area of the ID Sensor Unit, and the processing methods of the areas vary with the memory capacity of the Data Carrier, the details of which are explained below.

29

Page 45

The User Program

Section 2-3

Data Carrier Memory Map Data Carrier With a Memory Capacity of 256 Bytes Maximum Data

Address 0000

Data Carrier With a Memory Capacity of More Than 256 Bytes Data

Address 0000

Write protected setting area

Production month and year area 0001

0001

0002

0002

0003 to

Write protected setting area

0005

User area

0006 to to

00FF 0100

1 byte to to

01FF

1 byte

2-3-3

Write Protection Function The write protection function protects the data kept in the Data Carrier from being purged by mistake. We recommend the user to write-protect any important data after the user writes them to the Data Carrier. The write protection method is explained below.

Data Carrier with Memory up to 256 Bytes Write Protection Method

By writing write protection end address data to address 0000 of the Data Carrier, the area between address 0001 and the end address that has been designated will be write-protected. Whether or not to execute write protection is specified by the leftmost bit of address 0000. Address

Bit 7

0000

Yes/No

6

5

4

3

2

End address

Write protection execution bit (the leftmost bit of address 0000). 1:

30

Write protection (yes)

1

0