D2 - DCM Data Communications Module
D2 - DCM Data Communications Module
D2 - DCM Data Communications Module
Thank you for purchasing automation equipment from PLCDirectä. We want your new DirectLOGICä automation
equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other
relevant publications) before installing or operating the equipment.
To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate
the installation and operation of your equipment. These codes vary from area to area and usually change with time. It is
your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and
operation is in compliance with the latest revision of these codes.
At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code, and the
codes of the National Electrical Manufacturer’s Association (NEMA). There may be local regulatory or government
offices that can also help determine which codes and standards are necessary for safe installation and operation.
Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and
standards. We do not guarantee the products described in this publication are suitable for your particular application,
nor do we assume any responsibility for your product design, installation, or operation.
If you have any questions concerning the installation or operation of this equipment, or if you need additional
information, please call us at 1--800--633--0405.
This publication is based on information that was available at the time it was printed. At PLCDirectä we constantly
strive to improve our products and services, so we reserve the right to make changes to the products and/or
publications at any time without notice and without any obligation. This publication may also discuss features that may
not be available in certain revisions of the product.
Trademarks
This publication may contain references to products produced and/or offered by other companies. The product and
company names may be trademarked and are the sole property of their respective owners. PLCDirectä disclaims any
proprietary interest in the marks and names of others.
Stage is a trademark of Koyo Electronics Industries Co., LTD. Think & Do Software is a trademark of Think & Do
Software, Inc. Texas Instruments is a registered trademark of Texas Instruments, Inc. TI, TIWAY, Series 305, Series
405, TI305, and TI405 are trademarks of Texas Instruments, Inc. Siemens and SIMATIC are registered trademarks of
Siemens, AG. GE is a registered trademark of General Electric Corporation. Series One is a registered trademark of
GE Fanuc Automation North America, Inc. MODBUS is a registered trademark of Gould, Inc. IBM is a registered
trademark of International Business Machines. MS-DOS and Microsoft are registered trademarks of Microsoft
Corporation. Windows and Windows NT are trademarks of Microsoft Corporation. OPTOMUX and PAMUX are
trademarks of OPTO 22.
No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of
PLCDirectä Incorporated. PLCDirectä retains the exclusive rights to all information included in this document.
1
Manual Revisions
If you contact us in reference to this manual, please remember to include the revision number.
Overview
The Purpose of This manual is designed to allow you to setup
this Manual and install your DL205 Data Communications
Module (DCM). This is the only manual you will
need if you are using the DCM as an extra
general purpose communication port for your
DL205 PLC system. If you plan on using the
DCM as a network master or slave for a
DirectNET network, this manual covers the
basic steps for setting up the DCM and the
RX/WX instructions needed in your RLL
program.
If you plan on using a personal computer as the network master, it may be helpful to
read the DirectNET manual first. In either case, the DirectNET manual can be
useful because it provides detailed descriptions of network configurations, various
cable connections, etc.
Supplemental Depending on which products you have purchased, there may be other manuals that
Manuals are necessary or helpful for your application. These are some suggested manuals:
User Manuals
D DirectNET Network Guide part number DA--DNET--M
D DirectSoft Programming Software part number DA--DSOFT--M
If you plan to use your D2--DCM to communicate with another PLC, you will need the
appropriate user manual for the other PLC.
If you plan to use your D2--DCM module as an interface to HMI or PC Control
software or to an Operator Interface panel, you will need to refer to the
documentation for that product.
Who Should Read If you need an additional communications port for your DL205 PLC and you
this Manual understand the basics of installing and programming PLCs, this is the right manual
for you. This manual gives you the information you need to set up an active port on
the D2--DCM module.
Quality Technical We strive to make our manuals the best in the industry. We rely on your feedback to
Manuals and let us know if we are reaching our goal. If you cannot find the solution to your
Technical Support particular application, or, if for any reason you need additional assistance, please
call us at 800--633--0405. Our technical support group is glad to work with you in
answering your questions. They are available weekdays from 9:00 a.m. to 6:00
p.m. Eastern Time. You can also contact us on the worldwide web at:
You can also find a variety of support solutions at our 24--hour per day BBS at:
770--844--4209
If you find a problem with any of our products, services, or manuals, please fill out
and return the ’Suggestions’ card that came with this manual.
33
Introduction
Steps The main contents of this manual are organized into five steps:
guides you through the setup of the rotary and DIP switches
3
to select communication parameters and network
Set the DCM Switches
addressing. It shows the proper method of inserting the
module into the base.
tells you what to consider when laying out your network
4 Install the DCM and Start cable and how to terminate the individual conductors at the
the Network networked devices. It gives you specific cabling examples,
showing pinouts for each device.
introduces the use of the DCM’s status indicator lights as a
5 Verify and Troubleshoot diagnostic tool. It gives you status indicator light patterns to
help you identify problems that could be preventing
communications.
Appendices Additional reference information for the D2--DCM is available in these four
appendices:
B
RLL Communications provides helpful examples of Ladder Logic programs for DCM
Programs communications.
C
Using the DCM with describes the methods for communicating using the popular
MODBUS MODBUS RTU protocol.
D
Using the DCM with explains communications using telephone, radio or fiber
Modems optic modems.
4
Introduction
DCM Hardware
The following diagram shows the major DCM components. The address selection
switches and the communication dipswitches are of special importance.
Status Indicators
(shown below)
Online/Offline Switch
Base Connector
RS232C/RS422
Communication Port Address Selection
Switches
Applications
As a DirectNET The DCM can be used as a network interface for applications that require data to be
Interface shared between PLCs, or between PLCs and an intelligent device (such as a host
computer). The DCM can be configured as either a master or slave station and
allows you to upload or download virtually any type of system data including
Timer/Counter data, I/O information, and V-memory information.
DirectNET Slaves
Slaves respond to the master’s request
DirectNET Masters
Issue requests to slave stations
Response
PC or DCM
master can
communicate with
DirectNET Slaves
Request
Using a DCM as a Network Master
The DL205 DCM can be used with a Possible Slaves
D2--240/250 CPU to serve as a network D D2--240/250 CPU (bottom port)
master. Your CPU must have firmware V1.8 D D2--240/250 w/ D2--DCM
or later. It cannot be used with a DL230
D D3--330 or D3--330P w/ DCU
CPU. (A master is the network station that
initiates requests for data from other stations D D3--340 (either port)
on the network). You simply use special RLL D D4--430 (bottom port)
instructions (RX and WX) inside of your RLL D D4--440 (bottom port)
program to initiate the data exchange. The D D4--450 (phone jack or bottom port)
DCM takes communication requests issued
by the PLC program instructions and D Any DL405 CPU w/ D4--DCM
automatically converts these requests into
network commands that read data from or
write data to another network station.
The PLC program is really very simple and only requires a few instructions. Appendix
A provides an overview of the instructions. Or, see the DirectNET Manual for network
details.
Using a DCM as a Network Slave
The DCM can also be used with a Possible Masters
D2--240/250 CPU to serve as a network D D2--240/250 w/ D2DCM
slave station. It cannot be used with a
D D3--340 CPU (bottom port)
DL230 CPU. In this case, the DCM
“listens” to the network for any messages D Any DL405 CPU w/ D4--DCM
that contain the DCM’s address. The DCM D D4--450 CPU (bottom port)
deciphers the network commands, carries D Host computer w/
out the request to read or write data, and DirectSOFT DDE Server
sends confirmation and/or information to
the master station.
6
Introduction
As an Extra As an extra communication port, the DCM supports the DirectNET protocol just like
Communication the bottom port on the D2--240/250 CPU, but at higher baud rates. In general, if you
Port can connect a device to the bottom port on the D2--240/250 CPU, then you can also
connect the same device to the DCM. These devices can be a variety of things, such
as operator interfaces or personal computers.
Since the DCM does not require any programming, you can simply set the DCM
communication parameters, connect the appropriate RS232C or RS422 cables, and start
transferring data.
As a MODBUSâ The DCM can be used as a slave interface to connect your DL205 system to a
Network Interface MODBUSâ network using the MODBUSâ RTU protocol. The host system must be
capable of issuing the MODBUSâ commands to read or write the appropriate data.
Appendix C provides additional information on using the D2--DCM as a
MODBUS slave interface. This manual does not describe the MODBUSâ protocol.
We recommend that you reference the Gould MODBUSâ Protocol Reference Guide
(P1-MBUS-300 Rev. B) for details on the protocol. There may be more recent editions
of this manual, so check with your MODBUSâ supplier before ordering the
documentation.
MODBUSâ Master
Specifications
Environmental
Specifications
Operating Temperature 32° F to 131° F (0° to 55° C)
Storage Temperature --4° F to 158° F (--20° to 80° C)
Operating Humidity 5 to 95% (non-condensing)
Air Composition No corrosive gases permitted
Vibration JIS C0040
Shock JIS C0041
Voltage Isolation 1500 VAC, 1 minute duration
Insulation Resistance 10M ohms at 500 VDC
Noise NEMA ICS3--304
Operating
Specifications
Power Budget Requirement 300ma @ 5 VDC
Maximum number of modules limited only by power budget
CPU Required D2--240/250 minimum
firmware V1.8 or later
Location of module CPU base only
any slot except Slot 0 or CPU slot
Interface Serial RS232C / RS422
half-duplex, DTE, Asynchronous,
8 bits/character, odd or no parity
Baud Rates 300 to 38.4K baud, switch selectable
Maximum Distance RS232C -- 49ft (15 meters)
RS422 -- 3300 feet (1000 meters)
Protocol DirectNET1
K-sequence (proprietary)
MODBUSâ RTU
Diagnostics Automatic check of ROM/RAM,
communications, switch settings,
and LEDs
Note 1: Also compatible with Hostlink and/or CCM2 protocols. These names were used by previous vendors of
compatible Koyo designed products.
8
Introduction
Cable
STEP 2. Build the communication cable
that fits your needs.
Switches
Install
Verify (Troubleshooting)
or
DCM
DCM
Multi-drop
or
DCM
11
11
Building the Communication Cable
Consideration 2: The DCM can support RS232C or RS422 communication. Your application and
Electrical configuration choice will help determine which electrical specification is best for you.
Specification If you are using multi-drop, you must use RS422. If you are using point-to-point, you
RS232C or RS422 may have a choice between RS232C and RS422.
You can use RS232C if the cable length is less than 50 feet and if the cable will not be
subjected to induced electrical noise that is commonly found near welders, large
motors, or other devices that create large magnetic fields.
You must use RS422 for all other applications. RS422 allows longer cable distances
(up to 3300 feet) and provides higher noise immunity.
Consideration 3: Although the network configuration and electrical specification are important, the
Cable Schematics type of devices being connected to the DCM are just as important. The exact cable
schematic needed really depends on a combination of all three things. There are a
wide range of possibilities when you consider that all three product families, the
DL205, DL305, and DL405 all offer DirectNET communication capabilities.
Some of you hardy souls will take these port pinouts and you’ll be on your way.
However, if you want some helpful hints, check out Appendix A. We’ve already
included a wide variety of cable schematics that cover several different possibilities.
You may have to combine some of these examples to design a cable that meets your
exact application requirements, but it can get you started on the right track.
NOTE: If you are using the DCM to connect an OptiMation operator interface,
you must order our standard pre-made cable, part number OP--4CBL--2. If you
are using a DV--1000, you must build a custom cable. See the cable diagram at
the end of Appendix A.
The following diagram shows the port pinouts for the DCM and the bottom port of the
DL240 CPU. These are the two most likely combinations that you will use. Notice
that the DCM has two sets of RS422 pins. These pins are internally connected and
can make it easier to wire multidrop connections.
D2--DCM Pinouts D2--240 Bottom Port
RS232C RS422*
1 1
RS232 TXD
14 14 RS422 TXD+
2 2
15 15 RS422 TXD--
RS232 RXD 3 3
16 16 RS422 RXD--
RS232 RTS 4 4
17 17 RS422 RXD+
RS232 CTS 5 5
18 18
+5V 6 +5V 6
19 19
0V 7 0V 7
20 20
8 RS422 RTS+ 8
21 21
9 RS422 RTS-- 9
22
RS422 RTS+
22 RS422 TXD+
10 10
23 23 RS422 TXD--
11 RS422 RTS-- 11
24 24 RS422 RXD--
12 RS422 CTS+ 12
25 25 RS422 RXD+
13 RS422 CTS-- 13
1
2
Port 2 Pinouts 3
* RS422 pins are internally connected Pin Signal Definition 4
5
6
1 0V Phone Jack
2 5V Connector
3 RS232C DTE RXD
4 RS232C TXD
5 Request to Send
6 0V
NOTE: The DL205 CPU ports only support RS232C signal levels. If you are
going to have more than one slave station, you will have to use RS422 and a
FA--UNICON RS232 to RS422 converter for each slave station. See the cable
diagrams shown in Appendix A for detailed diagrams.
12
Building the Cable
Consideration 4: Although many types of cables may work for your application, we recommend you
Cable Specifications use a cable that is constructed to offer a high degree of noise immunity. A cable
constructed equivalent to Belden 9855 is sufficient. The following specifications are
to be used as a guideline.
Structure . . . . . . . . . . . . . . . . . . . . . . . Shielded, twisted-pair
(RS232C only uses two wires and a ground)
Conductor size . . . . . . . . . . . . . . . . . 24 AWG or larger
Insulation . . . . . . . . . . . . . . . . . . . . . . Polyethylene
Shield . . . . . . . . . . . . . . . . . . . . . . . . . Copper braid or aluminum foil
Impedance . . . . . . . . . . . . . . . . . . . . . 100O @ 1MHz
Capacitance . . . . . . . . . . . . . . . . . . . . 60pf / meter or less
Consideration 5: Your company may have guidelines for cable installation. If so, you must check those
Installation before you begin the installation. Here are some general things to consider.
Guidelines D Don’t run cable next to larger motors, high current switches, or
transformers. This may cause noise problems.
D Route the cable through an approved cable housing to minimize the risk
of accidental cable damage. Check local and national codes to choose
the correct method for your application.
D Consider redundant cabling if the application data is critical. This allows
you to quickly reconnect all stations while the primary cable is being
repaired.
2.5”
Line-to-Line Termination
Master Slave Last Slave
Terminate
at Master
7 GND 7 GND
10 +RTS 19 +RTS
11 --RTS 18 --RTS
12 +CTS 11 +CTS
13 --CTS 23 --CTS
14 +OUT 9 +IN
15 --OUT 10 --IN
16 --IN 16 --OUT
17 +IN 14 +OUT
22
23
+OUT
--OUT
120 ohm
24 --IN Resistor
DirectNET 120 ohm 25 +IN
Slaves Resistor
Line-to-Ground Termination
Master Slave Last Slave
7 GND 7 GND
10 +RTS 19 +RTS
11 --RTS 18 --RTS
12 +CTS 11 +CTS
13 --CTS 23 --CTS
14 +OUT 9 +IN
15 --OUT 10 --IN
16 --IN 16 --OUT
17 +IN 14 +OUT
22 +OUT 62 ohm
23 --OUT
24 --IN Resistors
25 +IN
Terminate
at Last Slave 62 ohm
Resistors
14
Building the Cable
Network Amplifiers — If you have more than 16 slave stations, you must use an
RS422 amplifier to maintain the signal levels. The best amplifiers are regenerative,
that is, they try to improve signal quality by reducing any noise signals that are
present. (They amplify the signal and not the noise if possible.) Some amplifiers are
not regenerative and amplify the noise as well as the signal. You can get amplifiers
from several sources. The Black Box catalog is one of many good places to start.
They sell direct just like we do. Call 1--800--555--1212 and ask the 800 directory
assistance operator for their phone number. The following diagram shows some
instances where an amplifier is necessary.
Serial Slave Connection
Master RS422
Station Amp
RS422 RS422
Amp Amp
A Quick Test Cable PLCDirect offers a Universal Cable Kit (part number FA--CABKIT). This cable kit
allows you to connect various types of DirectLOGIC products with an RS232C
cable. The kit consists of cable (phone cable with male plugs already attached) and
several specially wired connectors. The special connectors are a D-sub style with
built-in female phone jacks. The kit includes a wide variety of the special connectors
so you can use one kit to connect products from the different DirectLOGIC family of
products. To use the kit with the DCM, just follow these steps.
1. Plug the appropriate D-sub connector onto the DCM.
2. Plug the appropriate D-sub connector onto the other device you are
connecting to the DCM.
3. Connect the cable to the two D-sub connectors.
WARNING: This cable is suitable for quick testing situations and must not be
used in actual applications. This cable is not shielded and is highly
susceptible to electrical noise. Electrical noise can cause unpredictable
operation that may result in a risk of personal injury or damage to equipment.
Use the cable specifications described earlier in this manual to select a cable
suitable for actual applications.
9 Pin
25 pin
Universal 9 pin
D--sub connector Universal 25 pin
D--sub connector
Cable Kit Contains 1 each of:
RJ12 to RJ11 Phone jack to 9 pin Phone jack to 9 pin Phone jack to 15 pin Universal 25 pin
non-shielded cable female D--sub connector D--sub connector D--sub connector D--sub connector
RJ12 to RJ12
non-shielded cable
16
Setting the Switches
Host Computer or If you’re using a host computer or operator interface as the master station you should set the
Operator Interface DCM to match the master station parameters. Check the documentation that came with your
Connection computer or operator interface panel to determine the available communication parameters.
You’ll need to know the following things.
D Baud rate
D Parity settings
D Protocol required
Your operator interface must use one of the following protocols.
D DirectNET
D K-sequence
D Hostlink (DirectNET was called Hostlink on the old TIt or Simaticr TI products.
Some Operator Interface manufacturers may still refer to it this way.)
D MODBUSâ RTU
DirectNET Interface If you’re using the DCM as a DirectNET interface, you’ll need to know whether the DCM is
Connection being used in a master station, slave station, or peer station. Once you’ve determined how
the DCM will be used, proceed with the dipswitch settings.
DCM as Master
DCM as Slave
17
17
Setting the Switches
DCM Once again, the switches should be set at the factory for the following type of operation.
Switch Settings D DirectNET Slave
D 9600 Baud
D Station Address 1
D Odd Parity
D Hex Mode
If these settings are acceptable, then you can go ahead and install the DCM into the base. If
not, you’ll have to change the switch settings.
There are two small banks of switches located next to the blue rotary switches on the one of
the DCM circuit boards. These dipswitches are used to select the communications settings.
The following diagram shows the switch locations and their purpose.
Switch Positions
Protocol 1 2
SW3
DirectNET Slave OFF OFF
Network DirectNET Master OFF ON
1 Protocol DirectNET Peer ON OFF
2 MODBUSâ RTU ON ON
COM Timeout Enable 3 COM Timeout Disable
Hexadecimal Mode 4 ASCII Mode
OFF ON
Protocol Selection: Positions 1 and 2 on SW3 select the DCM protocol and the master or
slave settings. The DCM primarily uses two protocols, DirectNET and MODBUSâ RTU
protocol. Here’s some information to help you choose.
Communications Port for DirectSOFT Programming: If you plan to program the CPU through
the DCM, then you can use either DirectNET protocol or our proprietary protocol, called
K-sequence. Although it is not listed in the switch settings, K-sequence is also available
whenever the DCM is set for DirectNET slave operation.
Computer or Operator Interface: If you’re using the DCM to connect a computer or operator
interface, check your documentation to see which protocol is being used. Since the DCM is
always a slave station when it’s connected to a computer or operator interface, you should
select DirectNET slave or MODBUSâ RTU slave. Note, there are also a handful of operator
interfaces that have been designed to use our proprietary K-sequence protocol. If you have
one of these, or if you need to use K-sequence for some reason, make sure you set the DCM
for DirectNET Slave operation. Peer to Peer works in Hexadecimal mode only.
DirectNET Master / Slave: In a DirectNET master / slave network, one DCM should be set as
a master and the rest should be set as slaves.
DirectNET Peer as Master: This is a variation of the master / slave protocol and should be
selected when you only have two stations that can each initiate requests. Each station must
have a DCM as the network interface.
MODBUSâ RTU Slave: The DCM can also be a MODBUSâ slave (in the RTU or HEX
mode). The DCM cannot be a MODBUSâ master station. If you’re going to use MODBUSâ,
make sure your software package supports the DL205 products. See Appendix C for more
information.
Communication Timeout: Position 3 on SW3 selects the communication timeout. For most
cases, you should leave this switch in the OFF position. Communication Timeout Disable is
normally used only if you’re developing your own DirectNET programs. By disabling the
timeout, you can send one DirectNET component without any communication timeout
problems. If you have this timeout disabled and a communication error does occur, you must
restart communications by sending a retry or an End of Transmission (EOT) command. If you
want to know more, see the DirectNET manual for details.
ASCII / HEX Mode: Position 4 on SW3 selects between ASCII and HEX modes of data
representation. If you want the fastest communication possible, use HEX mode, which is the
default. The difference is in the way the data is represented. The same data is twice as long in
ASCII format, so if there’s more data, it takes longer to transfer. If you have a device on the network
that requires ASCII mode, then set the switch for ASCII mode, otherwise, use HEX mode.
Baud Rate: Positions 1 -- 3 on SW5 are used to set the baud rate for the DCM. There are eight
baud rate selections available ranging from 300bps to 38.4Kbps. All stations must have the
same baud rate before the communications will operate correctly. Usually, you should
use the highest baud rate possible unless noise problems appear. If noise problems appear,
try reducing the baud rates.
Parity: Position 4 on SW5 selects between the two parity options, odd or none. If you’re using
all DL205 equipment, you should use odd parity. Odd parity uses eleven bits total (1 start bit, 8
data bits, 1 stop bit, and 1 parity bit).
Some devices require no parity, which uses only 10 bits (1 start bit, 8 data bits, and 1 stop bit).
Self-Test: Position 5 on SW5 selects the factory self-test and should always be switched off.
If the self-test is on, the module will not operate correctly.
Response Delay Time: Positions 6--8 on SW4 set the response delay time. The delay time
specifies the amount of time the DCM waits to send the data after it has raised the RTS signal
line. This is normally set to 0, and is typically only adjusted if you are using the DCM with a
radio modem. If you are using the DCM with a radio modem, check your modem
documentation to help you choose the proper setting. Also, if you’re considering the use of a
modem, check out Appendix D. It may be of some help.
19
19
Setting the Switches
Address Selection The DCM station address is set by the two rotary
Switch switches located on one of the DCM’s circuit
boards. Addresses are in hexadecimal format
with valid addresses from 0 (only used for the
master station) to hexadecimal 5A. The
addresses do not have to be consecutive, but each
station must have a unique address.
The top rotary switch is used to set the most
significant digit of the HEX address. The bottom
switch is used to set the least significant digit of the
HEX address. For example, to set a DCM address
of HEX 10 (decimal 16), set the top rotary switch to 1
and the bottom rotary switch to 0. If you’re using the
DCM as a master, make sure you select address 0.
10 11 12 13 14 15
HEX 3C
3 x 16 = 48 + C = 12 = 60 decimal
20
Setting the Switches
Online / Offline On the front of the unit, just to the left of the LEDs,
Switch you’ll notice a small slide switch. This switch is
labeled ON (for online) and OFF (for offline). If you
want to communicate through the DCM, make
sure this switch is in the ON position.
In the OFF position, this switch logically
disconnects the DCM from the network (just as if
you pulled the cable from the connector). Once
this switch is moved to the OFF position, the DCM
will not communicate with the network. If you move
the switch to the ON position, the DCM will
communicate with the network, but not until the
master sends another request for communication.
This does not operate like the reset switch on
many personal computers.
21
21
Installing the DCM and Starting the Network
NOTE: The DCM can not be mounted in a base that does not contain a
D2--240/250 CPU. Also, the DCM requires 300mA of +5V base power. Make sure
you will not exceed the available base power budget by installing the DCM.
See the DL205 User Manual for complete details on power budget
calculations.
To insert the module into the base, align the circuit board(s) with the grooves on the
top and bottom of the base. Push the module straight into the base until it is firmly
seated in the backplane connector. Once the module is inserted into the base, push
in the retaining clips (located at the top and bottom of the module) to firmly secure the
module to the base.
Align module to
slots in base and slide in
Push the retaining
clips in to secure the module
to the DL205 base
Connect the Cables Make sure you have all the cables connected and that all the network devices have
the same communication parameters (baud rate, parity, etc).
If you’re using The PLC master station must contain an RLL program that has the appropriate RX or
DirectNET... WX instructions necessary to initiate the communications. (See Appendix B for
details on the RX and WX instructions). The master station CPU must be in Run
mode in order to execute the communications program. The slave station CPUs do
not absolutely have to be in Run mode because the DCM will still transfer the data.
Whether you put the slave stations in Run mode depends on your application
requirements.
22
Installing the DCM and Starting the Network
If you’re using an Connect the cables and follow the procedures outlined in the documentation that
Operator Interface or came with your host computer software or operator interface. You’ll have to execute
Host Computer... your host or operator interface program before the communications can begin. For
example, if you’re using DirectSOFT, you can just specify the station address and
start working!
If you’re using Connect the cables and follow the procedures outlined in your MODBUSâ Host
MODBUSâ... software package to start the communications. See Appendix C for more
information on using the D2--DCM with MODBUS protocol.
23
23
Verification & Troubleshooting
Troubleshooting If the DCM does not seem to be working correctly, check the following items. These
Quick Steps items represent the problems found most often.
1. Cable and connections. Incorrectly wired cables and loose connectors
cause the majority of problems. Verify you’ve selected the proper cable
configuration and check the cable making sure it is wired correctly.
2. Dipswitch settings. Make sure you’ve set the DCM to match the
communication parameters required by the master station (DCM, operator
interface or host computer).
3. Incorrect protocol. Make sure your operator interface or personal computer
software can use the DirectNET, Hostlink, CCM2, or MODBUSâ RTU
protocol.
4. Communications program. Check the communications program for errors.
Consult the DirectNET Manual or the manuals that came with your host
computer software or operator interface for details.
NOTE: If you need more in depth troubleshooting, see the chart on the next page. It
provides several different indicator patterns that may help identify your exact
problem.
25
25
Verification & Troubleshooting
Troubleshooting Chart The following chart identifies the indicator status, possible cause, and corrective
off on flash action for a wide variety of commonly found problems.
Power, OK, and MA are on. 1.The master station CPU not in RUN.
EQ does not come on when 2.Online/Offline switch is set to OFF. 3.
the communications program is 3.Communications program is not
executed. correct.
3.Cable problem.
Power, OK, and MA are on. 1.Settings are different.
EQ stays on, and NK flashes. 6.
EQ & HD come on
26
Verification & Troubleshooting
20 20
8 RS422 RTS+ 8
21 21
9 RS422 RTS-- 9
22
RS422 RTS+
22 RS422 TXD+
1.Check the amount and type of data
10 10
23 23 RS422 TXD--
11 RS422 RTS-- 11
8. being transferred. (Byte count may be 12
24
RS422 CTS+ 12
24 RS422 RXD--
set to 1 or an odd number for a data 13
25
RS422 CTS-- 13
25 RS422 RXD+
Point-to-Point These diagrams show the D2--DCM being used as the network master. The cable diagram is
RS232C the same when the D2--DCM is being used as a slave (for those connections that could have
DCM as Master the master/slave roles reversed). This is true for the:
S D2--DCM to D4--DCM connection
S D2--DCM to DL305 CPU with RS232C DCU (or a D3--340 bottom port)
S D2--DCM to DL405 CPU connection when used with a D4--450 CPU.
DL340 CPU
RS232C RS232C
2 TXD 2 TXD 1 GND
1 RXD DL240 CPU
3 RXD 2 TXD 3 RXD 2 5V Bottom Port
4 RTS 3 RTS 4 RTS 3 RXD
or
5 CTS 4 GND 5 CTS 4 TXD
5 RTS DL450 CPU
4P4C Phone Jack
7 GND 7 GND 6 GND
6P6C
Point-to-Point These diagrams show the DCM being used as a slave to a personal computer. The personal
RS232C computer would have to be capable of issuing commands using either DirectNET or
PC as Master MODBUS RTU protocol. A good example of this would be a personal computer running an
Excel spreadsheet connected through our DirectSOFT DDE Server. (Sounds complicated,
but it’s really quite simple! Check out our catalog for more information on our powerful DDE
Server.)
Master Slave
DL205 DCM
RS232C RS232C
2 RXD 2 TXD 2 TXD 2 TXD
3 TXD 3 RXD 3 RXD 3 RXD
5 GND 7 GND 7 GND 7 GND
1 DCD 4 RTS 4 RTS 4 RTS
4 DTR 5 CTS 5 CTS 5 CTS
6 DSR 6 DSR
7 RTS 8 DCD
8 CTS 20 DTR
9-pin
Connector
Point-to-Point These diagrams show the D2--DCM being used as the network master. The cable diagram is
RS422 the same when the D2--DCM is being used as a slave (for those connections that could have
DCM as Master the master/slave roles reversed). This is true for the:
S D2--DCM to D4--DCM connection
S D2--DCM to DL405 CPU connection when used with a D4--450
DL405 CPU
Bottom Port
DL405
DCM
(or DL205
DCM)
Connect to any
of these devices
DL305
with
RS422 DCU
DCM DCM
RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 10 +RTS 10 +RTS 10 +RTS
DL405
11 --RTS 11 --RTS 11 --RTS 11 --RTS
DCM
12 +CTS 12 +CTS 12 +CTS 12 +CTS
DL405 or
13 --CTS 13 --CTS 13 --CTS 13 --CTS
CPU DL205
14 +OUT 9 +IN Port 14 +OUT 17 +IN DCM
15 --OUT 10 --IN 15 --OUT 16 --IN or
16 --IN 16 --OUT 16 --IN 15 --OUT
17 +IN 14 +OUT 17 +IN 14 +OUT DL305
w/DCU
Note: Pin numbers are correct. Pins are Note: Pin numbers are correct. Pins are
shown out of order because it makes the shown out of order because it makes the
drawing easier to comprehend. drawing easier to comprehend.
A--5
Cable Diagrams
DL340 CPU
DL240 CPU
Bottom Port
Connect to any
of these devices
DL450 CPU
Phone Jack
Slave Connection
25-pin Connector
Note: RTS/CTS are looped back internally
Slave Connection
DCM FA--UNICON Converter
DCE
1 GND DL240 CPU
RS422 2 5V Bottom Port
7 GND 7 GND 3 RXD
TXD 2
10 +RTS 10 +RTS or
RXD 3 4 TXD
11 --RTS 11 --RTS 5 RTS
GND 7 DL450 CPU
12 +CTS 12 +CTS 6 GND
DTR 20 Phone Jack
13 --CTS 13 --CTS
6P6C
14 +OUT 14 +IN
15 --OUT 15 -- IN
16 --IN 16 --OUT
17 +IN 17 +OUT
Point-to-Point These diagrams show the DCM being used as a slave to a personal computer. Since most
RS422 personal computers come with RS232C communication cards, we have shown an
PC as Master FA--UNICON RS232/422 Converter being used to convert the signal. The personal computer
would have to be capable of issuing commands using either DirectNET or MODBUS RTU
protocol.
Master Slave
DL205 DCM
DL205
Personal Computer FA--UNICON Converter DCM
DTE DCE
RS232C GND 7 7 GND
2 RXD 2 TXD
3 TXD +RTS 10 10 +RTS
3 RXD
5 GND --RTS 11 11 --RTS
7 GND
1 DCD +CTS 12 12 +CTS
20 DTR
4 DTR 25 +5V --CTS 13 13 --CTS
RS422
6 DSR +IN 14 14 +OUT
7 RTS -- IN 15 15 --OUT
8 CTS --OUT 16 16 --IN
+OUT 17 17 +IN
9-pin DTE
Connector
DL205
Personal Computer FA--UNICON Converter DCM
DTE DCE
RS232C GND 7
2 TXD 2 TXD 7 GND
+RTS 10 10 +RTS
3 RXD 3 RXD
--RTS 11 11 --RTS
7 GND 7 GND
+CTS 12 12 +CTS
4 RTS 20 DTR
25 +5V --CTS 13 13 --CTS
5 CTS RS422
6 DSR +IN 14 14 +OUT
8 DCD -- IN 15 15 --OUT
20 DTR --OUT 16 16 --IN
+OUT 17 17 +IN
Multidrop These diagrams show the D2--DCM being used as the network master for a network
RS422 consisting of various PLC stations using DCMs, CPU ports, etc..
DCM as Master
Master
DL205
DCM Master DL405 DCM DL205 DCM DL305 w/ DCU
RS422 RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 10 +RTS 10 +RTS 10 +RTS
11 --RTS 11 --RTS 11 --RTS 11 --RTS
12 +CTS 12 +CTS 12 +CTS 12 +CTS
13 --CTS 13 --CTS 13 --CTS 13 --CTS
DL305
RS422 DCU
Master
DL205 DL405 CPU DL405 CPU DL405 CPU
DCM Master Port #2 Port #2 Port #2
RS422 RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 19 +RTS 19 +RTS 19 +RTS
11 --RTS 18 --RTS 18 --RTS 18 --RTS
12 +CTS 11 +CTS 11 +CTS 11 +CTS
13 --CTS 23 --CTS 23 --CTS 23 --CTS
Slaves 15
16
--OUT
--IN
10
16
--IN
--OUT
10
16
--IN
--OUT
10
16
--IN
--OUT
17 +IN 14 +OUT 14 +OUT 14 +OUT
DL405 CPU
Bottom Port 22 +OUT
23 --OUT
24 --IN
25 +IN
DL405 CPU
Bottom Port
REV A
A--8
Cable Diagrams
DL205 DCM
Master Master
RS422 — — —
GND 7
+RTS 10
--RTS 11
+CTS 12
--CTS 13
+OUT 14
--OUT 15
Slaves --IN 16
+IN 17
+OUT 22
--OUT 23
--IN 24
+IN 25
Termination
Resistor
DL340
CPU
+IN 14
--IN 15
--OUT 16
+OUT 17
DL450
Phone Jack DL240 CPU
Bottom Port
or DL450 Note: RTS/CTS are looped back internally
Phone Jack
FA--UNICON Converter
GND 1
DCE
5V 2 RS232 RS422
GND 7
RXD 3 2 TXD
+RTS 10
TXD 4 3 RXD --RTS 11
RTS 5 7 GND +CTS 12
GND 6 20 DTR --CTS 13
+IN 14
--IN 15
--OUT 16
+OUT 17
RS422
Multidrop These diagrams show how to connect a network of D2--DCMs to a personal computer.
RS422
PC as Master
Master Slaves
22 +OUT 22 +OUT
9-pin DTE 23 --OUT 23 --OUT
Connector 24 --IN 24 --IN
25 +IN 25 +IN
Note: 1. You must connect pin 20 to pin 25 25-pin Connector 25-pin Connector
2. RTS/CTS are looped back internally
and do not require external wiring. Termination Resistor
5 CTS 25 +5V
+IN 14 14 +OUT 14 +OUT
6 DSR --IN 15 15 --OUT 15 --OUT
8 DCD --OUT 16 16 --IN 16 --IN
20 DTR +OUT 17 17 +IN 17 +IN
22 +OUT 22 +OUT
23 --OUT 23 --OUT
24 --IN 24 --IN
25 +IN 25 +IN
25-pin DTE Note: 1. You must connect pin 20 to pin 25 25-pin Connector 25-pin Connector
Connector 2. RTS/CTS are looped back internally
and do not require external wiring. Termination Resistor
REV A
A--10
Cable Diagrams
DV--1000 Cable Use the following cable diagram to connect a DV--1000 to DL205 DCM. This is still a
simple master/slave connection, but the DV--1000 is the master and initiates the
data exchange with the DCM.
DV--1000 DCM
D2--DCM
DV--1000
RS232C
1 GND TXD 2
2 5V RXD 3
3 RXD RTS 4
4 TXD CTS 5
5 RTS +5V 6
6 GND GND 7
Phone Jack style connector
(RJ12) on the back of the 6P6C
DV--1000
25-pin Connector
RLL Communications
B
Programs
B--2
RLL Communications Programs
This example reads 3 bytes of data from Slave Address #1,(starting at Y0), into the Master
PLC starting at V40600 (Control Relays).
CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4
Communication Error
SP125 Set
Y50
Master PLC
V40600
15 8 0
V40601 DCM
16pt 16pt
Output Output Communication Error
Y0 Y20 SP131 Set
-- --
Y17 Y37 Y50
LDA
O40600
Master Starting Address
Type of
WX Operation
Y0
Slave Starting Address
The following paragraphs explain each operation and provide some helpful hints to make
your programs simple and easy to follow.
B--4
RLL Communications Programs
In this example, we’re showing a simple example with only three slaves. In this case the
address conversions are very simple. Check the Conversion Hints shown above for a more
complex example.
Slot of DCM
CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4
0
LD
K0260
Slave Address
X10 = 3
X1 = C
B--5
B--5
RLL Communications Programs
The number of bytes specified also depends on the type of data you want to obtain. For
example, the DL405 Input points can be accessed by V-memory locations or as X input
locations. However, if you only want X0 -- X27, you’ll have to use the X input data type
because the V-memory locations can only be accessed in 2-byte increments. The following
table shows the byte ranges for the various types of DirectLOGICä products.
15 0
MSB V40601 LSB
15 0
B--7
B--7
RLL Communications Programs
NOTE: If you are exchanging data with a DL305 system, it is important to understand how to
reference the DL305 memory locations. For example, the DL305 I/O points are accessed with
the V data type or the GY data type, even though the DL305 does not actually have those data
types present in the CPU. The table on the next page provides a detailed cross reference.
Master PLC
Y0 -- Y17
15 8 0
Y20 -- Y37
Slave Address 1
Slave Address 2
B--8
RLL Communications Programs
D3--330P CPUs
To get ...
TMR/CNT Current Values use... TMR / CNT Status Bits use... Data Registers use...
R600 V0 CT600 GY6001 R401, R4002 V100
R601 V1 CT601 GY6011 R403, R4022 V101
——— ——— ——— ——— ——— ———
R677 V77 CT677 GY6771 R777, R7762 V237
To get ...
I/O Points use... Control Relays use... Shift Registers use...
IO 000 GY01 CR160 GY1601 SR200 GY400
IO 001 GY11 CR161 GY1611 SR201 GY401
——— ——— ——— ——— ——— ———
IO 157 GY1571 CR277 GY2771 SR277 GY477
To get ...
Stage Status Bits use... Example:
LD
Read current value from R400 K0201
S0 GY2001
into memory location V2000.
S1 GY2011 LD Read 2
This is a tricky one. If you’re just K0002 bytes
——— ——— obtaining I/O or Timer/Counter
values, the task is fairly simple. LDA Store in
S177 GY2771 O2000 V2000
But when you work with data
registers, it’s a bit more involved. RX
To get R400,
1 . You must have CPU firmware V1.9 Here’s why. V100 use V100
or greater to use the GY data type To get R400, you examine the
in the RX/WX instructions. LD Load
table and find that you must use V2000 V2000
2 . Two bytes of DL305 register data reference V0. You will also notice
are returned with one DL205 V that you always get at least 2 ANDD Use ANDD
memory location. registers! So you get R400 and KFF to remove
R401
R401. Since you only want the
contents of R400, you have to OUT Store the
Vxxxx result in a
add some ladder logic to get rid of different V
the data from R401. location
B--9
B--9
RLL Communications Programs
DL205
0 1 2 3 4 5 6 7
CPU
B--10
RLL Communications Programs
Multiple Read and If you’re using multiple reads and writes in the
Write Interlocks RLL program, you have to interlock the Interlocking Relay
routines to make sure all the routines are SP124 C0
executed. If you don’t use the interlocks, then LD
the CPU will only execute the first routine. This K0201
is because the DCM can only handle one
transaction at a time. LD
In the example, once the RX instruction is K0003
executed, C0 is set. When the DCM has
finished the communication task, the second LDA
routine is executed and C0 is reset. O40600
If you’re using RLL PLUS, you can just put each
routine in a separate program stage to ensure RX
proper execution. In most all cases, RLL PLUS
Y0
is a much more efficient way to create an
automation program. C0
The DirectNET manual provides a master / Set
slave example with both RLL and RLL PLUS
program descriptions.
Interlocking Relay
SP124 C0
LD
K0201
LD
K0003
LDA
O40400
WX
Y0
C0
RST
Using the DCM
C
with MODBUS
C--2
Using the DCM with MODBUS
Introduction
How Does the DCM The DL205 DCM can be used as a slave interface to a network using the MODBUS RTU
work with MODBUS? protocol. To use the DCM with MODBUS, your host software must send a MODBUS function
code and a MODBUS address to specify a PLC memory location that is understood by the DCM.
Host sends a
MODBUS request...
It would be quite difficult for us to discuss all of the ins and outs of MODBUS in this document.
Instead, our goal with this Appendix is to:
D provide a quick overview of MODBUS Data Types and Function Codes.
D show you how to determine the proper MODBUS address necessary to allow
your host software to access various memory locations in the DL205 system.
One key point to remember is that not all host software packages using MODBUS drivers
operate exactly the same way. That is, there a couple of different ways to achieve the same
result, especially when it comes to specifying the address for the PLC memory location you
need. Therefore, it is important that you follow the instructions for your particular software
package or network master.
C--3
C--3
Using the DCM with MODBUS
MODBUS Function Your host software package reads or writes information by sending a MODBUS function code
Codes Supported to the DCM. The following table provides a description of the MODBUS function codes
supported by the DL205 DCM.
NOTE: The maximum MODBUS secondary address supported by the DCM is 60 (5A hex).
MODBUS Data Types You are probably accustomed to seeing data types like X input, Y output, C control relay, V
Supported memory data registers, etc. for the various types of memory in a DL205 system. For example,
if you need to know the status of Y12, then you ask for Y12. MODBUS does not use these
same data types, so you have to determine which MODBUS data type corresponds to the
PLC memory location that you need. The following table will help.
If Your Host Software Many host software packages allow you to specify the MODBUS data type and the MODBUS
Requires the Data address that corresponds to the PLC memory location. This is the easiest method, but not all
Type and Address... packages allow you to do it this way. The various MODBUS data types were presented
earlier, but they have been included again in the following table.
The actual equation used to calculate the address depends on the type of PLC data you are
using. The PLC memory types are split into two categories for this purpose.
D Discrete -- X, SP, Y, CR, S, T (contacts), C (contacts)
D Word -- V, Timer current value, Counter current value
In either case, you basically just convert the PLC octal address to decimal and add the
appropriate MODBUS address (if required). The table below shows the exact equation used
for each group of data.
Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Data Type
location V2100.
V2100 = 1088 decimal
1. Find V memory in the table. 1088 + Hold. Reg. = Holding Reg. 1088
2. Convert V2100 into decimal (1088).
3. Use the MODBUS data type from the table.
Example 2: Y20 Find the MODBUS address for output Y20. PLC Addr. (Dec) + Start Addr. + Data Type
1. Find Y outputs in the table. Y20 = 16 decimal
2. Convert Y20 into decimal (16). 16 + 2048 + Coil = Coil 2064
3. Add the starting address for the range
(2048).
4. Use the MODBUS data type from the table.
Example 3: T10 Find the MODBUS address to obtain the PLC Address (Dec.) + Data Type
Current Value current value from Timer T10.
T10 = 8 decimal
1. Find Timer Current Values in the table. 8 + Input Reg. = Input Reg. 8
2. Convert T10 into decimal (8).
3. Use the MODBUS data type from the table.
Example 4: C54 Find the MODBUS address for Control Relay PLC Addr. (Dec) + Start Addr. +Data Type
C54.
C54 = 44 decimal
1. Find Control Relays in the table. 44 + 3072 + Coil = Coil 3116
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Use the MODBUS data type from the table.
C--6
Using the DCM with MODBUS
If Your Host Software Some host software packages do not allow you to specify the MODBUS data type and
Requires an Address address. Instead, you specify an address only. This method requires another step to
ONLY determine the address, but it’s still fairly simple. Basically, MODBUS also separates the data
types by address ranges as well. So this means an address alone can actually describe the
type of data and location. This is often referred to as “adding the offset”. One important thing
to remember here is that two different addressing modes may be available in your host
software package. These are:
D 484 Mode
D 584/984 Mode
We recommend that you use the 584/984 addressing mode if your host software
allows you to choose. This is because the 584/984 mode allows access to a higher number
of memory locations within each data type. If your software only supports 484 mode, then
there may be some PLC memory locations that will be unavailable. The actual equation used
to calculate the address depends on the type of PLC data you are using. The PLC memory
types are split into two categories for this purpose.
D Discrete -- X, GX, SP, Y, CR, S, T (contacts), C (contacts)
D Word -- V, Timer current value, Counter current value
In either case, you basically just convert the PLC octal address to decimal and add the
appropriate MODBUS addresses (as required). The table below shows the exact equation
used for each group of data.
DL205 Memory Type QTY1 PLC Range MODBUS 484 Mode 584/984 MODBUS
(Dec.) (Octal) Address Range Address Mode Data Type
Address
For Discrete Data Types ... Convert PLC Addr. to Dec. + Start of Range + Appropriate Mode Address
Inputs (X) 320 X0 -- X477 2048 -- 2367 1001 10001 Input
Special Relays (SP) 144 SP0 -- SP137 3072 -- 3167 1001 10001 Input
SP540 -- SP617 3280 -- 3471
Outputs (Y) 320 Y0 -- Y477 2048 -- 2367 1 1 Coil
Control Relays (CR) 256 C0 -- C377 3072 -- 3551 1 1 Coil
Timer Contacts (T) 128 T0 -- T177 6144 -- 6271 1 1 Coil
Counter Contacts (CT) 128 CT0 -- CT177 6400 -- 6527 1 1 Coil
Stage Status Bits (S) 512 S0 -- S777 5120 -- 5631 1 1 Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Appropriate Mode Address
Timer Current Values (V) 128 V0 -- V177 0 -- 127 3001 30001 Input Reg
Counter Current Values (V) 128 V1000 -- V1177 512 -- 639 3001 30001 Input Reg
V Memory, user data (V) 1024 V2000 -- V3777 1024 -- 2047 4001 40001 Hold Reg.
V Memory, user data (V) 256 V4000 -- V4377 2048 -- 2303 4001 40001 Hold Reg.
non--volatile
V Memory, system (V) 106 V7620 -- V7737 3984 -- 4063 4001 40001 Hold Reg.
V7746 -- V7777 4070 -- 4095
C--7
C--7
Using the DCM with MODBUS
Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Mode Address
584/984 Mode location V2100.
V2100 = 1088 decimal
1. Find V memory in the table. 1088 + 40001 = 41089
2. Convert V2100 into decimal (1088).
3. Add the MODBUS starting address for the
mode (40001).
Example 2: Y20 Find the MODBUS address for output Y20. PLC Addr. (Dec) + Start Address + Mode
584/984 Mode 1. Find Y outputs in the table. Y20 = 16 decimal
2. Convert Y20 into decimal (16). 16 + 2048 + 1 = 2065
3. Add the starting address for the range
(2048).
4. Add the MODBUS address for the mode
(1).
Example 3: T10 Find the MODBUS address to obtain the PLC Address (Dec.) + Mode Address
Current Value current value from Timer T10.
T10 = 8 decimal
484 Mode 1. Find Timer Current Values in the table. 8 + 4001 = 4009
2. Convert T10 into decimal (8).
3. Add the MODBUS starting address for the
mode (40001).
Example 4: C54 Find the MODBUS address for Control Relay PLC Addr. (Dec) + Start Address + Mode
584/984 Mode C54.
C54 = 44 decimal
1. Find Control Relays in the table. 44 + 3072 + 1 = 3117
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Add the MODBUS address for the mode
(1).
Using the DCM
D
with Modems
D--2
Using the DCM with Modems
Introduction
There are some applications that require a remote connection to the PLC. These remote
connections require you to use a modem to communicate between the Personal Computer and
the PLC system. Although this manual tends to focus on using the DCM in networking
applications, there are a tremendous number of people who simply use the DCM as an extra
communications port. The DCM provides additional flexibility in configuration and baud rates
compared to the built-in port on the CPU, so it’s a logical choice for use with a modem.
It is not hard to establish remote communications with a PLC system via a modem. This
appendix provides some guidelines to help you setup the communications link.
System Components There are typically two types of communication paths for modem applications.
D Telephone modems
D Radio modems
Both serve the same basic function, which is to enable data communications over a long
distance. However, your choice really depends on your particular application. Radio modems
are typically more expensive and can be more difficult to use in some situations. But if you
don’t have phone lines or dedicated cabling in the area, your choice may be restricted to radio
modems anyway.
For the DL205 family of products, any system that is designed to handle modem
communications usually contains components from the following list.
D PLC System with DCM
D PLC System with DL240 CPU bottom port
D Personal Computer
D 2 modems (one on each end)
Telephone
Modems
Radio
Modems
D--3
D--3
Using the DCM with Modems
Possible Even though most all systems have one or more of the system components, there are a
Configurations couple of ways that they can be used.
PC Master — Some people need to use modems between a personal computer and the PLC
system so that they can do remote programming and/or data monitoring with PC-based
software, such as DirectSOFT or WonderWare. In this case, the personal computer is the
master and the PLC system is the remote slave station.
DCM Master — In other situations, you may be using a DCM as the remote communications
master instead of a personal computer. If you are considering this, you must have one of the
following situations.
D You have a Leased-line — You can have a leased (dedicated) phone line if
telephone modems are used. A dedicated line is necessary because the DCM
cannot issue the dial-up commands, so the carrier must be active at all times.
D You have a Radio Link — You also have the option of using radio modems.
This is useful when it is not feasible to have hard-wired communications cabling
between the remote stations.
In either case, the cabling and setup requirements share many similarities, which are
covered later in this Appendix.
Choosing a Modem With today’s prices, it is possible to buy a high quality modem for a reasonable price. We
recommend that you buy a modem not mainly because it is inexpensive, but because it has a
good reputation. This will save you money (and time) over the long run. We also suggest that
you spend a few extra bucks to get an external modem if possible. The internal versions
typically do not have status indicator lights and are much harder to debug when things don’t
work correctly.
We have established communications between a personal computer and our PLCs while
using the following brands of modems:
D US Robotics Sportster (not the Sportster Si)
D MultiTech
D Hayes Optima
D Supra
We use the US Robotics Sportster modems here in our office and they work quite well. We
also think the MultiTech modems are great, but they are more expensive. There are also
some modems that we have encountered problems with when used with our equipment.
Because of this, we do not recommend BOCA modems.
D--4
Using the DCM with Modems
Baud Rate & Parity It is important that you select the following communications parameters when you use the
DCM for remote communications.
D 9600 baud
D NO parity
The important part is the parity setting. Most popular modems cannot transmit an odd
number of bits per character. If parity is enabled, each character would consist of 1 start bit, 8
data bits, 1 parity bit and 1 stop bit, making a total of 11 bits per character. Since this is an odd
number, the modem would not work properly. You can experiment with the baud rate settings,
but make sure all components are set to the same baud rate.
Delay Time If you’re using a radio modem, you may have to set a delay time for the communications. This
time is necessary to allow time for the radio to “key-up” before the data is transmitted. You
must match the settings required by your modem.
ON
D--5
D--5
Using the DCM with Modems
Delay Time You may recall that we mentioned a couple of scenarios where you may be using a DCM
Considerations for connected to a modem as the master station and a DL240 CPU connected to a modem as the
Networks with DL240 slave station. If you have such a situation, there are a couple of things that you may have to
Slaves take into consideration.
If you are using a radio modem connected to V7632
the bottom port of a DL240, you will probably
have to set a delay time for the CPU port. You MSB LSB
can do this by loading a BCD value into X X X X
V7632. This is a special V-memory location
Delay Codes Baud Rate Codes
that can define the baud rate and/or time
delay for the bottom port. We recommend that 00 No delay 00: 300 baud
you do this on the first scan within your ladder 01 2ms delay 01: 1200 baud
program. The following diagram provides a 02 5ms delay 02: 9600 baud
table of the settings and an example of some 03 10ms delay 03: 19200 baud
simple setup logic that could be included in 04 20ms delay
your RLL program.
05 50ms delay
06 100ms delay
07 500ms delay
Example:
First Scan Only, Load Delay Time of 5ms & Baud Rate of 19200 for Bottom Port
V7632
Delay Time Baud Rate Delay Codes Baud Rate Codes
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 00 No delay 00: 300 baud
0 0 0 0 00 1 0 0 0 0 0 0 1 1 0 01 2ms delay 01: 1200 baud
02 5ms delay 02: 9600 baud
03 10ms delay 03: 19200 baud
0 2 0 3 04 20ms delay
05 50ms delay
06 100ms delay
Setup Rung 07 500ms delay
SP0 Use the LD (Load) instruction to load the BCD codes for
LD each parameter into the accumlator. The number 0203 is
K0203 just the code used for our particular example, which is a
5ms delay, 19.2K baud.
Connecting a Modem Your choice of cable for connecting the modem to your personal computer depends on
to your Personal whether you have a 9-pin port or a 25-pin port on your COM card. In either case, it’s usually
Computer easier to buy a cable rather than make one. We suggest you check your modem
documentation to see what they recommend. If your documentation does not recommend a
cable, you could try the following sources.
D Radio Shack
D Black Box Catalog
Some of you techno-wizards will want to build your own cable. Here are the pinouts that are
usually required. Again, check your modem documentation for the exact requirements.
NOTE: The 9-pin diagram has confused many techno--wizards over the years because it
shows TXD -- TXD and RXD -- RXD connections. Believe it or not this is actually correct.
Why? Because the 9-pin connector conforms to the IBM standard for DTE and the 25-pin
side conforms to the standard for DCE. This results in the slight confusion over the
terminology used to label the TXD and RXD pins.
PC Modem PC Modem
RS232C RS232C
2 RXD 2 TXD 2 TXD 2 TXD
3 TXD 3 RXD
3 RXD 3 RXD
5 GND 7 GND 7 GND 7 GND
1 DCD 8 DCD 4 RTS 4 RTS
4 DTR 20 DTR
5 CTS 5 CTS
6 DSR 6 DSR 6 DSR 6 DSR
7 RTS 4 RTS 8 DCD 8 DCD
8 CTS 5 CTS 20 DTR 20 DTR
9 RI 22 RI
9-pin
Connector
Connecting a Modem The PLC lies on the other end of the remote communication link and will typically have a DCM
to the DCM as the communications interface. Just as you needed a cable to connect your personal
computer to the modem, you’ll also need a cable between the PLC system (DCM) and the
receiving modem. Since the DCM and the modem have 25-pin connectors, use the
straight-through 25-pin to 25-pin cable diagram shown here.
25--pin to 25-pin Cable 25--pin to 25-pin Cable
Phone Modem DCM Radio Modem DCM
RS232C RS232C
2 TXD 2 TXD 2 TXD 2 TXD
3 RXD 3 RXD 3 RXD 3 RXD
7 GND 7 GND 7 GND 7 GND
4 RTS 4 RTS 4 RTS 4 RTS
5 CTS 5 CTS 5 CTS 5 CTS
6 DSR 6 DSR
8 DCD 8 DCD
20 DTR 20 DTR
You can use our D3--DSCBL--2 with a null modem adapter to quickly build a cable that can
connect the modem to the D2--DCM. You’ll need the following parts, which can be obtained at
most any electronics store. Since there seems to be a Radio Shack on every corner, we’ve
included their part numbers.
D D3--DSCBL--2 — PLCDirect DL305 Programming Cable
D 26--1496 — Radio Shack DB25 Null Modem Adapter
D 26--1388 — Radio Shack DB25 Male to DB9 Male Adapter
25 to 25 Pin
Null Modem
Adapter
9 to 25 Pin
Adapter
9 Pin Adapter
Connecting a Modem Use the cable diagram shown here to connect 25--pin to 25-pin Cable
to the DL240 a modem to the bottom port of a DL240 CPU.
DL240 Modem
RS232C
4 TXD 2 TXD
3 RXD 3 RXD
1 GND 7 GND
2 5V 4 RTS
5 RTS 5 CTS
6 GND 6 DSR
25-pin Connector
D--8
Using the DCM with Modems
Choose a COM Port First, you’ll need to choose the personal computer COM port that you want to use. We
suggest that you choose the same COM port that you normally would use with your
DirectSOFT Programming Software. If you have a mouse, it usually occupies COM 1, so
start by trying COM 2.
Configure the A modem will allow you to select certain operating characteristics by sending it special
Modems modem commands. The settings usually differ slightly between the local modem (at the
master) and the remote modem (at the slave). For the remote modem, make sure you use the
modem documentation to determine the setup commands to:
D Use auto answer (for the remote modem)
D Use baud rate adjustment (or select a fixed serial port baud rate of 9600)
D Turn off any data compression
D Use error correction
Write these settings to the modem’s non-volatile RAM. By saving it in non-volatile RAM, you
don’t have to worry about a power cycle wiping out your setup routine. Here are the setup
strings for several popular brands of modems.
D Hayes Optima 9600
Remote: AT&F N0 S37=9 S46=136 &C1 &K0 &Q5 &R1 &Y0 S0=1 &W0
Local: AT&F N0 S37=9 S46=136 &C1 &K0 &Q5 &R1 &Y0 &W0
D MultiTech MT932EAB
Remote: Start with the default DIP switch settings, but then set switch 1
to force DTR ON and set switch 5 to select Auto Answer mode.
AT&W1&F1
ATQ0$BA0$MB9600$SB9600
AT&E3&E7&E12&E14&W0
Local: (Uses the same settings except uses Q1 instead of Q0)
AT&W1&F1
ATQ1$BA0$MB9600$SB9600
AT&E3&E7&E12&E14&W0
D Supra FaxModem 14.4k V.32
Remote: AT&F0 N0 S37=9 %C0 \N3 &C1 &K0 &Q5 &R1 &Y0 S0=1
&W0
Local: AT&F0 N0 S37=9 %C0 \N3 &C1 &K0 &Q5 &R1 &Y0 &W0
D USRobotics Sportster
Remote: Start with the default DIP switch settings, but then set switch 1
to force DTR ON and set switch 5 to select Auto Answer
AT&F1&B0&N6&D0&H1&R1&I0&K0&W0
NOTE: Assuming you have used the above command to connect to the remote site, you will
have to exit the terminal program completely. This is extremely important. You will have to
exit the terminal program completely. Otherwise, your software package, such as
DirectSoft, will not be able to get control of the communications port and you will not be able
to go online with the PLC.
If You are Using a If you are using the DCM as a master connected directly to a modem, then you must be using
DCM as Master one of two types of modems. In either case, there are no special procedures that are
required.
D Leased-line Modem — If you have a leased line modem, it tries to establish
communications with the remote modem as soon as the power is turned on.
The carrier stays active as long as the power is on. (That’s why they call them
“dedicated” lines.) After they are connected, the RX or WX instruction in the
RLL program controls the data transmission between the stations. That is,
when the RX or WX is executed, it automatically causes the DCM’s Request to
Send line to go high. The modem responds with a Clear to Send and the
communications begins.
D Radio Modems — If you have a radio modem, the RX or WX instruction in the
RLL program controls the data transmission between the stations. That is,
when the RX or WX is executed, it automatically causes the DCM’s Request to
Send line to go high. The modem responds with a Clear to Send and the
communications begins. The radio modem broadcasts the request and
(hopefully) the remote station will receive it and respond accordingly.
D--10
Using the DCM with Modems
NOTE: When you are done with the connection, you will have to exit DirectSOFT, restart the
terminal program, and disconnect the modem using the +++ (wait for OK response) and ATH
<CR>command sequence.