Automation Direct D0–DCM Manual

Data communications module
Table of Contents

Advertisement

Quick Links

D0–DCM Data
Communications
Module
Manual Number D0–DCM–M

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the D0–DCM and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Automation Direct D0–DCM

  • Page 1 D0–DCM Data Communications Module Manual Number D0–DCM–M...
  • Page 2 WARNING Thank you for purchasing automation equipment from Automationdirect.com™, doing business as, AutomationDirect. 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.
  • Page 3 AVERTISSEMENT Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.comE, en faisant des affaires comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d’automatisation DirectLOGIC™ fonctionne en toute sécurité. Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les autres publications pertinentes) avant de l’installer ou de l’utiliser.
  • Page 4 Manual Revisions If you contact us in reference to this manual, please remember to include the revision number. Title: DL05/06 Data Communications Module Manual Number: D0–DCM–M Issue Date Description of Changes Original 8/05 Original Issue...
  • Page 5: Table Of Contents

    Table of Contents Chapter 1: Introduction Manual Overview ..............1–2 The Purpose of this Manual .
  • Page 6 Table of Contents DL05 Port Setup Examples ............3–11 Port 1 Example: Slave Mode Only .
  • Page 7 Table of Contents r RTU Chapter 5: D0–DCM Using MODBUS Network Slave Operation ............. 5–2 MODBUS Function Codes Supported .
  • Page 9: Chapter 1: Introduction

    Introduction In This Chapter..— Manual Overview — D0–DCM Hardware Features — D0–DCM Applications...
  • Page 10: Manual Overview

    1–2 Introduction Manual Overview The Purpose of This manual is designed to allow you to setup this Manual install your DL05/06 Data Communications Module (D0–DCM). This is the only manual you will need if you are using the D0–DCM as an extra general purpose communication port for your DL05/06 PLC system.
  • Page 11: Conventions Used

    1–3 Introduction Conventions Used The “light bulb” icon in the left-hand margin indicates a tip or shortcut. The “note pad” icon in the left–hand margin indicates a special note. The “exclamation mark” icon in the left-hand margin indicates a warning or caution. These are very important because the information may help you prevent serious personal injury or equipment damage.
  • Page 12: D0-Dcm Hardware Features

    1–4 Introduction D0–DCM Hardware Features The following diagram shows the D0–DCM hardware components. The communication parameters are configured using DirectSOFT32. There are no DIP switches to set on this module. The D0–DCM requires ladder logic programming to configure its communication parameters, unless the default settings are acceptable for the application.
  • Page 13: Applications

    1–5 Introduction Applications As a DirectNET The D0–DCM can be used as a network interface for applications that require data to Interface be shared between PLCs, or between PLCs and an intelligent device (such as a host computer). The D0–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.
  • Page 14: As An Extra Communication Port

    1–6 Introduction As an Extra The D0–DCM ports are similiar to the ports on the DL05 and DL06 CPUs. In general, Communication if you can connect a device to the CPU ports, then you can also connect the same Port device to the D0–DCM.
  • Page 15: Chapter 2: Installation, Network Cabling And Module Specifications

    Installation, Network Cabling and Module Specifications In This Chapter..— Inserting the D0–DCM into the PLC — Building the Communication Cable — Wiring Diagrams — Module Specifications...
  • Page 16: Inserting The D0-Dcm Into The Plc

    2–2 Installation and Setup Inserting the D0–DCM into the PLC D0–DCM Module Remove the front protective option slot cover by squeezing the pinch tabs and lifting the cover off. Remove the top option slot cover using small flat–head screwdriver or Installation similiar device.
  • Page 17: Building The Communication Cable

    2–3 Installation and Setup Building the Communication Cable There are several considerations that help determine the type of cable needed for your D0–DCM application. The next few pages discuss these considerations in detail. Consideration 1: The D0–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.
  • Page 18: Consideration 3: Cable Schematics

    2–4 Installation and Setup Consideration 2: The D0–DCM can support RS–232 (ports 1 and 2) or RS–422/485 (port 2) Electrical communication. Your application and configuration choice will help determine which Specification electrical specification is best for you. If you are using multi-drop, you must use RS–422 RS232C or or RS–485.
  • Page 19: Consideration 4: Cable Specifications

    2–5 Installation and Setup 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. The following specifications are to be used as a guideline. Structure .
  • Page 20: Wiring Diagrams

    2–6 Installation and Setup Wiring Diagrams D0–DCM Port 1 D0–DCM Port 2 RS–232 Network RS–232 Network Loop Back 6-pin Female Modular Connector D0–DCM PORT 1 Signal GND TXD 4 RXD 3 0V 1 D0–DCM Port 2 RS–485 Network Termination Resistor TXD+ / RXD+ TXD+ / RXD+ TXD+ / RXD+...
  • Page 21: D0-Dcm Port 2 Rs-422 Network

    2–7 Installation and Setup D0–DCM Port 2 RS–422 Network RXD+ RXD– TXD+ TXD– Signal GND PC/PLC Master Termination 9 TXD+ Resistor on 10 TXD– 13 RXD+ last slave only 6 RXD– Cable: Use Belden 11 RTS+ 9729 or equivalent 12 RTS– PORT 2 14 CTS+ (D0–DCM)
  • Page 22: Module Specifications

    2–8 Installation and Setup Module Specifications General Specifications Power Budget Requirement 250mA @ 5 VDC (not including external 5VDC consumption) DL05: 1; DL06: 4 Maximum Number of Modules Operating Temperature 32° F to 131° F (0° to 55° C) Storage Temperature –4°...
  • Page 23: Status Indicators

    2–9 Installation and Setup Port 2 Specifications Connector 15–pin female high–density D–shell Communications RS–232 RS–422/485 Protocol DirectNET master/slave (auto–dectection) K-Sequence slave MODBUS® RTU master/slave Non–sequence (ASCII IN/OUT) Station Number 0 – 247 Communication Data 8/7 data bits, 1 start bit, 1/2 stop bits Parity Bit None, Odd, Even 300, 600, 1200, 4800, 9600, 19200, 38400,...
  • Page 25: Chapter 3: D0-Dcm Module Configuration Registers

    D0–DCM Module Configuration Registers In This Chapter..— DCM Port Configuration Registers — DL05 Ladder Logic Port Setup Examples — DL06 Ladder Logic Port Setup Examples...
  • Page 26: Dcm Port Configuration Registers

    3–2 D0–DCM Setup DCM Port Configuration Registers Module The table below lists the special V-memory locations used by the DL05 and DL06 Configuration PLCs for the D0–DCM module. The following pages define each registers function. Registers Module Configuration DL05 and DL06 Option Slot Parameters Parameters Word...
  • Page 27 3–3 D0–DCM Setup Protocol Selection: Communications Port for DirectSOFT32 Programming: If you plan to program the CPU through the D0–DCM, then you can use either DirectNET protocol or our proprietary K-sequence protocol. Computer or Operator Interface: If you’re using the D0–DCM to connect a computer or operator interface, check your documentation to see which protocol the PC or OI is using.
  • Page 28 3–4 D0–DCM Setup A: Port 1 – Use word +0000 to set Port 1: Transmit Mode, • K–Sequence slave, DirectNET slave or MODBUS RTU slave protocol Protocol (or auto–detect for all three protocols) • HEX or ASCII transmit mode word +0000 7 6 5 4 3 2 1 Protocol Transmit Mode...
  • Page 29: B: Port 1 - Station Address, Baud Rate, Parity

    3–5 D0–DCM Setup B: Port 1 – Use word +0001 to set Port 1: Station Address, • Station address ranges from 0–247 (00–F7 Hex) Baud Rate, • Baud rates ranging from 9.6K to 115.2K bps Parity • Odd or No parity word +0001 0 9 8 7 6 5 4 3 2 1 Station...
  • Page 30: C: Port 2 – Rts On/Off Delay, Transmit Mode, Protocol, Comm Time–Out, Rs–485 Mode

    3–6 D0–DCM Setup C: Port 2 – Use word +0002 to set Port 2: RTS On/Off delay, • K–Sequence slave, DirectNET slave or MODBUS RTU slave protocol Transmit Mode, (or auto–detect for all three protocols) Protocol, • HEX or ASCII transmit mode Comm Time–out, •...
  • Page 31 3–7 D0–DCM Setup Port 2: Protocol Protocol Bit 7–4 Bit 7 Bit 6 Bit 5 Bit 4 (Hex) K–Sequence DirectNet MODBUS RTU Non–Sequence K–Seq / D–Net /MODBUS RTU Port 2: Communication Time–out (ms) K–Seq, D–Net, Non–Sequence Bit 10 Bit 9 Bit 8 MODBUS RTU Protocol...
  • Page 32: D: Port 2 – Station Address, Baud Rate, Data Bit, Stop Bit, Parity

    3–8 D0–DCM Setup D: Port 2 – Use word +0003 to set Port 2: Station Address, • Station address ranges from 0–247 (00–F7 Hex) Baud Rate, • Baud rates ranging from 9.6K to 115.2K bps Data Bit, Stop Bit, • Data Bit Length (7 or 8 bits) Parity •...
  • Page 33: E: Port 2 - Character Time-Out

    3–9 D0–DCM Setup Port 2: Data Bit Length Bit 12 8 Bit 7 Bit Port 2: Stop Bit Length Bit 13 1 Bit 2 Bit Port 2: Parity Parity Bit 15 Bit 14 No Parity Odd Parity Even Parity E: Port 2 – Use word +0006 to set Port 2: Character •...
  • Page 34: F: Port 1 And 2 Setup And Completion Code

    3–10 D0–DCM Setup F: Port 1 and 2 Word +0007 is used for Port 1 and Port 2 to : Setup and • request that the DCM recognizes changes in the port(s) communication Completion Code parameters from default or previous settings •...
  • Page 35: Dl05 Port Setup Examples

    3–11 D0–DCM Setup DL05 Port Setup Examples Port 1 Example: Selects auto–detect protocol mode (This port can (K–seq, D–Net and MODBUS) and serve as slave HEX transmit mode. only) Write configuration data into V7700. V7700 Selects station address 1, baud rate of 9600bps and odd parity.
  • Page 36: Port 2 Example: Directnet Master

    3–12 D0–DCM Setup Port 2 Example: Selects DirectNet protocol, HEX transmit DirectNet Master mode, RTS On/Off delay times are set to zero and RS–422/485 (4–wire) / RS–232 Write configuration data into V7702. V7702 Selects station address 1, baud rate of 19200bps, odd parity, 8–bit data K4601 length and 1 stop bit.
  • Page 37: Dl06 Port Setup Examples

    3–13 D0–DCM Setup DL06 Port Setup Examples The following examples assumes the D0–DCM is installed in slot 1. Port 1 Example: Selects auto–detect protocol mode Slave Mode Only (K–seq, D–Net and MODBUS) and HEX transmit mode. Write configuration data into V700 (based V700 on module slot location).
  • Page 38: Port 2 Example: Directnet Master

    3–14 D0–DCM Setup Port 2 Example: Selects DirectNet protocol, HEX transmit DirectNet Master mode, RTS On/Off delay times are set to zero and RS–422/485 (4–wire) / RS–232 Write configuration data into V702 (based V702 on module slot location). Selects station address 1, baud rate of 19200bps, odd parity, 8–bit data K4601 length and 1 stop bit.
  • Page 39: Chapter 4: Rll Programming For Communications

    RLL Programming for Communications In This Chapter..— PLC-to-PLC Communications — How RLL is Used for Communications — Network Instructions — Addressing the Different Memory Types — Special Relays for Communications — Example Program with One Read Instruction —...
  • Page 40: Plc-To-Plc Communications

    4–2 RLL Programming for Communications PLC-to-PLC Communications This chapter steps you through the development of a Relay Ladder Logic (RLL) program to enable one PLC to communicate with another PLC. For the experienced programmer of DirectLOGIC PLCs, the communication programs presented in this chapter will be simple to follow.
  • Page 41: Network Instructions

    4–3 RLL Programming for Communications Network Instructions Read (RX) and The Read (RX) and Write (WX) instructions are used by the master PLC to Read a Write (WX) block of data from another PLC or Write a block of data to another PLC. To perform their functions, the RX and WX boxes must be preceded in the ladder logic program Instructions by two Load instructions and one Load Address instruction.
  • Page 42: The Second Ld Instruction

    4–4 RLL Programming for Communications The Second LD second Load (LD) instruction Instruction determines the length of the data block to K114 be transmitted during the Read or Write communication. This instruction will also accept two data types. Use a “K” to designate the number as a constant.
  • Page 43: Read (Rx) Instruction

    4–5 RLL Programming for Communications Read (RX) The Read (RX) instruction specifies the Instruction memory location to be read from the slave K114 PLC. A block of data is read that begins at the specified memory location and extends the number of bytes specified in the second LD instruction.
  • Page 44: Addressing The Different Memory Types

    4–6 RLL Programming for Communications Addressing the Different Memory Types Some data types are inherently 16 bits long, for example timer and counter current values. Other data types are 1 bit long, for example: discrete inputs and outputs. Word-length and bit-length data are mapped into Word Memory, also known as V-memory, which allows you to address any of the different memory types as 16-bit words.
  • Page 45: Dl05 Cpu

    4–7 RLL Programming for Communications DirectSOFT32 You can address the different data types by any available convention shown in the is Flexible tables that follow. The largest block of data that can be sent in a single Read or Write operation is 128 bytes.
  • Page 46: Special Relays For Communications

    4–8 RLL Programming for Communications Special Relays for Communications The DirectLOGIC PLCs provide internal contacts (bits) for monitoring the status of communications. The internal contacts are called Special Relays (there are other Special Relays used for other purposes). There are two Special Relays for each slot in the PLC that will be used by DCM module.
  • Page 47: Program With One Read Instruction

    4–9 RLL Programming for Communications Program with One Read Instruction The Ladder View screen below is the program development screen in DirectSOFT32 Programming Software. This four rung program is explained in detail on page 4–10. This is a complete program although its function is very limited. There is also a two rung program that runs in the slave PLC, and it is also explained on page 4–10.
  • Page 48 4–10 RLL Programming for Communications Program for the In our example, the normally open contact Master PLC: labeled C0 is an internal control relay. Rung 1 When C0 is on, discrete output Y0 is energized. Rung 2 The second rung uses a Special Relay to identify a communication error.
  • Page 49: Program For The Master Plc

    4–11 RLL Programming for Communications Example Program with One Write Instruction The Ladder View screen below is the program development screen in DirectSOFT32 Programming Software. This four-rung program is explained in detail on page 4–12. This is a complete program although its function is very limited. There is also a two-rung program that runs in the responding PLC.
  • Page 50: Program For The Master Plc

    4–12 RLL Programming for Communications Program for the In our example, the normally open contact Master PLC: labeled X0 is a toggle switch input to a Rung 1 discrete input module. When X0 is on, Control Relay C0 is energized. Rung 2 The second rung uses a Special Relay to identify a communication error.
  • Page 51: Integrating Multiple Read And Write Instructions

    4–13 RLL Programming for Communications Integrating Multiple Read and Write Instructions Multiple Read and Write instructions require interlocks for sequencing because only one RX/WX instruction can be processed at once. Using interlocks, one RX/WX instruction is processed in each scan until all RX/WX instructions have been executed.
  • Page 52 4–14 RLL Programming for Communications Our three RX/WX instructions can be sequenced by the two contacts C50 Truth Table and C51. Two contacts provide four First RX/WX different binary states: Second RX/WX both off Third RX/WX C50 on and C51 off Fourth RX/WX C50 off and C51 on Fifth RX/WX...
  • Page 53: First Rx/Wx Instruction

    4–15 RLL Programming for Communications Second RX/WX SP122 C50 is normally open and C51 is Instruction normally closed. For this rung to be K209 executed, the C50 bit must be on and the C51 bit must be off, corresponding to the second row of the truth table. C50 was turned on in the previous rung.
  • Page 54: Shift Register

    4–16 RLL Programming for Communications Shift Register The Shift Register can be used for creating interlocks, as an alternative to using control relays. For a complete explanation of the function of the Shift Register, see the User Manual for your PLC. If you have more than a few RX/WX instructions, using control relays can become cumbersome.
  • Page 55: First Rx/Wx Instruction

    4–17 RLL Programming for Communications First RX/WX Instruction SP122 C60 is the interlocking contact. It is turned on by the Store If Equal rung K214 preceding this one. O40600 VC100 Second RX/WX Instruction SP122 C61 is the interlocking contact. It is turned on by the sequencing steps of K209 the Shift Register in a preceding rung.
  • Page 57: Chapter 5: D0-Dcm Using Modbus

    D0–DCM Using MODBUS In This Chapter..— Network Slave Operation — Network Master Operation...
  • Page 58: Network Slave Operation

    5–2 D0–DCM Using MODBUS Network Slave Operation This section describes how a MODBUS RTU master on a network can communicate with a D0–DCM using the MODBUS RTU protocol. A network master must send a MODBUS function code and MODBUS address to specify a PLC memory location in the DL05/06 CPU.
  • Page 59: If Your Host Software Or Master Requires The Data Type And Address

    5–3 D0–DCM Using MODBUS If Your Host Software Many MODBUS masters allow you to specify the MODBUS data type and the or Master Requires MODBUS address that corresponds to the PLC memory location. This is the easiest the Data Type and method, but not all packages allow you to do it this way.
  • Page 60 5–4 D0–DCM Using MODBUS DL06 Memory Type 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) – X777 2048 – 2560 Input Special Relays (SP) –...
  • Page 61: Example 1: V2100

    5–5 D0–DCM Using MODBUS The following examples show how to generate the MODBUS address and data type for hosts which require this format. Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Data Type location V2100. V2100 = 1088 decimal 1.
  • Page 62: If The Host Software Or Master Requires An Address Only

    5–6 D0–DCM Using MODBUS If the Host Software Some MODBUS masters do not allow you to specify the MODBUS data type and address. or Master Requires Instead, you specify an address only. This method requires another step to determine the address, but it is not difficult.
  • Page 63 5–7 D0–DCM Using MODBUS DL06 Discrete Data Types PLC Memory Type PLC Range MODBUS Address QTY (Dec.) (Octal) Range Access Global Inputs (GX) 2048 GX0–GX1746 10001 – 10999 Read only only GX1747 – GX3777 11000 – 12048 Inputs (X) X0 – X777 12049 –...
  • Page 64: Example 1: V2100

    5–8 D0–DCM Using MODBUS Example 1: V2100 Find the MODBUS address for User V PLC Address (Dec.) + Mode Address location V2100. V2100 = 1088 decimal 1. Find V memory in the table. 1088 + 40001 = 41089 2. Convert V2100 into decimal (1088). 3.
  • Page 65: Network Master Operation

    5–9 D0–DCM Using MODBUS Network Master Operation This section describes how the DL05/06 CPU can serve as a master on a MODBUS RTU network using the D0–DCM. This section discusses how to design the required ladder logic for network master operation. MODBUS Slaves Slave #1 Slave #2...
  • Page 66: Plc Memory Supported For Master Operation

    5–10 D0–DCM Using MODBUS PLC Memory Supported for The actual equation used to calculate the address depends on the type of PLC data you are Master Operation using. The PLC memory types are split into three categories for this purpose. •...
  • Page 67: Example 1: Calculating Word Plc Address

    5–11 D0–DCM Using MODBUS Your PC’s Windows calculator can be used for number conversions (i.e. decimal to octal). The Windows calculator must be in Calculator>View>Scientific mode to enable number conversions capability. Example 1: Find the PLC address to use to target MODBUS Calculating Word address 41025 in a server device.
  • Page 68: Building The Read (Rx) Or Write (Wx) Routine

    5–12 D0–DCM Using MODBUS Building the For network communications, you build the Read (RX) or Read (RX) or Write (WX) instructions into a A aaa Write (WX) routine which requires the four instructions Routine you see to the right. They must be used in the A aaa sequence shown.
  • Page 69: Step 2: Load Number Of Bytes To Transfer

    5–13 D0–DCM Using MODBUS Step 2: second Load (LD) instruction (BCD) Load Number of determines the number of bytes which will Bytes to Transfer be transferred between the master and slave in the subsequent WX or RX # of bytes to transfer instruction.
  • Page 70: Communications From A Ladder Program

    5–14 D0–DCM Using MODBUS Communications Typically network communications will SP121 from a last longer than 1 scan. The program must Ladder Program wait for the communications to finish before starting the next transaction. SP120 K114 DCM Communication Error DCM Port Busy O40600 Depending on which slot the DCM is in, it has two Special Relay contacts associated with it (see page 5–12 for special relays).

Table of Contents