![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436389.webp)
382
Application Example
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.
@TXD
DM 0100
#0000
#0010
00101 SR 26405
@RXD
DM 0200
#0000
265
SR 26406
DIFU(13)
00101
00100
If SR 26405 (the Transmit Ready Flag) is ON
when IR 00100 turns ON, the ten bytes of data
(DM 0100 to DM 0104) will be transmitted, left-
most bytes first.
When SR 26406 (Reception Completed Flag)
goes ON, the number of bytes of data specified in
SR 265 will be read from the C200HS’s reception
buffer and stored in memory starting at DM 0200,
leftmost bytes first.
The data will be as follows:
“31323132313231323132CR LF”
8-2-6 One-to-one Link Communications
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.
One-to-one 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.
1
1
1
Master
Slave
Master area
Slave area
Written automatically.
Write “1”
Master area
Slave area
Write
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
LR 00 to LR 63
LR 00 to LR 31
LR 00 to LR 15
Master words
LR00 to LR31
LR00 to LR15
LR00 to LR07
Slave words
LR32 to LR63
LR16 to LR31
LR08 to LR15
Wiring
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.
Parameters for Host Link and RS-232C Communications
Section 8-2
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...