background image

MANUEL STA46 

Modbus TCP 

JP Viskovic 30/08/2005 OEE-F 

13 

 

1-4-7 

I/O memory area (DM) Write Multiple Registers 

[Function] 

Writes registers. 
 
 

[Request] 

 

Length 

Data 

Function Code 

1 Byte 

0x10 

Starting Address 

2 Bytes 

0x0000-0x17FF 

Quantity of Registers 

2 Bytes 

1-123(0x7B) 

Byte Count 

1 Byte 

2 x N(*) 

Registers Value 

N x 2 Bytes 

value 

(*)

N = Quantity of Registers to write. 

 
 
 
[Response] 

 

Length 

Data 

Function Code 

1 Byte 

0x10 

Starting Address 

2 Bytes 

0x0000-0x17FF 

Quantity of Registers 

2 Bytes 

1-123(0x7B) 

 
 
 
Example: write 2 words into DM1000-1001.  

Request 

Response 

 

Data 

 

 

Data 

Function Code 

0x10 

  Function Code 

0x10 

Starting Address(H) 

0x03 

  Starting Address(H) 

0x03 

Starting Address(L) 

0xE8 

  Starting Address(L) 

0xE8 

Quantity of Registers(H) 

0x00 

  Quantity of Registers(H) 

0x00 

Quantity of Registers(L) 

0x02 

  Quantity of Registers(L) 

0x02 

Byte Count 

0x04 

 

Registers Value(H) 

0x3A 

 

Registers Value(L) 

0xC5 

 

Registers Value(H) 

0x97 

 

Registers Value(L) 

0x13 

 

 

 
 
 

DM 15 14 13 12 11 10 9  8  7  6  5  4  3  2  1  0 
1000 

1001 

Summary of Contents for CS CJ1W-ETN21

Page 1: ...1 SYSMAC CS CJ Serie CS1W ETN21 CJ1W ETN21 MODBUS TCP Quick Start Manual MANUEL STA46...

Page 2: ...ron Certain details are voluntarily occulted not to cause confusion Despite everything the care taken to the realization of this documentation omron could not be held for person in charge for the erro...

Page 3: ...MBAP Header description 5 1 4 FUNCTION CODE 6 1 4 0 I O memory area CIO Read Multiple Coils 6 1 4 1 I O memory area CIO Read Multiple Coils 7 1 4 2 I O memory area DM Read Multiple Registers 8 1 4 3...

Page 4: ...te Multiple Registers 1 2 Memory map 1 2 0 Used by ModbusTCP PLC program Modbus process Type Memory address Descriptions Work Area W480 511 Used for counter and calculation Receive Area CIO 5800 6000...

Page 5: ...rruption to a request or response message 1 3 0 MBAP Header description The MBAP Header contains the following fields Fields Length Description Client Server Transaction Identifier 2 Bytes Identificat...

Page 6: ...001 04 to 0002 06 Request Response Data Data Function Code 0x01 Function Code 0x01 Starting Address H 0x00 Byte Count 0x03 Starting Address L 0x14 Coil Status 27 20 0xCD Quantity of Coils H 0x00 Coil...

Page 7: ...0002 06 Request Response Data Data Function Code 0x02 Function Code 0x02 Starting Address H 0x00 Byte Count 0x03 Starting Address L 0x13 Coil Status 27 20 0xCD Quantity of Coils H 0x00 Coil Status 35...

Page 8: ...Byte 0x03 Byte Count 1 Byte N x 2 Register Value N x 2 Bytes N Quantity of Registers Example read 3 words DM 1000 to DM 1002 Request Response Data Data Function Code 0x03 Function Code 0x03 Starting...

Page 9: ...2 Register Value N x 2 Bytes N Quantity of Registers Example read 3 words CIO 1000 to CIO 1002 Request Response Data Data Function Code 0x04 Function Code 0x04 Starting Address H 0x03 Byte Count 0x06...

Page 10: ...oil CIO 0002 02 ON Request Response Data Data Function Code 0x05 Function Code 0x05 Output Address H 0x00 Output Address H 0x00 Output Address L 0x22 Output Address L 0x22 Output Value H 0xFF Output V...

Page 11: ...nse Length Data Function Code 1 Byte 0x06 Register Address 2 Bytes 0x0000 0x7FFF Register Value 2 Bytes 0x0000 0xFFFF Example write h3AC5 to DM 2000 Request Response Data Data Function Code 0x06 Funct...

Page 12: ...x0000 Data N x 2 Bytes 2 to 125 0x0002 to 0x007D Bytes Response Length Data Function Code 1 Byte 0x08 Sub function Code 2 Bytes 0x0000 Data N x 2 Bytes Same as request data Example sending 0xA537 Requ...

Page 13: ...1 Byte 0x10 Starting Address 2 Bytes 0x0000 0x17FF Quantity of Registers 2 Bytes 1 123 0x7B Example write 2 words into DM1000 1001 Request Response Data Data Function Code 0x10 Function Code 0x10 Sta...

Page 14: ...1 Byte Function Code 0x80 Exception Code 1 Byte 01 02 or 03 Exception Code Name 01 ILLEGAL FUNCTION 02 ILLEGAL DATA ADDRESS 03 ILLEGAL DATA VALUE 1 6 Status counter Counter Channel Descriptions Except...

Reviews: