This Errata Sheet contains corrections or changes
made after the publication of this manual.
Product Family: DL205 / DL305
Manual Number D2-DCM
Revision and Date 2nd Edition; February 2003
Change to Table of Contents
There is a typo on the first page of the Table of Contents. “Install” is spelled “Insall” for the section named “Install the D2-DCM”.
Change to Page 2. Introduction
Add the following note to this page:
NOTE: The D3-DCM module is only supported by the D3-350 processor only.
Change to Page 7. Specifications
In the Operating Specifications table, revise the “CPU Required” entry. It should say:
D2-240 (firmware V1.8 or later), D2-250-1 and D2-260
Date: September 2018
Change to Page 11. Building the Cable
The NOTE at the bottom of the page is incorrect. Only the D2-230 and D2-240 CPUs support RS232 only. D2-250(-1) and
D2-260 CPUs support RS232/422/485 without extra hardware.
Change to Page 12. Building the Cable (continued)
Change the refererence in the first paragraph to “Belden 9855” cable to “AutomationDirect L19772-1 (Belden 8102)
or equivalent”.
Change to Page 13. Building the Cable (continued)
In the first paragraph, change the last sentence to “For example, AutomationDirect L19772-1 (Belden 8102) or equivalent has a
nominal characteristic impedance of 100 ohms”.
In the top wiring drawing (“Line-to-Line Termination for the D2-DCM”), change both “120 Ohm Resistor” callouts to “100 Ohm
Resistor”.
In the bottom wiring drawing, change the “65 Ohm Resistors” callouts to “51 Ohm Resistors”.
In the top drawing, move the termination resistor on the left connector (Master) from the 24-25 pins to the 16-17 pins.
Page 1 of 3
Page 2
Errata Sheet
Errata Sheet
This Errata Sheet contains corrections or changes
made after the publication of this manual.
The Change to Page 17. D2–DCM Switch Settings
Add the following note near the first bullet point, “DirectNET Slave”:
NOTE: Although it is not listed in the switch settings, K-sequence is also available whenever the D2–DCM is set for DirectNET
Slave operation.
Change to Page 18. D2–DCM Switch Settings (continued)
There is an error in the last paragraph, “Response Delay Time”. The first sentence refers to switch “SW4”. It should say “SW5”.
(SW4 is used for firmware updates.)
Change to Page 21. Install the D2–DCM and Starting the Network
Add the following note to this page:
D3-DCM cannot be mounted in the farthest slot from the CPU in a base. It requires 300 mA of +9 V base power. Make sure you
will not exceed the available base power budget by installing the D3-DCM.
See the DL305 User Manual for complete details on power budget calculations.
Changes to Appendix A. Cable Diagrams
Page A-4. Point-to-Point RS422 D2–DCM as Master
In the lower left drawing there are some pin number errors for the DL405 port 1 25-pin connector. The correct pin numbers are:
19 +RTS (not 10 as shown)
18 -RTS (not 11 as shown)
11 +CTS (not 12 as shown)
23 -CTS (not 13 as shown)
In the top set of drawings, change the callout that says “DL405 CPU Bottom Port” to DL405 Port 1”
Page 2 of 3
Page 3
Errata Sheet
Errata Sheet
This Errata Sheet contains corrections or changes
made after the publication of this manual.
Change to Appendix A. Cable Diagrams (continued)
Page A-7. Revisions were made to both drawings:
Master
DL205
D2–DCM MasterD4–DCMD2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
Slaves
DL405 or
DL205 DCM
Termination Resistor
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
DL205
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
17
+IN
16
–IN
15
–OUT
14
+OUT
22
+OUT
23
–OUT
24
–IN
25
+IN
RS422
7 GND
10
11
12
13
17
16
15
14
22
23
24
25
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
+OUT
–OUT
–IN
+IN
D3-422-DCU
224SR224SR
10
11
12
13
17
16
15
14
22
23
24
25
7 GND
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
+OUT
–OUT
–IN
+IN
Master
D3-422-DCU
Slaves
DL405 CPU
Port 1
Termination Resistor
DL405 CPU
Port 1
DL205
D2–DCM Master
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
DL405 CPU
Port #1
7 GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
Termination Resistor
DL405 CPU
Port #1
RS422224SR224SR
7 GND
19
18
11
23
9
10
16
14
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
DL405 CPU
Port #1
7 GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
Termination Resistor
DL405 CPU
Port 1
Change to Appendix A. Cable Diagrams (continued)
Page A-8. Change the call-out that says “DL240 CPU Bottom Port or DL450 Phone Jack” to:“DL450 Port 2 (RJ12)”
Page 3 of 3
Page 4
D2–DCM
Data Communications
Module
Manual Number D2–DCM–M
Page 5
WARNING
Thank you for purchasing automation equipment from Automationdirect.com. 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 are 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.
Our products are not fault–tolerant and are not designed, manufactured or intended for use or resale as on–line control
equipment in hazardous environments requiring fail–safe performance, such as in the operation of nuclear facilities,
aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in
which the failure of the product could lead directly to death, personal injury, or severe physical or environmental
damage (”High Risk Activities”). Automationdirect.com specifically disclaims any expressed or implied warranty of
fitness for High Risk Activities.
For additional warranty and safety information, see the Terms and Conditions section of our Desk Reference. If you
have any questions concerning the installation or operation of this equipment, or if you need additional information,
please call us at 770–844–4200.
This publication is based on information that was available at the time it was printed. At Automationdirect.com 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. Automationdirect.com
disclaims any proprietary interest in the marks and names of others.
No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of
Automationdirect.com Incorporated. Automationdirect.com retains the exclusive rights to all information
included in this document.
Page 6
AVERTISSEMENT
Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.comE. Nous tenons à ce que
votre nouvel équipement d’automatisation DirectLOGIC fonctionne en toute sécurité. Toute personne qui installe ou
utilise cet équipement doit lire la présente publication (et toutes les autres publications pertinentes) avant de l’installer ou de
l’utiliser.
Afin de réduire au minimum le risque d’éventuels problèmes de sécurité, vous devez respecter tous les codes locaux et
nationaux applicables régissant l’installation et le fonctionnement de votre équipement. Ces codes diffèrent d’une région à
l’autre et, habituellement, évoluent au fil du temps. Il vous incombe de déterminer les codes à respecter et de vous assurer
que l’équipement, l’installation et le fonctionnement sont conformes aux exigences de la version la plus récente de ces
codes.
Vous devez, à tout le moins, respecter toutes les sections applicables du Code national de prévention des incendies, du
Code national de l’électricité et des codes de la National Electrical Manufacturer’s Association (NEMA). Des organismes de
réglementation ou des services gouvernementaux locaux peuvent également vous aider à déterminer les codes ainsi que
les normes à respecter pour assurer une installation et un fonctionnement sûrs.
L’omission de respecter la totalité des codes et des normes applicables peut entraîner des dommages à l’équipement ou
causer de graves blessures au personnel. Nous ne garantissons pas que les produits décrits dans cette publication
conviennent à votre application particulière et nous n’assumons aucune responsabilité à l’égard de la conception, de
l’installation ou du fonctionnement de votre produit.
Nos produits ne sont pas insensibles aux défaillances et ne sont ni conçus ni fabriqués pour l’utilisation ou la revente en tant
qu’équipement de commande en ligne dans des environnements dangereux nécessitant une sécurité absolue, par
exemple, l’exploitation d’installations nucléaires, les systèmes de navigation aérienne ou de communication, le contrôle de
la circulation aérienne, les équipements de survie ou les systèmes d’armes, pour lesquels la défaillance du produit peut
provoquer la mort, des blessures corporelles ou de graves dommages matériels ou environnementaux (”activités à risque
élevé”). La société Automationdirect.comE nie toute garantie expresse ou implicite d’aptitude à l’emploi en ce qui a trait
aux activités à risque élevé.
Pour des renseignements additionnels touchant la garantie et la sécurité, veuillez consulter la section Modalités et
conditions de notre documentation. Si vous avez des questions au sujet de l’installation ou du fonctionnement de cet
équipement, ou encore si vous avez besoin de renseignements supplémentaires, n’hésitez pas à nous téléphoner au
770–844–4200.
Cette publication s’appuie sur l’information qui était disponible au moment de l’impression. À la société
Automationdirect.comE, nous nous efforçons constamment d’améliorer nos produits et services. C’est pourquoi nous
nous réservons le droit d’apporter des modifications aux produits ou aux publications en tout temps, sans préavis ni quelque
obligation que ce soit. La présente publication peut aussi porter sur des caractéristiques susceptibles de ne pas être offertes
dans certaines versions révisées du produit.
La présente publication peut contenir des références à des produits fabriqués ou offerts par d’autres entreprises. Les
désignations des produits et des entreprises peuvent être des marques de commerce et appartiennent exclusivement à
leurs propriétaires respectifs. Automationdirect.comE nie tout intérêt dans les autres marques et désignations.
Nulle partie de ce manuel ne doit être copiée, reproduite ou transmise de quelque façon que ce soit sans le consentement
préalable écrit de la société Automationdirect.comE Incorporated. Automationdirect.comE conserve les droits
exclusifs à l’égard de tous les renseignements contenus dans le présent document.
Marques de commerce
Tous droits réservés
Page 7
1
Manual Revisions
If you contact us in reference to this manual, please remember to include the revision number.
Title: DL205 Data Communications Module
Manual Number: D2–DCM–M
IssueDateDescription of Changes
Original5/96Original Issue
Rev. A5/98Downsize to spiral
Rev. A
Minor changes
2nd Edition2/03Upgrade with DL06 and DirectSOFT32;
— Introduction
— Building the Communication Cable
— Setting the D2–DCM Switches
— Installing the D2–DCM and Starting the Network
— Verification and Troubleshooting
Data Communications Module, 2nd Edition, 2/03
Page 12
2
Overview
Introduction
The Purpose of
this Manual
Supplemental
Manuals
This manual is designed to allow you to setup
and install your DL205 Data Communications
Module (D2–DCM). This is the only manual
you will need if you are using the D2–DCM as
an extra general purpose communication port
for your DL205 PLC system. If you plan on
using the D2–DCM as a network master or
slave for a DirectNET network, this manual
covers the basic steps for setting up the
D2–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.
Depending on which products you have purchased, there may be other manuals that
are necessary or helpful for your application. These are some suggested manuals:
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.
If you need an additional communications port for your DL205 PLC and you
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.
We strive to make our manuals the best in the industry and rely on your feedback in
reaching our goal. If you cannot find the solution to your particular application, or, if
for any reason you need additional technical assistance, please call us at
770–844–4200.
Our technical support team 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. We also
encourage you to visit our website where you can find technical and nontechnical
information about our products and our company.
www.automationdirect.com
Data Communications Module, 2nd Edition, 2/03
Page 13
Conventions Used
33
Introduction
The “light bulb” icon in the left-hand margin indicates a tip or shortcut.
The “note pad” icon in the left–hand margin indicates a special note.
The “exclamation mark” icon in the left-hand margin indicates a warning or caution.
These are very important because the information may help you prevent serious
personal injury or equipment damage.
Key Topics for
Each Chapter
The beginning of each chapter will list the
key topics that can be found in that
chapter.
1
Data Communications Module, 2nd Edition, 2/03
Page 14
4
Introduction
D2–DCM Hardware
The following diagram shows the major D2–DCM components. The address
selection switches and the communication dipswitches are of special importance.
Online/Offline Switch
Status Indicators
(shown below)
Base Connector
RS232C/RS422
Communication Port
The DL205 Data Communications Module (D2–DCM) is a general purpose
communications interface that can be used in a DL205 system that has a
D2–240/250–1/260 Central Processing Unit (CPU). The D2–DCM cannot be usedwith a DL230 CPU. The module can go in any base slot, except for Slot 0, which is
next to the CPU. This module is primarily used for three reasons.
DAs a network master or slave interface to a DirectNET network
DAs an extra general purpose communications port to connect a personal
computer or operator interface
DAs a network interface to a MODBUS
Module Power: ON
NK: ON if a NAK is
either sent or received
TO: ON if a timeout has
occurred in the D2–DCM
Master Mode:
ON if master
OFF if slave
Address Selection
Switches
DIP Switches for
communications
and protocol parameters
Status Indicators
R
network using the RTU protocol
Self Test Indicator: ON
Send/Receive Enquiry:
FLASHING*
Send/Receive Header:
FLASHING*
Send/Receive Data
Packet: FLASHING*
* During communications only
Data Communications Module, 2nd Edition, 2/03
Page 15
Applications
55
Introduction
As a DirectNET
Interface
The D2–DCM can be used as a network interface for applications that require data to
be shared between PLCs, or between PLCs and an intelligent device (such as a host
computer). The D2–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
DirectNET Masters
Issue requests to slave stations
PC or D2–DCM
master can
communicate with
DirectNET Slaves
Request
Using a D2–DCM as a Network Master
The DL205 D2–DCM can be used with a
D2–240/250–1/260 CPU to serve as a
network master. Your CPU must have
firmware V1.8 or later. It cannot be usedwith a DL230 CPU. (A master is the
network station that initiates requests for
data from other stations on the network).
You simply use special RLL instructions (RX
and WX) inside of your RLL program to
initiate the data exchange. The D2–DCM
takes communication requests issued by
the PLC program instructions and
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 D2–DCM as a Network Slave
The D2–DCM can also be used with a
D2–240/250–1/260 CPU to serve as a
network slave station. It cannot be usedwith a DL230 CPU. In this case, the
D2–DCM “listens” to the network for any
messages that contain the D2–DCM’s
address. The D2–DCM deciphers the
network commands, carries out the
request to read or write data, and sends
confirmation and/or information to the
master station.
DD2–240/250–1/260 CPU (bottom
DD2–240/250–1/260 w/ D2–DCM
DD3–330 or D3–330P w/ DCU
DD3–340 (either port)
DD4–430 (bottom port)
DD4–440 (bottom port)
DD4–450 (phone jack or bottom port)
DAny DL405 CPU w/ D4–DCM
DD2–240/250–1/260
DD3–340 CPU (bottom port)
DAny DL405 CPU w/ D4–DCM
DD4–450 CPU (bottom port)
DHost computer w/DirectSOFT
Slaves respond to the master’s request
Response
Possible Slaves
port)
Possible Masters
w/ D2–DCM
DSData Server
Data Communications Module, 2nd Edition, 2/03
Page 16
6
Introduction
As an Extra
Communication
Port
As an extra communication port, the D2–DCM supports the DirectNET protocol just
like the bottom port on the D2–240/250–1/260 CPU, but at higher baud rates. In
general, if you can connect a device to the bottom port on the D2–240/250–1/260
CPU, then you can also connect the same device to the D2–DCM. These devices
can be a variety of things, such as operator interfaces or personal computers.
Since the D2–DCM does not require any programming, you can simply set the D2–DCM
communication parameters, connect the appropriate RS232C or RS422 cables, and start
transferring data.
Quickly add extra
communication ports*
* Number of D2-DCMs is limĆ
ited by the available power
budget
As a MODBUS
Network Interface
The D2–DCM can be used as a slave interface to connect your DL205 system to a
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
MODBUS Network using RTU Protocol
Network
Slave
DL205 Slave
with D2–DCM
As a slave station....
responding to network reĆ
quests
Network
Slave
Data Communications Module, 2nd Edition, 2/03
Page 17
Specifications
Environmental
Specifications
Operating Temperature32° F to 131° F (0° to 55° C)
Storage Temperature–4° F to 158° F (–20° to 80° C)
Operating Humidity5 to 95% (non-condensing)
Air CompositionNo corrosive gases permitted
VibrationJIS C0040
ShockJIS C0041
Voltage Isolation1500 VAC, 1 minute duration
Insulation Resistance10M ohms at 500 VDC
NoiseNEMA ICS3–304
Operating
Specifications
Power Budget Requirement300ma @ 5 VDC
77
Introduction
Maximum number of moduleslimited only by power budget
CPU RequiredD2–240/250–1/260 minimum
firmware V1.8 or later
Location of moduleCPU base only
any slot except Slot 0 or CPU slot
InterfaceSerial RS232C / RS422
half-duplex, DTE, Asynchronous,
8 bits/character, odd or no parity
Baud Rates300 to 38.4K baud, switch selectable
Maximum DistanceRS232C – 49ft (15 meters)
MODBUS RTU
DiagnosticsAutomatic 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.
Data Communications Module, 2nd Edition, 2/03
Page 18
8
Introduction
Using your D2–DCM– Five Steps
STEP 1. Familiarize yourself with the
communications options of
D2–DCM in the Introduction.
STEP 2. Build the communication cable
that fits your needs.
STEP 3. Set the D2–DCM switches.
(Baud rate, parity, etc).
Cable
Switches
STEP 4. Install the D2–DCM in any slot
except for Slot 0, which is next to
the CPU.
STEP 5. Verify correct network operation
by using the indicators and the
troubleshooting chart.
Install
Verify (Troubleshooting)
Data Communications Module, 2nd Edition, 2/03
Page 19
Building the Cable
Building the Communication Cable
There are several considerations that help determine the type of cable needed for
your D2–DCM application.
1. Will the D2–DCM be physically connected in a point-to-point configuration
or multi-drop configuration?
2. What electrical specification is best for your application? RS232C or
RS422?
3. What is the cable schematic?
4. What are the relevant cable specifications?
5. What installation guidelines are necessary?
The next few pages discuss these considerations in detail.
Tip: If you need a quick test cable you may want to try our FA–CABKIT which allows
you to quickly build several different types of cables. (See page 15 for more
information). If you’re fairly comfortable with network or communications cabling
requirements, see Appendix A for detailed diagrams.
99
Data Communications Module, 2nd Edition, 2/03
Page 20
10
Building the Cable
Consideration 1:
Physical
Configuration
The D2–DCM can be used in either a point-to-point or multi-drop configuration. A
point-to-point connection only has two stations, a master and a slave. Use the
point-to-point configuration to connect a personal computer, an operator interface,
or an intelligent device to a single D2–DCM. You must also use this configuration
when you want to connect a DirectNET master station to a single DirectNET slave
station.
Use the multi-drop configuration to connect one master to two or more slaves (90
slave maximum).
Point to Point
or
DCM
D2–DCM
DL205 MasterDirectNET PLC Slave
Multi-drop
DirectNET SlavesDirectNET
Masters
or
D2–DCM
Data Communications Module, 2nd Edition, 2/03
Page 21
Building the Cable
1111
Consideration 2:
Electrical
Specification
RS232C or RS422
Consideration 3:
Cable Schematics
The D2–DCM can support RS232C or RS422 communication. Your application and
configuration choice will help determine which electrical specification is best for you. If
you are using multi-drop, you must use RS422. If you are using point-to-point, you 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.
Although the network configuration and electrical specification are important, the type of
devices being connected to the D2–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.
Hint: Look at Appendix A to determine a cable possibility. Some of these examples
may need to be combined to design a cable for your application.
NOTE: If you are using the D2–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 D2–DCM and the bottom port of the
DL240 CPU. These are the two most likely combinations that you will use. Notice that the
D2–DCM has two sets of RS422 pins. These pins are internally connected and can make
it easier to wire multidrop connections.
D2–DCM PinoutsD2–240 Bottom Port
RS232C
1
RS232 TXD
RS232 RXD
RS232 RTS
RS232 CTS
+5V+5V
14
2
15
3
16
4
17
5
18
6
19
0V
7
20
8
9
10
11
12
13
RS422 RTS+
21
RS422 RTS–
22
RS422 RTS+
23
RS422 RTS–
24
RS422 CTS+
25
RS422 CTS–
* RS422 pins are internally connected
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.
RS422*
0V
10
11
12
13
1
2
3
4
5
6
7
8
9
14
RS422 TXD+
RS422 TXD–
15
16
RS422 RXD–
17
RS422 RXD+
18
19
20
21
22
RS422 TXD+
RS422 TXD–
23
RS422 RXD–
24
RS422 RXD+
25
PinSignal Definition
10 V
25 V
3RS232C DTE RXD
4RS232C TXD
5Request to Send
60 V
Port 2 Pinouts
1
2
3
4
5
6
Phone Jack
Connector
Data Communications Module, 2nd Edition, 2/03
Page 22
12
Building the Cable
Consideration 4:
Cable Specifications
Consideration 5:
Installation
Guidelines
Although many types of cables may work for your application, we recommend you
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.
Your company may have guidelines for cable installation. If so, you must check those
before you begin the installation. Here are some general things to consider.
DDon’t run cable next to larger motors, high current switches, or
transformers. This may cause noise problems.
DRoute 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.
DConsider redundant cabling if the application data is critical. This allows
you to quickly reconnect all stations while the primary cable is being
repaired.
Cable Shield Grounding — It is important to ground the cable shield to minimize
the possibility of noise. The preferred method is to connect one end of the cable
shield to the connector housing. If noise problems are still present and you have a
good earth ground for the cabinet, you must connect one end of the shield to the
cabinet earth ground. Don’t ground both ends of the shield because this will create
induced noise on the cable.
Step 1: Strip back about 2.5” of the shield.
2.5”
Step 2: Crimp a ring connector onto the shield.
Step 3: Secure the shield to
the connector shell.
Data Communications Module, 2nd Edition, 2/03
Page 23
DirectNET
Slaves
Building the Cable
Multi-drop Termination Resistors — It is important you add termination resistors
at each end of the RS422 line. This helps reduce data errors during data
transmission. You must select resistors that match the cable impedance. For
example, a typical 22 AWG solid conductor cable with 4.5 twists per foot has a typical
impedance of about 120 ohm.
There are two ways to actually connect the resistors.
DLine-to-Line — this method balances the receive data lines (IN+ and
IN–) and requires one resistor at each end of the line. (The cable
diagrams we’ve provided show this method, but you can use either).
DLine-to-Ground — this method also balances the receive data lines, but
common mode noise rejection is improved significantly. This method
requires two resistors at each end of the line. Also, since there are two
resistors, the sum total of both resistors must match the cable
impedance.
The following diagram illustrates the two options.
Line-to-Line Termination for the D2–DCM
Terminate
at Master
120W
Resistor
Master
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
Slave
Last Slave
7 GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
17
+I+IN
16
–IN
15
–OUT
14
+OUT
22
+OUT
23
–OUT
24
–IN
25
+IN
120W
Resistor
1313
Terminate
at Last Slave
Line-to-Ground Termination for the D2–DCM
Master
62W
Resistors
7 GND
10
11
12
13
14
15
16
17
22
23
24
25
+RTS
–RTS
+CTS
–CTS
+OUT
–OUT
–IN
+IN
+OUT
–OUT
–IN
+IN
Last SlaveSlave
7 GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
62W
Resistors
Data Communications Module, 2nd Edition, 2/03
Page 24
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 purchase
amplifiers from several sources. The Black Box catalog is one of many good places
to start; they sell direct. Call 1–800–555–1212 and ask the 800 directory assistance
operator for their phone number. You can also look for a amplifier supplier on the
internet. One web site to look at is www.idealsolution.com, or search for other RS422
amplifier web sites. The following diagram illustrates some instances where an
amplifier is necessary.
Serial Slave Connection
1-16 Slave Stations
Master
Station
SlaveSlaveSlaveSlave
Parallel Slave Connection
RS422
Amp
Master
Station
RS422
Amp
RS422
Amp
Slave
1-16 Slave Stations
RS422
Amp
SlaveSlaveSlaveSlave
RS422
Amp
SlaveSlaveSlaveSlave
RS422
Amp
SlaveSlaveSlaveSlave
Data Communications Module, 2nd Edition, 2/03
RS422
Amp
Page 25
Building the Cable
1515
A Quick Test Cable
AutomationDirect 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 D2–DCM, just follow these
steps.
1. Plug the appropriate D-sub connector onto the D2–DCM.
2. Plug the appropriate D-sub connector onto the other device you are
connecting to the D2–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.
Build A Test Cable In 30 Seconds
1.Attach Universal Cable Adapter to the D2–DCM
2.Attach another Universal Cable Adapter to the
Device which will connect to the D2–DCM
3.Attach the Universal Cable
Universal 9 pin
D–sub connector
Cable Kit Contains one (1) each of:
RJ12 to RJ12
nonĆshielded cable
RJ12 to RJ11
nonĆshielded cable
Phone jack to 9 pin
female D–sub connector
25 pin
Phone jack to 9 pin
D–sub connector
Universal 25 pin
D–sub connector
Phone jack to 15 pin
D–sub connector
9 Pin
Universal 25 pin
D–sub connector
Data Communications Module, 2nd Edition, 2/03
Page 26
16
Setting the Switches
Setting the D2–DCM switches
The D2–DCM has two banks of dipswitches that allow you to select the communication
parameters necessary for your application. In quite a few cases, you may not have to change
the switches at all. The D2–DCM comes set from the factory for:
If you’re using a host computer or operator interface as the master station you should set the
D2–DCM to match the master station parameters. Check the documentation that came with
your computer or operator interface panel to determine the available communication
parameters.
You’ll need to know the following things.
DBaud rate
DParity settings
DProtocol required
Your operator interface must use one of the following protocols.
DDirectNET
DK-sequence
DHostlink (DirectNET was called Hostlink on the old TIt or Simaticr TI products.
Some Operator Interface manufacturers may still refer to it this way.)
DMODBUS RTU
If you’re using the D2–DCM as a DirectNET interface, you’ll need to know whether the
D2–DCM is being used in a master station, slave station, or peer station. Once you’ve
determined how the D2–DCM will be used, proceed with the dipswitch settings.
D2–DCM as Slave
Data Communications Module, 2nd Edition, 2/03
D2–DCM as Master
D2–DCM as PeerD2–DCM as Peer
Page 27
Setting the Switches
1717
D2–DCM
Switch Settings
ON
Once again, the switches should be set at the factory for the following type of operation.
If these settings are acceptable, then you can go ahead and install the D2–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 D2–DCM circuit boards. These dipswitches are used to select the communications
settings. The following diagram shows the switch locations and their purpose.
Switch Positions
Protocol12
DirectNET SlaveOFF OFF
DirectNET MasterOFF ON
DirectNET Peer ON OFF
MODBUS RTUON ON
Switch Positions
Baud123
300ON OFF OFF
600 OFF ON OFF
1200ON ON OFF
2400 OFF OFF ON
4800ON OFF ON
9600 OFF ON ON
19200 ON ON ON
38400 OFF OFF OFF
COM Timeout Enable
Hexadecimal Mode
Switch Positions
Time*678
0 OFF OFF OFF
2ON OFF OFF
5 OFF ON OFF
10ON ON OFF
20 OFF OFF ON
50ON OFF ON
100 OFF ON ON
500ON ON ON
*Delay time in milliseconds
NO Parity
Set to OFF
Delay Time
SW3
OFF ON
SW5
OFF ON
Network
1
2
3
4
1
2
3
4
5
6
7
8
Protocol
COM Timeout Disable
ASCII Mode
Baud Rate
ODD Parity
Self Test
Data Communications Module, 2nd Edition, 2/03
Page 28
18
Setting the Switches
Protocol Selection:Positions 1 and 2 on SW3 select the D2–DCM protocol and the master
or slave settings. The D2–DCM primarily uses two protocols, DirectNET and MODBUS
RTU protocol. Here’s some information to help you choose.
Communications Port for DirectSOFT32 Programming: If you plan to program the CPU
through the D2–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 D2–DCM is set for DirectNET slave operation.
Computer or Operator Interface: If you’re using the D2–DCM to connect a computer or
operator interface, check your documentation to see which protocol is being used. Since the
D2–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 D2–DCM for DirectNET Slave operation. Peer to Peer works in Hexadecimal mode only.
DirectNET Master / Slave: In a DirectNET master / slave network, one D2–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 D2–DCM as the network interface.
MODBUS RTU Slave: The D2–DCM can also be a MODBUS slave (in the RTU or HEX
mode). The D2–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:
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 D2–DCM. There areeight 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 D2–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
D2–DCM with a radio modem. If you are using the D2–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.
Position 3 on SW3 selects the communication timeout. For most
Data Communications Module, 2nd Edition, 2/03
Page 29
Setting the Switches
1919
Address Selection
Switch
The D2–DCM station address is set by the two
rotary switches located on one of the D2–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 D2–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 D2–DCM as a master, make sure
you select address 0.
Even though the D2–DCM address is set in
hexadecimal, it’s a good idea to remember the
decimal equivalent. This is because the decimal
address is used most often. For example, a RLL
communications program, the DirectSOFT32
Programming Software, and our DSData Server all
use the decimal equivalent of the HEX address. It’s
easy to convert from hex to decimal.
Example: Switches set for 3C
HEX Format
0 1 2 3 4 5 6 7 8 9 A B C D E F
10 11 12 13 14 15
X10
X1
HEX 3C
3 x 16 = 48
C = 12+= 60 decimal
Warning: The D2–DCM address switch settings are only read at power up. If you want to
change the address, you must remove the module from the base to access the switches.
Your system can be damaged if you install or remove system components before
disconnecting the system power. To minimize the risk of equipment damage, electrical
shock, or personal injury, always disconnect the system power before installing or removing
any system component.
Data Communications Module, 2nd Edition, 2/03
Page 30
20
Setting the Switches
Online / Offline
Switch
On the front of the unit, just to the left of the LEDs,
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 D2–DCM, make
sure this switch is in the ON position.
In the OFF position, this switch logically
disconnects the D2–DCM from the network (just
as if you pulled the cable from the connector).
Once this switch is moved to the OFF position, the
D2–DCM will not communicate with the network. If
you move the switch to the ON position, the
D2–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.
Data Communications Module, 2nd Edition, 2/03
Page 31
Install the D2–DCM/Starting the Network
Install the D2–DCM and Starting the Network
2121
Install the D2–DCM
The D2–DCM can go in any slot of a DL205 base except Slot 0, which is right next to
the CPU. The D2–DCM will not work in Slot 0.
If you’re using a D2–DCM as the network interface in a PLC master station,
remember to make a note of the slot location. (You will have to refer to this address at
some point.)
NOTE: The D2–DCM can not be mounted in a base that does not contain a
D2–240/250–1/260 CPU. Also, the D2–DCM requires 300mA of +5V base power.
Make sure you will not exceed the available base power budget by installing the
D2–DCM. See the DL205 User Manual for complete details on power budget
calculations.
WARNING: Your system can be damaged if you install or remove system
components before disconnecting the system power. To minimize the risk of
equipment damage, electrical shock, or personal injury, always disconnect the
system power before installing or removing any system component.
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.
Connect the Cables
If you’re using
DirectNET...
Make sure you have all the cables connected and that all the network devices have
the same communication parameters (baud rate, parity, etc).
The PLC master station must contain an RLL program that has the appropriate RX or
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 D2–DCM will still transfer the
data. Whether you put the slave stations in Run mode depends on your application
requirements.
Align module to
slots in base and slide in
Data Communications Module, 2nd Edition, 2/03
Push the retaining
clips in to secure the module
to the DL205 base
Page 32
22
Install the D2–DCM/Starting the Network
If you’re using an
Operator Interface or
Host Computer...
If you’re using
MODBUS...
Connect the cables and follow the procedures outlined in the documentation that
came with your host computer software or operator interface. You’ll have to execute
your host or operator interface program before the communications can begin. For
example, if you’re using DirectSOFT32, you can just specify the station address and
start working!
Connect the cables and follow the procedures outlined in your MODBUS Host
software package to start the communications. See Appendix C for more
information on using the D2–DCM with MODBUS protocol.
Data Communications Module, 2nd Edition, 2/03
Page 33
Verification & Troubleshooting
y
r
Verification and Troubleshooting
If you have used the guidelines shown previously in Step 3, Starting the Network,
you are now ready to verify that the unit is operating properly. Check the D2–DCM
indicators to verify the D2–DCM is operating correctly. The following diagram shows
the proper indicator conditions.
Note: Online/Offline switch has been removed from the drawing for clarity.
Module Power:
ON
NK: ON if a NAK
is either sent or
received
TO: ON if a
timeout has
occurred in the
D2–DCM
MA:
ON if master
OFF if slave
2323
OK: ON if self test is OK
EQ: Send/Receive Enquir
FLASHING*
HD: Send/Receive Heade
FLASHING*
DA: Send/Receive
Data Packet:
FLASHING*
* During Communication only
Data Communications Module, 2nd Edition, 2/03
Page 34
24
Verification & Troubleshooting
Troubleshooting
Quick Steps
If the D2–DCM does not seem to be working correctly, check the following items.
These 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 D2–DCM to match the
communication parameters required by the master station (D2–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.
Data Communications Module, 2nd Edition, 2/03
Page 35
Verification & Troubleshooting
2525
Troubleshooting Chart
offonflash
Master Station IndicatorsSlave Station IndicatorsPossible Cause
Power or OK is off.1.Master PLC power is disconnected
Power and OK are on.
Master indicator is off.
Power, OK, and MA are on.
EQ does not come on when
the communications program is
executed.
Power, OK, and MA are on.
EQ stays on, but NK, TO, or
HD indicators do not come on
at all.
Power, OK, and MA are on.
EQ stays on, and TO flashes.
The following chart identifies the indicator status, possible cause, and corrective
action for a wide variety of commonly found problems.
2.D2–DCM is defective
1.Switch setting on master station is
incorrect
1.The master station CPU not in RUN.
2.Online/Offline switch is set to OFF.
3.Communications program is not
correct.
1.COM Timeout is disabled.
2.RTS and CTS signals are not
looped back on the D2–DCM end
of the cable.
1.RLL Communications program is
incorrect.
1.
2.
3.
4.
5.
Power, OK, and MA are on.
EQ stays on, and NK flashes.
Power, OK, and MA are on.
EQ and HD come on. TO
flashes.
Power, OK, and MA are on.
EQ and HD come on. EQ goes
off. HD stays on, and NK
flashes or stays on.
Power, OK, and MA are on.
DT is on, but NK flashes on
occasion.
Only PW and OKEQ flashes.OR
EQ & NK come onEQ and HD
EQ & HD come onEQ goes off, HD
OR
THEN
flash.
EQ & HD come on
and NK are on
2.Settings are different.
3.Cable problem.
1.Settings are different.
2.Cable problem or Slave is offline.
1.Settings are different.
1.RLL Communications program is
incorrect.
2.Settings are different.
1.Electrical noise.
6.
7.
8.
9.
Data Communications Module, 2nd Edition, 2/03
Page 36
26
Verification & Troubleshooting
Corrective ActionSwitch Settings & Port Pinouts
1.Check the master PLC source power.
1.
2.Replace the D2–DCM.
1.Disconnect the master station PLC power,
2.
3.
4.
5.
6.
7.
8.
9.
remove the D2–DCM and check positions
1 & 2 on SW3.
1.Place the CPU in RUN mode.
2.Set the switch to the ON position.
3.Make sure the RX or WX instruction is
being executed. Check the address,
slot number, and amount and type of
data used in the RX/WX instructions.
1.Disconnect the PLC power, remove the
D2–DCM and check position 3 on SW3.
2.Remove master station connector,
ensure that RTS & CTS are connected
according to the cable diagram.
1.Check the address, slot number, and
amount and type of data used in the
RX/WX instructions.
2.Make sure baud rate, parity, and mode
(HEX/ASCII) match between the
master and slave.
3.Verify that the cable is wired properly.
1.Make sure baud rate, parity, and mode
(HEX/ASCII) match between the
master and slave.
2.Verify that the cable is wired properly.
Also, make sure slave is online.
1.Make sure baud rate, parity, and mode
(HEX/ASCII) match between the
master and slave.
1.Check the amount and type of data
being transferred. (Byte count may be
set to 1 or an odd number for a data
type that requires 2 bytes.)
2.Make sure baud rate, parity, and mode
(HEX/ASCII) match between the
master and slave.
1.Make sure the system has good earth
grounds. Only one end of the cable
shield must be grounded.
2.If you’re using RS232C, try RS422.
COM Timeout Enable
Hexadecimal Mode
NO Parity
Set to OFF
Switch Settings
SW3
Network
Protocol
1
2
COM Timeout Disable
3
ASCII Mode
4
OFF ON
SW5
1
Baud Rate
2
3
ODD Parity
4
Self Test
5
6
Delay Time
7
8
OFF ON
Port Pinouts
RS232 TXD
RS232 RXD
RS232 RTS
RS232 CTS
+5V+5V
0V
RS232C
1
14
2
15
3
16
4
17
5
18
6
19
7
20
8
21
9
22
10
23
11
24
12
25
13
Switch Positions
Protocol12
DirectNET SlaveOFF OFF
DirectNET MasterOFF ON
DirectNET Peer ON OFF
MODBUS RTUON ON
Switch Positions
Baud123
300ON OFF OFF
600 OFF ON OFF
1200ON ON OFF
2400 OFF OFF ON
4800ON OFF ON
9600 OFF ON ON
19200 ON ON ON
38400 OFF OFF OFF
Switch Positions
Time*678
0 OFF OFF OFF
2ON OFF OFF
5 OFF ON OFF
10ON ON OFF
20 OFF OFF ON
50ON OFF ON
100 OFF ON ON
500ON ON ON
*Delay time in milliseconds
RS422*
1
14
RS422 TXD+
2
RS422 TXD–
15
3
16
RS422 RXD–
4
17
RS422 RXD+
5
18
6
19
0V
7
RS422 RTS+
RS422 RTS–
RS422 RTS+
RS422 RTS–
RS422 CTS+
RS422 CTS–
* RS422 pins are internally connected
8
9
10
11
12
13
20
21
22
RS422 TXD+
RS422 TXD–
23
RS422 RXD–
24
RS422 RXD+
25
Data Communications Module, 2nd Edition, 2/03
Page 37
Cable Diagrams
1
A
Page 38
A–2
Cable Diagrams
Point-to-Point
RS232C
D2–DCM as Master
MasterPossible Slaves
Connect to any
of these devices
These diagrams show the D2–DCM being used as the network master. The cable diagram is
the same when the D2–DCM is being used as a slave (for those connections that could have
the master/slave roles reversed). This is true for the:
SD2–DCM to D4–DCM connection
SD2–DCM to DL305 CPU with RS232C DCU (or a D3–340 bottom port)
SD2–DCM to DL405 CPU connection when used with a D4–450 CPU.
DL405 CPU
Bottom Port
DL405 DCM
or
DL205 DCM
DL305 CPU
w/ 232 DCU
D2–DCM
RS232C
2 TXD
3
RXD
4
RTS
5
CTS
7
GND
2 TXD
3
RXD
4
RTS
5
CTS
7
GND
25Ćpin Connector25Ćpin Connector
DL405
CPU
Port #2
or
D4–DCM
or
D2–DCM
or
DL305
w/DCU
MasterPossible Slaves
DL340 CPU
DL240 CPU
Connect to any
Bottom Port
of these devices
D2–DCMD2–DCM
RS232C
2 TXD
3
RXD
4
RTS
5
CTS
7
GND
DL340 CPU
1 RXD
23TXD
RTS
4 GND
4P4C
2 TXD
3
RXD
4
RTS
5
CTS
7
GND
RS232C
DL450 CPU
Phone Jack
1
GND
2
5V
3
RXD
RXD
4
TXD
TXD
5
RTS
GND
6
6P6C
DL240 CPU
Bottom Port
or
DL450 CPU
Phone Jack
25Ćpin Connector
Data Communications Module, 2nd Edition, 2/03
25Ćpin Connector
Page 39
Cable Diagrams
A–3
Point-to-Point
RS232C
PC as Master
These diagrams show the D2–DCM being used as a slave to a personal computer. The
personal computer would have to be capable of issuing commands using either DirectNET
or MODBUS RTU protocol. A good example of this would be a personal computer running an
Excel spreadsheet connected through our DSData Server. (Sounds complicated, but it’s
really quite simple! Check out our catalog for more information on our powerful DSData
Server.)
MasterSlave
Personal ComputerD2–DCM
2 RXD
3
TXD
5
GND
1
DCD
4 DTR5 CTS
6
DSR
7RTS
8 CTS
RS232C
2 TXD
3
RXD
7
GND
4
RTS
DL205 DCM
2 TXD
3
RXD
7
GND
4
RTS
5CTS
6DSR
8DCD
20 DTR
RS232C
D2–DCMPersonal Computer
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
9Ćpin
Connector
25Ćpin Connector
25Ćpin DTE
Connector
25Ćpin Connector
Data Communications Module, 2nd Edition, 2/03
Page 40
A–4
Cable Diagrams
Point-to-Point
RS422
D2–DCM as Master
MasterPossible Slaves
Connect to any
of these devices
D2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+OUT
15 –OUT
16 –IN
17 +IN
These diagrams show the D2–DCM being used as the network master. The cable diagram is
the same when the D2–DCM is being used as a slave (for those connections that could have
the master/slave roles reversed). This is true for the:
SD2–DCM to D4–DCM connection
SD2–DCM to DL405 CPU connection when used with a D4–450
DL405 CPU
Bottom Port
DL405
DCM
(or DL205
DCM)
DL305
with
RS422 DCU
D2–DCM
RS422
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
9
+IN
10 –IN
16 –OUT
14 +OUT
DL405
CPU
Port
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+OUT
15 –OUT
16 –IN
17 +IN
RS422
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
17
+IN
16 –IN
15 –OUT
14 +OUT
D4–DCM
or
D2–DCM
or
DL305
w/DCU
25Ćpin Connector25Ćpin Connector
Note: Pin numbers are correct. Pins are
shown out of order because it makes the
drawing easier to comprehend.
Data Communications Module, 2nd Edition, 2/03
25Ćpin Connector25Ćpin Connector
Note: Pin numbers are correct. Pins are
shown out of order because it makes the
drawing easier to comprehend.
Page 41
Cable Diagrams
A–5
Master
Connect to any
of these devices
D2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+OUT
15 –OUT
16 –IN
17 +IN
Possible Slaves
RS422
DL340 CPU
FA–UNICON RS232/422 Converter
DL240 CPU
Bottom Port
DL450 CPU
Phone Jack
FA–UNICON Converter
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+IN
15 – IN
16 –OUT
17 +OUT
Slave Connection
DCE
2TXD
3
RXD
7
GND
20
DTR
DL340
CPU Port
1 RXD
2
TXD
3
RTS
4
GND
4P4C
25Ćpin Connector
Note: RTS/CTS are looped back internally
D2–DCMFA–UNICON Converter
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+OUT
15 –OUT
16 –IN
17 +IN
25Ćpin Connector
RS422
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14
+IN
15 – IN
16 –OUT
17 +OUT
Note: RTS/CTS are looped back internally
Slave Connection
DCE
2TXD
3
RXD
7
GND
20
DTR
1
2
3
4
5
6
6P6C
GND
5V
RXD
TXD
RTS
GND
DL240 CPU
Bottom Port
or
DL450 CPU
Phone Jack
Data Communications Module, 2nd Edition, 2/03
Page 42
A–6
Cable Diagrams
Point-to-Point
RS422
PC as Master
Master
Personal Computer
DTE
2 RXD
3
TXD
5
GND
1
DCD
4 DTR
6
DSR
7RTS
8 CTS
9Ćpin DTE
Connector
RS232C
These diagrams show the D2–DCM being used as a slave to a personal computer. Since
most personal computers come with RS232C communication cards, we have shown an
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.
Slave
DL205 DCM
FA–UNICON RS232/422 Converter
FA–UNICON Converter
DCE
2 TXD
3
RXD
7
GND
20
DTR
25 +5V
+RTS
–RTS
+CTS
+IN
7GND
10
11
12
13–CTS
14
15– IN
16–OUT
17+OUT
RS422
D2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14 +OUT
15 –OUT
16 –IN
17
+IN
Note: 1. You must connect pin 20 to pin 25
2. RTS/CTS are looped back internally
and do not require external wiring.
Personal ComputerFA–UNICON Converter
DTE
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
6 DSR
8 DCD
20 DTR
25Ćpin DTE
Connector
RS232C
DCE
2 TXD
3
RXD
7
GND
20
DTR
25 +5V
+RTS
–RTS
+CTS
+IN
Note: 1. You must connect pin 20 to pin 25
2. RTS/CTS are looped back internally
and do not require external wiring.
25Ćpin Connector
D2–DCM
7GND
10
11
12
13–CTS
14
15– IN
16–OUT
17+OUT
RS422
7 GND
10
+RTS
11
–RTS
12
+CTS
13 –CTS
14 +OUT
15 –OUT
16 –IN
17
+IN
25Ćpin Connector
Data Communications Module, 2nd Edition, 2/03
Page 43
Cable Diagrams
A–7
Multidrop
RS422
D2–DCM as Master
Master
These diagrams show the D2–DCM being used as the network master for a network
consisting of various PLC stations using D2–DCMs, CPU ports, etc..
Slaves
DL405 or
DL205 DCM
RS422 DCU
DL205
D2–DCM MasterD4–DCMD2–DCM
RS422RS422
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
Termination Resistor
DL305
DL205
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
17
+IN
16
–IN
15
–OUT
14
+OUT
22
+OUT
23
–OUT
24
–IN
25
+IN
RS422
7 GND
10
11
12
13
17
16
15
14
22
23
24
25
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
+OUT
–OUT
–IN
+IN
DL305 w/ DCU
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
17
+IN
16
–IN
15
–OUT
14
+OUT
22
+OUT
23
–OUT
24
–IN
25
+IN
Termination Resistor
Master
Slaves
DL405 CPU
Bottom Port
DL405
CPU
Bottom Port
DL205
D2–DCM Master
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
DL405 CPU
Port #2
7 GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
DL405 CPU
Port #2
RS422RS422RS422
7GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
DL405 CPU
Termination ResistorTermination Resistor
DL405 CPU
Bottom Port
Port #2
7GND
19
+RTS
18
–RTS
11
+CTS
23
–CTS
9
+IN
10
–IN
16
–OUT
14
+OUT
Data Communications Module, 2nd Edition, 2/03
Page 44
A–8
Cable Diagrams
Master
DL340
CPU
Slaves
DL205
D2–DCM
Master
7GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
RS422 — — —
Termination
Resistor
DL240 CPU
Bottom Port
DL450
Phone Jack
DL340
CPU
1RXD
23TXD
RTS
4GND
DL240 CPU
Bottom Port
or DL450
Phone Jack
GND
5V
RXD
TXD
RTS
GND
1
2
3
4
5
6
FA–UNICON Converter
RS232
DCE
2 TXD
3
7
20
RXD
GND
DTR
Note: RTS/CTS are looped back internally
FA–UNICON Converter
RS232
DCE
2 TXD
3
7
20
RXD
GND
DTR
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
RS422
7GND
10
11
12
13
14
15
16
17
RS422
7GND
10
11
12
13
14
15
16
17
Data Communications Module, 2nd Edition, 2/03
Note: RTS/CTS are looped back internally
RS422
Termination Resistor
Page 45
Cable Diagrams
A–9
Multidrop
These diagrams show how to connect a network of D2–DCMs to a personal computer.
RS422
PC as Master
MasterSlaves
FA–UNICON RS232/422 Converter
Personal Computer
2 RXD
3
TXD
5
GND
1
DCD
4 DTR
6
DSR
7RTS
8 CTS
RS232C
9Ćpin DTE
Connector
FA–UNICON Converter
DCEDTE
2 TXD
3
RXD
7
GND
20
DTR
25 +5V
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
7GND
10
11
12
13
14
15
16
17
D2–DCM
RS422
D2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
RS422
D2–DCM
D2–DCM
7 GND
10
11
12
13
14
15
16
17
22
23
24
25
+RTS
–RTS
+CTS
–CTS
+OUT
–OUT
–IN
+IN
+OUT
–OUT
–IN
+IN
Note: 1. You must connect pin 20 to pin 25
2. RTS/CTS are looped back internally
and do not require external wiring.
Personal ComputerFA–UNICON Converter
DCEDTE
2 TXD
3
RXD
7
GND
20
DTR
25 +5V
+RTS
–RTS
+CTS
–CTS
+IN
–IN
–OUT
+OUT
Note: 1. You must connect pin 20 to pin 25
2. RTS/CTS are looped back internally
and do not require external wiring.
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
6 DSR
8 DCD
20 DTR
25Ćpin DTE
Connector
RS232C
25Ćpin Connector
25Ćpin Connector
Termination Resistor
D2–DCM
7GND
10
11
12
13
14
15
16
17
RS422
7 GND
10
11
12
13
14
15
16
17
22
23
24
25
RS422
+RTS
–RTS
+CTS
–CTS
+OUT
–OUT
–IN
+IN
+OUT
–OUT
–IN
+IN
25Ćpin Connector
D2–DCM
7 GND
10
+RTS
11
–RTS
12
+CTS
13
–CTS
14
+OUT
15
–OUT
16
–IN
17
+IN
22
+OUT
23
–OUT
24
–IN
25
+IN
25Ćpin Connector
Termination Resistor
Data Communications Module, 2nd Edition, 2/03
Page 46
A–10
Cable Diagrams
DV–1000 Cable
Phone Jack style connector
(RJ12) on the back of the
DV-1000
Use the following cable diagram to connect a DV–1000 to D2–DCM. This is still a
simple master/slave connection, but the DV–1000 is the master and initiates the
data exchange with the D2–DCM.
DV–1000
DV–1000
1
GND
2
5V
3
RXD
4
TXD
5
RTS
GND
6
6P6C
RS232C
D2–DCM
D2–DCM
2TXD
3
RXD
4
RTS
5
CTS
6+5V
7
GND
25Ćpin Connector
Data Communications Module, 2nd Edition, 2/03
Page 47
RLL Communications
Programs
B
Data Communications Module, 2nd Edition, 2/03
Page 48
B–2
Why are networking instructions needed in your RLL?
RLL Communications Programs
The Master Initiates
Requests
Why Ladder Logic?
Example RLL Program
Communication Error
Since DirectNET is a master/slave network, the master station must initiate requests for
network data transfers. If you’re using a PLC as the master station, you use simple RLL
instructions to initiate the requests.
Since the D2–DCM network interface does not contain a program, you have to use the PLC to
issue the commands to tell the D2–DCM where to read or write data. The D2–DCM gets
information from the PLC and then converts the information into the appropriate DirectNET
commands. The RLL instructions use or identify the following items.
1. Uses the special relays assigned to the slot to control the communications.
2. Slot location of the D2–DCM master and the slave station address. (LD instruction)
3. Amount of data (in bytes, decimal) you want to transfer. (LD instruction)
4. Area of memory to be used by the master. (LDA instruction, see the DL205 User
Manual for a detailed memory map.)
5. Area of memory to be used by the slave, and whether it is a read or write operation.
(RX or WX instruction)
6. Interlocks for communication timing and multiple RX and WX routines.
This example reads 3 bytes of data from Slave Address #1,(starting at Y0), into the Master
PLC starting at V40600 (Control Relays).
Slot 0CPUSlot 1Slot 2Slot 3Slot 4
Master PLC
SetSP125
Y50
Communication Not Busy
SP124
LD
K201
LD
K3
Transfer 3 bytes
LDA
O40600
Master Starting Address
RX
Y0
Slave Starting Address
Slave AddressD2–DCM Slot
Type of Operation
Y0 - Y17
1580
Y20 - Y37
Slave Address 1
Slave Address 2
Data Communications Module, 2nd Edition, 2/03
Page 49
B–3
RLL Communications Programs
This example writes 3 bytes of data from the Master Station (starting at V40600) to Y0 – Y27
in Slave Station #1.
Slot 0CPUSlot 1Slot 2Slot 3 Slot 4
V40600
1580
B–3
Master PLC
Slave Address 1
Slave Address 2
16pt
Output
Y0
-
Y17
16pt
Output
Y20
-
Y37
V40601
DCM
Example RLL Program
Communication Error
Communication Not Busy
SP130
LD
K401
D2–DCM Slot
LD
K3
Transfer 3 bytes
LDA
O40600
SetSP131
Y50
Slave
Address
Master Starting Address
Type of
WX
Y0
Slave Starting Address
The following paragraphs explain each operation and provide some helpful hints to make
your programs simple and easy to follow.
Operation
Data Communications Module, 2nd Edition, 2/03
Page 50
B–4
Identifying the master and slave locations & addresses
RLL Communications Programs
The first Load (LD) instruction identifies the
slot location of the D2–DCM master and
the address of the slave station.
(Remember, the slot numbers start at 0.)
The constant (K) portion of the instruction
actually contains two pieces (bytes) of
information. The first two digits specify the
D2–DCM master location and the second
two digits specify the slave station address.
It is necessary to specify both the master
slot location and slave address because
you can have more than one D2–DCM
master in the base and you can have up to
90 slave stations for each master.
Conversion Hints!
Valid Slot Range: 0–7
Valid Slave Address: 1–90
Example
Master in Slot: 2
Slave Address: 3C HEX (60 decimal)
Convert the HEX address to decimal
0123456789ABCDEF
10 11 12 13 14 15
HEX
DEC0123456789
HEX 3C
3 x 16 = 48C = 12+= 60 decimal
NOTE: The LD instruction K value is entered in decimal, but the D2–DCM master and slave
addresses are in HEX. The HEX addresses must be converted to their decimal equivalent for
this instruction. See the conversion hints above.
This example is showing three slaves. In this case the address conversions are simple.
Check the Conversion Hints shown above for a more complex example.
Slot of D2–DCM
LD
K260
Slave Address
Slave 1
Slot 0CPUSlot 1 Slot 2 Slot 3 Slot 4
0
Slave 2Slave 60
X10 = 3
X1 = C
Data Communications Module, 2nd Edition, 2/03
Page 51
RLL Communications Programs
Specifying the amount of data to transfer
The second LD instruction indicates the
amount of data that needs to be transferred (in
bytes, 128 maximum). You have to specify the
amount of data in complete bytes. For
example, Y0 – Y27 would be three bytes of
data. There are 24 bits for the output range of
Y0–Y27 (these I/O addresses are in octal).
From the charts below we see that we can
obtain 8 bits per byte for this type of memory.
Therefore, 24 bits yields 3 bytes, of 8 bits each.
The charts below can be very helpful. Notice
that the different PLC families do not always
use the same types of memory or the same
byte boundaries. For example, the DL305 does
not use a separate data type for input and
output points.
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.
Example:
3 bytes of data to be transferred
B–5
B–5
LD
K201
LD
K3
Number of Bytes
in decimal
DL 205 / 405 MemoryBits per unitBytes
V memory
T / C current value
Inputs (X, GX, SP)81
Outputs
(Y, C, Stage, T/C bits)
Diagnostic Status81
DL305 MemoryBits per unitNumber of
Data registers
T / C accumulator
I/O, internal relays, shift
register bits, T/C bits,
stage bits
Diagnostic Status
(5 word R/W)
16
16
81
bytes
8
16
11
1610
2
2
1
2
Data Communications Module, 2nd Edition, 2/03
Page 52
B–6
Designating the master station memory area
RLL Communications Programs
The Load Address (LDA) instruction specifies
the V memory area of the master that will be
used. This is the starting address. Additional
sequential locations may be used, depending
on the number of bytes that are being
transferred. Since all DL405 data is mapped
into V memory, you can easily access the data
you need.
If you are reading information from the slave
station, this is the destination area, or, the area
where the master will store the information.
If you are writing information to the slave
station, this is the source area, or, the area
where the master will obtain the information
that will be transferred to the slave.
Example:
V memory location 40600 will be the starting point of the data
transfer area for the master. The following locations will be used to
store the data.
Letter “O”
specifies an
Octal Address
LD
K201
LD
K3
LDA
O40600
V memory
Address
MSBLSB
MSBLSB
NOTE: Since V memory words are always 16 bits, you may not always use the whole word.
For example, if you only specify 3 bytes and you are reading Y outputs from the slave, you will
only get 24 bits of data. In this case, only the 8 least significant bits of the last word location will
be modified. The remaining 8 bits are not affected.
V40600
015
V40601
015
Data Communications Module, 2nd Edition, 2/03
Page 53
RLL Communications Programs
B–7
Identifying the slave station memory area to read or write
B–7
The Read Network (RX) or Write Network
(WX) is the last instruction in the routine. Use
the RX if you want to read data from the slave,
or use the WX instruction if you want to write
data to the slave.
You have to specify the data type and the
starting address for the slave. (Remember,
you have to specify a data type that will work
correctly with the number of bytes specified.)
If you use the RX instruction, the data will be
read from the slave starting at the address
specified. If you use the WX instruction, the
data will be written to the slave starting at the
address specified.
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.
Slot 0CPUSlot 1Slot 2Slot 3Slot 4
Data Type
and
Address
Example:
Read from slave starting at Y0.
Master PLC
LD
K201
LD
K3
LDA
O40600
RX
Y0
Y0 - Y17
1580
Y20 - Y37
Slave Address 1
Slave Address 2
Data Communications Module, 2nd Edition, 2/03
Page 54
B–8
g
g
gyp
yg
To get ...
TMR/CNT Current Values
To get ...
To get ...
TMR/CNT Current Values
To get ...
To get ...
1You must have CPU firmware V1.9.
2Two bytes of DL305 register data.
RLL Communications Programs
D3–330 / D3–340 CPUs
use...
R600V0CT600GY600
R601V1CT601GY601
TMR / CNT Status Bits
use...
1
1
— — —— — —— — —— — —— — —— — —
R677V77CT677GY677
I/O Points
IO 000GY0
IO 001GY1
use...Control Relaysuse...Shift Registersuse...
1
1
CR160GY160
CR161GY161
1
1
1
— — —— — —— — —— — —— — —— — —
IO 157GY157
1
CR377GY377
1
D3–330P CPUs
use...
R600V0CT600GY600
R601V1CT601GY601
— — —— — —— — —— — —— — —— — —
R677V77CT677GY677
I/O Points
IO 000GY0
IO 001GY1
use...Control Relaysuse...Shift Registersuse...
1
1
— — —— — —— — —— — —— — —— — —
IO 157GY157
Stage Status Bits
use...
S0GY200
S1GY201
— — —— — —
S177GY277
TMR / CNT Status Bits
CR160GY160
CR161GY161
1
CR277GY277
Example:
Read current value from R400
1
into memory location V2000.
1
If you’re just obtaining I/O or
Timer/Counter values, the task is
fairly simple. But when you work
1
with data registers, it’s a bit more
use...
1
1
1
1
1
1
involved. Here’s why.
or greater to use the GY data type
in the RX/WX instructions.
To get R400, you examine the
table and find that you must use
reference V0. You will also notice
that you always get at least 2
are returned with one DL205 V
memory location.
registers! So you get R400 and
R401. Since you only want the
contents of R400, you have to
add some ladder logic to get rid of
the data from R401.
Data Registers
R401, R400
R403, R402
R777, R776
2
2
2
SR400GY400
SR401GY401
SR577GY577
Data Registers
R401, R400
R403, R402
R777, R776
2
2
2
SR200GY400
SR201GY401
SR277GY477
LD
K201
LD
K2
LDA
O2000
RX
V100
LD
V2000
ANDD
KFF
OUT
Vxxxx
use...
V100
V101
V237
use...
V100
V101
V237
Read 2
bytes
Store in
V2000
To get R400,
use V100
Load
V2000
Use ANDD
to remove
R401
Store the
result in a
different V
location
Data Communications Module, 2nd Edition, 2/03
Page 55
Controlling the communications
RLL Communications Programs
B–9
B–9
Communications
Special Relays
Whenever communication is executed with a
D2–DCM, chances are the communication will
take longer than the actual PLC scan. If the
D2–DCM is busy, another request should not
be initiated until it is finished. Fortunately,
there is an easy solution for this.
There are two SPs for each slot in the CPU
base which are used only with the D2–DCM.
For example, slot 0 has SP120 and SP121.
SP120 is the D2–DCM Busy relay and, when
turned on, indicates the D2–DCM is busy.
SP121 indicates there is a communication
error for slot 0.
You should always use the D2–DCM Busy SP
in your RLL programs to ensure the D2–DCM
is ready.
The communication error SP is optional, but it
is a good way to monitor the communication
status in the RLL program. If you use the
communication error SP, make sure you place
it at the beginning of your communication
routines. This is because the communication
error relay is always reset (turned off)
whenever an RX or WX instruction is
executed.
SP125
Communication Error
SP124
D2–DCM
Busy
Y50
Set
LD
K201
LD
K3
LDA
O40600
RX
Y0
Special Purpose Communication Relays
I/O Slot Location01234567
Communication Busy
Communication Error
N/ASP122 SP124 SP126 SP130 SP132 SP134 SP136
N/ASP123 SP125 SP127 SP131 SP133 SP135 SP137
DL205
0123456
7
CPU
Data Communications Module, 2nd Edition, 2/03
Page 56
B–10
RLL Communications Programs
Multiple Read and
Write Interlocks
If you’re using multiple reads and writes in the
RLL program, the routines need to be
interlocked to be certain that all the routines
are executed. If the interlocks are not used,
then the CPU will only execute the first routine.
This is because the D2–DCM can only handle
one transaction at a time.
In the example, once the RX instruction is
executed, C0 is set. When the D2–DCM has
finished the communication task, the second
routine is executed and C0 is reset.
If you’re using RLL
routine in a separate program stage to ensure
proper execution. In most all cases, RLL
can be a more efficient way to create an
automation program.
The DirectNET manual provides a master /
slave example with both RLL and RLL
program descriptions.
PLUS
, you can just put each
PLUS
PLUS
SP124
SP124
Interlocking Relay
C0
Interlocking Relay
C0
LD
LD
LDA
RX
LD
LD
K201
K3
O40600
Y0
C0
Set
K201
K3
LDA
WX
O40400
Y0
C0
RST
Data Communications Module, 2nd Edition, 2/03
Page 57
RLL Communications Programs
B–11
B–11
Multiple Read and
Write Interlocks
This example is showing three slaves. In this case the address conversions are very simple.
Check the Conversion Hints shown above for a more complex example.
Slot of D2–DCM
LD
K260
Slave Address
Slave 1
Slot 0CPUSlot 1 Slot 2 Slot 3 Slot 4
0
Slave 2Slave 60
X10 = 3
X1 = C
Data Communications Module, 2nd Edition, 2/03
Page 58
Using the D2–DCM
with MODBUS
C
Data Communications Module, 2nd Edition, 2/03
Page 59
C–2
Introduction
Using the D2–DCM with MODBUS
How Does the
D2–DCM work with
MODBUS?
The D2–DCM can be used as a slave interface to a network using the MODBUS RTU protocol.
To use the D2–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 D2–DCM.
Host sends a
MODBUS request...
What's the status of Y0?
... D2–DCM
D2-DCM responds
Y0 is ON"
It would be quite difficult to discuss all of the ins and outs of MODBUS in this document.
Instead, the purpose of this Appendix is to:
Dprovide a quick overview of MODBUS Data Types and Function Codes.
Dhow to determine the proper MODBUS address necessary to allow the 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 are a couple of different ways to achieve the
same result, especially when it comes to specifying the needed address for the PLC memory
location. Therefore, it is important that you follow the instructions for your particular software
package or network master.
responds
with data
Data Communications Module, 2nd Edition, 2/03
Page 60
Using the D2–DCM with MODBUS
C–3
C–3
MODBUS Function
Codes Supported
MODBUS Data Types
Supported
The host software package reads or writes information by sending a MODBUS function code
to the D2–DCM. The following table provides a description of the MODBUS function codes
supported by the D2–DCM.
MODBUS CodeFunctionDL205 Data Types
Available
01Read a group of coilsY, CR, T, CT
02Read a group of inputsX, SP
05Set / Reset a single coilY, CR, T, CT
15Set / Reset a group of coilsY, CR, T, CT
03, 04Read a value from one or
more registers
06Write a value into a single
register
16Write a value into a group
of registers
NOTE: The maximum MODBUS secondary address supported by the D2–DCM is 60 (5A
hex).
You are probably accustomed to seeing data types like X input, Y output, C control relay, V
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.
V
V
V
DL205 Memory TypeQuantity
(Decimal)
Inputs (X)320X0 – X477Input
Special Relays (SP)144SP0 – SP137
Outputs (Y)320Y0 – Y477Coil
Control Relays (CR)256C0 – C377Coil
Timer Contacts (T)128T0 – T177Coil
Counter Contacts (CT)128CT0 – CT177Coil
Stage Status Bits (S)512S0 – S777Coil
Timer Current Values (V)128V0 – V177Input Register
Counter Current Value (V)128V1000 – V1177Input Register
V Memory, user data (V)1024V2000 – V3777Holding Register
V Memory, user data (V)
Non–volatile
V Memory, system (V)106V7620 – V7737
256V4000 – V4377Holding Register
1
PLC Range
(Octal)
SP540 – SP617
V7746 – V7777
Corresponding
MODBUS
Data Type
Input
Holding Register
Data Communications Module, 2nd Edition, 2/03
Page 61
C–4
Determining the MODBUS Address
Using the D2–DCM with MODBUS
There are typically two ways that most host software packages allow you to specify a PLC
memory location. These are:
DBy specifying the MODBUS data type and address.
DBy specifying a MODBUS address only.
If the Host Software
Requires the Data
Type and Address...
DL205 Memory TypeQTY
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type
Inputs (X)320X0–X4772048–2367Input
Special Relays (SP)144SP0–SP137
Outputs (Y)320Y0–Y4772048–2367Coil
Control Relays (CR)256C0–C3773072–3551Coil
Timer Contacts (T)128T0–T1776144–6271Coil
Counter Contacts (CT)128CT0–CT1776400–6527Coil
Stage Status Bits (S)512S0–S7775120–5631Coil
Many host software packages allow you to specify the MODBUS data type and the MODBUS
address that corresponds to the PLC memory location. This is the easiest method, but not all
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.
DDiscrete – X, SP, Y, CR, S, T (contacts), C (contacts)
DWord – V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the
appropriate MODBUS address (if required). The following tables show the exact equation
used for each group of data.
1
(Dec.)
PLC Range
(Octal)
SP540 –SP617
MODBUS
Address Range
3072–3167
3280–3471
MODBUS
Data Type
Input
For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V)128V0–V1770–127Input Register
Counter Current Values (V)128V1000–V1177512–639Input Register
V Memory, user data (V)1024V2000–V37771024–2047Holding Register
V Memory, user data (V)
non–volatile
V Memory, system (V)106V7620–V7737
256V4000–V43772048–2303Holding Register
Data Communications Module, 2nd Edition, 2/03
V7746–V7777
3984–4063
4070–4095
Holding Register
Page 62
Using the D2–DCM with MODBUS
C–5
C–5
(Dec.)
1
PLC Range
(Octal)
SP320 –SP717
V1400–V7377
V10000 – V17777
V7400–V7777
MODBUS
Address Range
3072–3167
3280–3535
768–3839
4096 – 8192
448–768
3840 – 3735
MODBUS
Data Type
Input
Holding Register
Holding Register
DL250–1 Memory TypeQTY
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type
Inputs (X)512X0–X7772048–2560Input
Special Relays (SP)512SP0–SP137
Outputs (Y)512Y0–Y7772048–2560Coil
Control Relays (CR)1024C0–C17773072–4095Coil
Timer Contacts (T)256T0–T3776144–6399Coil
Counter Contacts (CT)128CT0–CT1776400–6527Coil
Stage Status Bits (S)1024S0–S17775120–6143Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V)256V0–V3770–255Input Register
Counter Current Values (V)128V1000–V1177512–639Input Register
V Memory, user data (V)3072
4096
V Memory, system (V)320V700–V777
Data Communications Module, 2nd Edition, 2/03
Page 63
C–6
Using the D2–DCM with MODBUS
Example 1: V2100
Example 2: Y20
Find the MODBUS address for User V
location V2100.
Find the MODBUS address to obtain the
current value from Timer T10.
1. Find Timer Current Values in the table.
2. Convert T10 into decimal (8).
3. Use the MODBUS data type from the table.
Find the MODBUS address for Control Relay
C54.
1. Find Control Relays in the table.
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Use the MODBUS data type from the table.
PLC Address (Dec.) + Data Type
TA10 = 8 decimal
8 + Input Reg. = Input Reg. 8
PLC Addr. (Dec) + Start Addr. +Data Type
C54 = 44 decimal
44 + 3073 + Coil = Coil 3117
Data Communications Module, 2nd Edition, 2/03
Page 64
Using the D2–DCM with MODBUS
C–7
C–7
If the Host Software
Requires an Address
ONLY
Memory TypePLC Range
Some host software packages do not allow you to specify the MODBUS data type and
address. Instead, you specify an address only. This method requires another step to
determine the address, but it is not difficult. Basically, MODBUS also separates the data
types by address ranges as well. 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:
D484 Mode
D584/984 Mode
We recommend that you use the 584/984 addressing mode if the 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.
DDiscrete – X, GX, SP, Y, CR, S, T (contacts), C (contacts)
DWord – V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the
appropriate MODBUS starting address (as required). The following tables show the exact
range used for each group of data.
Discrete Data Types
(Octal)
Address
(484 Mode)
Address
(584/984 Mode)Data Type
Global Inputs (GX)GX0–GX17461001 – 199910001–10999Input
V Memory (Timers)V0 – V3773001/400130001/40001
V Memory (Counters)V1000 – V11773513/451330513/40513
V Memory (Data Words)V1200 – V13773641/464130641/40641
* MODBUS: Function 04 (New Feature)
The DL–250, DL–350 and DL450 will support function 04 read input register (Address
30001). To use function 04, put the number ’4’ into the most significant position (4xxx). Four
digits must be entered for the instruction to work properly with this mode.
1. Refer to your PLC user manual for the correct memory mapping size of your PLC. Some of
the addresses shown above might not pertain to your particular CPU.
2. For an automated MODBUS/Koyo address conversion utility, download the file
modbus_conversion.xls from the www.automationdirect.com website.
The Maximum constant possible is 4128. This
is due to the 128 maximum number of Bytes
that the RX/WX instruction can allow. The
value of 4 in the most significant position of the
word will cause the RX to use function 04
(30001 range).
Data Communications Module, 2nd Edition, 2/03
Page 66
Using the D2–DCM with MODBUS
C–9
C–9
Example 1: V2100
584/984 Mode
Example 2: Y20
584/984 Mode
Find the MODBUS address for User V
location V2100.
1. Find V memory in the table.
2. Convert V2100 into decimal (1088).
3. Add the MODBUS starting address for the
mode (40001).
Find the MODBUS address for output Y20.
1. Find Y outputs in the table.
2. Convert Y20 into decimal (16).
3. Add the starting address for the range
(2048).
4. Add the MODBUS address for the mode
(1).
PLC Address (Dec.) + Mode Address
V2100 = 1088 decimal
1088 + 40001 = 41089
PLC Addr. (Dec) + Start Address + Mode
Y20 = 16 decimal
16 + 2048 + 1 = 2065
Example 3: T10
Current Value
484 Mode
Example 4: C54
584/984 Mode
Find the MODBUS address to obtain the
current value from Timer T10.
1. Find Timer Current Values in the table.
2. Convert T10 into decimal (8).
3. Add the MODBUS starting address for the
mode (3001).
Find the MODBUS address for Control Relay
C54.
1. Find Control Relays in the table.
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Add the MODBUS address for the mode
(1).
PLC Address (Dec.) + Mode Address
TA10 = 8 decimal
8 + 3001 = 3009
PLC Addr. (Dec) + Start Address + Mode
C54 = 44 decimal
44 + 3072 + 1 = 3117
Data Communications Module, 2nd Edition, 2/03
Page 67
Using the D2–DCM
with Modems
D
Data Communications Module, 2nd Edition, 2/03
Page 68
D–2
Introduction
Using the D2–DCM with Modems
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 D2–DCM in networking
applications, there are a tremendous number of people who simply use the D2–DCM as an extra
communications port. The D2–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.
DTelephone modems
DRadio 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.
DDL240 PLC System with D2–DCM
DPLC System with DL250–1/260 CPU bottom port
DPersonal Computer
D2 modems (one on each end)
Telephone
Modems
Data Communications Module, 2nd Edition, 2/03
Radio
Modems
Page 69
Using the D2–DCM with Modems
D–3
D–3
Possible
Configurations
Even though most all systems have one or more of the system components, there are a
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 perform remote programming and/or data monitoring tasks with
PC-based software, such as DirectSOFT32 or a SCADA system. In this case, the personal
computer is the master and the PLC system is the remote slave station.
D2–DCM Master — In other situations, you may be using a D2–DCM as the remote
communications master instead of a personal computer. If you are considering this, you
must have one of the following situations.
DYou have a Leased-line — You can have a leased (dedicated) phone line if
modems are used. A dedicated line is necessary because the D2–DCM cannot
issue the dial-up commands, so the carrier must be active at all times.
DYou 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.
DYou have a MDM–TEL — It has the capability of on contact initiated dialing.
In either case, the cabling and setup requirements share many similarities, which are
covered later in this Appendix.
PC as MasterD2–DCM as
Slave
Choosing a Modem
D2–DCM as
Master
With today’s prices, it is possible to buy a high quality modem for a reasonable price. It is
recommended that you purchase a modem not because it is inexpensive, but because it has
a good reputation. This will save you money (and time) over the long run. It is also suggested
that you spend a few extra dollars to get an external modem if possible. The internal versions
typically do not have status indicator lights and are much harder to debug during setup, or
modem communication failure.
We recommend using AutomationDirect’s MDM–TEL, Industrial Telephone Modem. It is
an external modem which is DIN–rail mounted. This is a rugged industrial telephone modem
which has been designed for operation in electrical enclosures which are installed in harsh
environments. This MDM–TEL supports all standard Hayes AT commands, Fax Class 1 and
Class 2 commands and S–registers, therefore it can be setup as an external modem on any
PC. This industrial modem is compatible with any telecommunications or dial–up networking
software. The MDM–TEL is also fully supported by AutomationDirect’s technical support
team. More detailed information can be located at www.automationdirect.com.
D2–DCM as
Slave
Data Communications Module, 2nd Edition, 2/03
Page 70
D–4
Set the D2–DCM Switches
Using the D2–DCM with Modems
For the most part, we suggest that you follow the setup instructions shown earlier in this
manual. That is, choose the protocol you’re using, set the station address, etc. However,
there are a couple of important differences which are discussed here.
Baud Rate & Parity
Delay Time
It is important that you select the following communications parameters when you use the
D2–DCM for remote communications.
D9600 baud
DNO parity
The parity setting is most important. 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.
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.
Switch Positions
Time*678
0 OFF OFF OFF
2ON OFF OFF
5 OFF ON OFF
10ON ON OFF
20 OFF OFF ON
50ON OFF ON
100 OFF ON ON
500ON ON ON
*Delay time in milliseconds
NO Parity
Set to OFF
Delay Time
(see modem
manual)
SW5
OFF ON
1
2
3
4
5
6
7
8
Baud Rate
(9600 shown)
Switch Positions
Baud123
300ON OFF OFF
600 OFF ON OFF
1200ON ON OFF
2400 OFF OFF ON
4800ON OFF ON
9600 OFF ON ON
19200 ON ON ON
38400 OFF OFF OFF
ON
Data Communications Module, 2nd Edition, 2/03
Page 71
Using the D2–DCM with Modems
D–5
D–5
Delay Time
Considerations for
Networks with DL240
Slaves
A couple of scenarios have been mentioned where you may be using a D2–DCM connected
to a modem as the master station and a DL240 CPU connected to a modem as the slave
station. If you have such a situation, there are a couple of things that you may have to 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
can do this by loading a BCD value into
V7632. This is a special V-memory location
which defines the baud rate and/or time delay
for the bottom port. It is recommended that
you do this on the first scan within your ladder
program. The following diagram provides a
table of the settings and an example of some
simple setup logic that could be included in
your RLL program.
Use the LD (Load) instruction to load the BCD codes for
each parameter into the accumlator. The number 0203 is
just the code used for our particular example, which is a
5ms delay, 19.2K baud.
Place the value in memory location V7632
After the parameter setup rung(s) above, we begin the
normal ladder program. Use your actual program for this
and the following rungs.
Y
Data Communications Module, 2nd Edition, 2/03
Page 72
D–6
Choose the Proper Cables
Using the D2–DCM with Modems
The exact cables needed really depend on your particular application. In any case, you will
probably use one or more of the following connections.
DPersonal Computer to modem connection
DModem to D2–DCM connection
DModem to DL240 connection
Connecting a Modem
to your Personal
Computer
Your choice of cable for connecting the modem to your personal computer depends on
whether you have a 9-pin port or a 25-pin port on your COM card. In either case, it’s usually
easier to buy a cable rather than make one. It is suggested that you check your modem
documentation to see what the manufacturer recommends. If your documentation does not
recommend a cable, you could try the following sources.
DRadio Shack
DBlack Box Catalog
Some users prefer to build their own cable. Here are the pinouts that are usually required.
Again, check your modem documentation for the exact requirements.
NOTE: The 9-pin diagram can be confusing because it shows TXD – TXD and RXD – RXD
connections. This is actually correct 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.
9 to 25 Pin Cable
PCModem
2 RXD
3
TXD
5
GND
1
DCD
4 DTR
6
DSR
7RTS
8 CTS
9RI22RI
RS232C
2 TXD
3
RXD
7
GND
8
DCD
20 DTR
6
DSR
4RTS
5 CTS
25 to 25 Pin Cable
PCModem
RS232C
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
6 DSR
8 DCD
20 DTR
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
68DSR
DCD
20 DTR
9Ćpin
Connector
Data Communications Module, 2nd Edition, 2/03
25Ćpin Connector
25Ćpin Connector25Ćpin Connector
Page 73
Using the D2–DCM with Modems
D–7
D–7
Connecting a Modem
to the D2–DCM
The PLC is on the other end of the remote communication link and will typically have a
D2–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
(D2–DCM) and the receiving modem. Since the D2–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
Phone ModemD2–DCM
RS232C
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
68DSR
DCD
20 DTR
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
Radio ModemD2–DCM
25–pin to 25-pin Cable
RS232C
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
68DSR
DCD
20 DTR
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
Tip: You can use our D3–DSCBL–2 with a null modem adapter to quickly build a cable which
can connect the modem to the D2–DCM (also used with the MDM–TEL modem). 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.
DD3–DSCBL–2 — Automationdirect DL305 Programming Cable
D26–1496 — Radio Shack DB25 Null Modem Adapter
D26–1388 — Radio Shack DB25 Male to DB9 Male Adapter
Connecting a Modem
to the DL240
25 to 25 Pin
Null Modem
Adapter
9 to 25 Pin
Adapter
9 Pin Adapter
Use the cable diagram shown here to connect
a modem to the bottom port of a DL240 CPU.
RJ12 to 25-pin Cable
DL240Modem
RS232C
4 TXD
3
RXD
1
GND
2
5V
5RTS
6 GND
RJ12 Connector
25Ćpin Connector
2 TXD
3
RXD
7
GND
4
RTS
5 CTS
68DSR
DCD
20 DTR
Data Communications Module, 2nd Edition, 2/03
Page 74
D–8
Using the MDM–TEL
RS232 Connections
Using the D2–DCM with Modems
The MDM–TEL industrial modem, which is fully supported by AutomationDirect, is a
sensible choice for your application. The MDM–TEL User Manual, which can be downloaded
from the AutomationDirect website, will provide more detailed information.
Use a straight–through or equivalent serial cable to connect the modem’s RS232 female port
(DB9 cable male end) to the RS232 male port on a PC or other “Data Terminal Equipment”
(DTE) device (DB9 cable female end). The diagram below details the pin–out of a
straight–through serial communications cable suitable for connecting a DCE device
(MDM–TEL) to a DTE device (PC, PLC or other device). A sutable DB9 RS–232 cable is
provided with the MDM–TEL.
MODEM RS232 Connections
Cable for MODEM to IBM COM Port
IBM COM Port
(Female DB9)
DCD
1
RXD
2
TXD
3
DTR
4
GND
5
DSR
6
RTS
7
CTS
8
RI
99
MODEM RS232 Port
(Male DB9)
DCD
1
RXD
2
TXD
3
DTR
4
GND
5
DSR
6
RTS
7
CTS
8
RI
MODEM CABLE WIRING
(Standard DB9 Cable)
To simplify the connection between the D2–DCM and the MDM–TEL modem purchase a
D3–DSCBL–2 cable available from AutomationDirect. The null modem adapter supplied
with the modem is required when using this cable.
NOTE: A suitable serial cable and a null modem adapter are provided with the MDM–TEL.
The provided null modem adapter is not required for normal serial communications
between the MDM–TEL and a PC.
The MDM–TEL Setup
Wizard
A modem setup utility is provided on the MDM–TEL CD to help you quickly configure the
modem. In most applications, no knowledge of modem AT commands or S register contents
is necessary. Pre–configured profiles, for common situations, are provided for convenience.
Data Communications Module, 2nd Edition, 2/03
Page 75
D2–DCM as Master
Using the D2–DCM with Modems
D–9
D–9
If You are Using a
D2–DCM as Master
If you are using the D2–DCM as a master connected directly to a modem, then you must be
using one of two types of modems. In either case, there are no special procedures that are
required.
DLeased-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 D2–DCM’s
Request to Send line to go high. The modem responds with a Clear to Send
and the communications begins.
DRadio 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 D2–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.
DMDM–TEL — If you have a MDM–TEL modem, you can have the modem dial a
preconfigured phone number by applying +24VDC to the “From PLC” terminal
on the modem. When the modem connects to another modem and establishes
communications, the modem will then apply +24VDC to the “to PLC” terminal.
This input to the PLC is used to initiate RX or WX commands from the RLL
program. If you do not have either a sourcing DC output or a sinking DC input,
you will need to add a D2–08CDR module to your system in order to control the
signals to/from the modem.
Data Communications Module, 2nd Edition, 2/03
Page 76
D–10
Using DirectSOFT32
Using the D2–DCM with Modems
Creating a Modem
Link
Modem Setup
DirectSOFT32 uses Telephony Application Programming Interface (TAPI) for
modem configurations. The TAPI protocol allows applications to control modems or
other telephony devices for operations such as dialing, answering, or disconnecting
a connection. With the TAPI protocol, all of the modem support is centralized by the
Windows operating system.
By using the TAPI interface, you will use the Windows modem setup utilities to
configure the modem. Configuring the modem in this matter should simplify the
setup process and allow you to select the most recent drivers for your modem.
If there is an existing modem connected to your PC for Internet or fax use, the
modem setup will have to be changed. Some of the features will have to be disabled
in order to communicate to the PLCs. To avoid making any changes to the existing
modem configuration, you will need to install the same modem a second time.
Windows will change the name by adding a number to the end i.e., “
each time you add the same modem to your PC. Refer to your PC and/or modems
installation manual for additional information on setting up your modem.
The first series of examples were performed in Windows 2000 and will illustrate how
to configure the modem connected to your PC. The examples may differ depending
on your Windows operating system.
1. Install the modem if not already installed. Refer to the modem’s
documentation for installation information. If the modem is to be used for
other devices you will need to install it a second time.
2. Once you have successfully installed the modem, you will need to edit its
properties. In the Windows Start field, select Settings > Control Panel.
modemname#2”
Data Communications Module, 2nd Edition, 2/03
Page 77
Using the D2–DCM with Modems
D–11
D–11
3. Select the
modems installed will appear.
4. Choose the Modems tab, then click on P
Phone and Modem Options icon. A dialog box with all available
roperties at the bottom.
5. Choose 9600 as the Maximum Port Speed.
Data Communications Module, 2nd Edition, 2/03
Page 78
D–12
Using the D2–DCM with Modems
6. Select the Advanced tab and click on Change D
efault Preferences.
7. Make Port speed 9600, and choose None for Flow control.
Data Communications Module, 2nd Edition, 2/03
Page 79
Using the D2–DCM with Modems
D–13
D–13
8. Click on the
bits.
9. Click OK until all dialog boxes are closed. This will setup your Windows
driver so DirectSOFT32 can use the Windows TAPI control when
accessing the modem.
Advanced tab and choose 8 Data bits, None Parity and 1 Stop
Data Communications Module, 2nd Edition, 2/03
Page 80
D–14
Using the D2–DCM with Modems
Configuring the
Link
Right Click to
select Add Link
With the modem configured correctly, the link to the PLC can now be established.
The next series of steps will provide the information necessary for configuring the
link using DirectSOFT32.
1. The LinkWizard can automatically determine the majority of the
communication settings; however, you will need to manually setup the
modem specific information (modem type, phone number, etc.). To
activate the Link Wizard in the Launch Window, right click on the Comm
Links icon in the DSLaunch tree and select
Add Link.
2. Select Modem as the device and click the Next button.
Data Communications Module, 2nd Edition, 2/03
Page 81
D–15
Using the D2–DCM with Modems
3. The Configure Link dialog box should now be present. First, choose the
PLC family and the PLC CPU Type. Click once on the appropriate item in
the PLC F
right. Click once to select the appropriate PLC T
name and description.
amily and a list of available CPUs for that family will appear to the
D–15
ype. Also give the link a
4. Click the Port tab of the dialog to display the port configuration dialog. This
dialog allows you to setup up the port to match your modem’s configuration.
Follow the steps below:
DSelect Modem in the Devices column.
DSelect the modem type that you configured earlier in this procedure.
You can verify or modify the settings by clicking on the Pr
button or you can create a new modem by clicking on the Add button.
DEnter the dialing information for your modem.
operties
Data Communications Module, 2nd Edition, 2/03
Page 82
D–16
Using the D2–DCM with Modems
5. Click the Protocol tab to display the communication protocol dialog box.
This dialog allows you to further define the communication parameters.
DSelect the communication protocol to use. Refer to the chart in
Appendix A for a breakdown of the various CPUs, and which protocols
are supported on which ports.
DIf the PLC has been given a node A
address now.
DYou can adjust the time–outs and retries on this dialog, however, the
default values should work for you.
6. Click the Accept button to save this link configuration. The following dialog
will appear. If you click Y
to verify that it can communicate with the PLC connected to the other
modem using the parameters defined in the link. DirectSOFT32 will
hang–up once the connection is made. If you click N
will simply be saved to disk.
es, DirectSOFT32 will dial the modem and attempt
ddress other than 1, enter the new
o, the link configuration
Data Communications Module, 2nd Edition, 2/03
Page 83
D–17
Using the D2–DCM with Modems
7. After successfully creating a link, the Launch Window will have an entry for
the link that you have created. The name that you assigned to the link
should appear in the menu tree under the Comm Links icon. If the link is
highlighted, the main launch window screen will change with all of the links
information displayed.
D–17
Data Communications Module, 2nd Edition, 2/03
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.