Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 22 of 61

DL205 PLC User Manual, Volume 1 of 2: Chapter 4: System Design and Configuration, pages 195 to 204

Pages 195 to 204 of 592, from DL205 PLC User Manual, Volume 1 of 2

The original document is the PDF (13 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the PLC Direct D2-08ND3 and Koyo D2-08ND3

Page 195

Chapter 4: System Design and Configuration When configuring a Remote I/O channel for fewer than 7 slaves, we must fill the remainder of the table with zeros. This is necessary because the CPU will try to interpret any non-zero number as slave information. We continue our setup program from the previous page by adding a segment which fills the remainder of the table with zeros. The example to the right fills zeros for slave numbers 2–7, which do not exist in our example system.

DirectSOFT

1 2 OUTD V37710 3 4 OUTD 5 V37736 C740 6 SET 7 On the last rung in the example program above, we set a special relay contact C740. This particular contact indicates to the CPU the ladder program has finished specifying a remote 8 I/O system. At that moment the CPU begins remote I/O communications. Be sure to include this contact after any Remote I/O setup program. 9 Remote I/O Test Program Now we can verify the remote I/O link and 10 setup program operation. A simple quick DirectSOFT check can be done with one rung of ladder, X60 Y40 11 shown to the right. It connects the first input OUT of the remote base with the first output. After placing the PLC in RUN mode, we can 12 go to the remote base and activate its first input. Then its first output should turn on. 13 14 A B C D LD K0

DL205 User Manual, 4th Edition, Rev. A

4–31

Page 196

Chapter 4: System Design and Configuration

Network Connections to Modbus and DirectNET

1 Configuring Port 2 For DirectNET This section describes how to configure the CPU’s built-in networking ports for either 2 Modbus or DirectNET. This will allow you to connect the DL205 PLC system directly to

Modbus networks using the RTU protocol, or to other devices on a DirectNET network. For 3 more details on DirectNET, order our DirectNET manual, part number DA–DNET–M.

4 Configuring Port 2 For Modbus RTU Modbus hosts system on the network must be capable of issuing the Modbus commands to 5 read or write the appropriate data. For details on the Modbus protocol, please refer to the

Gould Modbus Protocol reference Guide (P1–MBUS–300 Rev. J). In the event a more recent 6 version is available, check with your Modbus supplier before ordering the documentation.

You will need to determine whether the network connection is a 3-wire RS–232 type, or a 5wire RS–422 type. Normally, the RS–232 signals are used for shorter distance (15 meters 7 max) communications between two devices. RS–422 signals are for longer distance (1000 meters max.) multi-drop networks (from 2 to 247 devices). Use termination resistors at both 8 ends of RS–422 network wiring, matching the impedance rating of the cable (between 100 and 500 ohms). 9 10 11 12 13 14 A B C D 230 240

250-1 260

230 240

250-1 260

RXD+ RXD– TXD+ TXD– Signal GND

RS–422 Multi–drop Network

PC/PLC Master

9 TXD+ 10 TXD– 13 RXD+ 6 RXD– 11 RTS+ 12 RTS– 14 CTS+ 15 CTS– 7 0V

PORT 1: DL250–1, DL260 (slave only) PORT 2: DL240 (slave only) 1 0V 3 RXD 4 TXD

RS–232 Point-to-point DTE Device

6-pin Female Modular Connector

Signal GND RXD RS–232 Master TXD

6

11

10

5

15

15-pin Female D-Sub connector

4–32

PORT 2 (DL250–1, DL260) RS–422 Slave

Port 1 Pinouts (DL250–1 / DL260)

Port 2 Pin Descriptions (DL240 only)

1 2 3 4 5 6

1 2 3 4 5 6

0V 5V RXD TXD 5V 0V

Power (–) connection (GND) Power (+) conection Receive Data (RS-232) Transmit Data (RS-232) Power (+) conection Power (–) connection (GND)

0V 5V RXD TXD RTS 0V

Port 2 Pin Descriptions (DL250–1 / DL260)

1

Termination Resistor on last slave only

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

5V TXD2 RXD2 RTS2 CTS2 RXD2– 0V 0V TXD2+ TXD2 – RTS2 + RTS2 – RXD2 + CTS2 + CTS2 –

5 VDC Transmit Data (RS-232) Receive Data (RS-232) Ready to Send (RS–232) Clear to Send (RS–232) Receive Data – (RS–422) (RS–485 DL260) Logic Ground Logic Ground Transmit Data + (RS–422) (RS–485 DL260) Transmit Data – (RS–422) (RS–485 DL260) Request to Send + (RS–422) (RS–485 DL260) Request to Send – (RS–422)(RS–485 DL260) Receive Data + (RS–422) (RS–485 DL260) Clear to Send + (RS422) (RS–485 DL260) Clear to Send – (RS–422) (RS–485 DL260)

DL205 User Manual, 4th Edition, Rev. A

Power (–) connection (GND) Power (+) conection Receive Data (RS-232) Transmit Data (RS-232) Request to Send Power (–) connection (GND)

The recommended cable for RS-232 or RS-422 is Belden 8102 or equivalent. The recommended cable for RS-485 is Belden 9841 or equivalent.

Note: The DL260 supports RS–485 multi–drop networking. See the Network Master Operation (DL260 Only) section later in this chapter for details.

Page 197

Chapter 4: System Design and Configuration

Modbus Port Configuration

1 • Protocol: Click the check box to the left of “MODBUS” (use AUX 56 on the HPP, and select 2 “MBUS”), and then you’ll see the dialog box below. • Timeout: The amount of time the port 3 will wait after it sends a message to get a response before logging an error. • RTS On Delay Time: The amount of 4 time between raising the RTS line and sending the data. 5 • RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data. 6 • Station Number: To make the CPU port a Modbus master, choose “1”. The 7 possible range for Modbus slave numbers is from 1 to 247, but the DL250–1 and DL260 WX and RX network instructions 8 used in Master mode will access only slaves 1 to 90. Each slave must have a 9 unique number. At powerup, the port is automatically a slave, unless and until the DL250–1 or DL260 executes ladder logic 10 network instructions which use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic 11 uses the port again. NOTE: The DL250–1 does not support the Echo Suppression feature • Baud Rate: The available baud rates 12 include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the 13 baud rates of all devices on the network to the same value. Refer to the appropriate product manual for details. 14 • Stop Bits: Choose 1 or 2 stop bits for use in the protocol. • Parity: Choose none, even, or odd parity for error checking. A • Echo Suppression: Select the appropriate radio button based on the wiring configuration used on port 2. B Then click the button indicated to send the Port configuration to the CPU, and click Close. C D In DirectSOFT, choose the PLC menu, then Setup, then “Secondary Comm Port”.

240 250-1 260 230

• Port: From the port number list box at the top, choose “Port 2”.

DL205 User Manual, 4th Edition, Rev. A

4–33

Page 198

Chapter 4: System Design and Configuration

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

DirectNET Port Configuration

230 In DirectSOFT, choose the PLC menu, then Setup, then “Secondary Comm Port”. 240 • Port: From the port number list box, choose “Port 2 ”. 250-1 • Protocol: Click the check box to the left of “DirectNET” (use AUX 56 on the HPP, then select “DNET”), and then you’ll see the dialog box below. 260

4–34

• Timeout: The amount of time the port will wait after it sends a message to get a response before logging an error. • RTS On Delay Time: The amount of time between raising the RTS line and sending the data. • RTS Off Delay Time: The amount of time between resetting the RTS line after sending the data. • Station Number: To make the CPU port a DirectNET master, choose “1”. The allowable range for DirectNET slaves is from 1 to 90 (each slave must have a unique number). At powerup, the port is automatically a slave, unless and until the DL250–1 or DL260 executes ladder logic instructions which attempt to use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the port again. • Baud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. • Stop Bits: Choose 1 or 2 stop bits for use in the protocol. • Parity: Choose none, even, or odd parity for error checking. • Format: Choose hex or ASCII formats.

Then click the button indicated to send the Port configuration to the CPU, and click Close.

DL205 User Manual, 4th Edition, Rev. A

Page 199

Chapter 4: System Design and Configuration

Network Slave Operation 230 240 250-1 260

This section describes how other devices on a network can communicate with a CPU port that you have configured as a DirectNET slave (DL240/250–1/260) or Modbus slave (DL250–1, DL260). A Modbus host must use the Modbus RTU protocol to communicate with the DL250–1 or DL260 as a slave. The host software must send a Modbus function code and Modbus address to specify a PLC memory location the DL250–1 or DL260 comprehends. The DirectNET host uses normal I/O addresses to access applicable DL205 CPU and system. No CPU ladder logic is required to support either Modbus slave or DirectNET slave operation.

1 2 3 4 Modbus Function Codes Supported The Modbus function code determines whether the access is a read or a write, and whether to

5 access a single data point or a group of them. The DL250–1 and DL260 support the Modbus function codes described below.

6 Modbus Function Code Function DL205 Data Types Available 7 8 9 Determining the Modbus Address There are typically two ways that most host software conventions allow you to specify a PLC 10 memory location. These are: • By specifying the Modbus data type and address 11 • By specifying a Modbus address only. If Your Host Software Requires the Data Type and Address 12 Many Host software packages allow you to specify the Modbus data type and the Modbus address that corresponds to the PLC memory location. This is the easiest method, but not all 13 packages allow you to do it this way. 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. 14 • Discrete – X, SP, Y, C, S, T (contacts), CT (contacts) • Word – V, Timer current value, Counter current value A In either case, you basically convert the PLC octal address to decimal and add the appropriate Modbus address (if required). The following table shows the exact equation used for each B group of data. C NOTE: For information about the Modbus protocol see www.Modbus.org and select Technical Resources. For more information about the DirectNET protocol, order our DirectNET User Manual, DA-DNET-M, or download the manual free from our website: www.automationdirect.com. Select Manuals/Docs>Online User D Manuals>Misc.>DA-DNET-M 230 240

250-1 260

01 02 05 15 03, 04 06 16

Read a group of coils Read a group of inputs Set / Reset a single coil (slave only) Set / Reset a group of coils Read a value from one or more registers Write a value into a single register (slave only) Write a value into a group of registers

Y, C, T, CT X, SP Y, C, T, CT Y, C, T, CT V V V

DL205 User Manual, 4th Edition, Rev. A

4–35

Page 200

Chapter 4: System Design and Configuration

DL250–1 Memory

Modbus Address

QTY (Dec.) PLC Range (Octal) Range (Decimal) Modbus Data Type Type 1 For Discrete Data Types ............. Convert PLC Addr. to Dec. + Start of Range + Data Type 2 3 4 5 For Word Data Types .............................. Convert PLC Addr. to Dec. + Data Type 6 7 8 Modbus Address Modbus Data Type DL260 Memory Type QTY (Dec.) PLC Range (Octal) Range 9 For Discrete Data Types ............. Convert PLC Addr. to Dec. + Start(Decimal) of Range + Data Type 10 11 12 13 For Word Data Types ............................. Convert PLC Addr. to Dec. + Data Type 14 A B C D Inputs (X)

512

512 1024 256 128 1024

X0 – X777 SP0 – SP137 SP320 – SP717 Y0 – Y777 C0 – C1777 T0 – T377 CT0 – CT177 S0 – S1777

2048 3072 3280 2048 3072 6144 6400 5120

Special Relays (SP)

512

Outputs (Y) Control Relays (C) Timer Contacts (T) Counter Contacts (CT) Stage Status Bits (S)

Timer Current Values (V) Counter Current Values (V)

V-Memory, system (V)

256 128 3072 4096 256

V0 – V377 V1000 – V1177 V1400 – V7377 V10000 – V17777 V7400 – V7777

0 – 255 512 – 639 768 – 3839 4096 – 8191 3480 – 3735

Inputs (X) Remote Inputs (GX) Special Relays (SP) Outputs (Y) Remote Outputs (GY) Control Relays (C) Timer Contacts (T) Counter Contacts (CT) Stage Status Bits (S)

1024 2048 512 1024 2048 2048 256 256 1024

X0 – X1777 GX0 – GX3777 SP0 – SP777 Y0 – Y777 GY0 – GY3777 C0 – C377 T0 – T177 CT0 – CT177 S0 – S777

2048 – 3071 3840 – 18431 3072 – 3583 2048 – 3071 18432 – 20479 3072 – 5159 6144 – 6399 6400 – 6655 5120 – 6143

Input Input Input Coil Coil Coil Coil Coil Coil

Timer Current Values (V) Counter Current Values (V)

256 256

V0 – V177 V1000 – V1177

0 – 255 512 – 767

Input Register Input Register

V-Memory, user data (V)

14.6K

V400 – V777 V1400 – V7377 V10000 – V35777

1024 – 2047

Holding Register

V-Memory, system (V)

256 1024

V7400 – V7777 V36000 – V37777

3480 – 4095 15360 – 16383

Holding Register

V-Memory, user data (V)

4–36

DL205 User Manual, 4th Edition, Rev. A

– – – – – – – –

2560 3167 3535 2560 4095 6399 6527 6143

Input Input Coil Coil Coil Coil Coil

Input Register Input Register

Holding Register Holding Register

Page 201

Chapter 4: System Design and Configuration The following examples show how to generate the Modbus address and data type for hosts which require this format. Example 1: V2100 PLC Address (Dec.) + Data Type Find the Modbus address for User V2100 = 1088 decimal V location V2100. 1088 + Hold. Reg. = Holding Reg. 1089 1. Find V memory in the table. 2. Convert V2100 into decimal (1089). 3. Use the Modbus data type from the table. Timer Current Values (V) Counter Current Values (V) V Memory, user data (V)

128 128 1024

V0 - V177 V1000 - V1177 V2000 - -V3777

0 - 127 512 - 639 1024 - 2047

Input Register Input Register Holding Register

PLC Addr. (Dec) + Start Addr. + Data Type

Example 2: Y20 Find the Modbus address for output Y20.

Y20 = 16 decimal 16 + 2049 + Coil =

Coil 2065

1. Find Y outputs in the table. 2. Convert Y20 into decimal (16). 3. Add the starting address for the range (2049). Outputs (Y) Control Relays (CR)

320 256

Y0 – Y477 C0 – C377

2049 – 2367 3072 - 3551

Modbus data type from the table.

Coil Coil

4. Use the

PLC Address (Dec.) + Data Type T10 = 8 decimal Input Reg. 9 8 + Input Reg. =

Example 3: T10 Current Value Find the Modbus address to obtain the current value from Timer T10. 1. Find Timer Current Values in the table. 2. Convert T10 into decimal (8). 3. Use the Modbus data type from the table. Timer Current Values (V) Counter Current Values (V)

128 128

V0 – V177 V1000 – V1177

Example 4: C54 Find the Modbus address for Control Relay C54.

0 – 128 512 – 639

Input Register Input Register

PLC Addr. (Dec) + Start Addr. +Data Type C54 = 44 decimal Coil 3117 44 + 3073 + Coil =

1. Find Control Relays in the table. 2. Convert C54 into decimal (44). 3. Add the starting address for the range (3073). 4. Use the Modbus data type from the table. Outputs (Y) Control Relays (C)

320 256

Y0 – Y477 C0 – C377

2048 - 2367 3073 – 3551

Coil Coil

DL205 User Manual, 4th Edition, Rev. A

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

4–37

Page 202

Chapter 4: System Design and Configuration

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4–38

If Your Modbus Host Software Requires an Address ONLY Some host software does not allow you to specify the Modbus data type and address. Instead, you specify an address only. This method requires another step to determine the address, but it is not difficult. Basically, Modbus 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: • 484 Mode • 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. • Discrete – X, GX, SP, Y, R, S, T, CT (contacts), C (contacts) • Word – V, Timer current value, Counter current value

In either case, you basically 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. Discrete Data Types Range PLC Range (Octal) Address (484 Mode)

Address Range (584/984 Mode) Modbus Data Type

Inputs (X) Special Relays (SP)

GX0 – GX1746 GX1747 – GX3777 X0 – X1777 SP0 – SP777

1001 – 1999 -------

10001 11000 12049 13073

– – – –

10999 12048 13072 13584

Input Input Input Input

Global Outputs (GY) Outputs (Y) Control Relays (C) Timer Contacts (T) Counter Contacts (CT) Stage Status Bits (S)

GY0 – GY3777 Y0 – Y1777 C0 – C3777 T0 – T377 CT0 – CT377 S0 – S1777

1 2049 3073 6145 6401 5121

1 2049 3073 6145 6401 5121

– – – – – –

2048 3072 5120 6400 6656 6144

Output Output Output Output Output Output

DL260 Memory Type Global Inputs (GX)

DL205 User Manual, 4th Edition, Rev. A

– – – – – –

2048 3072 5120 6400 6656 6144

Page 203

Chapter 4: System Design and Configuration Word Data Types Registers

PLC Range (Octal)

V-Memory (Timers) V-Memory (Counters)

V-Memory (Data Words)

V0 V1000 V1200 V1400 V1747 V2000 V10000

– – – – – – –

V377 V1177 V1377 V1746 V1777 V7377 V17777

Input/Holding (484 Mode)*

Input/Holding (585/984 Mode)*

3001/4001 3513/4513 3641/4641 3769/4769 -------

30001/40001 30513/40513 30641/40641 30769/40769 31000/41000 41025 44097

*Modbus: Function 04 The DL-250 supports function 04 read input register (Address 30001). To use function 04, put the number ‘4’ into the most significant position (4xxx) when defining the number of bytes to read. Four digits must be entered for the instruction to work properly with this mode.

LD K101 LD K4128

The maximum constant possible is 4128. This is due to the 128 maximum number of Bytes that the RX/WX instruction can allow. The value of 4 in the most significant position of the word will cause the RX to use function 04 (30001 range).

LDA O4000 RX Y0

1. Refer to your PLC user manual for the correct memory size of your PLC. Some of the addresses shown above might not pertain to your particular CPU. 2. For an automated Modbus/Koyo address conversion utility, search and download the file modbus_conversion.xls from the www.automationdirect.com website.

DL205 User Manual, 4th Edition, Rev. A

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

4–39

Page 204

Chapter 4: System Design and Configuration

Example 1: V2100 584/984 Mode

PLC Address (Dec.) + Mode Address Find the Modbus address for User V location 1 V2100. V2100 = 1088 decimal 1. Find V memory in the table 1088 + 40001 = 2. Convert V2100 into decimal (1088). 2 3. Add the Modbus starting address for the mode (40001). For Word Data Types... PLC Address (Dec.) + Appropriate Mode Address 3 4 Example 2: Y20 584/984 Mode PLC Addr. (Dec.) + Start Address + Mode Find the Modbus address for output Y20. 5 1. Find Y outputs in the table. Y20 = 16 decimal 2. Convert Y20 into decimal (16). 16 + 2048 + 1 = 6 3. Add the starting address for the range (2048). 4. Add the Modbus address for the mode (1). 7 8 Example 3: T10 Current Value 484 Mode PLC Address (Dec.) + Mode Address 9 Find the Modbus address to obtain the TA10 = 8 decimal current value from Timer T10. 8 + 3001 = 1. Find Timer Current Values in the table. 10 2. Convert T10 into decimal (8). 3. Add the Modbus starting address for the mode (3001). 11 For Word Data Types... PLC Address (Dec.) + Appropriate Mode Address 12 Example 4: C54 584/984 Mode 13 PLC Addr. (Dec.) + Start Address + Mode Find the Modbus address for Control Relay C54. C54 = 44 decimal 14 1. Find Control Relays in the table. 44 + 3072 + 1 = 2. Convert C54 into decimal (44). 3. Add the starting address for the range (3072). A 4. Add the Modbus address for the mode (1). B C Determining the DirectNET Address Addressing the memory types for DirectNET slaves is very easy. Use the ordinary native D address of the slave device itself. To access a slave PLC’s memory address V2000 via 41089

Timer Current Value (V) Counter Current Value (V) V Memory, User Data (V)

128 128 1024

V0 - V177 V1000 - V1177 V2000 - V3777

0 - 127 512 - 639 1024 - 2047

3001 3001 4001

30001 30001 40001

Input Register Input Register Hold Register

2065

Outputs (Y) Control Relays (CR) Timer Contacts (T)

320 256 128

Y0 - Y477 C0 - C377 T0 - T177

2048 - 2367 3072 - 3551 6144 - 6271

1 1 1

1 1 1

Coil Coil Coil

3009

Timer Current Value (V) Counter Current Value (V) V Memory, User Data (V)

128 128 1024

V0 - V177 V1000 - V1177 V2000 - V3777

0 - 127 512 - 639 1024 - 2047

3001 3001 4001

30001 30001 40001

Input Register Input Register Hold Register

3117

Outputs (Y) Control Relays (CR) Timer Contacts (T)

320 256 128

Y0 - Y477 C0 - C377 T0 - T177

2048 - 2367 3072 - 3551 6144 - 6271

1 1 1

1 1 1

230

240 250-1 260

4–40

DirectNET, for example, the network master will request V2000 from the slave. DL205 User Manual, 4th Edition, Rev. A

Coil Coil Coil