D2 - DCM Data Communications Module

Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

D2--DCM

Data Communications Module

Manual Number D2--DCM-M


WARNING

Thank you for purchasing automation equipment from PLCDirectä. We want your new DirectLOGICä automation
equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other
relevant publications) before installing or operating the equipment.

To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate
the installation and operation of your equipment. These codes vary from area to area and usually change with time. It is
your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and
operation is in compliance with the latest revision of these codes.

At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code, and the
codes of the National Electrical Manufacturer’s Association (NEMA). There may be local regulatory or government
offices that can also help determine which codes and standards are necessary for safe installation and operation.

Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and
standards. We do not guarantee the products described in this publication are suitable for your particular application,
nor do we assume any responsibility for your product design, installation, or operation.

If you have any questions concerning the installation or operation of this equipment, or if you need additional
information, please call us at 1--800--633--0405.

This publication is based on information that was available at the time it was printed. At PLCDirectä we constantly
strive to improve our products and services, so we reserve the right to make changes to the products and/or
publications at any time without notice and without any obligation. This publication may also discuss features that may
not be available in certain revisions of the product.

Trademarks
This publication may contain references to products produced and/or offered by other companies. The product and
company names may be trademarked and are the sole property of their respective owners. PLCDirectä disclaims any
proprietary interest in the marks and names of others.

Stage is a trademark of Koyo Electronics Industries Co., LTD. Think & Do Software is a trademark of Think & Do
Software, Inc. Texas Instruments is a registered trademark of Texas Instruments, Inc. TI, TIWAY, Series 305, Series
405, TI305, and TI405 are trademarks of Texas Instruments, Inc. Siemens and SIMATIC are registered trademarks of
Siemens, AG. GE is a registered trademark of General Electric Corporation. Series One is a registered trademark of
GE Fanuc Automation North America, Inc. MODBUS is a registered trademark of Gould, Inc. IBM is a registered
trademark of International Business Machines. MS-DOS and Microsoft are registered trademarks of Microsoft
Corporation. Windows and Windows NT are trademarks of Microsoft Corporation. OPTOMUX and PAMUX are
trademarks of OPTO 22.

Copyright 1998, PLCDirectä Incorporated


All Rights Reserved

No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of
PLCDirectä Incorporated. PLCDirectä retains the exclusive rights to all information included in this document.
1
Manual Revisions
If you contact us in reference to this manual, please remember to include the revision number.

Title: DL205 Data Communications Module


Manual Number: D2--DCM--M

Issue Date Effective Pages Description of Changes


Original 5/96 Cover/Copyright Original Issue
Contents
Manual History
1-1 -- 1-23
A-1 -- A-10
B-1 -- B-10
C-1 -- C-7
D-1 -- D-10
Rev. A 5/98 All Downsize to spiral
Manual Revisions Rev. A
Various Minor changes
1
Table of Contents
Introduction
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Manual Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
DCM Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5,6
As a DirectNET Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
As an Extra Communication Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
As a MODBUS) Network Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Environmental Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Operating Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Using your DCM -- Four Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Building the Communication Cable


Consideration 1: Physical Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Consideration 2: Electrical Specification RS232C or RS422 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Consideration 3: Cable Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Consideration 4: Cable Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Consideration 5: Installation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
A Quick Test Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Setting the DCM Switches


Host Computer or Operator Interface Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
DirectNET Interface Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
DCM Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Address Selection Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Online / Offline Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Installing the DCM and Starting the Network


Install the DCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Connect the Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
If you’re using DirectNET... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
If you’re using an Operator Interface or Host Computer... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
If you’re using MODBUS)... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Verification and Troubleshooting


DCM Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Troubleshooting Quick Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Troubleshooting Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ii
Table of Contents

Appendix A: Cable Diagrams


Point-to-Point RS232C DCM as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--2
Point-to-Point RS232C PC as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--3
Point-to-Point RS422 DCM as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--4
Point-to-Point RS422 PC as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--6
Multidrop RS422 DCM as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--7
Multidrop RS422 PC as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--9
DV--1000 Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A--10

Appendix B: RLL Communications Programs


Why do you need networking instructions in your RLL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--2
The Master Initiates Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--2
Why Ladder Logic? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--2
Identifying the master and slave locations & addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--4
Specifying the amount of data to transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--5
Designating the master station memory area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--6
Identifying the slave station memory area to read or write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--7
Controlling the communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--9
Communications Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--9
Multiple Read and Write Interlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B--10

Appendix C: Using the DCM with MODBUS


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--2
How Does the DCM work with MODBUS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--2
MODBUS Function Codes Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--3
MODBUS Data Types Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--3
Determining the MODBUS Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--4
If Your Host Software Requires the Data Type and Address... . . . . . . . . . . . . . . . . . . . . . . . . . . . C--4
Example 1: V2100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--5
Example 2: Y20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--5
Example 3: T10 Current Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--5
Example 4: C54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--5
If Your Host Software Requires an Address ONLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--6
Example 1: V2100 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--7
Example 2: Y20 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--7
Example 3: T10 Current Value 484 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--7
Example 4: C54 584/984 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C--7
iii
Table of Contents

Appendix D: Using the DCM with Modems


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--2
System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--2
Possible Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--3
Choosing a Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--3
Step 1: Set the DCM Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--4
Baud Rate & Parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--4
Delay Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--4
Delay Time Considerations for Networks with DL240 Slaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--5
Step 2: Choose the Proper Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--6
Connecting a Modem to your Personal Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--6
Connecting a Modem to the DCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--7
Connecting a Modem to the DL240 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--7
Step 3: Setting up the Modems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--8
Use a Terminal Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--8
Choose a COM Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--8
Configure the Modems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--8
Step 4: Connect the Modems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--9
If You are Using a Personal Computer as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--9
If You are Using a DCM as Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--9
Step 5: Start DirectSOFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D--10
D2--DCM
Data Communication
Module
In This Manual. . . .
— Introduction
— Building the Communication Cable
— Setting the DCM Switches
— Installing the DCM and Starting the Network
— Verification and Troubleshooting
2
Introduction

Overview
The Purpose of This manual is designed to allow you to setup
this Manual and install your DL205 Data Communications
Module (DCM). This is the only manual you will
need if you are using the DCM as an extra
general purpose communication port for your
DL205 PLC system. If you plan on using the
DCM as a network master or slave for a
DirectNET network, this manual covers the
basic steps for setting up the DCM and the
RX/WX instructions needed in your RLL
program.
If you plan on using a personal computer as the network master, it may be helpful to
read the DirectNET manual first. In either case, the DirectNET manual can be
useful because it provides detailed descriptions of network configurations, various
cable connections, etc.

Supplemental Depending on which products you have purchased, there may be other manuals that
Manuals are necessary or helpful for your application. These are some suggested manuals:
User Manuals
D DirectNET Network Guide part number DA--DNET--M
D DirectSoft Programming Software part number DA--DSOFT--M

If you plan to use your D2--DCM to communicate with another PLC, you will need the
appropriate user manual for the other PLC.
If you plan to use your D2--DCM module as an interface to HMI or PC Control
software or to an Operator Interface panel, you will need to refer to the
documentation for that product.

Who Should Read If you need an additional communications port for your DL205 PLC and you
this Manual understand the basics of installing and programming PLCs, this is the right manual
for you. This manual gives you the information you need to set up an active port on
the D2--DCM module.

Quality Technical We strive to make our manuals the best in the industry. We rely on your feedback to
Manuals and let us know if we are reaching our goal. If you cannot find the solution to your
Technical Support particular application, or, if for any reason you need additional assistance, please
call us at 800--633--0405. Our technical support group is glad to work with you in
answering your questions. They are available weekdays from 9:00 a.m. to 6:00
p.m. Eastern Time. You can also contact us on the worldwide web at:

http://www.plcdirect.com (PLCDirect Web site for general info/file transfers)

You can also find a variety of support solutions at our 24--hour per day BBS at:

770--844--4209
If you find a problem with any of our products, services, or manuals, please fill out
and return the ’Suggestions’ card that came with this manual.
33
Introduction

Steps The main contents of this manual are organized into five steps:

tells you about the Data Communication Module and its


1 Introduction uses. It lists other manuals you may need and tells you how
to get additional technical assistance, if necessary.

guides you through building the necessary communication


2 Build the Cable
cable, covering physical and electrical specifications.

guides you through the setup of the rotary and DIP switches

3
to select communication parameters and network
Set the DCM Switches
addressing. It shows the proper method of inserting the
module into the base.
tells you what to consider when laying out your network

4 Install the DCM and Start cable and how to terminate the individual conductors at the
the Network networked devices. It gives you specific cabling examples,
showing pinouts for each device.
introduces the use of the DCM’s status indicator lights as a
5 Verify and Troubleshoot diagnostic tool. It gives you status indicator light patterns to
help you identify problems that could be preventing
communications.

Appendices Additional reference information for the D2--DCM is available in these four
appendices:

A Cable Diagrams gives pinouts and cable options.

B
RLL Communications provides helpful examples of Ladder Logic programs for DCM
Programs communications.

C
Using the DCM with describes the methods for communicating using the popular
MODBUS MODBUS RTU protocol.

D
Using the DCM with explains communications using telephone, radio or fiber
Modems optic modems.
4
Introduction

DCM Hardware
The following diagram shows the major DCM components. The address selection
switches and the communication dipswitches are of special importance.
Status Indicators
(shown below)
Online/Offline Switch

Base Connector

RS232C/RS422
Communication Port Address Selection
Switches

DIP Switches for


communications
and protocol parameters

Self Test Indicator: ON


Module Power: ON
Send/Receive Enquiry:
NK: ON if a NAK is FLASHING*
either sent or received
Send/Receive Header:
TO: ON if a timeout has FLASHING*
occurred in the DCM
Send/Receive Data
Packet: FLASHING*
Master Mode:
ON if master
OFF if slave Status Indicators * During communications only

The DL205 Data Communications Module (DCM) is a general purpose


communications interface that can be used in a DL205 system that has a D2--240/250
Central Processing Unit (CPU). The DCM cannot be used with 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.
D As a network master or slave interface to a DirectNET network
D As an extra general purpose communications port to connect a personal
computer or operator interface
D As a network interface to a MODBUSR network using the RTU protocol
55
Introduction

Applications
As a DirectNET The DCM can be used as a network interface for applications that require data to be
Interface shared between PLCs, or between PLCs and an intelligent device (such as a host
computer). The DCM can be configured as either a master or slave station and
allows you to upload or download virtually any type of system data including
Timer/Counter data, I/O information, and V-memory information.

DirectNET Slaves
Slaves respond to the master’s request
DirectNET Masters
Issue requests to slave stations

Response

PC or DCM
master can
communicate with
DirectNET Slaves

