Omron C200HE ユーザーズマニュアル

ページ / 564
422
Note If pin 5 of the CPU Unit’s DIP switch is ON, the standard communications set-
tings will be used regardless of the settings in the PC Setup. The standard set-
tings are as follows:
Item
Setting
Node number
00
Start bits
1
Data length
7
Stop bits
2
Parity
Even
Baud rate
9,600 bps
Transmission delay time
None
8-2-2 Host Link Communications
Host link communications are executed by means an exchange of commands
and responses between the host computer and the PC. The command or re-
sponse data that is transferred in one exchange is known as a frame and one
frame can contain up to 131 characters of data.
The frame formats for Host Link commands transmitted from the host computer
and responses returned from the PC are described below. The PC automatically
returns an ASCII-code response when it receives an ASCII-code command
from the host computer. The host computer must have a program that controls
the transmission and reception of the commands and responses.
Command Frame Format
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
The header code and text depend on the Host Link command being transmitted.
When a composite command is transmitted, there will be a second sub-header
code.
The FCS (Frame Check Sequence) code is calculated at the host computer and
set in the command frame. The FCS calculation is described later in this section.
The command frame may be up to 131 characters long. A command of 132 char-
acters or more must be divided into more than one frame. To split the command,
use a carriage return delimiter (
, CHR$(13)) instead of a terminator. A termina-
tor must be used at the end of the last frame.
When dividing commands such as WR, WL, WC, or WD that execute write op-
erations, be careful not to divide into separate frames data that is to be written
into a single word. Be sure to divide frames so that they coincide with the divi-
sions between words.
Item
Function
@
An “@” symbol must be placed at the beginning of every command.
Node no.
Identify the PC by the node number set in DM 6648 of the PC Setup.
Header code Set the 2-character command code.
Text
Set the command parameters.
FCS
Set a 2-character Frame Check Sequence code.
Terminator
Set two characters, “
” and the carriage return (CHR$(13)) to
indicate the end of the command.
Host Link Communications
Section 8-2