Omron SYSMAC C200HS Operation Manual page 389

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Parameters for Host Link and RS-232C Communications
Application Example
8-2-6 One-to-one Link Communications
One-to-one Links
Master area
Slave area
Wiring
382
This example shows a program for using the RS-232C port in the RS-232C
mode to transmit 10 bytes of data (DM 0100 to DM 0104) to the computer, and to
store the data received from the computer in the DM area beginning with
DM 0200. Before executing the program, the following PC Setup setting must be
made.
DM 6645: 1000 (RS-232C port in RS-232C mode; standard communications
conditions)
DM 6648: 2000 (No start code; end code CR/LF)
The default values are assumed for all other PC Setup settings. From DM 0100
to DM 0104, 3132 is stored in every word. From the computer, execute a pro-
gram to receive C200HS data with the standard communications conditions.
00100
00101 SR 26405
SR 26406
The data will be as follows:
"31323132313231323132CR LF"
If two C200HSs or one C200HS and one CQM1 are linked one-to-one by con-
necting them together through their RS-232C ports, they can share common LR
areas. When two PCs are linked one-to-one, one of them will serve as the mas-
ter and the other as the slave.
Note The peripheral port cannot be used for 1:1 links.
A one-to-one link allows two C200HSs (or a CQM1) to share common data in
their LR areas. As shown in the diagram below, when data is written into a word
the LR area of one of the linked Units, it will automatically be written identically
into the same word of the other Unit. Each PC has specified words to which it can
write and specified words that are written to by the other PC. Each can read, but
cannot write, the words written by the other PC.
Master
Write "1"
Written automatically.
1
The word used by each PC will be as shown in the following table, according to
the settings for the master, slave, and link words.
DM 6645 setting
Master words
Slave words
Wire the cable as shown in the diagram below using the connector listed.
Applicable Connectors
The following connectors are applicable. One plug and one hood are included
with the CPU.
DIFU(13)
00101
@TXD
If SR 26405 (the Transmit Ready Flag) is ON
when IR 00100 turns ON, the ten bytes of data
DM 0100
(DM 0100 to DM 0104) will be transmitted, left-
#0000
most bytes first.
#0010
When SR 26406 (Reception Completed Flag)
@RXD
goes ON, the number of bytes of data specified in
DM 0200
SR 265 will be read from the C200HS's reception
#0000
buffer and stored in memory starting at DM 0200,
leftmost bytes first.
265
Slave
1
LR 00 to LR 63
LR 00 to LR 31
LR00 to LR31
LR00 to LR15
LR32 to LR63
LR16 to LR31
Section 8-2
1
Master area
Write
Slave area
LR 00 to LR 15
LR00 to LR07
LR08 to LR15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents