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

The text of a manual · part 27 of 39

C200HW-DRT21, CQM1-DRT21, DRT1 Series DeviceNet Slaves Operation Manual: W347-E1-06.pdf, pages 261 to 270

Pages 261 to 270 of 381, from C200HW-DRT21, CQM1-DRT21, DRT1 Series DeviceNet Slaves Operation Manual

The original document is the PDF (7.8 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 DRT1-ID16

Page 261

Section 6-1

C200H I/O Link Units Parameters Destination Node Address (Command)

The node address of the C200H I/O Link Unit writing the data in single-byte (2-digit) hexadecimal. Service Code (Command, Response) In the command, IE Hex is specified. In the response, the leftmost bit is turned ON and 9E Hex is returned. Class ID (Command) Always 2F Hex. Instance ID (Command) Specifies the data area to be written, in hexadecimal, as shown in the following table. Setting 01 Hex

IR Area 1 (CIO)

02 Hex

IR Area 2 (CIO)

03 Hex

Data Memory Area (DM or D)

04 Hex

LR Area

05 Hex 06 Hex

HR Area (HR or H) C200HX/HG/HE AR Area (-Z) CS1H/G Holding Area (H)

07 Hex

C200HX/HG/HE Timer/Counter (-Z) Area (TIM/CNT) CS1H/G Timer Area (T)

08 Hex

Area

EM Area (bank 0 only)

Word range Write Area: IR 000 to IR 235 Read Area: IR 000 to IR 235 IR 300 to IR 511 DM 0000 to DM 4095 (C200HE-CPU11-E only) DM 0000 to DM 5999 (All except C200HE-CPU11-E) LR 00 to LR 63 HR 00 to HR 99 AR 00 to AR 27 (Can be set for Read Area only) H100 or H102 to H127 (Specify the starting word with 00 Hex or 02 to 1B Hex.) TIM/CNT 000 to TIM/CNT 511 T 000 to T 511 EM 0000 to EM 6143

Address L, Address H (Command) The address in hexadecimal of the first word of data to be written. Address L: Rightmost 2 digits of the address in 4-digit hexadecimal. Address H: Leftmost 2 digits of the address in 4-digit hexadecimal. Write Data (Command) Specify the data to be written to the specified area and words from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). If an odd number of read bytes have been specified, the last byte of data moves into word H. No. of Received Bytes (Response) The number of bytes received from the source node address is returned in hexadecimal. Source Node Address (Response) The node address of the C200H I/O Link Unit that returned the response is returned in hexadecimal. Note Actual addresses for Address H and Address L and actual number of bytes to be written differ according to the model of PLC to which the C200H I/O Link

246

Page 262

Section 6-1

C200H I/O Link Units

Unit is mounted and the memory area. Be sure to specify bytes within the data area range. WORD DATA READ

WORD DATA READ will read data from any area of the CPU Unit of the PLC to which the C200H I/O Link Unit is mounted. Data is returned from the rightmost byte to the leftmost byte. Command Block

Class ID Address L No. of read words Service code Destination node address Address H Instance ID

Response Block

Service code

Word data H

Word data H Word data L

Word data L Source node address

Read data (Maximum: 200 bytes)

No. of received bytes

Parameters Destination Node Address (Command) The node address of the C200H I/O Link Unit reading the data, in single-byte (2-digit) hexadecimal. Service Code (command, response) In the command, ID Hex is specified. In the response, the leftmost bit is turned ON and 9D Hex is returned. Class ID (Command) Always 2F Hex. Instance ID (Command) Specifies the data area to be read, in hexadecimal as shown in the following table. Setting

Area

01 Hex

IR Area 1 (CIO)

02 Hex

IR Area 2 (CIO)

03 Hex

Data Memory Area (DM or D)

04 Hex

LR Area

05 Hex 06 Hex

HR Area (HR or H) C200HX/HG/HE AR Area (-Z) CS1H/G Holding Area (H)

Word range Write Area: IR 000 to IR 235 Read Area: IR 000 to IR 235 IR 300 to IR 511 DM 0000 to DM 4095 (C200HE-CPU11-E only) DM 0000 to DM 5999 (All except C200HE-CPU11-E) LR 00 to LR 63 HR 00 to HR 99 AR 00 to AR 27 (Can be set for Read Area only) H100 or H102 to H127 (Specify the starting word with 00 Hex or 02 to 1B Hex.)

247

Page 263

Section 6-1

C200H I/O Link Units Setting 07 Hex

08 Hex

Area C200HX/HG/HE Timer/Counter (-Z) Area (TIM/CNT)

Word range TIM/CNT 000 to TIM/CNT 511

CS1H/G Timer Area (T) EM Area (bank 0 only)

T 000 to T 511 EM 0000 to EM 6143

Address L, Address H (Command) The address in hexadecimal of the first word of data to be read. Address L: Rightmost 2 digits of the address in 4-digit hexadecimal. Address H: Leftmost 2 digits of the address in 4-digit hexadecimal. When specifying a Holding Area word (H100 or H102 to H127) in a CS1H/G PLC, specify the first word in hexadecimal with 0000 Hex for H100 or 0002 to 001B Hex for H102 to H127. No. of read words (Command) The number of words of read data, in single-byte (2-digit) hexadecimal. The specified range is 01 to 64 Hex (1 to 100 in decimal). No. of received bytes (Response) The number of bytes received from the destination node address is returned in hexadecimal. Source node address (Response) The node address of the C200H I/O Link Unit that returned the response is returned in hexadecimal. Read data (Response) The specified area type, words, and number of bytes of data are returned from word L (rightmost byte: bits 0 to 7) to word H (leftmost byte: bits 8 to 15). Note Actual addresses for Address H and Address L and actual number of bytes to be read differ according to the model of PLC to which the C200H I/O Link Unit is mounted and the memory area. Be sure to specify data bytes within the data area range. WORD DATA WRITE

WORD DATA WRITE will write data to any area of the CPU Unit of the PLC to which the C200H I/O Link Unit is mounted. Write data is specified from the rightmost byte to the leftmost byte. Command Block

Class ID Word data L Address L Service code Word data H Destination node address Instance ID Address H

Word data L Word data H

Write data (Maximum 200 bytes)

Response Block

Service code Source node address No. of received bytes

248

Page 264

Section 6-1

C200H I/O Link Units Parameters Destination Node Address (Command)

The node address of the C200H I/O Link Unit writing the data, in single-byte (2-digit) hexadecimal. Service Code (Command, Response) In the command, IF Hex is specified. In the response, the leftmost bit is turned ON and 9F Hex is returned. Class ID (Command) Always 2F Hex. Instance ID (Command) Specifies the data area to be written in hexadecimal as shown in the following table. Setting 01 Hex

IR Area 1 (CIO)

02 Hex

IR Area 2 (CIO)

03 Hex

Data Memory Area (DM or D)

04 Hex

LR Area

05 Hex 06 Hex

HR Area (HR or H) C200HX/HG/HE AR Area (-Z) CS1H/G Holding Area (H)

07 Hex

C200HX/HG/HE Timer/Counter (-Z) Area (TIM/CNT) CS1H/G Timer Area (T)

08 Hex

Area

EM Area (bank 0 only)

Word range Write Area: IR 000 to IR 235 Read Area: IR 000 to IR 235 IR 300 to IR 511 DM 0000 to DM 4095 (C200HE-CPU11-E only) DM 0000 to DM 5999 (All except C200HE-CPU11-E) LR 00 to LR 63 HR 00 to HR 99 AR 00 to AR 27 (Can be set for Read Area only) H100 or H102 to H127 (Specify the starting word with 00 Hex or 02 to 1B Hex.) TIM/CNT 000 to TIM/CNT 511 T 000 to T 511 EM 0000 to EM 6143

