The text of a manual · part 45 of 60
C200HX/C200HG/C200HE Programmable Controllers Operation Manual, pages 434 to 443
Pages 434 to 443 of 586
The original document is the PDF (3.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Omron C200HE-CPU42-E
Page 434
Section 7-2
Programming Console Operations
To enable expansion keyboard mapping, pin 6 of the CPU Unit’s DIP switch and AR 0709 must be ON and AR 0708 must be OFF. Bits turned ON with this operation can be turned OFF by toggling AR 0708. Turn AR 0709 OFF to stop expansion keyboard mapping and switch the Programming Console from Expansion TERMINAL mode to CONSOLE mode. TERMINAL Mode
The Programming Console can be put into TERMINAL mode by pressing CHG or executing TERM(48) in the program. Pin 6 of the CPU Unit’s DIP switch must be OFF.
PROGRAM
BZ
<MESSAGE> NO MESSAGE PROGRAM
Expansion TERMINAL Mode
CONSOLE mode
Switch the Programming Console to TERMINAL mode by pressing CHG or executing TERM(48).
BZ
Press CHG again to return to CONSOLE mode.
The Programming Console can be put into Expansion TERMINAL mode by turning ON AR 0709. Pin 6 of the CPU Unit’s DIP switch must be ON.
PROGRAM
BZ
<MESSAGE> NO MESSAGE PROGRAM
CONSOLE mode
Switch the Programming Console to Expansion TERMINAL mode by turning AR 0709 ON.
BZ
Turn AR 0709 OFF to return to CONSOLE mode.
7-2-18 Keyboard Mapping The C200HX/HG/HE supports the expansion keyboard mapping as well as normal keyboard mapping. Expansion keyboard mapping controls the status of the 41 bits SR 27700 through SR 27909, while normal keyboard mapping controls only the 16 bits in AR 22. The status of these bits can be controlled by pressing the corresponding Programming Console keys when the Programming Console is in TERMINAL mode or expansion TERMINAL mode. The following diagram shows how to switch the Programming Console between CONSOLE mode (normal operating mode) and TERMINAL or expansion TERMINAL mode. Press the CHG Key or execute TERM(48). TERMINAL mode (DIP switch pin 6 OFF)
CONSOLE mode Press the CHG key.
TERMINAL Mode
416
Turn ON AR 0709. Expansion TERMINAL mode (DIP switch pin 6 ON) Turn OFF AR 0709 or turn OFF DIF switch pin 6.
The Programming Console can be put into TERMINAL mode by pressing CHG or executing TERM(48) in the program. Pin 6 of the CPU Unit’s DIP switch must be OFF. Press the CHG key again to return to CONSOLE mode. When the Programming Console is in TERMINAL mode it can perform normal keyboard mapping and display messages output by MSG(46) or LMSG(47).
Page 435
Section 7-2
Programming Console Operations
With keyboard mapping, bits 00 to 15 of AR 22 will be turned ON when keys 0 to F are pressed on the Programming Console’s keyboard. A bit will remain ON after the Programming Console’s key is released. All bits in AR 22 will be turned OFF when AR 0708 is turned ON. Keyboard mapping inputs are disabled when AR 0708 is ON. In addition to the keyboard mapping function, TERMINAL mode allows messages output by MSG(46) and LMSG(47) to be displayed on the Programming Console. These messages will be erased if the Programming Console is switch back to CONSOLE mode. Expansion TERMINAL Mode
The Programming Console can be put into Expansion TERMINAL mode by turning ON AR 0709. Pin 6 of the CPU Unit’s DIP switch must be ON. Turn off AR 0709 or pin 6 of the CPU Unit’s DIP switch to return to CONSOLE mode. When the Programming Console is in TERMINAL mode it can perform expansion keyboard mapping and display messages output by MSG(46) or LMSG(47). With expansion keyboard mapping, bits SR 27700 through SR 27909 will be turned ON when the corresponding key is pressed on the Programming Console’s keyboard. A bit will remain ON after the Programming Console’s key is released. All bits from SR 27700 through SR 27909 will be turned OFF when AR 0708 is turned ON. Expansion keyboard mapping inputs are disabled when AR 0708 is ON. In addition to the keyboard mapping function, expansion TERMINAL mode allows messages output by MSG(46) and LMSG(47) to be displayed on the Programming Console. These messages will be erased if the Programming Console is switch back to CONSOLE mode. The following diagram shows the correspondence between the position of Programming Console keys and bits in the SR Area. Each key corresponds 1 to 1 with a bit. Shifted inputs are not recognized. Keys 0 to 15 correspond to bits SR 27700 to SR 27715, keys 16 to 31 correspond to bits SR 27800 to SR 27815, and keys 32 to 41 correspond to bits SR 27900 to SR 27909. FUN key
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
The following table shows the correspondence between the actual Programming Console keys and bits SR 27700 to SR 27909. SR word 277
Bit
Corresponding key(s)
00 FUN
01 02
417
Page 436
Section 7-2
Programming Console Operations SR word 277
Bit 03
*1
04
*2
05 06 07 08 09 10 11 12 13 14 15 278
00 01 02 03 04 05 06 07 08 09 10
418
Corresponding key(s)
Page 437
Section 7-2
Programming Console Operations SR word 278
Bit
Corresponding key(s)
11 12 13 14 15
279
00 01 02 03 04 05
*3
06 07 VER
08 09
419
Page 438
Page 439
SECTION 8 Serial Communications This section provides an overview of the serial communications (Host Link, RS-232C, one-to-one links, NT links, and protocol macros) that operate through the RS-232C, RS-422/485, and Peripheral Ports. 8-1 8-2
8-3
8-4 8-5 8-6
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Host Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2-1 Host Link Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2-2 Host Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2-3 Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RS-232C Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3-1 Communications Frame Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3-2 Communications Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3-3 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . One-to-one PC Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NT Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Protocol Macro Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6-1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6-2 Communications Board Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6-3 Communications Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6-4 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
422 423 423 426 429 430 431 431 433 434 436 437 437 440 441 444
421
Page 440
Section 8-1
Introduction
8-1
Introduction The RS-232C port and peripheral port built into the C200HX/HG/HE PC’s CPU Unit support the following communications functions: • Communications with Programming Devices (e.g., Programming Console or SSS.) • Host Link communications with personal computers and other external devices. • RS-232C (no-protocol) communications with personal computers and other external devices. • One-to-one link communications with another PC. • NT link communications (one-to-one or one-to-N) with Programmable Terminals (PTs) equipped with an NT link interface. In addition to these communications functions, optional Communications Boards that support Protocol Macros can be installed in most C200HX/HG/HE PCs. The following table summarizes the communications functions.
Function Host Link
Connected device
Connection
Summary
Host computer or PT
One-to-one or One-to-N
Provides communications between a host computer and PC.
Related instructions Host Link commands, TXD(––)
The PC’s operating status and the contents of data areas can be monitored from the host computer. TXD(––) can be used to transmit data from the PC’s data areas to the host computer. RS-232C (no protocol)
Host computer or One-to-one other RS-232C device
TXD(––) and RXD(––) can be used to TXD(––), RXD(––) manage simple data transfer sequences such as inputs from bar code readers or outputs to printers. Control signals RS, CS, ER, and DR can be controlled by the instructions.
One-to-one Link
PC
One-to-one
Makes a one-to-one connection between two PCs using the LR areas of the PCs.
NT Link
PT
Protocol Macro
Other serial device
One-to-one or One-to-N One-to-one or One-to-N
Provides data transfers between the --PC and one or more PTs. The Protocol Macro function allows PMCR(––) the user to define separate data transfer sequences and transfer messages. Up to 1,000 communications sequences can be registered. A support program is provided that simplifies creation of communications sequences.
422
---
Page 441
Host Link Communications
8-2
Section 8-2
Host Link Communications
8-2-1 Host Link Command Summary Host Link communications are used to transfer data between the PC and a host computer (a personal computer or PT). It is possible to monitor the PC’s operating status and the contents of PC data areas from the host computer using Host Link commands. It is also possible to transfer data from the PC’s IOM data areas (IR area, SR area, LR area, HR area, AR area, timer and counter PVs, DM 0000 through DM 6143, and EM 0000 through EM 6143) to a host computer using the TXD(––) instruction in the ladder program. RS-232C Connections (1-to-1) Only one PC can be connected with the host computer (one-to-one connection) when the Host Link is made with RS-232C connections.
Host Link
Host Link Host computer
Host link
IBM PC/AT or compatible
RS-422/485 Connections (1-to-N)
Up to 32 PCs can be connected with the host computer (one-to-N connection) when the Host Link is made with RS-422/485 connections. See note
Host link
IBM PC/AT or compatible See note
See note
See note
32 PCs max.
Wiring Ports
Note:
RS-232C ↔ RS-422/485 Adapter
Use the wiring diagram shown below as a guide in wiring the port to the external device. Refer to documentation provided with the computer or other external device for wire details for it.
423
Page 442
Host Link Communications
Section 8-2 The connections between the C200HX/HG/HE and a personal computer are illustrated below as an example. C200HX/HG/HE
Personal computer
Signal
Pin No.
Pin No.
Signal
FG
1
1
–
SD
2
2
RD
RD
3
3
SD
RS
4
4
DTR
CS
5
5
SG
–
6
6
DSR
–
7
7
RS
–
8
8
CS
SG
9
9
–
Shielded cable
Applicable Connectors The following connectors are applicable. One plug and one hood are included with the CPU Unit. Plug:
XM2D-0901 (female) for IBM PC/AT or compatible (OMRON) or equivalent Hood: XM2S-0911 (OMRON) or equivalent Note Ground the FG terminal on the PC and at the computer to 100 Ω or less. Refer to the C200HX/HG/HE Installation Manual and to the documentation for your computer for details. Host Link Parameters
The following parameters in the PC Setup must be set in advance to enable Host Link communications. Communications Mode Set the communications mode to Host Link mode. (This is the default setting.) RS-232C port: Set bits 12 through 15 of DM 6645 to 0. Peripheral port: Set bits 12 through 15 of DM 6650 to 0. Node Number Setting When 1:N connections are being used, set a unique node number from 00 to 31. When a 1:1 connection is being used, set the PC’s node number to 00. RS-232C port: Set bits 00 through 07 of DM 6648 (00 to 31). Peripheral port: Set bits 00 through 07 of DM 6653 (00 to 31). Standard Port Settings Standard settings or custom settings can be used for the RS-232C and peripheral ports. The standard settings are used when the following bits are set to 0. (The custom settings are explained below.) RS-232C port: Bits 00 through 03 of DM 6645 (0: standard; 1: custom). Peripheral port: Bits 00 through 03 of DM 6650 (0: standard; 1: custom). The standard settings are shown in the following table. Item
424
Setting
Start bits
1
Data length
7
Stop bits
2
Parity
Even
Baud rate
9,600 bps
Page 443
Host Link Communications
Section 8-2 Custom Port Settings Standard settings or custom settings can be used for the RS-232C and peripheral ports. The custom settings are used when the following bits are set to 1. RS-232C port: Bits 00 through 03 of DM 6645 (0: standard; 1: custom). Peripheral port: Bits 00 through 03 of DM 6650 (0: standard; 1: custom). The custom settings for the RS-232C port are defined in DM 6646 and the custom settings for the peripheral port are defined in DM 6651. The following settings are valid only when pin 5 on the CPU Unit’s DIP switch is turned OFF. Be sure to set the communications parameters to the same settings for both ends of the communications.
Bit 15
0
DM 6646: RS-232C port DM 6651: Peripheral port
Transmission Frame Format (See table below.) Baud rate (See table below.)
Parameter Transmission Frame Format
Parameter Baud rate
Setting
Start bits
Data length
Stop bits
Parity
00 01 02 03 04 05 06 07 08 09 10 11
1 1 1 1 1 1 1 1 1 1 1 1
7 7 7 7 7 7 8 8 8 8 8 8
1 1 1 2 2 2 1 1 1 2 2 2
Even Odd None Even Odd None Even Odd None Even Odd None
Setting 00 01 02 03 04
Baud rate 1,200 bps 2,400 bps 4,800 bps 9,600 bps 19,200 bps
Transmission Delay Time Depending on the devices connected to the RS-232C port, it may be necessary to allow time for transmission. When that is the case, set the transmission delay to regulate the amount of time allowed. The transmission delay time is set in units of 10 ms. RS-232C port: Set DM 6647 from 0000 to 9999 (0 to 99.99 s delay). Peripheral port: Set DM 6652 from 0000 to 9999 (0 to 99.99 s delay).
425