![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414257.webp)
4-3
Section
CPM2A/CPM2C Communications Functions
237
Command and Response Formats
This section explains the formats for the commands and responses that are ex-
changed in Host Link communications.
When transmitting a command from the host computer, prepare the command
data in the format shown below.
x 10
1
@
FCS
x 10
0
*
↵
Node No.
Header
code
Text
Terminator
@
An “@” symbol must be placed at the beginning.
Node No.
Identifies the CPM2A/CPM2C PC communicating with the host computer.
Specify the CPM2A/CPM2C’s node number in the PC Setup (DM 6648,
DM 6653).
Header Code
Set the 2-character command code.
Text
Set the command parameters.
FCS
Set a 2-character Frame Check Sequence code. See page 239.
Terminator
Set two characters, “*” and the carriage return (CHR$(13)) to indicate the end of
the command.
The response from the CPM2A/CPM2C is returned in the format shown below.
Prepare a program 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
@, Node No., Header Code
Contents identical to those of the command are returned.
End Code
The completion status of the command (e.g., whether or not an error has oc-
curred) is returned.
Text
Text is returned only when there is data such as read data.
FCS
The set 2-character Frame Check Sequence is returned.
Terminator
Set two characters, “*” and the carriage return (CHR$(13)) to indicate the end of
the response.
Long Transmissions
The largest block of data that can be transmitted as a single frame is 131 charac-
ters. A command or response of 132 characters or more must therefore be di-
vided into more than one frame before transmission. When a transmission is
split, the ends of the first and intermediate frames are marked by a delimiter
instead of a terminator.
Command Format
Response Format