Chapter 2 Basic Unit Specification
3. Communication ports
2-18
G. 08H Diagnose:
The function code 08 provides a series of tests for checking the communication system between a
client (Master) device and a server (Slave), or for checking various internal error conditions within
a server.
Sub-function 00: Return Query Data
Function
Code
Sub-function 0000
Function Return Query Data
Format
PC Æ PLC PLCÆPC(OK) PLCÆPC(ERROR)
Slave Address 01H Slave Address 01H Slave Address 01H
Function Code 08H Function Code 08H Function Code 88H
High 00H High 00H Exception Code 02HSub-function
Low 00H
Sub-function
Low 00H High C7H
High A5H High A5H
CRC-16
Low C1H
Data
Data
Low 37H
Data
Data
Low 37H
Low DAH Low DAH
CRC-16
High 8DH
CRC-16
High 8DH
Remark Data is a random word.
H. 6CH : PLC control(6CH: RUN/STOP program, Write ID and Read RUN/STOP state):
a. Sub-function FF00: Control TP03 user program running/stopping
Function
Code
Sub-function FF00
Function Control TP03 user program running/stopping
Format
PC Æ PLC PLCÆPC(OK) PLCÆPC(ERROR)
Slave Address 01H Slave Address 01H Slave Address 01H
Function Code 6CH Function Code 6CH Function Code ECH
High FFH High FFH Exception Code 04H
Sub-function
Low 00H
Sub-function
Low 00H Low 6DH
High 53H High 53H
CRC-16
High 03H
Data
Data
Low 54H
Data
Data
Low 54H
Low 9CH Low 9CH
CRC-16
High D8H
CRC-16
High D8H
Remark
1. If Data =5255H, run program (ASCII code ‘RU’);
2. If Data =5354H, stop program (ASCII code ‘ST’).