Address L, Address H (Command) The address in hexadecimal of the first word of data to be written. Address L: Rightmost 2 digits of the address in 4-digit hexadecimal. Address H: Leftmost 2 digits of the address in 4-digit hexadecimal. When specifying a Holding Area word (H100 or H102 to H127) in a CS1H/G PLC, specify the first word in hexadecimal with 0000 Hex for H100 or 0002 to 001B Hex for H102 to H127. Write Data (Command) Specify the data to be written to the specified area and words from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). No. of Received Bytes (Response) The number of bytes received from the source node address is returned in hexadecimal. Source Node Address (Response) The node address of the C200H I/O Link Unit that returned the response is returned in hexadecimal. Note Actual addresses for Address H and Address L and actual number of words to be written differ according to the model of PLC to which the C200H I/O Link

249

Page 265

Section 6-1

C200H I/O Link Units

Unit is mounted and the memory area. Be sure to specify bytes within the data area range. Error Response

When there is an error in the explicit command, the C200H I/O Link Unit will return an error response as illustrated below. Response Block

General error code

Additional error code (FF Hex: fixed)

Source node address No. of received bytes

Parameters No. of Received Bytes (Response) The number of bytes received from the source node address is returned in hexadecimal. Source Node Address (Response) The node address of the C200H I/O Link Unit that returned the response is returned in hexadecimal. General Error Code (Response) The error code is returned in single-byte (2-digit) hexadecimal, as shown in the following table. Error code 08 Hex

Name Service not supported

15 Hex

Too much data

13 Hex

Not enough data

20 Hex

Invalid parameter

11 Hex

Reply data too large

16 Hex

Object does not exist

Details There is an error in the service code. There is too much data. (The data specified by the data write command exceeds the area range.) There is not enough data (e.g., an odd number of bytes of data was specified for the WORD DATA WRITE command). An error was made specifying the word address. The data specified by the data read command exceeds the area range. There is an error in the Class ID or Instance ID.

Additional Error Code (Response) Always FF Hex.

6-1-9

Using Explicit DeviceNet Messages

Using CMND to Read Data (CS-series and CV-series)

In the following example, the CMND instruction is used to read words CIO 010 to CIO 029 (20 words) on the Slave Unit, from the Master in a CS-series or CV-series PLC.

Note If a CS-series PLC is being used, this example is applicable only when a CSseries Master Unit is mounted. Use the IOWR instruction when a C200HX/

250

Page 266

Section 6-1

C200H I/O Link Units

HG/HE or C200HS Master Unit is mounted. In this case, refer to the DeviceNet Master Unit Operation Manual for details on using the IOWR instruction. For more detailed information on explicit messages, refer to the DeviceNet Master Unit Operation Manual. For information on the CMND instruction, refer to the PLC’s Operation Manual or Programming Manual. Example Conditions Master node address: 63 Slave network address: 1 Slave node address: 2 Example: Using the CMND Instruction

Command Words (S: First Command Word) Word

Contents (Hex)

Meaning

S

28 01

S+1

02 1C

EXPLICIT MESSAGE SEND command code: 28 01 Hex Slave node address: 2 BYTE DATA READ command service code: 1C Hex

S+2 S+3

00 2F 00 01

Class ID: 002F Hex Instance ID: For IR Area 1: 0001 Hex

S+4

0A 00

S+5

28 00

Read start address: 10 = 000A Hex Address L: 0A Hex, Address H: 00 Hex No. of bytes of read data: 40 bytes = 28 Hex (The rightmost byte is not used.)

D: Response Words (D: First Response Word) Results are stored as shown in the following table. Word D

Contents (Hex) 28 01

Meaning EXPLICIT MESSAGE SEND command code: 28 01 Hex Response code (0000 Hex: Normal completion)

D+1

00 00

D+2

00 2A

No. of received bytes (data length after D+3): 42 bytes

D+3

02 9C

Slave node address: 2 BYTE DATA READ response service code: 9C Hex

D+4

HH LL to to

D+23

HH LL

Data read from the Slave’s IR10 to IR29. When the BYTE DATA READ command is used from an OMRON Master, data is stored in the Master in the same sequence as the Slave; leftmost byte to rightmost byte.

Control Words (C: First Control Word) Word

Contents (Hex)

Meaning

C

00 08

No. of bytes of command data: 11 bytes of command data, S

C+1

00 30

C+2

00 01