Request
Using a DCM as a Network Master
The DL205 DCM can be used with a Possible Slaves
D2--240/250 CPU to serve as a network D D2--240/250 CPU (bottom port)
master. Your CPU must have firmware V1.8 D D2--240/250 w/ D2--DCM
or later. It cannot be used with a DL230
D D3--330 or D3--330P w/ DCU
CPU. (A master is the network station that
initiates requests for data from other stations D D3--340 (either port)
on the network). You simply use special RLL D D4--430 (bottom port)
instructions (RX and WX) inside of your RLL D D4--440 (bottom port)
program to initiate the data exchange. The D D4--450 (phone jack or bottom port)
DCM takes communication requests issued
by the PLC program instructions and D Any DL405 CPU w/ D4--DCM
automatically converts these requests into
network commands that read data from or
write data to another network station.
The PLC program is really very simple and only requires a few instructions. Appendix
A provides an overview of the instructions. Or, see the DirectNET Manual for network
details.
Using a DCM as a Network Slave
The DCM can also be used with a Possible Masters
D2--240/250 CPU to serve as a network D D2--240/250 w/ D2DCM
slave station. It cannot be used with a
D D3--340 CPU (bottom port)
DL230 CPU. In this case, the DCM
“listens” to the network for any messages D Any DL405 CPU w/ D4--DCM
that contain the DCM’s address. The DCM D D4--450 CPU (bottom port)
deciphers the network commands, carries D Host computer w/
out the request to read or write data, and DirectSOFT DDE Server
sends confirmation and/or information to
the master station.
6
Introduction

As an Extra As an extra communication port, the DCM supports the DirectNET protocol just like
Communication the bottom port on the D2--240/250 CPU, but at higher baud rates. In general, if you
Port can connect a device to the bottom port on the D2--240/250 CPU, then you can also
connect the same device to the DCM. These devices can be a variety of things, such
as operator interfaces or personal computers.
Since the DCM does not require any programming, you can simply set the DCM
communication parameters, connect the appropriate RS232C or RS422 cables, and start
transferring data.

Quickly add extra


communication ports*

* Number of DCMs is limited


by the available power budget

As a MODBUSâ The DCM can be used as a slave interface to connect your DL205 system to a
Network Interface MODBUSâ network using the MODBUSâ RTU protocol. The host system must be
capable of issuing the MODBUSâ commands to read or write the appropriate data.
Appendix C provides additional information on using the D2--DCM as a
MODBUS slave interface. This manual does not describe the MODBUSâ protocol.
We recommend that you reference the Gould MODBUSâ Protocol Reference Guide
(P1-MBUS-300 Rev. B) for details on the protocol. There may be more recent editions
of this manual, so check with your MODBUSâ supplier before ordering the
documentation.

MODBUSâ Master

MODBUSâ Network using RTU Protocol

Network As a slave station.... Network


Slave responding to network re- Slave
quests
DL205 Slave
with DCM
77
Introduction

Specifications
Environmental
Specifications
Operating Temperature 32° F to 131° F (0° to 55° C)
Storage Temperature --4° F to 158° F (--20° to 80° C)
Operating Humidity 5 to 95% (non-condensing)
Air Composition No corrosive gases permitted
Vibration JIS C0040
Shock JIS C0041
Voltage Isolation 1500 VAC, 1 minute duration
Insulation Resistance 10M ohms at 500 VDC
Noise NEMA ICS3--304

Operating
Specifications
Power Budget Requirement 300ma @ 5 VDC
Maximum number of modules limited only by power budget
CPU Required D2--240/250 minimum
firmware V1.8 or later
Location of module CPU base only
any slot except Slot 0 or CPU slot
Interface Serial RS232C / RS422
half-duplex, DTE, Asynchronous,
8 bits/character, odd or no parity
Baud Rates 300 to 38.4K baud, switch selectable
Maximum Distance RS232C -- 49ft (15 meters)
RS422 -- 3300 feet (1000 meters)
Protocol DirectNET1
K-sequence (proprietary)
MODBUSâ RTU
Diagnostics Automatic check of ROM/RAM,
communications, switch settings,
and LEDs
Note 1: Also compatible with Hostlink and/or CCM2 protocols. These names were used by previous vendors of
compatible Koyo designed products.
8
Introduction

Using your DCM-- Five Steps


STEP 1. Familiarize yourself with the
communications options of DCM
in the Introduction.

Cable
STEP 2. Build the communication cable
that fits your needs.

Switches

STEP 3. Set the DCM switches. (Baud


rate, parity, etc).

Install

STEP 4. Install the DCM in any slot


except for Slot 0, which is next to
the CPU.

Verify (Troubleshooting)

STEP 5. Verify correct network operation


by using the indicators and the
troubleshooting chart.
99
Building the Communication Cable

Building the Communication Cable


There are several considerations that help determine the type of cable needed for
your DCM application.
1. Will the 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.
Do you just need a quick test cable? If so, 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.
10
Building the Cable

Consideration 1: The DCM can be used in either a point-to-point or multi-drop configuration. A


Physical point-to-point connection only has two stations, a master and a slave. Use the
Configuration point-to-point configuration to connect a personal computer, an operator interface,
or an intelligent device to a single 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
DCM

DL205 Master DirectNET PLC Slave

Multi-drop

DirectNET DirectNET Slaves


Masters

or

DCM
11
11
Building the Communication Cable

Consideration 2: The DCM can support RS232C or RS422 communication. Your application and
Electrical configuration choice will help determine which electrical specification is best for you.
Specification If you are using multi-drop, you must use RS422. If you are using point-to-point, you
RS232C or RS422 may have a choice between RS232C and RS422.
You can use RS232C if the cable length is less than 50 feet and if the cable will not be
subjected to induced electrical noise that is commonly found near welders, large
motors, or other devices that create large magnetic fields.
You must use RS422 for all other applications. RS422 allows longer cable distances
(up to 3300 feet) and provides higher noise immunity.
Consideration 3: Although the network configuration and electrical specification are important, the
Cable Schematics type of devices being connected to the DCM are just as important. The exact cable
schematic needed really depends on a combination of all three things. There are a
wide range of possibilities when you consider that all three product families, the
DL205, DL305, and DL405 all offer DirectNET communication capabilities.
Some of you hardy souls will take these port pinouts and you’ll be on your way.
However, if you want some helpful hints, check out Appendix A. We’ve already
included a wide variety of cable schematics that cover several different possibilities.
You may have to combine some of these examples to design a cable that meets your
exact application requirements, but it can get you started on the right track.

NOTE: If you are using the DCM to connect an OptiMation operator interface,
you must order our standard pre-made cable, part number OP--4CBL--2. If you
are using a DV--1000, you must build a custom cable. See the cable diagram at
the end of Appendix A.
The following diagram shows the port pinouts for the DCM and the bottom port of the
DL240 CPU. These are the two most likely combinations that you will use. Notice
that the DCM has two sets of RS422 pins. These pins are internally connected and
can make it easier to wire multidrop connections.
D2--DCM Pinouts D2--240 Bottom Port
RS232C RS422*
1 1

RS232 TXD
14 14 RS422 TXD+
2 2
15 15 RS422 TXD--
RS232 RXD 3 3
16 16 RS422 RXD--
RS232 RTS 4 4
17 17 RS422 RXD+
RS232 CTS 5 5
18 18
+5V 6 +5V 6
19 19
0V 7 0V 7
20 20
8 RS422 RTS+ 8
21 21
9 RS422 RTS-- 9
22
RS422 RTS+
22 RS422 TXD+
10 10
23 23 RS422 TXD--
11 RS422 RTS-- 11
24 24 RS422 RXD--
12 RS422 CTS+ 12
25 25 RS422 RXD+
13 RS422 CTS-- 13
1
2
Port 2 Pinouts 3
* RS422 pins are internally connected Pin Signal Definition 4
5
6
1 0V Phone Jack
2 5V Connector
3 RS232C DTE RXD
4 RS232C TXD
5 Request to Send
6 0V

NOTE: The DL205 CPU ports only support RS232C signal levels. If you are
going to have more than one slave station, you will have to use RS422 and a
FA--UNICON RS232 to RS422 converter for each slave station. See the cable
diagrams shown in Appendix A for detailed diagrams.
12
Building the Cable

Consideration 4: Although many types of cables may work for your application, we recommend you
Cable Specifications use a cable that is constructed to offer a high degree of noise immunity. A cable
constructed equivalent to Belden 9855 is sufficient. The following specifications are
to be used as a guideline.
Structure . . . . . . . . . . . . . . . . . . . . . . . Shielded, twisted-pair
(RS232C only uses two wires and a ground)
Conductor size . . . . . . . . . . . . . . . . . 24 AWG or larger
Insulation . . . . . . . . . . . . . . . . . . . . . . Polyethylene
Shield . . . . . . . . . . . . . . . . . . . . . . . . . Copper braid or aluminum foil
Impedance . . . . . . . . . . . . . . . . . . . . . 100O @ 1MHz
Capacitance . . . . . . . . . . . . . . . . . . . . 60pf / meter or less

Consideration 5: Your company may have guidelines for cable installation. If so, you must check those
Installation before you begin the installation. Here are some general things to consider.
Guidelines D Don’t run cable next to larger motors, high current switches, or
transformers. This may cause noise problems.
D Route the cable through an approved cable housing to minimize the risk
of accidental cable damage. Check local and national codes to choose
the correct method for your application.
D Consider redundant cabling if the application data is critical. This allows
you to quickly reconnect all stations while the primary cable is being
repaired.

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. Step 3: Secure the shield to
the connector shell.

2.5”

Step 2: Crimp a ring connector onto the shield.


13
13
Building the Communication 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 120O .
There are two ways to actually connect the resistors.
D Line-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).
D Line-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
Master Slave Last Slave
Terminate
at Master
7 GND 7 GND
10 +RTS 19 +RTS
11 --RTS 18 --RTS
12 +CTS 11 +CTS
13 --CTS 23 --CTS

14 +OUT 9 +IN
15 --OUT 10 --IN
16 --IN 16 --OUT
17 +IN 14 +OUT

22
23
+OUT
--OUT
120 ohm
24 --IN Resistor
DirectNET 120 ohm 25 +IN

Slaves Resistor

Line-to-Ground Termination
Master Slave Last Slave

7 GND 7 GND
10 +RTS 19 +RTS
11 --RTS 18 --RTS
12 +CTS 11 +CTS
13 --CTS 23 --CTS

14 +OUT 9 +IN
15 --OUT 10 --IN
16 --IN 16 --OUT
17 +IN 14 +OUT

22 +OUT 62 ohm
23 --OUT
24 --IN Resistors
25 +IN
Terminate
at Last Slave 62 ohm
Resistors
14
Building the Cable

Network Amplifiers — If you have more than 16 slave stations, you must use an
RS422 amplifier to maintain the signal levels. The best amplifiers are regenerative,
that is, they try to improve signal quality by reducing any noise signals that are
present. (They amplify the signal and not the noise if possible.) Some amplifiers are
not regenerative and amplify the noise as well as the signal. You can get amplifiers
from several sources. The Black Box catalog is one of many good places to start.
They sell direct just like we do. Call 1--800--555--1212 and ask the 800 directory
assistance operator for their phone number. The following diagram shows some
instances where an amplifier is necessary.
Serial Slave Connection

1--16 Slave Stations

Master RS422
Station Amp

Slave Slave Slave Slave Slave

Parallel Slave Connection

1--16 Slave Stations


RS422 RS422
Amp Amp

Slave Slave Slave Slave

Master RS422 RS422


Station Amp Amp

Slave Slave Slave Slave

RS422 RS422
Amp Amp

