Structure of Frame - Serial Communication Module
Request Frame (Master) : The frame that an outside communication device requests to a computer link module
ENQ | Stn H | Stn L | Cmd | Leng H | Leng L | Data | BCC H | BCC L | EOT |
Response Frame (Slave) : The frame that a computer link module responds to an outside communication device
STX | Stn H | Stn L | Cmd | Leng H | Leng L | Data | BCC H | BCC L | ETX |
The structure of a sending frame and the one of a receiving frame are same.
The same as the command codes received from a request frame (Master) are used for response frame. But, if there is an error in communication or process, Code E is responded.
Description for Codes
Code | Hex Value | Description |
ENQ | 05H | Master Frame Header |
EOT | 04H | Master Frame Tail |
STX | 02H | Slave Header |
ETX | 03H | Slave Tail |
Stn | 00H~1FH, FFH | PLC Station Number |
Cmd |
| Command |
Leng |
| Length of Data Device (Length Bytes), Hexadecimal |
Data |
| Data Device according to Command (Length Bytes) |
BCC |
| Remainder value when dividing the binary-sum from Cmd to the end of data by 256 |
Commands : The commands used for exclusive communication service are as follows
Command | Code | ASCII | Function |
Read Word Data | 52H | R | Reads Word Memory Device. |
Write Word Data | 57H | W | Writes to Word Memory Device. |
Read Bit Data | 72H | r | Reads Bit Memory Device. |
Write Bit Data | 77H | w | Writes to Bit Memory Device. |
Mode Change | 4DH | M | Changes PLC Mode. |
Register Monitoring Device | 58H | X | Registers Monitoring Device. |
Monitor Read | 59H | Y | Reads Registered Monitoring Device |
Error Response | 45H | E | Responds Error in PLC. |