No. of bytes of response data: 48 bytes of response data, D Destination node network address: 1

251

Page 267

Section 6-1

C200H I/O Link Units Word

Using CMND to Write Data (CS-series and CV-series)

C+3

Contents (Hex) 3F FE

Meaning Master’s node address: 63 Master’s Unit address: FE Hex

C+4

00 00

Response returned, communications port No.: 0, No. of retries: 0

C+5

00 64

Response monitoring time: 10 s

In the following example, the CMND instruction is used to write data to words CIO 10 to CIO 29 (20 words) on the Slave Unit from the Master in a CS-series or CV-series PLC.

Note If a CS-series PLC is being used, this example is applicable only when a CSseries Master Unit is mounted. Use the IOWR instruction when a C200HX/ HG/HE or C200HS Master Unit is mounted. In this case, refer to the DeviceNet Master Unit Operation Manual for details on using the IOWR instruction. For more detailed information on explicit messages, refer to the DeviceNet Master Unit Operation Manual. For information on the CMND instruction, refer to the PLC’s Operation Manual or Programming Manual. Example Conditions Master node address: 63 Slave network address: 1 Slave node address: 2 Example: Using the CMND Instruction

Command Words (S: First Command Word) S

Word

Contents (Hex) 28 01

Meaning EXPLICIT MESSAGE SEND command code: 28 01 Hex

S+1

02 1E

S+2

00 2F

Slave node address: 2 BYTE DATA WRITE command service code: 1E Hex Class ID: 002F Hex

S+3 S+4

00 01 0A 00

S+5

HH LL to to

S+24

HH LL

Instance ID: For IR Area 1: 0001 Hex Write start address: 10 = 000A Hex Address L: 0A Hex, Address H: 00 Hex Data written to the Slave’s IR10 to IR29. When the BYTE DATA WRITE command is used from an OMRON Master, data is written to the Slave in the same sequence it is stored in the Master; leftmost byte to rightmost byte.

D: Response Words (D: First Response Word) Results are stored as shown in the following table. Word

252

Contents (Hex)

Meaning

D

28 01

EXPLICIT MESSAGE SEND command code: 28 01 Hex

D+1

00 00

Response code (0000 Hex: Normal completion)

Page 268

Section 6-1

C200H I/O Link Units

D+2

Word

Contents (Hex) 00 02

Meaning No. of received bytes (data length after D+3): 2 bytes

D+3

02 9E

Slave node address: 2 BYTE DATA WRITE response service code: 9E Hex

Control Words (C: First Control Word) Word

Using the IOWR Instruction to Read Data (C200HX/HE PLCs)

C

Contents (Hex) 00 32

C+1

00 08

C+2 C+3

00 01 3F FE

C+4

00 00

C+5

00 64

Meaning No. of bytes of command data: 50 bytes of command data, S No. of bytes of response data: 8 bytes of response data, D Destination node network address: 1 Master’s node address: 63 Master’s Unit address: FE Hex Response returned, communications port No.: 0, No. of retries: 0 Response monitoring time: 10 s n the example, the IOWR instruction is used to read words IR 010 to IR 029 (20 words) on the Slave Unit, and store them in the Master (C200HX/HG/HE PLCs) from DM 2000 onwards. For more detailed information on explicit messages, refer to the DeviceNet Master Unit Operation Manual. For information on the IOWR instruction, refer to the SYSMAC C200HX/HG/HE PLCs Operation Manual. Example Conditions Master node address: 63 Master’s Unit address: 0 Slave node address: 2 Example: Using the IOWR Instruction

C: Control Words (C: First Control Word) Word C

Contents (Hex) 3F FE

Meaning Master’s node address: 63 Master’s Unit address: FE Hex

Source Words (S: First Source Word) Word S

Contents (Hex) 82 07

Meaning Response storage words: DM2000 82 Hex: DM Area, 0700 Hex: 2000 words (For more detail, refer to the PLC Operation Manual.)

S+1

D0 00

S+2

00 64

Response monitoring time: 10 s

S+3

00 0B

No. of bytes of command data: 11 bytes (No. of bytes from S+4 onwards.)

S+4

