The text of a manual · part 20 of 68
DL405 User Manual: Chapter 4: System Design and Configuration, pages 157 to 164
Pages 157 to 164 of 608, from DL405 User Manual
The original document is the PDF (8.2 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 AutomationDirect D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models
Page 157
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 easiest way is the use the fill command as shown. The example to the right fills zeros for slave numbers 2--7, which do not exist in our example system (6 bases x 4 = 24 locations, = 18 hex).
4--17
DirectSOFT LD K18 LDA O37710 FILL K0 C740 SET
On the last rung in the example program above, we set a special relay contact C740. This particular contact indicates to the CPU that the ladder program has just finished specifying a remote 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. Remote I/O Test Program
Now we can verify the remote I/O link and setup program operation. A simple quick check can be done with just one rung of ladder, shown to the right. It connects the first input of the remote base with the first output. After placing the PLC in RUN mode, we can go to the remote base and activate its first input. Then its first output should turn on.
DirectSOFT X60
Y40 OUT
System Design and Configuration
DL405 User Manual, 4th Edtition
Page 158
4--18
System Design and Configuration
Network Connections to MODBUSR and DirectNET Configuring the CPU’s Comm Ports
430 440 450
This section describes how to configure the CPU’s built-in networking ports. for either MODBUS or DirectNET. This will allow you to connect the DL405 PLC system directly to MODBUS networks using the RTU protocol, or to other devices on a DirectNET network. MODBUS hosts system on the network must be capable of issuing the MODBUS commands to 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. B). In the event a more recent version is available, check with your MODBUS supplier before ordering the documentation. For more details on DirectNET, order our DirectNET manual, part number DA--DNET--M. NOTE: For information about the MODBUS protocol see the Group Schneider website at: www.schneiderautomation.com. At the main menu, select Support/Services, Modbus Technical Manuals, PI--MBUS--300 Modbus Protocol Reference Guide or search for PIMBUS300. For more information about DirectNET protocol, order our DirectNET user manual, part number DA--DNET--M, or download it free from our website: www.automationdirect.com. Select Manuals/Docs > Online User Manuals > Misc. > DA--DNET--M. The DL430 and DL440 can be DirectNET slaves on port 1. Both the DL450’s Port 1 and Port 3 can operate as master or slave for both MODBUS and DirectNET. Port 1 has RS--232 and RS--422 signal levels available on separate pins, and Port 3 (DL450) uses RS--422 signal levels. Ports 1 and Port 3 on the DL450 share the 25-pin D-shell connector, as shown to the right. Connect one or both ports as shown below. Note that you cannot simultaneously use Port 1’s RS--232 signals and its RS--422 signals.
System Design and Configuration
Port 1
Port 3
DL430 DirectNET, N/A and slave only DL440 DirectNET or DirectNET or DL450 MODBUS, MODBUS, master/slave master/slave
Port 3
Port 1
1 TXD RXD RTS CTS 0V RXD+ RXD-CTS+
TXD+
14
TXD-RTS-RTS+
0V
CTS-TXD+ TXD--
13
25
RXD+ RXD--
NOTE: The recommended cable for RS--232 or RS--422 is Belden 8102 or equivalent.
DL405 User Manual, 4th Edition
Page 159
System Design and Configuration
4--19
You will need to determine whether the network connection is a 3-wire RS--232 type, or a 5-wire RS--422 type. Normally, we use RS--232 signals for shorter distances (15 meters max), for communications between just two devices. Use RS--422 signals for longer distances (1000 meters max.), and for multi-drop networks (from 2 to 248 devices). Be sure to use termination resistors at the both ends of RS--422 network wiring, matching the impedance rating of the cable (between 100 and 500 ohms). NOTE: If your DL405 is to be used as a MODBUS Master and the distance will be more than 1000 feet, you can use the MODBUS Network Master module, F4--MAS--MB, and use the RS--485 port. See the module on our website, www.automationdirect.com for more details.
RS--422 Network Master
RXD+ RXD-TXD+ TXD-Signal GND
TXD RXD
RS--232C Point-to-point Signal GND
PORT 1 RS--232C
PORT 1 RS--422
PORT 3 RS--422
2 3 4 5 7
14 TXD+ 16 TXD-9 RXD+ 10 RXD-18 RTS-19 RTS+ 11 CTS+ 23 CTS-7 0V
12 TXD+ 13 TXD-24 RXD+ 25 RXD-7 0V
TXD RXD RTS CTS 0V
RS--422 Network Slaves
System Design and Configuration
DL405 User Manual, 4th Edtition
Page 160
4--20
System Design and Configuration
MODBUS Port Configuration
430 440 450
In DirectSOFT, choose the PLC menu, then Setup > Secondary Comm Port. S Port: From the port number list box at the top, choose Port 1 or 3. S Protocol: Click the box to the left of MODBUS to select it (use AUX 56 on the HPP, and select MBUS). The dialog below will appear.
3
S S
System Design and Configuration
S
S
S S
Timeout: 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 the port waits to send a message after it’s ready to send. For port 1, it activates the RTS line before it begins transmitting (assuming CTS is already active). The port will not transmit if the CTS input is false. Station Number: For making the CPU port a MODBUSR master, choose “1”. The possible range for MODBUS slave numbers is from 1 to 247, but the DL450 network instructions will access only slaves 1 to 90. Each slave must have a unique number. At powerup, the port is automatically a slave, unless and until the DL450 executes ladder logic network instructions which 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. Refer to the appropriate product manual for details. Stop Bits: Choose 1 or 2 stop bits for use in the protocol. Parity: Choose none, even, or odd parity for error checking. Then click the button indicated to send the Port configuration to the CPU, and click Close.
DL405 User Manual, 4th Edition
Page 161
System Design and Configuration DirectNET Port Configuration
430 440 450
4--21
In DirectSOFT, choose the PLC menu, then Setup > Secondary Comm Port. S Port: From the port number list box, choose Port 1 or 3 (DL450 only). S Protocol: Click the box to the left of DirectNET to select it (use AUX 56 on the HPP, then select DNET). The dialog below will appear.
S S
S
S S S
Then click the button indicated to send the Port configuration to the CPU, and click Close.
DL405 User Manual, 4th Edtition
System Design and Configuration
S
Timeout: amount of time the port will wait after it sends a message to get a response before logging an error. RTS delay time: the amount of time the port waits to send a message after it’s ready to send. For port 1, it activates the RTS line before it begins transmitting (assuming CTS is already active). The port will not transmit if the CTS input is false. Station Number: For making 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 DL450 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 between hex or ASCII formats.
Page 162
4--22
System Design and Configuration
Network Slave Operation This section describes how other devices on a network can communicate with a CPU port that you have configured as a DirectNETslave or MODBUS slave (DL450). A MODBUS host must use the MODBUS RTU protocol to communicate with the DL450 as a slave. The host software must send a MODBUS function code and MODBUS address to specify a PLC memory location the DL450 comprehends. The DirectNET host just uses normal I/O addresses to access any DL405 CPU and system. No CPU ladder logic is required to support either MODBUS slave or DirectNET slave operation. MODBUS Function The MODBUS function code determines whether the access is a read or a write, and Codes Supported whether to access a single data point or a group of them. The DL450 supports the MODBUS function codes described below.
430 440 450
430 440 450
MODBUS Function Code 01
Read a group of coils
Y, CR, T, CT, GY
02
Read a group of inputs
X, SP, GX
05 (slave only)
Set / Reset a single coil
Y, CR, T, CT
Set / Reset a group of coils
Y, CR, T, CT
15 03, 04
Read a value from one or more registers V
06 (slave only) 16
MODBUS Data Types Supported
Write a value into a single register
V
Write a value into a group of registers
V
The memory types in a DL405 system include X input, Y output, C control relay, V memory data registers, etc. MODBUS uses differently named data types. So, you will need to determine which MODBUS data type corresponds to any desired PLC memory location by using the cross-reference table below.
DL450 Memory Type
System Design and Configuration
DL405 Data Types Available
Function
Quantity (Decimal)
PLC Range (Octal)
Corresponding MODBUS Data Type
Rx Function Code
Inputs (X)
1024
X0 -- X1777
Input
02
Global Inputs (GX)
1536
GX0 -- GX2777
Input
02
Special Relays (SP)
512
SP0 -- SP137 SP320 -- SP717
Input
02
Outputs (Y)
1024
Y0 -- Y1777
Coil
01
Global Outputs (GY)
1536
GY0 -- GY2777
Coil
01
Control Relays (CR)
2048
C0 -- C3777
Coil
01
Timer Contacts (T)
256
T0 -- T377
Coil
01
Counter Contacts (CT)
256
CT0 -- CT377
Coil
01
Stage Status Bits (S)
1024
S0 -- S1777
Coil
01
Timer Current Values (V)
256
V0 -- V377
Input Register
03
Counter Current Value (V)
256
V1000 -- V1377
Input Register
03
V--Memory, user data (V)
3072 12288
V1400 -- V7377 V10000 -- V37777
Holding Register
03
V--Memory, system (V)
320
V700 -- V777 V7400 -- V7777
Holding Register
03
DL405 User Manual, 4th Edition
Page 163
System Design and Configuration Determining the MODBUS Address
4--23
There are typically two ways that most host software conventions allow you to specify a PLC memory location. These are: S By specifying the MODBUS data type and address S By specifying a MODBUS address only.
If Your Host Software Many host software packages allow you to specify the MODBUS data type and the Requires the Data MODBUS address that corresponds to the PLC memory location. This is the easiest Type and Address... method, but not all packages allow you to do it this way. The various MODBUS data types were presented earlier, but they have been included again in the following table.
The actual equation used to calculate the address depends on the type of PLC data you are using. The PLC memory types are split into two categories for this purpose. S Discrete -- X, SP, Y, CR, S, T, C (contacts) S 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.
DL450 Memory Type
QTY (Dec.)
MODBUS Address Range (Decimal)
PLC Range (Octal)
For Discrete Data Types .... Convert PLC Addr. to Dec.
+
Start of Range
MODBUS Data Type + Data Type
1024
X0
--
X1777
2048
--
3071
Input
Special Relays (SP)
512
SP0 SP320
---
SP137 SP717
3072 3280
---
3167 3535
Input
Outputs (Y)
1024
Y0
--
Y1777
2048
--
3071
Coil
Control Relays (CR)
2048
C0
--
C3777
3072
--
5119
Coil
Timer Contacts (T)
256
T0
--
T377
6144
--
6399
Coil
Counter Contacts (CT)
256
CT0
--
CT377
6400
--
6655
Coil
Stage Status Bits (S)
1024
S0
--
S1777
5120
--
6143
Coil
Global Inputs (GX) *
1536
GX0
--
GX2777
0
--
1535
Input
Global Outputs (GY) *
1536
GY0
--
GY2777
0
--
1535
Coil
For Word Data Types .... Timer Current Values (V)
Convert PLC Addr. to Dec.
+
Data Type
256
V0
--
V377
0
--
255
Input Register
Counter Current Values (V) 256
V1000
--
V1377
512
--
767
Input Register
V--Memory, user data (V)
3072 12288
V1400 -V10000 --
V7377 V37777
768 4096
---
3839 16383
Holding Register
V--Memory, system (V)
320
V700 V7400
V777 V7777
448 3480
---
768 3735
Holding Register
---
* Note: The total of GX and GY global I/O points cannot exceed 1536 points.
DL405 User Manual, 4th Edtition
System Design and Configuration
Inputs (X)
Page 164
4--24
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
Find the MODBUS address for User V location V2100. 1. Find V--memory in the table. 2. Convert V2100 into decimal (1088). 3. Use the MODBUS data type from the table. V--Memory, user data (V)
Example 2: Y20
System Design and Configuration
V1400 -V7377 V10000--V37777
1024
Y0
--
Y1777
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)
Example 4: C54
V2100 = 1088 decimal 1088 + Hold. Reg. = Holding Reg. 1088
768 4096
---
3839 16383
Holding Register
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. Outputs (Y)
Example 3: T10 Current Value
3072 12288
PLC Address (Dec.) + Data Type
256
V0
--
2048
--
3071
Coil
PLC Address (Dec.) + Data Type T10 = 8 decimal 8 + Input Reg. = Input Reg. 8
V377
0
--
255
Input Register
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. Control Relays (CR)
DL405 User Manual, 4th Edition
2048
C0
--
C3777
3072
--
5119
Coil