Slave Slave Slave Slave


15
15
Building the Communication Cable

A Quick Test Cable PLCDirect offers a Universal Cable Kit (part number FA--CABKIT). This cable kit
allows you to connect various types of DirectLOGIC products with an RS232C
cable. The kit consists of cable (phone cable with male plugs already attached) and
several specially wired connectors. The special connectors are a D-sub style with
built-in female phone jacks. The kit includes a wide variety of the special connectors
so you can use one kit to connect products from the different DirectLOGIC family of
products. To use the kit with the DCM, just follow these steps.
1. Plug the appropriate D-sub connector onto the DCM.
2. Plug the appropriate D-sub connector onto the other device you are
connecting to the DCM.
3. Connect the cable to the two D-sub connectors.

WARNING: This cable is suitable for quick testing situations and must not be
used in actual applications. This cable is not shielded and is highly
susceptible to electrical noise. Electrical noise can cause unpredictable
operation that may result in a risk of personal injury or damage to equipment.
Use the cable specifications described earlier in this manual to select a cable
suitable for actual applications.

Build A Test Cable In 30 Seconds


1. Attach Universal Cable Adapter to the DCM
2. Attach another Universal Cable Adapter to the
Device which will connect to the DCM
3. Attach the Universal Cable

9 Pin

25 pin

Universal 9 pin
D--sub connector Universal 25 pin
D--sub connector
Cable Kit Contains 1 each of:
RJ12 to RJ11 Phone jack to 9 pin Phone jack to 9 pin Phone jack to 15 pin Universal 25 pin
non-shielded cable female D--sub connector D--sub connector D--sub connector D--sub connector
RJ12 to RJ12
non-shielded cable
16
Setting the Switches

Setting the DCM switches


The 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 DCM comes set from the factory for:
D DirectNET Slave operation
D 9600 Baud
D Station Address 1
D Odd Parity
D Hex Mode

Host Computer or If you’re using a host computer or operator interface as the master station you should set the
Operator Interface DCM to match the master station parameters. Check the documentation that came with your
Connection computer or operator interface panel to determine the available communication parameters.
You’ll need to know the following things.
D Baud rate
D Parity settings
D Protocol required
Your operator interface must use one of the following protocols.
D DirectNET
D K-sequence
D Hostlink (DirectNET was called Hostlink on the old TIt or Simaticr TI products.
Some Operator Interface manufacturers may still refer to it this way.)
D MODBUSâ RTU

DirectNET Interface If you’re using the DCM as a DirectNET interface, you’ll need to know whether the DCM is
Connection being used in a master station, slave station, or peer station. Once you’ve determined how
the DCM will be used, proceed with the dipswitch settings.

Master -- Slave Network Peer as Master Network

DCM as Master

DCM as Peer DCM as Peer

DCM as Slave
17
17
Setting the Switches

DCM Once again, the switches should be set at the factory for the following type of operation.
Switch Settings D DirectNET Slave
D 9600 Baud
D Station Address 1
D Odd Parity
D Hex Mode
If these settings are acceptable, then you can go ahead and install the DCM into the base. If
not, you’ll have to change the switch settings.
There are two small banks of switches located next to the blue rotary switches on the one of
the DCM circuit boards. These dipswitches are used to select the communications settings.
The following diagram shows the switch locations and their purpose.
Switch Positions
Protocol 1 2
SW3
DirectNET Slave OFF OFF
Network DirectNET Master OFF ON
1 Protocol DirectNET Peer ON OFF
2 MODBUSâ RTU ON ON
COM Timeout Enable 3 COM Timeout Disable
Hexadecimal Mode 4 ASCII Mode

OFF ON

SW5 Switch Positions


Baud 1 2 3
Switch Positions 1
Baud Rate 300 ON OFF OFF
Time* 6 7 8 2 600 OFF ON OFF
0 OFF OFF OFF 3 1200 ON ON OFF
2 ON OFF OFF NO Parity ODD Parity 2400 OFF OFF ON
4 4800 ON OFF ON
5 OFF ON OFF
10 ON ON OFF Set to OFF 5 Self Test 9600 OFF ON ON
ON 20 OFF OFF ON 6 19200 ON ON ON
50 ON OFF ON Delay Time 38400 OFF OFF OFF
100 OFF ON ON 7
500 ON ON ON 8
*Delay time in milliseconds
OFF ON
18
Setting the Switches

Protocol Selection: Positions 1 and 2 on SW3 select the DCM protocol and the master or
slave settings. The DCM primarily uses two protocols, DirectNET and MODBUSâ RTU
protocol. Here’s some information to help you choose.
Communications Port for DirectSOFT Programming: If you plan to program the CPU through
the DCM, then you can use either DirectNET protocol or our proprietary protocol, called
K-sequence. Although it is not listed in the switch settings, K-sequence is also available
whenever the DCM is set for DirectNET slave operation.
Computer or Operator Interface: If you’re using the DCM to connect a computer or operator
interface, check your documentation to see which protocol is being used. Since the DCM is
always a slave station when it’s connected to a computer or operator interface, you should
select DirectNET slave or MODBUSâ RTU slave. Note, there are also a handful of operator
interfaces that have been designed to use our proprietary K-sequence protocol. If you have
one of these, or if you need to use K-sequence for some reason, make sure you set the DCM
for DirectNET Slave operation. Peer to Peer works in Hexadecimal mode only.
DirectNET Master / Slave: In a DirectNET master / slave network, one DCM should be set as
a master and the rest should be set as slaves.
DirectNET Peer as Master: This is a variation of the master / slave protocol and should be
selected when you only have two stations that can each initiate requests. Each station must
have a DCM as the network interface.
MODBUSâ RTU Slave: The DCM can also be a MODBUSâ slave (in the RTU or HEX
mode). The DCM cannot be a MODBUSâ master station. If you’re going to use MODBUSâ,
make sure your software package supports the DL205 products. See Appendix C for more
information.
Communication Timeout: Position 3 on SW3 selects the communication timeout. For most
cases, you should leave this switch in the OFF position. Communication Timeout Disable is
normally used only if you’re developing your own DirectNET programs. By disabling the
timeout, you can send one DirectNET component without any communication timeout
problems. If you have this timeout disabled and a communication error does occur, you must
restart communications by sending a retry or an End of Transmission (EOT) command. If you
want to know more, see the DirectNET manual for details.
ASCII / HEX Mode: Position 4 on SW3 selects between ASCII and HEX modes of data
representation. If you want the fastest communication possible, use HEX mode, which is the
default. The difference is in the way the data is represented. The same data is twice as long in
ASCII format, so if there’s more data, it takes longer to transfer. If you have a device on the network
that requires ASCII mode, then set the switch for ASCII mode, otherwise, use HEX mode.
Baud Rate: Positions 1 -- 3 on SW5 are used to set the baud rate for the DCM. There are eight
baud rate selections available ranging from 300bps to 38.4Kbps. All stations must have the
same baud rate before the communications will operate correctly. Usually, you should
use the highest baud rate possible unless noise problems appear. If noise problems appear,
try reducing the baud rates.
Parity: Position 4 on SW5 selects between the two parity options, odd or none. If you’re using
all DL205 equipment, you should use odd parity. Odd parity uses eleven bits total (1 start bit, 8
data bits, 1 stop bit, and 1 parity bit).
Some devices require no parity, which uses only 10 bits (1 start bit, 8 data bits, and 1 stop bit).
Self-Test: Position 5 on SW5 selects the factory self-test and should always be switched off.
If the self-test is on, the module will not operate correctly.
Response Delay Time: Positions 6--8 on SW4 set the response delay time. The delay time
specifies the amount of time the DCM waits to send the data after it has raised the RTS signal
line. This is normally set to 0, and is typically only adjusted if you are using the DCM with a
radio modem. If you are using the DCM with a radio modem, check your modem
documentation to help you choose the proper setting. Also, if you’re considering the use of a
modem, check out Appendix D. It may be of some help.
19
19
Setting the Switches

Address Selection The DCM station address is set by the two rotary
Switch switches located on one of the DCM’s circuit
boards. Addresses are in hexadecimal format
with valid addresses from 0 (only used for the
master station) to hexadecimal 5A. The
addresses do not have to be consecutive, but each
station must have a unique address.
The top rotary switch is used to set the most
significant digit of the HEX address. The bottom
switch is used to set the least significant digit of the
HEX address. For example, to set a DCM address
of HEX 10 (decimal 16), set the top rotary switch to 1
and the bottom rotary switch to 0. If you’re using the
DCM as a master, make sure you select address 0.

NOTE: The 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.

Even though the DCM address is set in X10


hexadecimal, it’s a good idea to remember the
decimal equivalent. This is because the decimal
address is used most often. For example, an RLL X1
communications program, the DirectSOFT
Programming Software, and our DirectSOFT DDE
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
HEX 3C

3 x 16 = 48 + C = 12 = 60 decimal
20
Setting the Switches

Online / Offline On the front of the unit, just to the left of the LEDs,
Switch you’ll notice a small slide switch. This switch is
labeled ON (for online) and OFF (for offline). If you
want to communicate through the DCM, make
sure this switch is in the ON position.
In the OFF position, this switch logically
disconnects the DCM from the network (just as if
you pulled the cable from the connector). Once
this switch is moved to the OFF position, the DCM
will not communicate with the network. If you move
the switch to the ON position, the DCM will
communicate with the network, but not until the
master sends another request for communication.
This does not operate like the reset switch on
many personal computers.
21
21
Installing the DCM and Starting the Network

Installing the DCM and Starting the Network


Install the DCM The DCM can go in any slot of a DL205 base except Slot 0, which is right next to the
CPU. The DCM will not work in Slot 0.
If you’re using a 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 DCM can not be mounted in a base that does not contain a
D2--240/250 CPU. Also, the DCM requires 300mA of +5V base power. Make sure
you will not exceed the available base power budget by installing the DCM.
See the DL205 User Manual for complete details on power budget
calculations.

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.

Align module to
slots in base and slide in
Push the retaining
clips in to secure the module
to the DL205 base

Connect the Cables Make sure you have all the cables connected and that all the network devices have
the same communication parameters (baud rate, parity, etc).

If you’re using The PLC master station must contain an RLL program that has the appropriate RX or
DirectNET... WX instructions necessary to initiate the communications. (See Appendix B for
details on the RX and WX instructions). The master station CPU must be in Run
mode in order to execute the communications program. The slave station CPUs do
not absolutely have to be in Run mode because the DCM will still transfer the data.
Whether you put the slave stations in Run mode depends on your application
requirements.
22
Installing the DCM and Starting the Network

If you’re using an Connect the cables and follow the procedures outlined in the documentation that
Operator Interface or came with your host computer software or operator interface. You’ll have to execute
Host Computer... your host or operator interface program before the communications can begin. For
example, if you’re using DirectSOFT, you can just specify the station address and
start working!