28 01

EXPLICIT MESSAGE SEND command code: 28 01 Hex

S+5

02 1C

Slave node address: 2 BYTE DATA READ response service code: 1C Hex

S+6

00 2F

Class ID: 002F Hex

253

Page 269

Section 6-1

C200H I/O Link Units

S+7

Word

Contents (Hex) 00 01

Meaning Instance ID: For IR Area 1: 0001 Hex

S+8

0A 00

S+9

28 00

Read start address: 10 = 000A Hex Address L: 0A Hex, Address H: 00 Hex No. of bytes of read data: 40 bytes = 28 Hex (The rightmost byte is not used.)

D: Destination Information Results are stored as shown in the following table. Word D

Contents (Hex) 00 10 (0 010)

Meaning Master’s Unit address: 0, No. of words of command data: 10 words (specified in BCD) (No. of words from S onwards)

Response Storage Words Results are stored as shown in the following table.

Using the IOWR Instruction (C200HX/HG/ HE PLCs) to Write Data

Word DM 2000

Contents (Hex) 28 01

DM 2001

00 00

DM 2002

00 2A

DM 2003

02 9C

DM 2004 to DM 2023

HH LL...

Meaning EXPLICIT MESSAGE SEND command code: 28 01 Hex Response code (0000 Hex: Normal completion) No. of received bytes (data length after DM 2003): 42 bytes Slave node address: 2 BYTE DATA READ response service code: 9C Hex Data read from the Slave’s IR 010 to IR 029. When the BYTE DATA READ command is used from an OMRON Master, data is stored in the Master in the same sequence as the Slave; leftmost byte to rightmost byte.

In the following example, the IOWR instruction is used to write data to words IR 010 to IR 029 (20 words) on the Slave Unit, from the Master (C200HX/HG/ HE PLCs). For more detailed information on explicit messages, refer to the DeviceNet Master Unit Operation Manual or for information on the IOWR instruction, refer to the SYSMAC C200HX/HG/HE PLCs Operation Manual. Example Conditions Master node address: 63 Master’s Unit address: 0 Slave node address: 2 Example: Using IOWR

C: Control Words (C: First Control Word) Word C

254

Contents (Hex) 3F FE

Meaning Master’s node address: 63 Master’s Unit address: FE Hex

Page 270

Section 6-1

C200H I/O Link Units Source Words (S: First Source Word) Word S

Contents (Hex) 82 07

Meaning Response storage words: DM2000 82 Hex: DM Area, 0700 Hex: 2000 words (For more detail, refer to the PLC Operation Manual.)

S+1

D0 00

S+2

00 64

Response monitoring time: 10 s

S+3

00 32

No. of bytes of command data: 50 bytes (No. of bytes from S+4 onwards.)

S+4

28 01

EXPLICIT MESSAGE SEND command code: 28 01 Hex

S+5

02 1E

Slave node address: 2 BYTE DATA WRITE response service code: 1E Hex

S+6 S+7

00 2F 00 01

Class ID: 002F Hex Instance ID: For IR Area 1: 0001 Hex

S+8

0A 00

Write start address: 10 = 000A Hex Address L: 0A Hex, Address H: 00 Hex

S+9 to

HH LL to

S_28

HH LL

Data written to the Slave’s IR10 to IR29. When the BYTE DATA WRITE command is used from an OMRON Master, data is written to the Slave in the same sequence it is stored in the Master; leftmost byte to rightmost byte.

D: Destination Information Results are stored as shown in the following table. Word D

Contents (Hex) 00 29 (0 029)

Meaning Master’s Unit address: 0, No. of words of command data: 29 words (specified in BCD) (No. of words from S onwards)

Response Storage Words Results are stored as shown in the following table. Word

Contents (Hex)

Meaning

DM2000

28 01

EXPLICIT MESSAGE SEND command code: 28 01 Hex

DM2001

00 00

DM2002

00 02

DM2003

02 9E

Response code (0000 Hex: Normal completion) No. of received bytes (data length after DM2003): 2 bytes Slave node address: 2 BYTE DATA READ response service code: 9E Hex

255