Omron C200HG Manuel D’Utilisation

Page de 564
423
Response Frame Format
The response from the PC is returned in the format shown below. Prepare a pro-
gram so that the response data can be interpreted and processed.
@
x 10
1
x 10
0
x 16
1
x 16
0
FCS
Node no.
Header
code
End code
Text
Terminator
The header code and text depend on the Host Link command that was received.
The end code indicates the completion status of the command (e.g., whether or
not an error has occurred).
When the response is longer than 131 characters, it will be divided into more
than one frame. A carriage return delimiter (
, CHR$(13)) instead of a terminator
will automatically be set at the end of the frame. A terminator will be set at the end
of the last frame.
Item
Function
@
An “@” symbol is placed at the beginning of every response.
Node no.
The PC’s node number set in DM 6648 of the PC Setup.
Header code
The 2-character command code is returned.
Text
The results of the command are returned.
FCS
The 2-character Frame Check Sequence code is returned.
Terminator
Two characters, “
” and the carriage return (CHR$(13)) indicate the
end of the response.
FCS (Frame Check Sequence) When a frame is transmitted, an FCS code is placed just before the delimiter or
terminator in order to check whether an error has occurred in the transmission.
The FCS is 8-bit data converted into two ASCII characters. The 8-bit data is the
result of an EXCLUSIVE OR performed on the data from the beginning of the
frame until the end of the text in that frame (i.e., just before the FCS). Calculating
the FCS each time a frame is received and checking the result against the FCS
that is included in the frame makes it possible to check for data errors in the
frame.
FCS
0
1
R
R
0
@
0
0
1
4
2
Text
Node no.
Header code
FCS calculation range
Terminator
@
40
0100
0000
EOR
1
31
0011
0001
EOR
0
30
0011
0000
EOR
R
52
0101
0010
1
31
0011
0001
0100
0010
i
i
Converted to hexadecimal.
4
2
Handled as ASCII characters.
ASCII code
Calculation
result
Host Link Communications
Section 8-2