If you’re using Connect the cables and follow the procedures outlined in your MODBUSâ Host
MODBUSâ... software package to start the communications. See Appendix C for more
information on using the D2--DCM with MODBUS protocol.
23
23
Verification & Troubleshooting

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 DCM
indicators to verify the DCM is operating correctly. The following diagram shows the
proper indicator conditions.
Note: Online/Offline switch has been removed from the drawing for clarity.
OK: ON if self test is OK
Module Power:
ON EQ: Send/Receive Enquiry
NK: ON if a NAK FLASHING*
is either sent or HD: Send/Receive Header
received FLASHING*
TO: ON if a DA: Send/Receive
timeout has Data Packet:
occurred in the FLASHING*
DCM
MA:
ON if master
OFF if slave

* During Communication only


24
Verification & Troubleshooting

Troubleshooting If the DCM does not seem to be working correctly, check the following items. These
Quick Steps items represent the problems found most often.
1. Cable and connections. Incorrectly wired cables and loose connectors
cause the majority of problems. Verify you’ve selected the proper cable
configuration and check the cable making sure it is wired correctly.
2. Dipswitch settings. Make sure you’ve set the DCM to match the
communication parameters required by the master station (DCM, operator
interface or host computer).
3. Incorrect protocol. Make sure your operator interface or personal computer
software can use the DirectNET, Hostlink, CCM2, or MODBUSâ RTU
protocol.
4. Communications program. Check the communications program for errors.
Consult the DirectNET Manual or the manuals that came with your host
computer software or operator interface for details.

NOTE: If you need more in depth troubleshooting, see the chart on the next page. It
provides several different indicator patterns that may help identify your exact
problem.
25
25
Verification & Troubleshooting

Troubleshooting Chart The following chart identifies the indicator status, possible cause, and corrective
off on flash action for a wide variety of commonly found problems.

Master Station Indicators Slave Station Indicators Possible Cause


Power or OK is off. 1.Master PLC power is disconnected
2.DCM is defective 1.

Power and OK are on. 1.Switch setting on master station is


Master indicator is off. incorrect
2.

Power, OK, and MA are on. 1.The master station CPU not in RUN.
EQ does not come on when 2.Online/Offline switch is set to OFF. 3.
the communications program is 3.Communications program is not
executed. correct.

Power, OK, and MA are on. 1.COM Timeout is disabled.


EQ stays on, but NK, TO, or 4.
HD indicators do not come on 2.RTS and CTS signals are not
at all. looped back on the DCM end of
the cable.
Power, OK, and MA are on. 1.RLL Communications program is
EQ stays on, and TO flashes. incorrect.
5.

2.Settings are different.


Only PW and OK OR EQ flashes.

3.Cable problem.
Power, OK, and MA are on. 1.Settings are different.
EQ stays on, and NK flashes. 6.

2.Cable problem or Slave is offline.


EQ & NK come on OR EQ and HD
flash.
Power, OK, and MA are on. 1.Settings are different.
EQ and HD come on. TO 7.
flashes.

EQ & HD come on
26
Verification & Troubleshooting

Power, OK, and MA are on. 1.RLL Communications program is


EQ and HD come on. EQ goes incorrect.
8.
off. HD stays on, and NK
flashes or stays on.
2.Settings are different.
EQ & HD come on THEN EQ goes off, HD
and NK are on

Power, OK, and MA are on. 1.Electrical noise.


DT is on, but NK flashes on 9.
occasion.
27
27
Verification & Troubleshooting

Corrective Action Switch Settings & Port Pinouts


1.Check the master PLC source power. Switch Settings
1. 2.Replace the DCM.
Switch Positions
Protocol 1 2
SW3 DirectNET Slave OFF OFF
Network DirectNET Master OFF ON
1.Disconnect the master station PLC power, 1 Protocol DirectNET Peer ON OFF
2. remove the DCM and check positions 1 MODBUSâ RTU ON ON
2
& 2 on SW3.
COM Timeout Enable 3 COM Timeout Disable
Hexadecimal Mode 4 ASCII Mode

1.Place the CPU in RUN mode. OFF ON


3. 2.Set the switch to the ON position. Switch Positions
Baud 1 2 3
3.Make sure the RX or WX instruction is SW5
300 ON OFF OFF
being executed. Check the address, 600 OFF ON OFF
slot number, and amount and type of 1
Baud Rate 1200 ON ON OFF
data used in the RX/WX instructions. 2 2400 OFF OFF ON
3 4800 ON OFF ON
1.Disconnect the PLC power, remove the 9600 OFF ON ON
NO Parity 4 ODD Parity 19200 ON ON ON
4. DCM and check position 3 on SW3.
Set to OFF 5 Self Test 38400 OFF OFF OFF
2.Remove master station connector,
ensure that RTS & CTS are connected 6 Delay Time
according to the cable diagram. 7 Switch Positions
8 Time* 6 7 8
1.Check the address, slot number, and 0 OFF OFF OFF
5. amount and type of data used in the OFF ON 2 ON OFF OFF
RX/WX instructions. 5 OFF ON OFF
10 ON ON OFF
2.Make sure baud rate, parity, and mode 20 OFF OFF ON
(HEX/ASCII) match between the 50 ON OFF ON
master and slave. 100 OFF ON ON
500 ON ON ON
3.Verify that the cable is wired properly. *Delay time in milliseconds

1.Make sure baud rate, parity, and mode


6. (HEX/ASCII) match between the Port Pinouts
master and slave.
RS232C RS422*
2.Verify that the cable is wired properly.
1 1
Also, make sure slave is online. RS232 TXD 2
14
2
14 RS422 TXD+
15 15 RS422 TXD--
RS232 RXD 3 3
16 16 RS422 RXD--
RS232 RTS
1.Make sure baud rate, parity, and mode
4 4
17 17 RS422 RXD+
RS232 CTS 5 5
7. (HEX/ASCII) match between the +5V 6
18
+5V 6
18

master and slave. 0V 7


19
0V 7
19

20 20
8 RS422 RTS+ 8
21 21
9 RS422 RTS-- 9
22
RS422 RTS+
22 RS422 TXD+
1.Check the amount and type of data
10 10
23 23 RS422 TXD--
11 RS422 RTS-- 11
8. being transferred. (Byte count may be 12
24
RS422 CTS+ 12
24 RS422 RXD--
set to 1 or an odd number for a data 13
25
RS422 CTS-- 13
25 RS422 RXD+

type that requires 2 bytes.)


* RS422 pins are internally connected
2.Make sure baud rate, parity, and mode
(HEX/ASCII) match between the
master and slave.
1.Make sure the system has good earth
9. grounds. Only one end of the cable
shield must be grounded.
2.If you’re using RS232C, try RS422.
1A
Cable Diagrams
A--2
Cable Diagrams

Point-to-Point These diagrams show the D2--DCM being used as the network master. The cable diagram is
RS232C the same when the D2--DCM is being used as a slave (for those connections that could have
DCM as Master the master/slave roles reversed). This is true for the:
S D2--DCM to D4--DCM connection
S D2--DCM to DL305 CPU with RS232C DCU (or a D3--340 bottom port)
S D2--DCM to DL405 CPU connection when used with a D4--450 CPU.

Master Possible Slaves

DL405 CPU D2--DCM


Bottom Port
RS232C DL405
2 TXD 2 TXD CPU
3 RXD 3 RXD Port #2
DL405 DCM 4 RTS 4 RTS
or
or 5 CTS 5 CTS
DL405
DL205 DCM DCM
Connect to any 7 GND 7 GND
or
of these devices DL205
DCM
DL305 CPU or
w/ 232 DCU
DL305
w/DCU

25-pin Connector 25-pin Connector

Master Possible Slaves

DL340 CPU

DL240 CPU DL450 CPU


Bottom Port Phone Jack
Connect to any
of these devices

D2--DCM DL340 CPU D2--DCM

RS232C RS232C
2 TXD 2 TXD 1 GND
1 RXD DL240 CPU
3 RXD 2 TXD 3 RXD 2 5V Bottom Port
4 RTS 3 RTS 4 RTS 3 RXD
or
5 CTS 4 GND 5 CTS 4 TXD
5 RTS DL450 CPU
4P4C Phone Jack
7 GND 7 GND 6 GND

6P6C

25-pin Connector 25-pin Connector


A--3
Cable Diagrams

Point-to-Point These diagrams show the DCM being used as a slave to a personal computer. The personal
RS232C computer would have to be capable of issuing commands using either DirectNET or
PC as Master MODBUS RTU protocol. A good example of this would be a personal computer running an
Excel spreadsheet connected through our DirectSOFT DDE Server. (Sounds complicated,
but it’s really quite simple! Check out our catalog for more information on our powerful DDE
Server.)
Master Slave

DL205 DCM

Personal Computer DCM Personal Computer DCM

RS232C RS232C
2 RXD 2 TXD 2 TXD 2 TXD
3 TXD 3 RXD 3 RXD 3 RXD
5 GND 7 GND 7 GND 7 GND
1 DCD 4 RTS 4 RTS 4 RTS
4 DTR 5 CTS 5 CTS 5 CTS
6 DSR 6 DSR
7 RTS 8 DCD
8 CTS 20 DTR

9-pin
Connector

25-pin Connector 25-pin DTE 25-pin Connector


Connector
A--4
Cable Diagrams

Point-to-Point These diagrams show the D2--DCM being used as the network master. The cable diagram is
RS422 the same when the D2--DCM is being used as a slave (for those connections that could have
DCM as Master the master/slave roles reversed). This is true for the:
S D2--DCM to D4--DCM connection
S D2--DCM to DL405 CPU connection when used with a D4--450

Master Possible Slaves

DL405 CPU
Bottom Port

DL405
DCM
(or DL205
DCM)
Connect to any
of these devices
DL305
with
RS422 DCU

DCM DCM

RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 10 +RTS 10 +RTS 10 +RTS
DL405
11 --RTS 11 --RTS 11 --RTS 11 --RTS
DCM
12 +CTS 12 +CTS 12 +CTS 12 +CTS
DL405 or
13 --CTS 13 --CTS 13 --CTS 13 --CTS
CPU DL205
14 +OUT 9 +IN Port 14 +OUT 17 +IN DCM
15 --OUT 10 --IN 15 --OUT 16 --IN or
16 --IN 16 --OUT 16 --IN 15 --OUT
17 +IN 14 +OUT 17 +IN 14 +OUT DL305
w/DCU

25-pin Connector 25-pin Connector 25-pin Connector 25-pin Connector

Note: Pin numbers are correct. Pins are Note: Pin numbers are correct. Pins are
shown out of order because it makes the shown out of order because it makes the
drawing easier to comprehend. drawing easier to comprehend.
A--5
Cable Diagrams

Master Possible Slaves

DL340 CPU

FA--UNICON RS232/422 Converter

DL240 CPU
Bottom Port
Connect to any
of these devices
DL450 CPU
Phone Jack

Slave Connection

DCM FA--UNICON Converter


DL340
RS422
DCE CPU Port
7 GND 7 GND
TXD 2 1 RXD
10 +RTS 10 +RTS
RXD 3 2 TXD
11 --RTS 11 --RTS
GND 7 3 RTS
12 +CTS 12 +CTS
DTR 20 4 GND
13 --CTS 13 --CTS
4P4C
14 +OUT 14 +IN
15 --OUT 15 -- IN
16 --IN 16 --OUT
17 +IN 17 +OUT

25-pin Connector
Note: RTS/CTS are looped back internally

Slave Connection
DCM FA--UNICON Converter
DCE
1 GND DL240 CPU
RS422 2 5V Bottom Port
7 GND 7 GND 3 RXD
TXD 2
10 +RTS 10 +RTS or
RXD 3 4 TXD
11 --RTS 11 --RTS 5 RTS
GND 7 DL450 CPU
12 +CTS 12 +CTS 6 GND
DTR 20 Phone Jack
13 --CTS 13 --CTS
6P6C
14 +OUT 14 +IN
15 --OUT 15 -- IN
16 --IN 16 --OUT
17 +IN 17 +OUT

25-pin Connector Note: RTS/CTS are looped back internally


A--6
Cable Diagrams

Point-to-Point These diagrams show the DCM being used as a slave to a personal computer. Since most
RS422 personal computers come with RS232C communication cards, we have shown an
PC as Master FA--UNICON RS232/422 Converter being used to convert the signal. The personal computer
would have to be capable of issuing commands using either DirectNET or MODBUS RTU
protocol.
Master Slave

DL205 DCM

FA--UNICON RS232/422 Converter

DL205
Personal Computer FA--UNICON Converter DCM
DTE DCE
RS232C GND 7 7 GND
2 RXD 2 TXD
3 TXD +RTS 10 10 +RTS
3 RXD
5 GND --RTS 11 11 --RTS
7 GND
1 DCD +CTS 12 12 +CTS
20 DTR
4 DTR 25 +5V --CTS 13 13 --CTS
RS422
6 DSR +IN 14 14 +OUT
7 RTS -- IN 15 15 --OUT
8 CTS --OUT 16 16 --IN
+OUT 17 17 +IN
9-pin DTE
Connector

Note: 1. You must connect pin 20 to pin 25 25-pin Connector


2. RTS/CTS are looped back internally
and do not require external wiring.

DL205
Personal Computer FA--UNICON Converter DCM
DTE DCE
RS232C GND 7
2 TXD 2 TXD 7 GND
+RTS 10 10 +RTS
3 RXD 3 RXD
--RTS 11 11 --RTS
7 GND 7 GND
+CTS 12 12 +CTS
4 RTS 20 DTR
25 +5V --CTS 13 13 --CTS
5 CTS RS422
6 DSR +IN 14 14 +OUT
8 DCD -- IN 15 15 --OUT
20 DTR --OUT 16 16 --IN
+OUT 17 17 +IN

Note: 1. You must connect pin 20 to pin 25 25-pin Connector


25-pin DTE
Connector 2. RTS/CTS are looped back internally
and do not require external wiring.
A--7
Cable Diagrams

Multidrop These diagrams show the D2--DCM being used as the network master for a network
RS422 consisting of various PLC stations using DCMs, CPU ports, etc..
DCM as Master

Master
DL205
DCM Master DL405 DCM DL205 DCM DL305 w/ DCU
RS422 RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 10 +RTS 10 +RTS 10 +RTS
11 --RTS 11 --RTS 11 --RTS 11 --RTS
12 +CTS 12 +CTS 12 +CTS 12 +CTS
13 --CTS 13 --CTS 13 --CTS 13 --CTS

14 +OUT 17 +IN 17 +IN 17 +IN


Slaves 15 --OUT 16 --IN 16 --IN 16 --IN
16 --IN 15 --OUT 15 --OUT 15 --OUT
DL405 or 17 +IN 14 +OUT 14 +OUT 14 +OUT
DL205 DCM
22 +OUT 22 +OUT 22 +OUT 22 +OUT
23 --OUT 23 --OUT 23 --OUT 23 --OUT
24 --IN 24 --IN 24 --IN 24 --IN
25 +IN 25 +IN 25 +IN 25 +IN

Termination Resistor Termination Resistor

DL305
RS422 DCU

Master
DL205 DL405 CPU DL405 CPU DL405 CPU
DCM Master Port #2 Port #2 Port #2
RS422 RS422 RS422
7 GND 7 GND 7 GND 7 GND
10 +RTS 19 +RTS 19 +RTS 19 +RTS
11 --RTS 18 --RTS 18 --RTS 18 --RTS
12 +CTS 11 +CTS 11 +CTS 11 +CTS
13 --CTS 23 --CTS 23 --CTS 23 --CTS

14 +OUT 9 +IN 9 +IN 9 +IN

Slaves 15
16
--OUT
--IN
10
16
--IN
--OUT
10
16
--IN
--OUT
10
16
--IN
--OUT
17 +IN 14 +OUT 14 +OUT 14 +OUT
DL405 CPU
Bottom Port 22 +OUT
23 --OUT
24 --IN
25 +IN

DL405 Termination Resistor Termination Resistor


CPU
Bottom Port

DL405 CPU
Bottom Port

REV A
A--8
Cable Diagrams

DL205 DCM
Master Master
RS422 — — —
GND 7
+RTS 10
--RTS 11
+CTS 12
--CTS 13

+OUT 14
--OUT 15
Slaves --IN 16
+IN 17

+OUT 22
--OUT 23
--IN 24
+IN 25

Termination
Resistor
DL340
CPU

DL340 FA--UNICON Converter


CPU DCE
RS422
RS232 GND 7
RXD 1 2 TXD
+RTS 10
TXD 2 3 RXD --RTS 11
RTS 3 7 GND
DL240 CPU +CTS 12
Bottom Port GND 4 20 DTR --CTS 13

+IN 14
--IN 15
--OUT 16
+OUT 17

DL450
Phone Jack DL240 CPU
Bottom Port
or DL450 Note: RTS/CTS are looped back internally
Phone Jack
FA--UNICON Converter
GND 1
DCE
5V 2 RS232 RS422
GND 7
RXD 3 2 TXD
+RTS 10
TXD 4 3 RXD --RTS 11
RTS 5 7 GND +CTS 12
GND 6 20 DTR --CTS 13

+IN 14
--IN 15
--OUT 16
+OUT 17

RS422

Note: RTS/CTS are looped back internally Termination Resistor


A--9
Cable Diagrams

Multidrop These diagrams show how to connect a network of D2--DCMs to a personal computer.
RS422
PC as Master
Master Slaves

DL205 DCM DL205 DCM

FA-- UNICON RS232/422 Converter

Personal Computer FA--UNICON Converter DCM DCM


DTE DCE
RS422 RS422
RS232C GND 7 7 GND 7 GND
2 RXD 2 TXD +RTS 10 10 +RTS 10 +RTS
3 TXD 3 RXD --RTS 11 11 --RTS 11 --RTS
5 GND 7 GND +CTS 12 12 +CTS 12 +CTS
1 DCD 20 DTR --CTS 13 13 --CTS 13 --CTS
4 DTR 25 +5V
+IN 14 14 +OUT 14 +OUT
6 DSR
--IN 15 15 --OUT 15 --OUT
7 RTS --OUT 16 16 --IN 16 --IN
8 CTS +OUT 17 17 +IN 17 +IN

22 +OUT 22 +OUT
9-pin DTE 23 --OUT 23 --OUT
Connector 24 --IN 24 --IN
25 +IN 25 +IN

Note: 1. You must connect pin 20 to pin 25 25-pin Connector 25-pin Connector
2. RTS/CTS are looped back internally
and do not require external wiring. Termination Resistor

Personal Computer FA--UNICON Converter DCM DCM


DTE DCE RS422 RS422
RS232C GND 7 7 GND 7 GND
2 TXD 2 TXD +RTS 10 10 +RTS 10 +RTS
3 RXD 3 RXD --RTS 11 11 --RTS 11 --RTS
7 GND 7 GND +CTS 12 12 +CTS 12 +CTS
4 RTS 20 DTR --CTS 13 13 --CTS 13 --CTS

5 CTS 25 +5V
+IN 14 14 +OUT 14 +OUT
6 DSR --IN 15 15 --OUT 15 --OUT
8 DCD --OUT 16 16 --IN 16 --IN
20 DTR +OUT 17 17 +IN 17 +IN

22 +OUT 22 +OUT
23 --OUT 23 --OUT
24 --IN 24 --IN
25 +IN 25 +IN

25-pin DTE Note: 1. You must connect pin 20 to pin 25 25-pin Connector 25-pin Connector
Connector 2. RTS/CTS are looped back internally
and do not require external wiring. Termination Resistor

REV A
A--10
Cable Diagrams

DV--1000 Cable Use the following cable diagram to connect a DV--1000 to DL205 DCM. This is still a
simple master/slave connection, but the DV--1000 is the master and initiates the
data exchange with the DCM.
DV--1000 DCM

D2--DCM
DV--1000
RS232C
1 GND TXD 2
2 5V RXD 3
3 RXD RTS 4
4 TXD CTS 5
5 RTS +5V 6
6 GND GND 7
Phone Jack style connector
(RJ12) on the back of the 6P6C
DV--1000

25-pin Connector
RLL Communications
B
Programs
B--2
RLL Communications Programs

Why do you need networking instructions in your RLL?


The Master Initiates Since DirectNET is a master / slave network, the master station must initiate requests for
Requests network data transfers. If you’re using a PLC as the master station, you use simple RLL
instructions to initiate the requests.
Why Ladder Logic? Since the DCM network interface does not contain a program, you have to use the PLC to
issue the commands to tell the DCM where to read or write data. The 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 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).
CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4

Example RLL Program Master PLC

Communication Error
SP125 Set
Y50

Communication Not Busy


SP124 LD
K0201

DCM Slot Slave Address Y0 -- Y17


LD 15 8 0

K0003 Y20 -- Y37


Transfer 3 bytes

LDA Slave Address 1


O40600
Master Starting Address
Type of Operation
RX
Y0
Slave Starting Address
Slave Address 2
B--3
RLL Communications Programs B--3
This example writes 3 bytes of data from the Master Station (starting at V40600) to Y0 -- Y27
in Slave Station #1.
CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4

Master PLC
V40600

15 8 0

V40601 DCM

Example RLL Program

16pt 16pt
Output Output Communication Error
Y0 Y20 SP131 Set
-- --
Y17 Y37 Y50

Slave Address 1 Communication Not Busy


SP130 LD
K0401
DCM Slot Slave
Address
LD
K0003
Transfer 3 bytes
Slave Address 2

LDA
O40600
Master Starting Address
Type of
WX Operation
Y0
Slave Starting Address
The following paragraphs explain each operation and provide some helpful hints to make
your programs simple and easy to follow.
B--4
RLL Communications Programs

Identifying the master and slave locations & addresses


The first Load (LD) instruction identifies the
slot location of the DCM master and the Conversion Hints!
address of the slave station. (Remember, the Valid Slot Range: 0--7
slot numbers start at 0.) Valid Slave Address: 1--90
The constant (K) portion of the instruction
actually contains two pieces (bytes) of Example
information. The first two digits specify the Master in Slot: 2
DCM master location and the second two
digits specify the slave station address. Slave Address: 3C HEX (60 decimal)
It is necessary to specify both the master slot Convert the HEX address to decimal
location and slave address because you can 0 1 2 3 4 5 6 7 8 9 A B C D E F HEX
have more than one DCM master in the base
and you can have up to 90 slave stations for 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DEC
each master.
HEX 3C
NOTE: The LD instruction K value is
entered in decimal, but the DCM master
and slave addresses are in HEX. You have 3 x 16 = 48 + C = 12 = 60 decimal
to convert the HEX addresses to their
decimal equivalent for this instruction. It’s
easy to convert from HEX to decimal. See
the hints to the right!

