The text of a manual · part 21 of 30
SLC 500 Modular Hardware Style User Manual, pages 201 to 210
Pages 201 to 210 of 296
The original document is the PDF (3.5 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 Allen-Bradley 1747-L524
Page 201
Appendix
C
RS-232 Communication Interface
This appendix provides an overview of the RS-232 communication interface and explains how the SLC 5/03, SLC 5/04, and SLC 5/05 processors support it. This appendix also provides information on: • RS-232 and SCADA applications. • RS-232 communication interface overview. • SLC 5/03, SLC 5/04, and SLC 5/05 processors and RS-232 communication. • SLC 500 devices that support RS-232 communication. • DF1 protocol and the SLC 5/03, SLC 5/04, and SLC 5/05 processors. • Modbus RTU Master communication. • ASCII communication. • DF1 communication protocol modems overview. • wiring connectors for RS-232 communication. • applications for the RS-232 communication interface. For online configuration procedures of the SLC 5/03, SLC 5/04, and SLC 5/05 processors for DF1 protocol, see your programming software user manual.
RS-232 and SCADA Applications
RS-232 is a communication interface included under SCADA (Supervisory Control and Data Acquisition) applications. SCADA is a term that refers to control applications that require communication over long distances. For more information about the use of Allen-Bradley equipment in SCADA applications, refer to the SCADA System Applications Guide, publication AG-UM008.
RS-232 Communication Interface Overview
RS-232 is an Electronics Industries Association (EIA) standard that specifies the electrical, mechanical, and functional characteristics for serial binary communication. One of the benefits of RS-232 communication is that it lets you integrate telephone and radio modems into your control system. The distance over which you are able to communicate with certain system devices is virtually limitless.
201
Publication 1747-UM011G-EN-P - June 2008
Page 202
202
RS-232 Communication Interface
The RS-232 channel on the SLC 5/03, SLC 5/04, and SLC 5/05 processors supports various protocols: • Full-duplex DF1 (default) • Half-duplex DF1 (SCADA) • DH-485 • ASCII communication • DF1 radio modem • Modbus RTU Master The SLC and PLC products detailed in this appendix that communicate over the RS-232 communication interface also use the DF1 serial communication protocol. DF1 protocol delimits messages, controls message flow, detects and signals errors, and retries after errors are detected.
SLC 5/03, SLC 5/04, and SLC 5/05 processors and RS-232 Communication
The SLC 5/03, SLC 5/04, and SLC 5/05 processors can communicate by means of the RS-232 communication port, channel 0. Channel 0 supports DF1 full-duplex protocol, DF1 half-duplex master and slave protocol, DH485 protocol, Modbus RTU Master communication, ASCII communication, and DF1 radio modem protocol. Refer to your programming software user manual for information on configuring the RS-232 communication port, channel 0. The details of the DF1 protocols can be found in the DF1 Protocol and Command Set Reference Manual, Publication Number 1770-6.5.16. Channel 0 provides a minimum of 500V dc isolation between the I/O signals and the logic ground of the SLC 5/03, SLC 5/04, and SLC 5/05 processors. The channel is a 9-pin D-shell. The table below provides a description of each of the pins. Pin
Pin Name
1
DCD (Data Carrier Detect)
2
RXD (Receive Data)
3
TXD (Transmit Data)
4
DTR (Data Terminal Ready)
5
COM (Common Return [Signal Ground])
6
DSR (Data Set Ready)
7
RTS (Request to Send)
8
CTS (Clear to Send)
9
NC (No Connection)
The D-shell is the bottom port on the SLC 5/03, SLC 5/04, and SLC 5/05 processors. Publication 1747-UM011G-EN-P - June 2008
Page 203
RS-232 Communication Interface
SLC 500 Devices that Support RS-232 Communication
203
The SLC 500 product line has two other modules, aside from the SLC 5/03, SLC 5/04, and SLC 5/05 processors, that support the RS-232 communication interface. They are the 1746-BAS BASIC module and the 1747-KE DH-485/RS-232C interface. Both of these modules can be used with either the SLC 5/01 or SLC 5/02 processor.
1747-KE Module The 1747-KE module is a communication interface module that acts as a bridge between DH-485 networks and devices requiring DF1 protocol. You can configure the DF1 port on the 1747-KE module for RS-232/423, RS-422, or RS-485 devices. Residing in an SLC 500 chassis, the 1747-KE module is ideally used as an interface module, linking remote DH-485 networks via a modem to a central host. For more information on the 1747-KE module, see the DH-485/RS-232 Interface Module User Manual, publication 1747-IN006.
1746-BAS and 1746-BAS-T Modules The 1746-BAS and 1746-BAS-T modules, which are programmed using the BASIC language, have two configurable serial ports for interfacing to computers, modems, serial printers, and other RS-232 compatible devices. You can also use them for off-loading complex math routines from an SLC 500 processor, thereby conserving ladder logic memory. For more information on the 1746-BAS module, see the SLC 500 BASIC and BASIC-T Module User Manual, publication 1746-UM004.
Publication 1747-UM011G-EN-P - June 2008
Page 204
204
RS-232 Communication Interface
DF1 Protocol and the SLC 5/03, SLC 5/04, and SLC 5/05 Processors
DF1 protocol combines data transparency (ANSI - American National Standards Institute - specification subcategory D1) and 2-way simultaneous transmission with embedded responses (F1). It is also a peer-to-peer, link-layer protocol. This means that system devices have equal access to messages being sent over the RS-232 communication interface. DF1 protocol provides two modes of communication: full-duplex and half-duplex.
DF1 Full-duplex Protocol DF1 full-duplex protocol (also referred to as DF1 point-to-point protocol) lets you use RS-232 point-to-point communication in applications that require it. This type of protocol supports simultaneous transmissions between two devices in both directions. You can use channel 0 as a programming port, or as a peer-to-peer port using the MSG instruction. In full-duplex mode, the SLC 5/03, SLC 5/04, and SLC 5/05 processors can send and receive messages. When the SLC 5/03, SLC 5/04, and SLC 5/05 processors receive messages, they act as an end device, or final destination for the data packets(1). The processor ignores the destination and source addresses received in the data packets. However, the processor swaps these addresses in the reply that it transmits in response to any command data packet that it has received. By setting a parameter with your programming software, you can also make the processor verify that the host computer can receive embedded responses. To do this, the processor waits to receive an embedded response from the host computer, before sending one of its own. A host computer that can send embedded responses should also be able to receive them. If you use modems with DF1 full-duplex protocol, make sure that they are capable of simultaneous bidirectional communication. Typically, dial-up modems designed to be connected to standard telephone lines can support full-duplex.
(1)
Publication 1747-UM011G-EN-P - June 2008
The exceptions to this are SLC 5/04 and SLC 5/05 processors that have the DH+ to DF1 or Ethernet to DF1 full-duplex passthru bit enabled. In the case of the SLC 5/04, the processor checks the destination address in the packet and if it does not match the configured DH+ address of the processor, the packet is forwarded onto the DH+ network to the destination address DH+ node. In the case of the SLC 5/05, the processor checks the destination address in the packet. If the routing table exists and an IP address is in the routing table for that DF1 address, the packet is forwarded out to the Ethernet network to that IP address.
Page 205
RS-232 Communication Interface
205
Full-duplex (Point-to-Point)
Modem
Modem
SLC 5/03 Processor (1747-L532)
SLC 5/03 Processor (1747-L532)
1747-CP3 Cable
DF1 Half-duplex Protocol DF1 half-duplex protocol provides a multi-drop single master/multiple slave network. In contrast to the DF1 full-duplex protocol, communication takes place in one direction at a time. You can use channel 0 as a programming port, or as a peer-to-peer port using the MSG instruction. In half-duplex mode, the SLC 5/03, SLC 5/04, and SLC 5/05 processors can be either master or slave devices. As a master device, the processor polls each slave on the network on a regular and sequential basis. The master also supports routing of data packets from one slave to another, or slave-to-slave communication. As a slave device, the processor can send data packets when polled by the master device, which initiates all communication with slave devices. If the master device has no data to send, it can still receive data from the slave device. To do this, the master sends out a poll packet addressed to the slave. If the slave has data to send, it does so in response to the poll packet. Otherwise, the slave sends a simple two-byte response, so that the master knows that it is active. Several Allen-Bradley products support half-duplex master protocol. They include the Enhanced PLC-5 processors, and SLC 5/03, SLC 5/04, and SLC 5/05 processors. RSLinx (2.0 or later) software also supports half-duplex master protocol. DF1 Half-duplex supports up to 255 slave devices (addresses 0...254) with address 255 reserved for master broadcasts. The SLC 5/03, SLC 5/04, and SLC 5/05 processor support broadcast reception. SLC 5/03, SLC 5/04, and SLC 5/05 processors with operating system FRN C/6 can also initiate broadcast write commands via the MSG Publication 1747-UM011G-EN-P - June 2008
Page 206
206
RS-232 Communication Interface instruction for all channel 0 system mode drivers and for channel 1 (DH-485) on the SLC 5/03 processor. Broadcast is not supported for read commands or any remote messages. Broadcast is also not supported by the SLC 5/04 channel 1 DH+ network or the SLC 5/05 channel 1 Ethernet network.
TIP
Either half-duplex or full-duplex modem types can be used for the master, but half-duplex modems must be used for the slaves (assuming there is more than one on a multi-drop network).
Personal Computer Running RSLinx with DF1 Half-duplex Protocol (master) RS-232 (DF1 protocol) Modem
Modem
Modular Controller with SLC 5/02 Processor and 1747-KE Interface Module (slave)
Modem
Modular Controller with SLC 5/03 Processor (slave)
Modem
Modular Controller with SLC 5/01 Processor and 1747-KE Interface Module (slave)
Modem
Fixed Controller with 1747-KE Interface Module (slave)
Modular Controller with SLC 5/03 Processor (master) RS-232 (DF1 protocol) Modem
Modular Controller with SLC 5/02 Processor and 1747-KE Interface Module (slave)
Publication 1747-UM011G-EN-P - June 2008
Modem
Modular Controller with SLC 5/03 Processor (slave)
Modem Modem
Modular Controller with SLC 5/01 Processor and 1747-KE Interface Module (slave)
Modem
Fixed Controller with 1747-KE Interface Module (slave)
Page 207
RS-232 Communication Interface
207
DF1 Radio Modem Channel 0 Driver Series C FRN 6 (FRN C/6) and later versions of operating systems OS302 (SLC 5/03 processor), OS401 (SLC 5/04 processor) and OS501 (SLC 5/05 processor) include a channel 0 system mode driver called DF1 radio modem. This driver implements a protocol, optimized for use with radio modem networks, that is a hybrid between DF1 full-duplex protocol and DF1 half-duplex protocol, and therefore is not compatible with either of these protocols. IMPORTANT
IMPORTANT
The DF1 radio modem driver should only be used among devices that support and are configured for the DF1 radio modem protocol. Only SLC 5/03, SLC 5/04 and SLC 5/05 processors with operating systems FRN C/6 support DF1 radio modem protocol. There are some radio modem network configurations that will not work with the DF1 radio modem driver. (See DF1 Radio Modem System Limitations on page 209.) In these configurations, continue to use DF1 half-duplex protocol.
Like DF1 full-duplex protocol, DF1 radio modem allows any node to initiate to any other node at any time (if the radio modem network supports full-duplex data port buffering and radio transmission collision avoidance). Like DF1 half-duplex protocol, a node ignores any packets received that have a destination address other than its own, with the exception of broadcast packets and passthru packets. Unlike either DF1 full-duplex or DF1 half-duplex protocols, DF1 radio modem protocol does not include ACKs, NAKs, ENQs, or poll packets. Data integrity is ensured by the CRC checksum.
Using the DF1 Radio Modem The DF1 radio modem driver can be configured as the system mode driver for channel 0 using RSLogix 500 version 5.50 or later software.
Publication 1747-UM011G-EN-P - June 2008
Page 208
208
RS-232 Communication Interface
Channel O Configuration
The Baud, Parity, Stop Bits and Error Detection selections are identical to the other DF1 drivers. Valid Node Addresses are 0...254, just like the DF1 half-duplex drivers. The primary advantage of using DF1 radio modem protocol for radio modem networks is in transmission efficiency. Each read/write transaction (command and reply) requires only one transmission by the initiator (to send the command) and one transmission by the responder (to return the reply). This minimizes the number of times the radios need to key-up to transmit, which maximizes radio life and minimizes radio power consumption. In contrast, DF1 half-duplex protocol requires five transmissions for the DF1 master to complete a read/write transaction with a DF1 slave - three by the master and two by the slave. The DF1 radio modem driver can be used in a pseudo master/slave mode with any radio modems, as long as the designated master node is the only node initiating MSG instructions, and as long as only one MSG instruction is triggered at a time. For modern serial radio modems that support full-duplex data port buffering and radio transmission collision avoidance, the DF1 radio modem driver can be used to set up a masterless peer-to-peer radio network, where any node can initiate communication to any other node at any time, as long as all of the nodes are within radio range so that they receive each other’s transmissions.
Publication 1747-UM011G-EN-P - June 2008
Page 209
RS-232 Communication Interface
209
DF1 Radio Modem System Limitations The following questions need to be answered in order to determine if you can implement the new DF1 radio modem driver in your radio modem network. • Are all of the devices SLC 5/03, 5/04 or 5/05 processors? If so, then they must all be at operating system FRN C/6 or later in order to be configured with the DF1 radio modem driver using RSLogix 500 version 5.50 or later software. If not, then make sure that all of the nodes can support the DF1 radio modem protocol. Once channel 0 is configured for DF1 radio modem, you will need to use channel 1 to locally monitor and program your SLC processor using RSLogix 500 software. • Does each node receive the radio transmissions of every other node, being both within radio transmission/reception range and on a common receiving frequency (either via a Simplex radio mode or via a single, common, full-duplex repeater)? If so, then go to the next question to see if you can use the DF1 radio modem driver to set up a peer-to-peer radio network. If not, then you may still be able to use the DF1 radio modem driver, but only if you limit MSG instruction initiation to the node connected to the master radio modem whose transmissions can be received by every other radio modem in the network. • Do the radio modems handle full-duplex data port buffering and radio transmission collision avoidance? If so, and the answer to the previous question is yes as well, then you can take full advantage of the peer-to-peer message initiation capability in every node (for example, the ladder logic in any node can trigger a MSG instruction to any other node at any time). If not, then you may still be able to use the DF1 radio modem driver, but only if you limit MSG instruction initiation to a single master node whose transmission can be received by every other node. • Can I take advantage of the SLC 5/03, SLC 5/04, and 5/05 channel-to-channel passthru to remotely program the other SLC nodes using RSLinx and RSLogix 500 running on a personal computer connected to a local SLC processor via DH-485, DH+, or Ethernet? Yes, with certain limitations imposed based on the radio modem network.
Publication 1747-UM011G-EN-P - June 2008
Page 210
210
RS-232 Communication Interface
Modbus RTU Master Communication
Modbus RTU communication lets you connect the SLC 5/03, SLC 5/04, and SLC 5/05 processors to Modbus RTU slave devices for exchange of data values. For an overview of the Modbus RTU Master protocol modem, refer to the SLC 500 Instruction Set Reference Manual (1747-RM001).
ASCII Communication
ASCII protocol lets you connect the SLC 5/03, SLC 5/04, and SLC 5/05 processors to serial printers, personal computers, and other third-party devices. ASCII protocol lets your ladder program manage ASCII data.
Modular Controller with SLC 5/03 Processor
RS-232 Channel 0 1747-CP3 Cable
DF1/Modbus RTU Communication Protocol Modems Overview
You can connect the SLC 5/03, SLC 5/04, and SLC 5/05 processors to several types of modems. In all cases, the processors act as Data Terminal Equipment (DTE). DTE send and/or receive data on a network. Modem or line drivers act as Data Communication Equipment (DCE), which provide the signal conversion and coding required for communication between DTE and data circuits. Other DCE include phone-line modems and specialized modems, such as radio and satellite-link modems. In addition to Common Return (COM), Receive Data (RXD), and Transmit Data (TXD), the following active modem-control lines are provided on the SLC 5/03, SLC 5/04, and SLC 5/05 processors. RTS (Request to Send) - this output signal indicates to the modem or other DCE that the DTE wants to transmit. CTS (Clear to Send) - this input signal from the modem indicates the modem is ready to receive the transmission by the DTE for forwarding over a link. DSR (Data Set Ready) - this input signal indicates the DCE device is ready for operation. Loss of this signal causes a modem-lost condition in the processor. DTR (Data Terminal Ready) - this output signal from the DTE indicates that it is ready for operation. You can also use this signal with the processor to initiate DTR dialing in dial-up modems that support such a feature.
Publication 1747-UM011G-EN-P - June 2008