Details of Command

Read Word Data

 

Function

  • This is used to read the data in the word device of a PLC. (Max. 63 words)

  • Device Symbol: X, Y, M, L, K, F, Z, TC, TS, CC, CS, D, S

 

 

Request Frame (Master)

  • COMMAND: ‘R’

  • Data Device Format

 

Address

8 Char

Size (Word)

Hexadecimal, 2 Char

......

Address

8 Char

Size (Word)

Hexadecimal, 2 Char

 

 

[Master(Request Format)]

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

02

R

0A

D0000001 01

B9

EOT

05H

30H

32H

52H

30H

41H

4430303030303031 3031H

42H

39H

04H

 

Leng is the length of a data and its value means the length of a data (D0000001 01).

Data means the address really read (D0000001) and the length of the word data read (01).

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame (Slave)

  • COMMAND (In completed case: ‘R’   /   In failed case: ‘E’)

  • Format of Data Device

 

[Completed Case]

PLC Data

Word Data

4 Char

Word Data

4 Char

......

Word Data

4 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

ETX

STX

02

R

04

F4AC

B4

ETX

02H

30H

32H

52H

30H

34H

46344143H

42H

34H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘R’. (* Leng means the length of a data (F4AC).

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

02

09

ETX

02H

30H

32H

45H

30H

32H

3032H

30H

39H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’. (*Leng means the length of error code(02).)

 

  • Error code displays the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] Read data from Address D00040 of Station 02H.