In this example, we’re showing a simple example with only three slaves. In this case the
address conversions are very simple. Check the Conversion Hints shown above for a more
complex example.

Slot of DCM
CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4
0
LD
K0260

Slave Address

Slave 1 Slave 2 Slave 60

X10 = 3

X1 = C
B--5
B--5
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 LD
amount of data in complete bytes. For K0201
example, Y0 -- Y27 would be three bytes of
data. How did we determine this? Simple. LD
There are actually 24 bits for the output range
K0003
of Y0--Y27 (remember, 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. Number of Bytes
The charts below can be very helpful. Notice in decimal
that the different PLC families do not always
use the same types of memory or the same Example:
byte boundaries. For example, the DL305 does 3 bytes of data to be transferred
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.

DL 205 / 405 Memory Bits per unit Bytes


V memory 16 2
T / C current value 16 2
Inputs (X, GX, SP) 8 1
Outputs 8 1
(Y, C, Stage, T/C bits)
Diagnostic Status 8 1

DL305 Memory Bits per unit Number of


bytes
Data registers 8 1
T / C accumulator 16 2
I/O, internal relays, shift 1 1
register bits, T/C bits,
stage bits
Diagnostic Status 16 10
(5 word R/W)
B--6
RLL Communications Programs

Designating the master station memory area


The Load Address (LDA) instruction specifies
the V memory area of the master that will be LD
used. This is the starting address. Additional K0201
sequential locations may be used, depending
on the number of bytes that are being
transferred. Since all DL405 data is mapped LD
into V memory, you can easily access the data K0003
you need.
If you are reading information from the slave LDA
station, this is the destination area, or, the area O40600
where the master will store the information.
If you are writing information to the slave Letter “O”
station, this is the source area, or, the area specifies an
where the master will obtain the information Octal Address V memory
that will be transferred to the slave.
Address

NOTE: Since V memory words are always 16 Example:


bits, you may not always use the whole word. V memory location 40600 will be the
For example, if you only specify 3 bytes and
you are reading Y outputs from the slave, you starting point of the data transfer area
will only get 24 bits of data. In this case, only for the master. The following locations
the 8 least significant bits of the last word will be used to store the data.
location will be modified. The remaining 8 bits
are not affected.
MSB V40600 LSB

15 0
MSB V40601 LSB

15 0
B--7
B--7
RLL Communications Programs

Identifying the slave station memory area to read or write


The Read Network (RX) or Write Network
(WX) is the last instruction in the routine. Use LD
the RX if you want to read data from the slave, K0201
or use the WX instruction if you want to write
data to the slave. LD
You have to specify the data type and the K0003
starting address for the slave. (Remember,
you have to specify a data type that will work
correctly with the number of bytes specified.) LDA
Data Type O40600
If you use the RX instruction, the data will be
read from the slave starting at the address and
specified. If you use the WX instruction, the Address RX
data will be written to the slave starting at the Y0
address specified.
Example:
Read from slave starting at Y0.

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.

CPU Slot 0 Slot 1 Slot 2 Slot 3 Slot 4

Master PLC

Y0 -- Y17
15 8 0

Y20 -- Y37

Slave Address 1

Slave Address 2
B--8
RLL Communications Programs

D3--330 / D3--340 CPUs


To get ...
TMR/CNT Current Values use... TMR / CNT Status Bits use... Data Registers use...
R600 V0 CT600 GY6001 R401, R4002 V100
R601 V1 CT601 GY6011 R403, R4022 V101
——— ——— ——— ——— ——— ———
R677 V77 CT677 GY6771 R777, R7762 V237
To get ...
I/O Points use... Control Relays use... Shift Registers use...
IO 000 GY01 CR160 GY1601 SR400 GY400
IO 001 GY11 CR161 GY1611 SR401 GY401
——— ——— ——— ——— ——— ———
IO 157 GY1571 CR377 GY3771 SR577 GY577

D3--330P CPUs
To get ...
TMR/CNT Current Values use... TMR / CNT Status Bits use... Data Registers use...
R600 V0 CT600 GY6001 R401, R4002 V100
R601 V1 CT601 GY6011 R403, R4022 V101
——— ——— ——— ——— ——— ———
R677 V77 CT677 GY6771 R777, R7762 V237
To get ...
I/O Points use... Control Relays use... Shift Registers use...
IO 000 GY01 CR160 GY1601 SR200 GY400
IO 001 GY11 CR161 GY1611 SR201 GY401
——— ——— ——— ——— ——— ———
IO 157 GY1571 CR277 GY2771 SR277 GY477
To get ...
Stage Status Bits use... Example:
LD
Read current value from R400 K0201
S0 GY2001
into memory location V2000.
S1 GY2011 LD Read 2
This is a tricky one. If you’re just K0002 bytes
——— ——— obtaining I/O or Timer/Counter
values, the task is fairly simple. LDA Store in
S177 GY2771 O2000 V2000
But when you work with data
registers, it’s a bit more involved. RX
To get R400,
1 . You must have CPU firmware V1.9 Here’s why. V100 use V100
or greater to use the GY data type To get R400, you examine the
in the RX/WX instructions. LD Load
table and find that you must use V2000 V2000
2 . Two bytes of DL305 register data reference V0. You will also notice
are returned with one DL205 V that you always get at least 2 ANDD Use ANDD
memory location. registers! So you get R400 and KFF to remove
R401
R401. Since you only want the
contents of R400, you have to OUT Store the
Vxxxx result in a
add some ladder logic to get rid of different V
the data from R401. location
B--9
B--9
RLL Communications Programs

Controlling the communications


Communications When you execute communication with a
Special Relays DCM, chances are good the communication SP125 Y50
may take longer than the actual PLC scan. If Set
the DCM is busy, you should not initiate
another request until it is finished. Fortunately, Communication Error
there’s an easy solution for this. SP124
There are two SPs for each slot in the CPU LD
base which are used only with the DCM. For K0201
example, slot 0 has SP120 and SP121. SP120
is the DCM Busy relay and, when turned on, DCM Busy LD
indicates the DCM is busy. SP121 indicates K0003
there is a communication error for slot 0.
You should always use the DCM Busy SP in LDA
your RLL programs to ensure the DCM is O40600
ready.
The communication error SP is optional, but RX
it’s a good way to monitor the communication Y0
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.

Special Purpose Communication Relays


I/O Slot Location 0 1 2 3 4 5 6 7
Communication Busy N/A SP122 SP124 SP126 SP130 SP132 SP134 SP136
Communication Error N/A SP123 SP125 SP127 SP131 SP133 SP135 SP137

DL205

0 1 2 3 4 5 6 7

CPU
B--10
RLL Communications Programs

Multiple Read and If you’re using multiple reads and writes in the
Write Interlocks RLL program, you have to interlock the Interlocking Relay
routines to make sure all the routines are SP124 C0
executed. If you don’t use the interlocks, then LD
the CPU will only execute the first routine. This K0201
is because the DCM can only handle one
transaction at a time. LD
In the example, once the RX instruction is K0003
executed, C0 is set. When the DCM has
finished the communication task, the second LDA
routine is executed and C0 is reset. O40600
If you’re using RLL PLUS, you can just put each
routine in a separate program stage to ensure RX
proper execution. In most all cases, RLL PLUS
Y0
is a much more efficient way to create an
automation program. C0
The DirectNET manual provides a master / Set
slave example with both RLL and RLL PLUS
program descriptions.
Interlocking Relay
SP124 C0
LD
K0201

LD
K0003

LDA
O40400

WX
Y0
C0
RST
Using the DCM
C
with MODBUS
C--2
Using the DCM with MODBUS

Introduction
How Does the DCM The DL205 DCM can be used as a slave interface to a network using the MODBUS RTU
work with MODBUS? protocol. To use the DCM with MODBUS, your host software must send a MODBUS function
code and a MODBUS address to specify a PLC memory location that is understood by the DCM.
Host sends a
MODBUS request...

What’s the status of Y0?

... DCM responds


DCM responds with data
“Y0 is ON”

It would be quite difficult for us to discuss all of the ins and outs of MODBUS in this document.
Instead, our goal with this Appendix is to:
D provide a quick overview of MODBUS Data Types and Function Codes.
D show you how to determine the proper MODBUS address necessary to allow
your host software to access various memory locations in the DL205 system.

One key point to remember is that not all host software packages using MODBUS drivers
operate exactly the same way. That is, there a couple of different ways to achieve the same
result, especially when it comes to specifying the address for the PLC memory location you
need. Therefore, it is important that you follow the instructions for your particular software
package or network master.
C--3
C--3
Using the DCM with MODBUS

MODBUS Function Your host software package reads or writes information by sending a MODBUS function code
Codes Supported to the DCM. The following table provides a description of the MODBUS function codes
supported by the DL205 DCM.

MODBUS Code Function DL205 Data Types


Available
01 Read a group of coils Y, CR, T, CT
02 Read a group of inputs X, SP
05 Set / Reset a single coil Y, CR, T, CT
15 Set / Reset a group of coils Y, CR, T, CT
03, 04 Read a value from one or V
more registers
06 Write a value into a single V
register
16 Write a value into a group V
of registers

NOTE: The maximum MODBUS secondary address supported by the DCM is 60 (5A hex).

MODBUS Data Types You are probably accustomed to seeing data types like X input, Y output, C control relay, V
Supported memory data registers, etc. for the various types of memory in a DL205 system. For example,
if you need to know the status of Y12, then you ask for Y12. MODBUS does not use these
same data types, so you have to determine which MODBUS data type corresponds to the
PLC memory location that you need. The following table will help.

DL205 Memory Type Quantity1 PLC Range Corresponding


(Decimal) (Octal) MODBUS
Data Type
Inputs (X) 320 X0 -- X477 Input
Special Relays (SP) 144 SP0 -- SP137 Input
SP540 -- SP617
Outputs (Y) 320 Y0 -- Y477 Coil
Control Relays (CR) 256 C0 -- C377 Coil
Timer Contacts (T) 128 T0 -- T177 Coil
Counter Contacts (CT) 128 CT0 -- CT177 Coil
Stage Status Bits (S) 512 S0 -- S777 Coil
Timer Current Values (V) 128 V0 -- V177 Input Register
Counter Current Value (V) 128 V1000 -- V1177 Input Register
V Memory, user data (V) 1024 V2000 -- V3777 Holding Register
V Memory, user data (V) 256 V4000 -- V4377 Holding Register
Non--volatile
V Memory, system (V) 106 V7620 -- V7737 Holding Register
V7746 -- V7777
C--4
Using the DCM with MODBUS

Determining the MODBUS Address


There are typically two ways that most host software packages allow you to specify a PLC
memory location. These are:
D By specifying the MODBUS data type and address
D By specifying a MODBUS address only.

If Your Host Software Many host software packages allow you to specify the MODBUS data type and the MODBUS
Requires the Data address that corresponds to the PLC memory location. This is the easiest method, but not all
Type and Address... packages allow you to do it this way. The various MODBUS data types were presented
earlier, but they have been included again in the following table.
The actual equation used to calculate the address depends on the type of PLC data you are
using. The PLC memory types are split into two categories for this purpose.
D Discrete -- X, SP, Y, CR, S, T (contacts), C (contacts)
D Word -- V, Timer current value, Counter current value
In either case, you basically just convert the PLC octal address to decimal and add the
appropriate MODBUS address (if required). The table below shows the exact equation used
for each group of data.

DL205 Memory Type QTY1 PLC Range MODBUS MODBUS


(Dec.) (Octal) Address Range Data Type
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type
Inputs (X) 320 X0 -- X477 2048 -- 2367 Input
Special Relays (SP) 144 SP0 -- SP137 3072 -- 3167 Input
SP540 -- SP617 3280 -- 3471
Outputs (Y) 320 Y0 -- Y477 2048 -- 2367 Coil
Control Relays (CR) 256 C0 -- C377 3072 -- 3551 Coil
Timer Contacts (T) 128 T0 -- T177 6144 -- 6271 Coil
Counter Contacts (CT) 128 CT0 -- CT177 6400 -- 6527 Coil
Stage Status Bits (S) 512 S0 -- S777 5120 -- 5631 Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V) 128 V0 -- V177 0 -- 127 Input Register
Counter Current Values (V) 128 V1000 -- V1177 512 -- 639 Input Register
V Memory, user data (V) 1024 V2000 -- V3777 1024 -- 2047 Holding Register
V Memory, user data (V) 256 V4000 -- V4377 2048 -- 2303 Holding Register
non--volatile
V Memory, system (V) 106 V7620 -- V7737 3984 -- 4063 Holding Register
V7746 -- V7777 4070 -- 4095
C--5
C--5
Using the DCM with MODBUS

Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Data Type
location V2100.
V2100 = 1088 decimal
1. Find V memory in the table. 1088 + Hold. Reg. = Holding Reg. 1088
2. Convert V2100 into decimal (1088).
3. Use the MODBUS data type from the table.