Master (Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

02

R

0A

D0000040 01

BC

EOT

05H

30H

32H

52H

30H

41H

4430303030303430 3031H

42H

43H

04H

 

Completed Case> reads 1-word data ‘F4AC’

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

ETX

STX

02

R

04

F4AC

B4

ETX

02H

30H

32H

52H

30H

34H

46344143H

42H

34H

03H

 

Failed Case> Error in BCC

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

02

09

ETX

02H

30H

32H

45H

30H

32H

3032H

30H

39H

03H

 

 

Write Word Data

Function

  • This is used to write a data to the word device of a PLC.

  • Device Symbol: X, Y, M, L, K, F, Z, TC, TS, CC, CS, D, S

 

 

Request Frame

  • COMMAND: ‘W’

  • Format of Data Device

Address

8 Char

Size (Word)

Hexadecimal,

2 Char

Word Data

Hexadecimal,

Size*4 Char

.......

Address

8 Char

Size (Word)

Hexadecimal,

2 Char

Word Data

Hexadecimal,

Size*4 Char

 

[Master (Request Format)]

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

02

W

0E

D0000010 01 FA34

B0

EOT

05H

30H

32H

57H

30H

45H

4430303030303130 3031 46413334H

42H

30H

04H

 

Leng is the length of a data and its value means the length of the Data (D0000010 01 FA34).

The address really written (D0000010), the length of the data (01) and the data written (FA34) are input in the Data (D1000 02 FA34).

BCC is the remainder value (F3) when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame

  • COMMAND ( In completed case: ‘W’  /   In failed case: ‘E’ )

  • Format of Data Device

 

[Completed Case]

No Data

 

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

02

W

00

B7

ETX

02H

30H

32H

57H

30H

30H

42H

37H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘W’.

Leng means the length of a data.

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

01

08

ETX

02H

30H

32H

45H

30H

32H

3031H

30H

38H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the length of Error Code(01).

Error code displays the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[ [Ex.] Write FA34H to Address D0010 and 8D41H to Address D0020. ]

Master (Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

02

W

12

D0000010 02 FA34

8D41

AF

EOT

05H

30H

32H

57H

31H

32H

4430303030303130 3032 46413334 38443431H

41H

46H

04H

 

Completed Case>

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

02

W

0

B7

ETX

02H

30H

32H

57H

30H

30H

42H

37H

03H

 

Failed Case>Receiving unknown command code (01H).

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

01

08

ETX

02H

30H

32H

45H

30H

32H

3031H

30H

38H

03H

 

 

Read Bit Data

 

Function

  • This is used to read the data in the bit device of a PLC.

  • Device Symbol: X, Y, M, L, K, F, Z, T, C

 

 

Request Frame

  • COMMAND: ‘r’

  • Format of Data Device

 

Address

8 Char

Size (Bit)

Hexadecimal,

2 Char

.......

Address

8 Char

Size (Bit)

Hexadecimal,

2 Char

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

03

r

0A

M000010F 02

F9

EOT

05H

30H

33H

72H

30H

41H

4D303030313030 46 3032H

46H

39H

04H

 

Leng is the length of a data and its value means the length of Data (M000010F 02H).

The address really read(M000010F) and the length of the data(02) are input in the Data.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame

  • COMMAND ( In completed case: ‘r’   /   In failed case: ‘E’  )

  • Format of Data Device

 

[Completed Case]

PLC Data

Bit Data

1 Char

Bit Data

1 Char

......

Bit Data

1 Char

 

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

ETX

STX

01

r

02

0 1

35

ETX

02H

30H

31H

72H

30H

32H

30 31H

33H

35H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘r’.

Leng(02) means the length of the Data(0 1).

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

03

E

02

01

08

ETX

02H

30H

33H

45H

30H

32H

3031H

30H

38H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the length of Error Code(01).

Error code indicates the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] Read the bit data in Address M0104 and Address M0105 of Station 03 PLC.

Master (Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

03

r

0A

M0000104 02

E7

EOT

05H

30H

33H

72H

30H

41H

4D3030303031 3034 3032H

45H

37H

04H

 

Completed Case > Reads Data ‘0 1’.

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

ETX

STX

03

r

02

0 1

35

ETX

02H

30H

33H

72H

30H

32H

30 31H

33H

35H

03H

 

Failed Case > Error in BCC

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

03

E

02

02

09

ETX

02H

30H

33H

45H

30H

32H

3032H

30H

39H

03H

 

 

Write Bit Data

 

Function

  • This is used to write data to the bit device of a PLC.

  • Device Symbol : X, Y, M, L, K, F, Z, T, C

 

 

Request Frame

  • COMMAND : ‘w’

  • Format of Data Device

 

Address

8 Char

Size (Bit)

Hexadecimal,

2 Char

Bit Data

Size*1 Char

.......

Address

8 Char

Size (Bit)

Hexadecimal,

2 Char

Bit Data

Size*1 Char

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

03

w

0D

M0000101 03 110

82

EOT

05H

30H

33H

77H

30H

42H

4D303030303130 31 3033 313130H

38H

32H

04H

 

Leng(0B) is the length of data and its value means the length of Data (M0000101 03 110).

The address really written(M0000101), the length of the data(03) and the data written(110) are input in the Data.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame

  • COMMAND ( In completed case: ‘w’    /    In failed case: ‘E’)

  • Format of Data Device

 

[Completed Case]

No Data

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

03

w

00

D7

ETX

02H

30H

33H

77H

30H

30H

44H

37H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘w’.

Leng(00) means the length of the data.

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

04

0B

ETX

02H

30H

32H

45H

30H

32H

3034H

30H

42H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the length of Error Code (04).

Error code indicates the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] Write bit data to Bit Address M0104.

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

w

0D

M0000104 03 110

82

EOT

05H

30H

31H

77H

30H

44H

4D303030303130 34 3033 313130H

38H

32H

04H

 

Completed Case

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

01

w

00

D7

ETX

02H

30H

31H

77H

30H

30H

44H

37H

03H

 

Failed Case> Data Size Overflow

Slave (Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

04

0B

ETX

02H

30H

31H

45H

30H

32H

3034H

30H

42H

03H

 

 

Change PLC Mode

 

Function

This is used to change the operation mode of a PLC.

 

 

Request Frame

  • COMMAND : ‘M’

  • Format of Data Device

 

Mode Code

 

Mode

Code

Run

0

Program

1

Pause/Remote

2

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

M

01

0

DE

EOT

05H

30H

31H

4DH

30H

31H

30H

44H

45H

04H

 

Leng(01) is the length of data.

Mode code value(0) is input in the Data(0).

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

Only the case CPU is under REMOTE status is available.

 

 

Response Frame

  • COMMAND ( In completed case: ‘M’   /   In failed case: ‘E’ )

  • Format of Data Device

 

 

[Completed Case]

No Data

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

01

M

00

AD

ETX

02H

30H

31H

4DH

30H

30H

41H

44H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘M’.

Leng(00) means the length of the data.

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

02

E

02

03

0A

ETX

02H

30H

32H

45H

30H

32H

3033H

30H

41H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the length of Error Code (03).

Error code indicates the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] Change the operation mode of a PLC to PAUSE/REMOTE mode.

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

M

01

2

E0

EOT

05H

30H

31H

4DH

30H

31H

32H

45H

30H

04H

 

Completed Case

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

01

M

00

AD

ETX

02H

30H

31H

4DH

30H

30H

41H

44H

03H

 

Failed Case > Invalid mode

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

03

0A

ETX

02H

30H

31H

45H

30H

32H

3033H

30H

41H

03H

 

 

Register Monitoring Device

 

Function

  • This is used to register a monitoring device.

  • 16 devices can be registered as maximum. (Distinguishing by Frame No., 0h – Fh)

  • Individual device should be continuous and is limited to 63 words as maximum.

 

 

Request Frame

  • COMMAND : ‘X’

  • Format of Data Device

 

Frame No.

1 Char

Word Address

8 Char

Word Size

Hexadecimal,

2 Char

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

X

0B

0

D0000001

02

C0

EOT

05H

30H

31H

58H

30H

42H

30H

4430303030303031H

3032H

43H

30H

04H

 

Leng(0B) is the length of a data.

The Mode code(0), the Address(D0000001) and the Size(02) are input in the Data (0 D00001 02).

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame

  • COMMAND ( In completed case: ‘X’  /  In failed case: ‘E’)

  • Format of Data Device

 

 

[Completed Case]

No Data

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

01

X

00

B8

ETX

02H

30H

31H

58H

30H

30H

42H

38H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘X’.

Leng(00) means the length of the data.

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

07

0E

ETX

02H

30H

31H

45H

30H

32H

3037H

30H

45H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the number of Error Codes (07).

Error code indicates the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] Register Frame 1 and Addresses from D0011 to D0014 to Station 1.

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

X

0B

1 D0000011 04

C5

EOT

05H

30H

31H

58H

30H

42H

31 443030303030  3131 3034H

43H

35H

04H

 

Completed Case

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

BCC

H

BCC

L

ETX

STX

01

X

00

B8

ETX

02H

30H

31H

58H

30H

30H

42H

38H

03H

 

Failed Case > Invalid Monitor Frame No.(0h~Fh)

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

07

0E

ETX

02H

30H

31H

45H

30H

32H

3037H

30H

45H

03H

 

 

Read Monitoring Device

 

Function

This is used to read the registered monitoring device.

 

 

Request Frame

COMMAND : ‘Y’

Format of Data Device

 

Frame No.

1 Char

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

Y

01

0

EA

EOT

05H

30H

31H

59H

30H

31H

30H

45H

41H

04H

 

Leng(01) is the length of a data.

Frame No. is input in the Data(0).

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

 

 

Response Frame

COMMAND ( In completed case: ‘Y’  /  In failed case: ‘E’ )

Format of Data Device

 

 

[Completed Case]

Frame No.

Word Data

4 Char

......

Word Data

4 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

Y

05

0 87F3

D6

EOT

05H

30H

31H

59H

30H

35H

30 38374633H

44H

36H

04H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is processed, Cmd is ‘Y’.

Leng(05) means the length of the Data(0 87F3).

 

 

[Failed Case]

Error Code

Error Code

2 Char

 

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

08

0F

ETX

02H

30H

31H

45H

30H

32H

3038H

30H

46H

03H

 

The request frame received from a master is used as the response frame of a PLC.

BCC is the remainder value when dividing the binary-sum from Cmd to the end of data by 256.

As the response frame is not processed, Cmd is ‘E’.

Leng(02) means the length of Error Code(08H).

Error code indicates the type of an error. Please refer to the ‘ERROR RESPONSE’.

 

 

[Ex.] If Frame 2h, Address D1005 and Address D1006 are registered as a monitoring device, read the registered device.

 

Master(Request Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

Y

01

2

EC

EOT

05H

30H

31H

59H

30H

31H

32H

45H

43H

04H

 

Completed Case

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Data

BCC

H

BCC

L

EOT

ENQ

01

Y

09

2 87F3 32E7

BD

EOT

05H

30H

31H

59H

30H

39H

32 38374633 33324537H

42H

44H

04H

 

Failed Case > Number of the unregistered(Not initialized) frame

Slave(Response Format)

HEADER

Stn

H

Stn

L

Cmd

Leng

H

Leng

L

Error Code

BCC

H

BCC

L

ETX

STX

01

E

02

08

0F

ETX

02H

30H

32H

45H

30H

32H

3038H

30H

46H

03H

 

 

Error Response

 

Function

This is the function to inform a master of error occurring in the process of a communication frame or a request frame and is used in a response frame only.

 

 

Request Frame

All request frames

 

 

Response Frame

COMMAND : ‘E’

Format of Data Device

 

 

Error Code

Error Code

2 Char

 

 

Error Code

Description

01

Receives unknown command code.

02

An error occurs in BCC.

03

CPU does not respond.

04

Receives unknown device code.

05

Exceeds the device read.

06

Invalid address.

07

Internal error

08

Receives the number of invalid data

09

Invalid data

10

Unregistered (Not initialized) frame number

11

Invalid Monitor Frame No. (0h – Fh) Invalid frame number

12

CPU is not in REMOTE status.

13

Invalid CPU status is assigned.

14

An error occurs in the size of the data written.

15

It is disabled to write.

16

It is disabled to change mode.