Example 2: Y20 Find the MODBUS address for output Y20. PLC Addr. (Dec) + Start Addr. + Data Type
1. Find Y outputs in the table. Y20 = 16 decimal
2. Convert Y20 into decimal (16). 16 + 2048 + Coil = Coil 2064
3. Add the starting address for the range
(2048).
4. Use the MODBUS data type from the table.

Example 3: T10 Find the MODBUS address to obtain the PLC Address (Dec.) + Data Type
Current Value current value from Timer T10.
T10 = 8 decimal
1. Find Timer Current Values in the table. 8 + Input Reg. = Input Reg. 8
2. Convert T10 into decimal (8).
3. Use the MODBUS data type from the table.

Example 4: C54 Find the MODBUS address for Control Relay PLC Addr. (Dec) + Start Addr. +Data Type
C54.
C54 = 44 decimal
1. Find Control Relays in the table. 44 + 3072 + Coil = Coil 3116
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Use the MODBUS data type from the table.
C--6
Using the DCM with MODBUS

If Your Host Software Some host software packages do not allow you to specify the MODBUS data type and
Requires an Address address. Instead, you specify an address only. This method requires another step to
ONLY determine the address, but it’s still fairly simple. Basically, MODBUS also separates the data
types by address ranges as well. So this means an address alone can actually describe the
type of data and location. This is often referred to as “adding the offset”. One important thing
to remember here is that two different addressing modes may be available in your host
software package. These are:
D 484 Mode
D 584/984 Mode
We recommend that you use the 584/984 addressing mode if your host software
allows you to choose. This is because the 584/984 mode allows access to a higher number
of memory locations within each data type. If your software only supports 484 mode, then
there may be some PLC memory locations that will be unavailable. The actual equation used
to calculate the address depends on the type of PLC data you are using. The PLC memory
types are split into two categories for this purpose.
D Discrete -- X, GX, SP, Y, CR, S, T (contacts), C (contacts)
D Word -- V, Timer current value, Counter current value
In either case, you basically just convert the PLC octal address to decimal and add the
appropriate MODBUS addresses (as required). The table below shows the exact equation
used for each group of data.

DL205 Memory Type QTY1 PLC Range MODBUS 484 Mode 584/984 MODBUS
(Dec.) (Octal) Address Range Address Mode Data Type
Address
For Discrete Data Types ... Convert PLC Addr. to Dec. + Start of Range + Appropriate Mode Address
Inputs (X) 320 X0 -- X477 2048 -- 2367 1001 10001 Input
Special Relays (SP) 144 SP0 -- SP137 3072 -- 3167 1001 10001 Input
SP540 -- SP617 3280 -- 3471
Outputs (Y) 320 Y0 -- Y477 2048 -- 2367 1 1 Coil
Control Relays (CR) 256 C0 -- C377 3072 -- 3551 1 1 Coil
Timer Contacts (T) 128 T0 -- T177 6144 -- 6271 1 1 Coil
Counter Contacts (CT) 128 CT0 -- CT177 6400 -- 6527 1 1 Coil
Stage Status Bits (S) 512 S0 -- S777 5120 -- 5631 1 1 Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Appropriate Mode Address
Timer Current Values (V) 128 V0 -- V177 0 -- 127 3001 30001 Input Reg
Counter Current Values (V) 128 V1000 -- V1177 512 -- 639 3001 30001 Input Reg
V Memory, user data (V) 1024 V2000 -- V3777 1024 -- 2047 4001 40001 Hold Reg.
V Memory, user data (V) 256 V4000 -- V4377 2048 -- 2303 4001 40001 Hold Reg.
non--volatile
V Memory, system (V) 106 V7620 -- V7737 3984 -- 4063 4001 40001 Hold Reg.
V7746 -- V7777 4070 -- 4095
C--7
C--7
Using the DCM with MODBUS

Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Mode Address
584/984 Mode location V2100.
V2100 = 1088 decimal
1. Find V memory in the table. 1088 + 40001 = 41089
2. Convert V2100 into decimal (1088).
3. Add the MODBUS starting address for the
mode (40001).

Example 2: Y20 Find the MODBUS address for output Y20. PLC Addr. (Dec) + Start Address + Mode
584/984 Mode 1. Find Y outputs in the table. Y20 = 16 decimal
2. Convert Y20 into decimal (16). 16 + 2048 + 1 = 2065
3. Add the starting address for the range
(2048).
4. Add the MODBUS address for the mode
(1).

Example 3: T10 Find the MODBUS address to obtain the PLC Address (Dec.) + Mode Address
Current Value current value from Timer T10.
T10 = 8 decimal
484 Mode 1. Find Timer Current Values in the table. 8 + 4001 = 4009
2. Convert T10 into decimal (8).
3. Add the MODBUS starting address for the
mode (40001).

Example 4: C54 Find the MODBUS address for Control Relay PLC Addr. (Dec) + Start Address + Mode
584/984 Mode C54.
C54 = 44 decimal
1. Find Control Relays in the table. 44 + 3072 + 1 = 3117
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Add the MODBUS address for the mode
(1).
Using the DCM
D
with Modems
D--2
Using the DCM with Modems

Introduction
There are some applications that require a remote connection to the PLC. These remote
connections require you to use a modem to communicate between the Personal Computer and
the PLC system. Although this manual tends to focus on using the DCM in networking
applications, there are a tremendous number of people who simply use the DCM as an extra
communications port. The DCM provides additional flexibility in configuration and baud rates
compared to the built-in port on the CPU, so it’s a logical choice for use with a modem.
It is not hard to establish remote communications with a PLC system via a modem. This
appendix provides some guidelines to help you setup the communications link.

System Components There are typically two types of communication paths for modem applications.
D Telephone modems
D Radio modems
Both serve the same basic function, which is to enable data communications over a long
distance. However, your choice really depends on your particular application. Radio modems
are typically more expensive and can be more difficult to use in some situations. But if you
don’t have phone lines or dedicated cabling in the area, your choice may be restricted to radio
modems anyway.
For the DL205 family of products, any system that is designed to handle modem
communications usually contains components from the following list.
D PLC System with DCM
D PLC System with DL240 CPU bottom port
D Personal Computer
D 2 modems (one on each end)
Telephone
Modems

Radio
Modems
D--3
D--3
Using the DCM with Modems

Possible Even though most all systems have one or more of the system components, there are a
Configurations couple of ways that they can be used.
PC Master — Some people need to use modems between a personal computer and the PLC
system so that they can do remote programming and/or data monitoring with PC-based
software, such as DirectSOFT or WonderWare. In this case, the personal computer is the
master and the PLC system is the remote slave station.
DCM Master — In other situations, you may be using a DCM as the remote communications
master instead of a personal computer. If you are considering this, you must have one of the
following situations.
D You have a Leased-line — You can have a leased (dedicated) phone line if
telephone modems are used. A dedicated line is necessary because the DCM
cannot issue the dial-up commands, so the carrier must be active at all times.
D You have a Radio Link — You also have the option of using radio modems.
This is useful when it is not feasible to have hard-wired communications cabling
between the remote stations.
In either case, the cabling and setup requirements share many similarities, which are
covered later in this Appendix.

PC as Master DCM as Slave

DCM as Master DCM as Slave

Choosing a Modem With today’s prices, it is possible to buy a high quality modem for a reasonable price. We
recommend that you buy a modem not mainly because it is inexpensive, but because it has a
good reputation. This will save you money (and time) over the long run. We also suggest that
you spend a few extra bucks to get an external modem if possible. The internal versions
typically do not have status indicator lights and are much harder to debug when things don’t
work correctly.
We have established communications between a personal computer and our PLCs while
using the following brands of modems:
D US Robotics Sportster (not the Sportster Si)
D MultiTech
D Hayes Optima
D Supra

We use the US Robotics Sportster modems here in our office and they work quite well. We
also think the MultiTech modems are great, but they are more expensive. There are also
some modems that we have encountered problems with when used with our equipment.
Because of this, we do not recommend BOCA modems.
D--4
Using the DCM with Modems

Step 1: Set the DCM Switches


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 It is important that you select the following communications parameters when you use the
DCM for remote communications.
D 9600 baud
D NO parity
The important part is the parity setting. Most popular modems cannot transmit an odd
number of bits per character. If parity is enabled, each character would consist of 1 start bit, 8
data bits, 1 parity bit and 1 stop bit, making a total of 11 bits per character. Since this is an odd
number, the modem would not work properly. You can experiment with the baud rate settings,
but make sure all components are set to the same baud rate.

Delay Time If you’re using a radio modem, you may have to set a delay time for the communications. This
time is necessary to allow time for the radio to “key-up” before the data is transmitted. You
must match the settings required by your modem.

SW5 Switch Positions


Baud 1 2 3
1
Baud Rate 300 ON OFF OFF
2 600 OFF ON OFF
(9600 shown)
3 1200 ON ON OFF
NO Parity 2400 OFF OFF ON
4 4800 ON OFF ON
Set to OFF 5 9600 OFF ON ON
6 19200 ON ON ON
Delay Time 38400 OFF OFF OFF
Switch Positions 7
Time* 6 7 8 (see modem
manual) 8
0 OFF OFF OFF
2 ON OFF OFF OFF ON
5 OFF ON OFF
10 ON ON OFF
20 OFF OFF ON
50 ON OFF ON
100 OFF ON ON
500 ON ON ON
*Delay time in milliseconds

ON
D--5
D--5
Using the DCM with Modems

Delay Time You may recall that we mentioned a couple of scenarios where you may be using a DCM
Considerations for connected to a modem as the master station and a DL240 CPU connected to a modem as the
Networks with DL240 slave station. If you have such a situation, there are a couple of things that you may have to
Slaves take into consideration.
If you are using a radio modem connected to V7632
the bottom port of a DL240, you will probably
have to set a delay time for the CPU port. You MSB LSB
can do this by loading a BCD value into X X X X
V7632. This is a special V-memory location
Delay Codes Baud Rate Codes
that can define the baud rate and/or time
delay for the bottom port. We recommend that 00 No delay 00: 300 baud
you do this on the first scan within your ladder 01 2ms delay 01: 1200 baud
program. The following diagram provides a 02 5ms delay 02: 9600 baud
table of the settings and an example of some 03 10ms delay 03: 19200 baud
simple setup logic that could be included in 04 20ms delay
your RLL program.
05 50ms delay
06 100ms delay
07 500ms delay

Example:
First Scan Only, Load Delay Time of 5ms & Baud Rate of 19200 for Bottom Port
V7632
Delay Time Baud Rate Delay Codes Baud Rate Codes
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 00 No delay 00: 300 baud
0 0 0 0 00 1 0 0 0 0 0 0 1 1 0 01 2ms delay 01: 1200 baud
02 5ms delay 02: 9600 baud
03 10ms delay 03: 19200 baud
0 2 0 3 04 20ms delay
05 50ms delay
06 100ms delay
Setup Rung 07 500ms delay

SP0 Use the LD (Load) instruction to load the BCD codes for
LD each parameter into the accumlator. The number 0203 is
K0203 just the code used for our particular example, which is a
5ms delay, 19.2K baud.

OUT Place the value in memory location V7632


V7632

Main Ladder Program Begins


X X After the parameter setup rung(s) above, we begin the
normal ladder program. Use your actual program for this
and the following rungs.
Y
D--6
Using the DCM with Modems

Step 2: Choose the Proper Cables


The exact cables needed really depend on your particular application. In any case, you will
probably use one or more of the following connections.
D Personal Computer to modem connection
D Modem to DCM connection
D Modem to DL240 connection

Connecting a Modem Your choice of cable for connecting the modem to your personal computer depends on
to your Personal whether you have a 9-pin port or a 25-pin port on your COM card. In either case, it’s usually
Computer easier to buy a cable rather than make one. We suggest you check your modem
documentation to see what they recommend. If your documentation does not recommend a
cable, you could try the following sources.
D Radio Shack
D Black Box Catalog
Some of you techno-wizards will want to build your own cable. Here are the pinouts that are
usually required. Again, check your modem documentation for the exact requirements.

NOTE: The 9-pin diagram has confused many techno--wizards over the years because it
shows TXD -- TXD and RXD -- RXD connections. Believe it or not this is actually correct.
Why? Because the 9-pin connector conforms to the IBM standard for DTE and the 25-pin
side conforms to the standard for DCE. This results in the slight confusion over the
terminology used to label the TXD and RXD pins.

9 to 25 Pin Cable 25 to 25 Pin Cable

PC Modem PC Modem
RS232C RS232C
2 RXD 2 TXD 2 TXD 2 TXD
3 TXD 3 RXD
3 RXD 3 RXD
5 GND 7 GND 7 GND 7 GND
1 DCD 8 DCD 4 RTS 4 RTS
4 DTR 20 DTR
5 CTS 5 CTS
6 DSR 6 DSR 6 DSR 6 DSR
7 RTS 4 RTS 8 DCD 8 DCD
8 CTS 5 CTS 20 DTR 20 DTR
9 RI 22 RI

9-pin
Connector

25-pin Connector 25-pin Connector 25-pin Connector


D--7
D--7
Using the DCM with Modems

Connecting a Modem The PLC lies on the other end of the remote communication link and will typically have a DCM
to the DCM as the communications interface. Just as you needed a cable to connect your personal
computer to the modem, you’ll also need a cable between the PLC system (DCM) and the
receiving modem. Since the DCM and the modem have 25-pin connectors, use the
straight-through 25-pin to 25-pin cable diagram shown here.
25--pin to 25-pin Cable 25--pin to 25-pin Cable
Phone Modem DCM Radio Modem DCM
RS232C RS232C
2 TXD 2 TXD 2 TXD 2 TXD
3 RXD 3 RXD 3 RXD 3 RXD
7 GND 7 GND 7 GND 7 GND
4 RTS 4 RTS 4 RTS 4 RTS
5 CTS 5 CTS 5 CTS 5 CTS
6 DSR 6 DSR
8 DCD 8 DCD
20 DTR 20 DTR

You can use our D3--DSCBL--2 with a null modem adapter to quickly build a cable that can
connect the modem to the D2--DCM. You’ll need the following parts, which can be obtained at
most any electronics store. Since there seems to be a Radio Shack on every corner, we’ve
included their part numbers.
D D3--DSCBL--2 — PLCDirect DL305 Programming Cable
D 26--1496 — Radio Shack DB25 Null Modem Adapter
D 26--1388 — Radio Shack DB25 Male to DB9 Male Adapter

25 to 25 Pin
Null Modem
Adapter

9 to 25 Pin
Adapter
9 Pin Adapter

Connecting a Modem Use the cable diagram shown here to connect 25--pin to 25-pin Cable
to the DL240 a modem to the bottom port of a DL240 CPU.
DL240 Modem
RS232C
4 TXD 2 TXD
3 RXD 3 RXD
1 GND 7 GND
2 5V 4 RTS
5 RTS 5 CTS
6 GND 6 DSR

RJ12 Connector 8 DCD


20 DTR

25-pin Connector
D--8
Using the DCM with Modems

Step 3: Setting up the Modems


Use a Terminal You must use a terminal program of some kind, such as the Windows Terminal application, to
Program configure the modems. Once again, make sure you select the same communications
parameters for all system components. (Around our office we usually use 9600 baud, 8 data
bits, No parity, 1 stop bit, and hardware handshaking with good results.) Check your Windows
documentation for information on how to use the Terminal program.

Choose a COM Port First, you’ll need to choose the personal computer COM port that you want to use. We
suggest that you choose the same COM port that you normally would use with your
DirectSOFT Programming Software. If you have a mouse, it usually occupies COM 1, so
start by trying COM 2.

Configure the A modem will allow you to select certain operating characteristics by sending it special
Modems modem commands. The settings usually differ slightly between the local modem (at the
master) and the remote modem (at the slave). For the remote modem, make sure you use the
modem documentation to determine the setup commands to:
D Use auto answer (for the remote modem)
D Use baud rate adjustment (or select a fixed serial port baud rate of 9600)
D Turn off any data compression
D Use error correction
Write these settings to the modem’s non-volatile RAM. By saving it in non-volatile RAM, you
don’t have to worry about a power cycle wiping out your setup routine. Here are the setup
strings for several popular brands of modems.
D Hayes Optima 9600
Remote: AT&F N0 S37=9 S46=136 &C1 &K0 &Q5 &R1 &Y0 S0=1 &W0
Local: AT&F N0 S37=9 S46=136 &C1 &K0 &Q5 &R1 &Y0 &W0
D MultiTech MT932EAB
Remote: Start with the default DIP switch settings, but then set switch 1
to force DTR ON and set switch 5 to select Auto Answer mode.
AT&W1&F1
ATQ0$BA0$MB9600$SB9600
AT&E3&E7&E12&E14&W0
Local: (Uses the same settings except uses Q1 instead of Q0)
AT&W1&F1
ATQ1$BA0$MB9600$SB9600
AT&E3&E7&E12&E14&W0
D Supra FaxModem 14.4k V.32
Remote: AT&F0 N0 S37=9 %C0 \N3 &C1 &K0 &Q5 &R1 &Y0 S0=1
&W0
Local: AT&F0 N0 S37=9 %C0 \N3 &C1 &K0 &Q5 &R1 &Y0 &W0
D USRobotics Sportster
Remote: Start with the default DIP switch settings, but then set switch 1
to force DTR ON and set switch 5 to select Auto Answer
AT&F1&B0&N6&D0&H1&R1&I0&K0&W0

Local: Use default switch settings


AT&F1&D0&W0
D--9
D--9
Using the DCM with Modems

Step 4: Connect the Modems


If You are Using a To dial the remote modem, you need to use the Windows Terminal program (or other
Personal Computer package). You must dial the modem by sending the following command:
as Master AT &D0 DT telephone number
The “&D0” command is very important and tells the modem not to hang up the line when the
DTR signal is dropped. Since we will have to exit the terminal program, the communications
port is reset and the DTR signal is dropped. If the modem disconnected at this point, we
wouldn’t be able to connect to the remote PLC system with our software package.

NOTE: Assuming you have used the above command to connect to the remote site, you will
have to exit the terminal program completely. This is extremely important. You will have to
exit the terminal program completely. Otherwise, your software package, such as
DirectSoft, will not be able to get control of the communications port and you will not be able
to go online with the PLC.

If You are Using a If you are using the DCM as a master connected directly to a modem, then you must be using
DCM as Master one of two types of modems. In either case, there are no special procedures that are
required.
D Leased-line Modem — If you have a leased line modem, it tries to establish
communications with the remote modem as soon as the power is turned on.
The carrier stays active as long as the power is on. (That’s why they call them
“dedicated” lines.) After they are connected, the RX or WX instruction in the
RLL program controls the data transmission between the stations. That is,
when the RX or WX is executed, it automatically causes the DCM’s Request to
Send line to go high. The modem responds with a Clear to Send and the
communications begins.
D Radio Modems — If you have a radio modem, the RX or WX instruction in the
RLL program controls the data transmission between the stations. That is,
when the RX or WX is executed, it automatically causes the DCM’s Request to
Send line to go high. The modem responds with a Clear to Send and the
communications begins. The radio modem broadcasts the request and
(hopefully) the remote station will receive it and respond accordingly.
D--10
Using the DCM with Modems

Step 5: Start DirectSOFT


It’s really easy to use our Windows-based DirectSOFT programming software (and many
other software packages) over a modem. There are a few simple steps to follow that will
simplify the process.
1. First, make sure you have exited your terminal program that you used to setup the
modems. This is very important. If you fail to do this, the terminal program will still
“hold” the PC’s COM port and you will not be able to communicate with the PLC
system.
2. Next, start DirectSOFT as you normally would.
3. Create a new DirectSOFT communications link and use the PC COM port that you
used to connect your modem.
4. You will now be able to communicate with your PLC just like it were connected to
your computer. Follow the normal procedures for opening a program, connecting
to a PLC, etc.

NOTE: When you are done with the connection, you will have to exit DirectSOFT, restart the
terminal program, and disconnect the modem using the +++ (wait for OK response) and ATH
<CR>command sequence.

You might also like