System Design and Configuration

System Design and Configuration
System Design and
Configuration
14
In This Chapter. . . .
— DL405 System Design Strategies
— Module Placement and Configuration
— Calculating the Power Budget
— Local I/O Expansion
— Remote I/O Expansion
— Network Connections to MODBUSR and DirectNET
— Network Slave Operation
— Network Master Operation
4--2
System Design and Configuration
DL405 System Design Strategies
I/O System
Configurations
The DL405 PLCs offer the following ways to add networking to the system:
S Local I/O -- consists of I/O modules located in the same base as the CPU.
S Expansion I/O -- consists of I/O modules in expansion bases located
close to the the local base. Expansion cables connect them to the local
CPU base’s serial bus in daisy-chain fashion.
S Remote I/O -- consists of I/O modules located in bases which are serially
connected to the local CPU base through a Remote Master module, or
may connect directly to port 3 on a DL450 CPU.
A DL405 system can be developed using many different arrangements of these
configurations. All I/O configurations use the standard complement of DL405 I/O
modules and bases. Below is a brief description of each of these configurations.
Examples of each configuration are discussed in detail later in this chapter.
Local I/O
CPU
(RM)
3280 ft. (1000m) Total distance
7 Bases per channel
R
M
Remote I/O
channel (DL450)
RS
1 meter max. length, each cable
System Design
and Configuration
EXP
EXP
Expansion I/O
-- 3 Expansion racks
maximum
-- DL430/440 up to
320 input and 320
outputs (includes I/O
in the local CPU base)
-- DL450 up to 1024
input and 1024 outputs
(includes I/O in the
local CPU base)
EXP
DL405 User Manual, 4th Edition, Rev. A
Remote I/O
DL440/430 supports a maximum of
2 channels. These channels can
be any combination of remote I/O.
DL450 supports a maximum of 3
channels. One remote channel
connects directly to the DL450
CPU. The other channel uses
Remote Masters in any
combination.
System Design and Configuration
Networking
Configurations
4--3
The DL405 PLCs offer the following four ways to add I/O modules to the system:
S Data Communications Module -- connects a DL405 system to devices
using the DirectNET protocol, or connects as a slave to a MODBUS
network.
S DL450 Communications Ports -- the DL450 CPU has two extra (total of
four) built-in comm ports. It allow two network connections directly from the
CPU. See Chapter 3, CPU Specifications and Operation, for individual port
specifications, and the sections at the end of this chapter for network
connections.
S MODBUS Master Module -- You can use MODBUS master modules in
any slot of a DL405 system for connecting it as a master to a MODBUS
network, using the RTU protocol.
S MODBUS Slave Module -- You can use MODBUS slave modules in any
slot of a DL405 system for connecting it as a slave to a MODBUS
network, using the RTU protocol.
S TIWAYR Network Interface Module -- Interface to Texas Instruments and
Siemens TIWAY networks by using this module as a slave.
S Shared Data Network Module -- The Shared Data Network Module lets
you make peer--to--peer connections between DL405 PLC systems.
PEER-TO-PEER and
MASTER/SLAVE
COMMUNICATIONS
305
System Migration
or Expansion
DirectNET/MODBUSr Communication
(max. 3300ft/1000m)
DirectNET/MODBUSr
Communication
(max. 3300ft/1000m)
DirectNET Communication (max. 3300ft/1000m)
405
DCM MB DCM
MSTR
DL405 User Manual, 4th Edition, Rev. A
System Design
and Configuration
405
4--4
System Design and Configuration
Module Placement and Configuration
Valid Module/Unit
Locations
The most commonly used I/O modules for the DL405 system (AC, DC, AC/DC,
Relay and Analog) can be used in any base in your system. The table below lists by
category the valid locations for all modules/units in a DL405 system. Remember that
the power budget can limit the number of modules in a base (discussed later).
Module/Unit
CPUs
Local CPU Base
Local Exp. Base
Remote Base
CPU Slot Only
Expansion Units
CPU Slot Only
8/16/32pt DC Input Modules
64pt DC Input Modules
n
n
Note 1
n
n
n
Note 1, 2
AC Input Modules
n
n
n
AC/DC Input Modules
n
n
n
8/16/32pt DC Output Modules
n
n
n
64pt DC Output Modules
n
Note 1
n
Note 1, 2
AC Output Modules
n
n
n
Relay Output Modules
n
n
n
Analog Modules
n
n
n
Remote I/O
Remote Master
n
Remote Slave Unit
CPU Slot Only
Communications and Networking
Modules
n
CoProcessor Modules
n
n
Note 2
Specialty Modules
System Design
and Configuration
Interrupt
DL430 -- Slot 0 Only
DL440 -- Slots 0 & 1
DL450 -- Slots 0 & 1
High Speed Counter
n
PID Module
n
SDS
n
4 Loop Temp. Controller
n
Input Simulator
n
n
n
Filler
n
n
n
n
Note 1: When using 64 pt modules, you cannot use any specialty modules in slots 5, 6, and 7 in the
same base.
Note 2: Specialty modules are allowed in expansion bases only if you are using the DL450 CPU and all
bases in the system are the D4--xxB--1 type bases.
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
I/O Configuration
Methods
Automatic
Configuration
4--5
There are two methods of I/O configuration for the DL405 CPUs:
S Auto configuration -- the CPU automatically configures the I/O. It
assigns the lowest I/O numbers to the module in slot 0 (the slot next to
the CPU), the next set of I/O numbers to the next module in the base,
etc. The numbers are assigned only to modules actually in the base, not
to empty slots in the base. This is the default mode of the CPU.
S Manual configuration -- (DL440/DL450 only) allows you assign I/O
numbers. Numbers can be assigned to empty slots or in any order as
long as the numbers are assigned in groups of 16 or 32.
The DL405 CPUs automatically detect any installed I/O modules (including specialty
modules)at powerup, and establish the correct I/O configuration and addresses. For
most applications, you will never have to change the configuration.
I/O addresses use octal numbering, starting at X0 and Y0 in the slot next to the CPU.
The addresses are assigned in groups of 8, 16, 32, or 64 depending on the number
of points for the I/O module. The discrete input and output modules can be mixed in
any order, but there may be restrictions placed on some specialty modules. The
following diagram shows the I/O numbering convention for an example system.
Slot 0
8pt. Input
X0--X7
Slot 1
32pt. Output
Y0--Y37
Slot 2
16pt. Input
X10--X27
Slot 3
8pt. Input
X30--X37
Manual
Configuration
430 440 450
It may never become necessary, but DL440 and DL450 CPUs allow manual I/O
address assignment for any I/O slot(s) in local or expansion bases. You can
manually modify an auto configuration to match arbitrary I/O numbering. For
example, two adjacent input modules can have starting addresses at X10 and X200.
In automatic configuration, the addresses are assigned on 8-point boundaries.
Manual configuration, however, assumes that all modules are at least 16 points, so
you can only assign addresses that are a multiple of 20 (octal). For example, X30
and Y50 are not valid addresses. You can still use 8 point modules, but 16 addresses
will be assigned and the upper eight addresses will be unused.
WARNING: If you manually configure an I/O slot, the I/O addressing for the
other modules may change. This is because the DL405 CPUs do not allow you
to assign duplicate I/O addresses. You must always correct any I/O
configuration errors before you place the CPU in RUN mode. Uncorrected
errors can cause unpredictable machine operation that can result in a risk of
personal injury or damage to equipment.
DL405 User Manual, 4th Edition, Rev. A
System Design
and Configuration
Both the Handheld Programmer and DirectSOFT provide AUX functions that allow
you to automatically configure the I/O. For example, with the Handheld Programmer
AUX 46 executes an automatic configuration, which allows the CPU to examine the
installed modules and determine the I/O configuration and addressing. With
DirectSOFT, the PLC Configure I/O menu option would be used.
4--6
System Design and Configuration
Removing a
Manual
Configuration
After a manual configuration, the system will automatically retain the new I/O
addresses through a power cycle. You can remove (overwrite) any manual
configuration changes by simply performing an automatic configuration.
The following diagram shows how I/O addresses change after manually configuring
a slot.
Automatic
Manual
System Design
and Configuration
Power--On I/O
Configuration
Check
Slot 0
8pt. Input
X0--X7
Slot 1
32pt. Output
Y0--Y37
Slot 2
16pt. Input
X10--X27
Slot 3
8pt. Input
X30--X37
Slot 0
8pt. Input
X0--X7
Slot 1
32pt. Output
Y0--Y37
Slot 2
16pt. Input
X100--X117
Slot 3
8pt. Input
X20--X27
The DL405 CPUs can also be set to automatically check the I/O configuration on
power-up. By selecting this feature you can detect any changes that may have
occurred while the power was disconnected. For example, if someone places an
output module in a slot that previously held an input module, the configuration check
will detect the change and print a message on the Handheld Programmer or
DirectSOFT screen (use AUX 44 on the HPP to enable the configuration check).
If the system detects a change in the I/O configuration at power-up, an error code
E252 NEW I/O CONFIGURATION will be generated. You can use AUX 42 to
determine the exact base and slot location where the change occurred.
WARNING: You should always correct any I/O configuration errors before you
place the CPU into RUN mode. Uncorrected errors can cause unpredictable
machine operation that can result in a risk of personal injury or damage to
equipment.
When a configuration error is generated, you may actually want to use the new I/O
configuration. For example, you may have intentionally changed an I/O module to
use with a program change. You can use AUX 45 to select the new configuration, or,
keep the existing configuration stored in memory.
WARNING: Verify the I/O configuration being selected will work properly with
the CPU program. Always correct any I/O configuration errors before placing
the CPU in RUN mode. Uncorrected errors can cause unpredictable machine
operation that can result in a risk of personal injury or damage to equipment.
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
4--7
Calculating the Power Budget
Managing your
Power Resource
As you have seen, the I/O configuration depends on your choice of I/O modules,
bases, and I/O location. When determining the types and quantity of I/O modules
you will be using in the DL405 system it is important to remember there is a limited
amount of power available from the power supply to the system. We have provided a
chart to help you easily see the amount of power you will have with your CPU,
Expansion Unit or Remote Slave selection. The following chart will help you
calculate the amount of power you need with your I/O selections. At the end of this
section you will also find an example of power budgeting and a worksheet for your
own calculations.
If the I/O you chose exceeds the maximum power available from the power supply
you can resolve the problem by shifting some of the modules to an expansion base
which contains another power supply.
WARNING: It is extremely important to calculate the power budget correctly. If
you exceed the power budget, the system may operate in an unpredictable
manner which may result in a risk of personal injury or equipment damage.
CPU Power
Specifications
The following chart shows the amount of current available for the two voltages
supplied on the DL405 CPU, Expansion unit or Remote Slave unit. Use these
currents when calculating the power budget for you system. The Auxiliary 24V
Power Source mentioned in the table is a connection at the base terminal strip
allowing you to connect to devices or DL405 modules that require 24VDC.
Auxiliary 24V
Power Source
Current
Supplied in
mA.
Remote and
Expansion Units
5V Current
Supplied in
mA.
Auxiliary 24V
Power Source
Current
Supplied in
mA.
D4--430
3700
400
D4--EX
4000
400
D4--440
3700
400
D4--EXDC
4000
None
D4--440DC--1
3700
None
D4--EXDC--2
3700
None
D4--440DC--2
3700
None
D4--RS
3700
400
D4--450
3100
400
D4--RSDC
3700
None
D4--450DC--1
3100
None
H4--EBC
3470
400
D4--450DC--2
3100
None
H4--EBC--F
3300
400
Module Power
Requirements
The chart on the next page shows the amount of maximum current required for each
of the DL405 modules. Use these currents when calculating the power budget for
your system. If external 24VDC is required, the external 24V from the CPU power
supply may be used as long as the power budget is not exceeded.
DL405 User Manual, 4th Edition, Rev. A
System Design
and Configuration
CPUs
5V Current
Supplied in
mA.
4--8
System Design and Configuration
Device
5V Current
Required (mA)
External 24V
Current Req. (mA)
I/O Bases
80
None
D4--06B, D4--06BNX,
D4--06B--1
80
None
80
None
DC Input Modules
F4--04AD
85
100
F4--04ADS
270
120
F4--08AD
75
90
F4--04DA
120
180
F4--04DA--1
70
75 + 20 per channel
F4--04DA--2
90
75 + 20 per channel
D4--08ND3S
100
None
F4--04DAS--1
60
50 per channel
D4--16ND2
150
None
F4--04DAS--2
60
60 per channel
D4--16ND2F
150
None
F4--08DA--1
90
100 + 20 per channel
D4--32ND3--1
150
None
F4--16DA--1
90
100 + 20 per channel
D4--32ND3--2
150
None
F4--16DA--2
80
25 max.
D4--64ND2
300 (max)
None
F4--16AD--1
100
100
F4--16AD--2
75
100
D4--08NA
100
None
F4--08THM--n
120
50 + 20 per channel
D4--16NA
150
None
F4--08RTD
80
None
D4--16NA--1
150
None
Remote I/O
D4--ERM
320
None
D4--16NE3
150
None
D4--ERM--F
450
None
F4--08NES
90
None
D4--RM
300
None
D4--08TD1
150
35
D4--DCM
500
None
F4--08TD1S
295
None
H4--ECOM
530
None
D4--16TD1
200
125
H4--ECOM--F
670
None
D4--16TD2
400
None
H4--ECOM100
300
None
D4--32TD1
250
140
F4--MAS--MB
235
None
D4--32TD1--1
250
140 (5--15VDC)
CoProcessors™
D4--32TD2
350
120 / (4A max
including loads)
F4--CP128
305
None
D4--64TD1
800 (max)
None
F4--CP512
235
None
F4--CP128--T
350
None
D4--16SIM
150
None
D4--HSC
300
None
F4--16PID
160
None
F4--8MPI
225
170
F4--4LTC
280
75
H4--CTRIO
400
None
AC Input Modules
AC/DC Input Modules
DC Output Modules
System Design
and Configuration
External 24V
Current Req. (mA)
Analog Modules
D4--04B, D4--04BNX,
D4--04B--1
D4--08B, D4--08BNX,
D4--08B--1
5V Current
Required (mA)
Device
Communications and Networking
AC Output Modules
D4--08TA
250
None
D4--16TA
450
None
Relay Output Modules
D4--08TR
550
None
F4--08TRS--1
575
None
F4--08TRS--2
575
None
D4--16TR
1000
None
D4--HPP
320
None
DV--1000
150
None
Programming
DL405 User Manual, 4th Edition, Rev. A
Specialty Modules
4--9
System Design and Configuration
Power Budget
Calculation
Example
The following example shows how to calculate the power budget for the DL405
system.
Base #
0
Module Type
Auxiliary
Power Source
24 VDC Output (mA)
5 VDC (mA)
CPU/
D4--430
Expansion
Unit/
Remote Slave
Used
Slot 0
D4--16ND2
+ 150
+
0
Slot 1
D4--16ND2
+ 150
+
0
Slot 2
F4--04DA--1
+ 70
Slot 3
D4--08ND3S
+ 100
+
0
Slot 4
D4--08ND3S
+ 100
+
0
Slot 5
D4--16TD2
+ 400
+
0
Slot 6
D4--16TD2
+ 400
+
0
Slot 7
D4--16TR
+ 1000
+
0
+ 80
+
0
+ 320
+
0
3700
400
+ 155
Other
Base D4--08B--1
Handheld Prog D4--HPP
Maximum power required
3700--2950 =930 400 -- 300
155
= 100
1. Using the tables at the beginning of the Power Budgeting section of this
chapter fill in the information for the CPU/Expansion Unit/Remote Slave,
I/O modules, and any other devices that will use system power including
devices that use the 24 VDC output. Pay special attention to the current
supplied by either the CPU, Expansion Unit, and Remote Slave since they
do differ. Devices which fall into the “Other” category are devices such as
the Base and the Handheld programmer which also have power
requirements but do not directly plug into the base.
2. Add the current columns starting with Slot 0 and put the total in the row
labeled “Maximum power required”.
3. Subtract the row labeled “Maximum power required” from the row labeled
“CPU/Expansion Unit/Remote Slave Used”. Place the difference in the
row labeled “Remaining Power Available”.
4. If “Maximum Power Required” is greater than “CPU/Expansion
Unit/Remote Slave Used” in any of the three columns, the power budget
will be exceeded. It will be unsafe to used this configuration and you will
need to restructure your I/O configuration.
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
Remaining Power Available
2770
4--10
System Design and Configuration
Power Budget
Calculation
Worksheet
You may copy and use the following blank chart for your power budget calculations.
Base #
Module Type
5 VDC (mA)
Auxiliary
Power Source
24 VDC Output (mA)
CPU/
Expansion
Unit/
Remote Slave
Used
Slot 0
Slot 1
Slot 2
Slot 3
Slot 4
Slot 5
Slot 6
Slot 7
Other
Maximum Power Required
System Design
and Configuration
Remaining Power Available
1. Using the tables at the beginning of the Power Budgeting section of this
chapter fill in the information for the CPU/Expansion Unit/Remote Slave,
I/O modules, and any other devices that will use system power including
devices that use the 24 VDC output. Pay special attention to the current
supplied by either the CPU, Expansion Unit, and Remote Slave since they
do differ. Devices which fall into the “Other” category are devices such as
the Base and the Handheld programmer which also have power
requirements but do not directly plug into the base.
2. Add the current columns starting with Slot 0 and put the total in the row
labeled “Maximum power required”.
3. Subtract the row labeled “Maximum power required” from the row labeled
“CPU/Expansion Unit/Remote Slave Used”. Place the difference in the
row labeled “Remaining Power Available”.
4. If “Maximum Power Required” is greater than “CPU/Expansion
Unit/Remote Slave Used” in any of the three columns, the power budget
will be exceeded. It will be unsafe to used this configuration and you will
need to restructure your I/O configuration.
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
4--11
Local I/O Expansion
430 440 450
The following I/O base configurations will assist you in understanding the options
available in the DL405 series. Local and expanded bases are the most common and
cost effective way of installing I/O. With local and expanded I/O the CPU can
automatically configure the I/O for you. Use Remote I/O when it is necessary to
locate I/O at distances away from the CPU. Remote I/O will require additional ladder
programming to operate.
Local Base and I/O The local base is the base in which the
CPU resides. Local I/O modules reside in
the same base as the CPU. For example,
placing 32 point modules in all eight slots
in an 8-slot base will use 256 I/O points .
The status of each I/O point is updated
each I/O scan of the CPU.
Local Expansion
Base and I/O
16pt
Input
8pt
Input
32pt 16pt
8pt
16pt
Input Output Output Output
X0 X20 X30 Y0 Y20 Y30
------X17 X27 X67 Y17 Y27 Y47
CPU
Use local expansion when you need more I/O points or a greater power budget than
the local base provides. The expansion bases require a Local Expansion Unit (in the
place of a CPU), and a cable (either D4--EXCBL--1 or D4--EXCBL--2) to connect to
the local CPU base. The CPU base is always the first base in the expansion chain.
The following figure shows one CPU base, two expansion bases and examples of
I/O numbering.
DL430/440: supports a
maximum of 3 expansion bases,
and maximum of 320 input
points and 320 output points
(includes local base I/O)
8pt
Input
Expansion cable
output connection
CPU
16pt
Input
8pt
Input
8pt
8pt
Output Output
16pt
Output
X0 X10 X30 Y0 Y10 Y20
------X07 X27 X37 Y07 Y17 Y37
Maxi. 3.05 ft (1M)
Expansion Base
16pt
Input
Expansion cable
input connection
Expansion cable
output connection
Maxi. 3.05 ft (1M)
EXP
16pt
Input
8pt
Input
32pt
Input
16pt
8pt
Output Output
8pt
Output
8pt
Output
X40 X60 X100 X110 Y40 Y60 Y70 Y100
--------X57 X77 X107 X147 Y57 Y67 Y77 Y107
Expansion Base
8pt
Input
Expansion cable
input connection
EXP
8pt
Input
16pt
Input
16pt
Input
16pt
Input
16pt
Output
X150 X160 X170 X210 X230 Y110
------X157 X167 X207 X227 X247 Y127
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
DL450: supports a maximum
of 3 expansion bases, and
maximum of 1024 input points
and 1024 output points
(includes local base I/O)
Local Base
4--12
System Design and Configuration
Remote I/O Expansion
How to Add
Remote I/O
Channels
430 440 450
Remote I/O is useful for a system that has a sufficient number of sensors and other
field devices located a relative long distance away (up to 1000 meters, or 3050 feet)
from the more central location of the CPU. The methods of adding remote I/O are:
S DL430 / DL440 CPUs: Remote I/O requires a remote master module
(D4--RM) to be installed in the local CPU base. The CPU updates the
remote master, then the remote master handles all communication to
and from the remote I/O base by communicating to the remote slave
module (D4--RS) installed in each remote base.
S DL450 CPU: The CPU’s comm port 3 features a built-in Remote I/O
channel. You may also use one or two D4--RM remote masters in the
local base as described above (can use either or both methods).
DL430
DL440
DL450
2
2
2
CPU built-in Remote I/O channels
none
none
1
Maximum I/O points supported by each channel
512
512
512
Maximum Remote I/O points supported
512
1024
1536
7
7
7
Maximum number of Remote Masters supported in
the local CPU base (1 channel per Remote Master)
System Design
and Configuration
Maximum number of remote I/O bases per channel
The use of Remote I/O does not limit the use of local expansion I/O discussed in the
previous section. In fact, Remote I/O point numbering is assignable. Depending on
the CPU scan time, remote I/O updates may be slower than local and expansion I/O,
due to the serial communications involved.
Remote I/O points map into different CPU memory locations than local/local
expansion I/O. So, the addition of remote I/O does not reduce the number of local I/O
points. Refer to the DL405 Remote I/O manual for details on remote I/O
configuration and numbering.
The following figure shows 1 CPU base, and one remote I/O channel with seven
remote bases. If the CPU is a DL450, adding the first remote I/O channel does not
require installing a remote master module (we use the CPU’s built-in remote I/O
channel on port 3).
Remote I/O
-- 7 Bases per channel
-- 3280 ft. (1000m) Total distance
Expansion I/O
also available
CPU Base
R
M
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
Configuring the
CPU’s Remote
I/O Channel
430 440 450
4--13
This section describes how to configure the DL450’s built-in remote I/O channel.
Additional information is in the Remote I/O manual, D4--REMIO--M, which you will
need in configuring the Remote slave units on the network. You can use the
D4--REMIO--M manual exclusively when using regular Remote Masters and
Remote Slaves for remote I/O in any DL405 system.
The DL450 CPU’s built-in remote I/O channel has the same capability as a Remote
Master module, the D4--RM. Specifically, it can communicate with up to seven
remote bases containing a maximum of 512 I/O points, at a maximum distance of
1000 meters. If required, you can still use Remote Master modules in the local CPU
base (512 I/O points on each channel), for a total of three channels providing 1536
total remote I/O points. First, we’ll need to set up the Remote I/O communications.
You may recall from the CPU specifications in Chapter 3 that the DL450’s Port 3 is
capable of several protocols. To configure the port using the Handheld Programmer,
use AUX 56 and follow the prompts, making the same choices as indicated below on
this page. To configure the port in DirectSOFT, choose the PLC menu, then Setup >
Setup Secondary Comm Port.
S
S
Port: From the port number list box at the top, choose “Port 3”.
Protocol: Click the box to the left of “Remote I/O” to select it (called
“M--NET” on the HPP). The dialog shown below will appear.
3
S
S
Station Number: Choose “0” as the station number, which makes the
DL450 the master. Station numbers 1--7 are reserved for remote slaves.
Baud Rate: The baud rates 19200 and 38400 baud are available.
Choose 38400 initially as the remote I/O baud rate, and revert to 19200
baud if you experience data errors or noise problems on the link.
Important: You must configure the baud rate on the Remote Slaves (via
DIP switches) to match the baud rate selection for the CPU’s Port 3.
Memory Address: Choose a V-memory address to use as the starting
location of a Remote I/O configuration table (V37700 is the default). This
table is separate and independent from the table for any Remote
Master(s) in the system.
Then click the button indicated to send the Port 3 configuration
to the CPU, and click Close.
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
S
4--14
System Design and Configuration
The next step is to make the connections between all devices on the Remote I/O link.
The location of the Port 3 on the DL450 is
on the 25-pin connector , as pictured to the
right. Remember that ports 1 and 3 are
“logical” ports that share the 25-pin
connector. Port 3 is an RS--422 nonisolated port. The pin assignments are:
Signal GND
S Pin 7
S Pin 12
TXD+
S Pin 13
TXD-S Pin 24
RXD+
S Pin 25
RXD--
Port 3
1
14
0V
TXD+
TXD--
13
25
RXD+
RXD--
Now we are ready to discuss wiring the DL450 to the remote slaves on the remote
base(s). The remote I/O link is a 3-wire, half-duplex type. Since Port 3 of the DL450
CPU is a 5-wire full duplex--capable port, we must jumper its transmit and receive
lines together as shown below (converts it to 3-wire, half-duplex).
DL450 CPU Port 3
Remote I/O Master
0V 7
Termination
Resistor
RXD+
RXD--
TXD+
TXD--
13
25
T
Remote I/O Slave
(end of chain)
Jumper
T
TXD+ / RXD+
1
1
TXD-- / RXD--
2
2
Signal GND
3
3
G
G
Recommended cable: Belden 9842 or equivalent
System Design
and Configuration
Remote I/O Slave
Internal
330 ohm
resistor
The twisted/shielded pair connects to the DL450 Port 3 as shown. Be sure to
connect the cable shield wire to the signal ground connection. A termination resistor
must be added externally to the CPU, as close as possible to the connector pins. Its
purpose is to minimize electrical reflections that occur over long cables. Be sure to
add the jumper at the last slave to connect the required internal termination resistor.
Ideally, the two termination resistors at the
cables opposite ends and the cable’s rated
impedance should match. For cable
impedances greater than 330 ohms, add a
series resistor at the last slave as shown to the
right. If less than 330 ohms, just parallel a
matching resistance across the slave’s pins 1
and 2 instead. For example, to match the
termination resistance to Belden 9842, use a
120 ohm resistor across terminals 1 and 2.
Remember to size the termination resistor at
Port 3 to match. The resistance values should
be between 100 and 500 ohms.
DL405 User Manual, 4th Edition, Rev. A
Add series
external
resistor
T
1
2
3
G
Internal
330 ohm
resistor
System Design and Configuration
Configure Remote
I/O Slaves
4--15
After configuring the DL450 CPU’s Port 3 and wiring it to the remote slave(s), use the
following checklist to complete the configuration of the remote slaves. Full
instructions for these steps are in the Remote I/O manual.
S Set the baud rate DIP switches to match CPU’s Port 3 setting.
S Select a station address for each slave, from 1 to 7. Each device on the
remote link must have a unique station address. There can be only one
master (address 0) on the remote link.
If you’re familiar with configuring remote bases, then you’ll recall the fixed table
location in V-memory (V7404--V7477) to configure up to two remote I/O channels.
However, we use a separate table for configuring the DL450 CPU’s built-in remote
I/O channel. You will still need the table at V7404 to configure any Remote Master
modules.
Configuring the
Remote I/O Table
The beginning of the configuration table
for the built-in remote I/O channel is the
memory address we selected in the Port 3
setup.
The table consists of blocks of four words
which correspond to each slave in the
system, as shown to the right. The first
four table locations are reserved.
The CPU reads data from the table just
after powerup, interpreting the four data
words in each block with these meanings:
1. Starting address of slave’s input data
2. Number of slave’s input points
3. Starting address of outputs in slave
4. Number of slave’s output points
37700
Remote I/O data
Reserved V37700
V37701
V37702
V37703
xxxx
xxxx
xxxx
xxxx
Slave 1 V37704
(or last V37705
slave)
V37706
V37707
xxxx
xxxx
xxxx
xxxx
V37734
V37735
V37736
V37737
0000
0000
0000
0000
Slave 7
(or last
slave)
DirectSOFT
SP0
LDA
O40000
OUT
V37704
LD
K16
OUT
V37705
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
The table is 32 words long. If your system
has fewer than seven remote slave bases,
then the remainder of the table must be
filled with zeros. For example, a 3--slave
system will have a remote configuration
table containing 4 reserved words,12
words of data and 16 words of “0000”.
A portion of the ladder program must
configure this table (just once) at powerup.
Use the LDA instruction as shown to the
right, to load an address to place in the
table. Use the regular LD constant to load
the number of the slave’s input or output
points.
The D4--REMIO--M manual contains
thorough examples for configuring the
table at V7404, which you can adapt for
this table as well. The following page give
a shorter program example for one slave.
Memory Addr. Pointer
4--16
System Design and Configuration
Consider the simple system featuring Remote I/O shown below. The DL450’s built-in
Remote I/O channel connects to one slave base, which we will assign a station
address=1. The baud rates on the master and slave will be 38400 kB.
We can map the remote I/O points as any type of I/O point, simply by choosing the
appropriate range of V-memory. Remember that on the DL450, you have both GX
and GY data types available. Since we have plenty of standard I/O addresses
available (X and Y), we will have the remote I/O points start at the next X and Y
addresses after the main base points (X60 and Y40, respectively).
Main Base with CPU as Master
Remote Slave Worksheet
1
Remote Base Address_________(Choose 1--7)
DL450
CPU
16
16
I
Port 3
16
I
X0-X17
V40400
16
I
16
O
O
X20-X37 X40-X57 Y0-Y17
V40401 V40402 V40500
Y20-Y37
V40501
Remote Slave
0
INPUT
Module
Name Input Addr.
No. Inputs
08ND3S
X060
8
1
08ND3S
2
08TD1
Y040
8
3
08TD1
Y050
8
Slot
Number
X070
OUTPUT
Output Addr.
No. Outputs
8
4
5
6
D4--RS
Slave
8
8
8
8
I
I
O
O
7
X060
Input Bit Start Address:________V-Memory
Address:V_______
40403
16
Total Input Points_____
Y040
40502
Output Bit Start Address:________V-Memory
Address:V_______
X60-X67 X70-X77 Y40-Y47 Y50-Y57
V40403 V40404 V40502 V40503
System Design
and Configuration
Remote I/O
Setup Program
Using the Remote Slave Worksheet
shown above can help organize our
system data in preparation for writing our
ladder program (a blank full-page copy of
this worksheet is in Appendix A of the
D4--REMIO--M manual for your use and
duplication). The four key parameters we
need to place in our Remote I/O
configuration table is in the lower right
corner of the worksheet. You can
determine the address values by using the
memory map given at the end of Chapter
3, CPU Specifications and Operation.
The program segment required to transfer
our worksheet results to the Remote I/O
configuration table is shown to the right.
Remember to use the LDA or LD
instructions appropriately.
The next page covers the remainder of the
required program to get this remote I/O
link up and running.
DL405 User Manual, 4th Edition, Rev. A
16
Total Output Points_____
DirectSOFT
SP0
LDA
O40403
OUT
V37704
LD
K16
OUT
V37705
LDA
O40502
OUT
V37706
LD
K16
OUT
V37707
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, Rev. A
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, Rev. A
4--19
System Design and Configuration
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
13
24
25
7
TXD
RXD
RTS
CTS
0V
TXD+
TXD-RXD+
RXD-0V
RS--422
Network
Slaves
System Design
and Configuration
DL405 User Manual, 4th Edtition, Rev. A
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, Rev. A
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, Rev. A
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.
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
V700 -- V777
V7400 -- V7777
Holding Register
03
V--Memory, system (V)
DL405 User Manual, 4th Edition, Rev. A
320
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.)
For Discrete Data Types .... Convert PLC Addr. to Dec.
Inputs (X)
1024
Special Relays (SP)
512
Outputs (Y)
MODBUS
Address Range
(Decimal)
PLC Range
(Octal)
+
Start of Range
MODBUS
Data Type
+ Data Type
--
X1777
2048
--
3071
Input
SP0
SP320
---
SP137
SP717
3072
3280
---
3167
3535
Input
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.
256
V0
--
V377
Counter Current Values (V) 256
V1000
--
V--Memory, user data (V)
3072
12288
V--Memory, system (V)
320
+
Data Type
0
--
255
Input Register
V1377
512
--
767
Input Register
V1400 -V10000 --
V7377
V37777
768
4096
---
3839
16383
Holding Register
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, Rev. A
System Design
and Configuration
X0
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, Rev. A
2048
C0
--
C3777
3072
--
5119
Coil
System Design and Configuration
If Your MODBUS
Host Software
Requires an
Address ONLY
4--25
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’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:
S 484 Mode
S 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.
S Discrete -- X, GX, SP, Y, CR, S, T (contacts), 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 addresses (as required). The table below shows the exact
equation used for each group of data.
DISCRETE DATA TYPES
Memory Type
Global Inputs (GX)
Inputs (X)
PLC Range
(Octal)
GX0
--
GX1746
GX1747 --
GX3777
Address
(484 Mode)
1001
--
1999
Address (584/984
Mode)
Data Type
10001
--
10999
Input
------
11000
--
12048
Input
--
X1777
------
12049
--
13072
Input
Special Relays (SP)
SP0
--
SP777
------
13073
--
13584
Input
Global Outputs (GY)
GY0
--
GY3777
Outputs (Y)
Y0
--
Control Relays (CR)
C0
Timer Contacts (T)
Counter Contacts (CT)
Stage Status Bits (S)
1
--
2048
1
--
2048
Output
Y1777
2049
--
3072
2049
--
3072
Output
--
C3777
3073
--
5120
3073
--
5120
Output
T0
--
T377
6145
--
6400
6145
--
6400
Output
CT0
--
CT377
6401
--
6656
6401
--
6656
Output
S0
--
S1777
5121
--
6144
5121
--
6144
Output
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
X0
4--26
System Design and Configuration
WORD DATA TYPES
PLC Range
(Octal)
Registers
V--memory (Timers)
Input/Holding
(484 Mode)*
Input/Holding
(585/984 Mode)*
V0
--
V377
3001/4001
30001/40001
V--memory (Counters)
V1000
--
V1177
3513/4513
30513/40513
V--memory (Data Words)
V1200
-- V1377
3641/4641
30641/40641
V--memory (Data Words)
V1400
-- V1746
3769/4769
30769/40769
V--memory (Data Words)
V1747
-- V1777
------
31000/41000
V--memory (Data Words)
V2000
-- V7377
------
41025
V--memory (Data Words)
V10000 -- V17777
------
44097
*MODBUS: Function 04 (New feature)
The DL450 will support function 04 read input register (Address 30001). To use
function 04, put the number ’4’ into the most significant position (4xxx). Four digits
must be entered for the instruction to work properly with this mode.
LD
K101
LD
K4128
LDA
O4000
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).
System Design
and Configuration
RX
Y0
1. Refer to the Memory Mapping section of this manual for the correct memory
mapping size. Some of the addresses shown above might not pertain to your CPU.
2. For an automated MODBUS/Koyo address conversion utility, download the file
modbus_conversion.xls from our website, www.automationdirect.com.
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
4--27
Example 1: V2100
584/984 Mode
Find the MODBUS address for User V
location V2100.
1. Find V--memory in the table.
2. Convert V2100 into decimal (1088).
3. Add the MODBUS starting address for the
mode (40001).
Example 2: Y20
584/984 Mode
Find the MODBUS address for output Y20.
PLC Addr. (Dec) + Start Address + 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
Current Value
484 Mode
Find the MODBUS address to obtain the
current value from Timer T10.
1. Find Timer Current Values in the table.
2. Convert T10 into decimal (8).
3. Add the MODBUS starting address for the
mode (3001).
Example 4: C54
584/984 Mode
Find the MODBUS address for Control Relay PLC Addr. (Dec) + Start Address + 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).
PLC Address (Dec.) + Mode Address
V2100 = 1088 decimal
1088 + 40001 = 41089
PLC Address (Dec.) + Mode Address
TA10 = 8 decimal
8 + 3001 = 3009
System Design
and Configuration
DL405 User Manual, 4th Edtition, Rev. A
4--28
System Design and Configuration
Network Master Operation
430 440 450
This section describes how the DL450 can communicate on a MODBUS or DirectNET
network as a master. For MODBUS networks, it uses the MODBUS RTU protocol,
which must be interpreted by all the slaves on the network. Since MODBUS and
DirectNET are master / slave networks, the master station must initiate requests for
network data transfers. This section teaches you how to design the required ladder
logic for network master operation.
Master
Slave #1
Slave #2
Slave #3
System Design
and Configuration
MODBUS RTU Protocol, or DirectNET
When using the DL450 CPU as the master
station, you use simple RLL instructions to
initiate the requests. The WX instruction
initiates network write operations, and the
RX instruction initiates network read
operations. Before executing either the
WX or RX commands, we will need to load
data related to the read or write operation
onto the CPU’s accumulator stack. When
the WX or RX instruction executes, it uses
the information on the stack combined
with data in the instruction box to
completely define the task, which goes to
the port.
It’s possible to use both Port 1 and Port 3
for either MODBUS or DirectNET, and to
use either or both as masters. You must
tell the WX and RX instructions the
intended port for each communications
transaction.
Master
Slave
WX (write)
RX (read)
Network
Network 1
Network 2
To summarize, the RLL instructions identify the following items.
1. Port number on the master (Port 1 or 3), and the slave station address. (LD
instruction)
2. Amount of data (in bytes) you want to transfer. (LD instruction)
3. Area of memory to be used by the master. (LDA instruction)
4. Area of CPU V-memory to be used in communication with the slave, and
whether it is a write or read operation. (WX or RX instruction)
5. Interlocks for communication timing for multiple WX and RX routines.
DL405 User Manual, 4th Edition, Rev. A
System Design and Configuration
Step 1:
Identify Master
Port # and Slave #
Step 2:
Load Number of
Bytes to Transfer
The first Load (LD) instruction identifies
the communications port number on the
network master (DL450) and the address
of the slave station. This instruction can
address up to 90 MODBUS slaves, or 90
DirectNET slaves. The format of the word
is shown to the right. The “F” in the upper
nibble tells the CPU the port is internal to
the CPU (and not in a slot in the base). The
second nibble indicates the port number, 1
or 3. The lower byte contains the slave
address number in BCD (01 to 90).
The second Load (LD) instruction
determines the number of bytes which will
be transferred between the master and
slave in the subsequent WX or RX
instruction. The value to be loaded is in
BCD format (decimal), from 1 to 128
bytes.
F
1
0
4--29
1
Slave address (BCD)
Port number (BCD)
Internal port (hex)
LD
KF101
1
2
8
(BCD)
# of bytes to transfer
LD
K128
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
Bytes
V--memory
T / C current value
16
16
2
2
Inputs (X, GX, SP)
8
1
Outputs
(Y, C, Stage, T/C bits)
8
1
Scratch Pad Memory
8
1
Diagnostic Status
8
1
Bits per unit
Bytes
Data registers
T / C accumulator
8
16
1
2
I/O, internal relays, shift register
bits, T/C bits, stage bits
1
1
Scratch Pad Memory
8
2
Diagnostic Status(5 word R/W)
16
10
DL305 Memory
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
Bits per unit
4--30
System Design and Configuration
The third instruction in the RX or WX
sequence is a Load Address (LDA)
instruction. Its purpose is to load the
starting address of the memory area to be
transferred. Entered as an octal number,
the LDA instruction converts it to hex and
places the result in the accumulator.
For a WX instruction, the DL450 CPU
sends the number of bytes previously
specified from its memory area beginning
at the LDA address specified.
For an RX instruction, the DL450 CPU
reads the number of bytes previously
specified from the slave, placing the
received data into its memory area
beginning at the LDA address specified.
Step 3:
Specify Master
Memory Area
4
0
6
0
0
(octal)
Starting address of
master transfer area
LDA
O40600
MSB
V40600
LSB
15
0
MSB
V40601
LSB
15
0
NOTE: Since V--memory words are always 16 bits, you may not always use the
whole word. For example, if you only specify 3 bytes and you are reading Y outputs
from the slave, you will only get 24 bits of data. In this case, only the 8 least significant
bits of the last word location will be modified. The remaining 8 bits are not affected.
The last instruction in our sequence is the
WX or RX instruction itself. Use WX to
write to the slave, and RX to read from the
slave. All four of our instructions are
shown to the right. In the last instruction,
you must specify the starting address and
a valid data type for the slave.
The RX instruction reads data from the
slave starting at the address specified.
The WX instruction writes data to the slave
starting at the address specified.
System Design
and Configuration
Step 4:
Specify Slave
Memory Area
S
S
S
SP112
LD
KF101
LD
K128
LDA
O40600
RX
Y0
DirectNET slaves -- specify the same address in the WX and RX
instruction as the slave’s native I/O address
MODBUS DL405 or DL205 slaves -- specify the same address in the
WX and RX instruction as the slave’s native I/O address
MODBUS 305 slaves -- use the following table to convert DL305
addresses to MODBUS addresses
DL305 Series CPU Memory Type--to--DL405 Series CPU Memory
PLC Memory type
305 base
address
405 base
addr.
PLC Memory Type
305 base
address
405 base
addr.
TMR/CNT Current Values
R600
V0
TMR/CNT Status Bits
CT600
GY600
I/O Points
IO 000
GY0
Control Relays
CR160
GY160
Data Registers
R401,
R400
V100
Shift Registers
SR400
GY400
Stage Status Bits (D3--330P only)
S0
GY200
DL405 User Manual, 4th Edition, Rev. A
4--31
System Design and Configuration
Communications
from a
Ladder Program
In some applications, the DL450 CPU as a
network master will communicate only
periodically to slaves(s) on the network.
However, most applications will probably
want to make a “continuous” update of
memory areas from a slave to the master.
This normally means starting the task on
each PLC SCAN. However, a single WX
or RX network communication will
probably last longer than one PLC scan
time. And we must wait before executing
another RX or WX until the port has
finished transmitting the previous WX or
RX data.
Port Communication Error
SP113
Y1
SET
SP112
LD
KF101
LD
K0003
Port Busy
LDA
O40600
RX
Y0
Each port which can be a master has two Special Relay contacts associated with it
(see Appendix D for comm port special relays).One indicates “Port busy”, and the
other indicates ”Port Communication Error”. The example above shows the use of
these contacts for a network master that only reads a device (RX). The Port Busy
contact ensures one network transaction finishes before we begin another.
Use of the communication error SP relay is optional. If used, be sure to place it at the
beginning of the communication routines, because a comm error relay is always
reset (turned off) whenever an RX or WX instruction using the same port executes.
Multiple Read and
Write Interlocks
Interlocking Relay
SP112 C100
LD
KF101
LD
K0003
LDA
O40600
Interlocking
Relay
SP112 C100
RX
Y0
C100
SET
LD
KF101
LD
K0003
LDA
O40400
WX
Y0
C100
RST
DL405 User Manual, 4th Edtition, Rev. A
System Design
and Configuration
If you’re using multiple reads and writes in
the RLL program, you have to interlock
the routines to make sure all the routines
are executed. If you don’t use the
interlocks, then the CPU will only execute
the first routine. This is because each port
can only handle one transaction at a time.
In the example to the right, after the RX
instruction is executed, C0 is set. When
the port has finished the communication
task, the second routine is executed and
C0 is reset.
If you’re using RLL PLUS Stage
Programing, you can just put each routine
in a separate program stage to ensure
proper execution. In most cases, RLL PLUS
is a much more efficient way to create an
automation program.
The DirectNET manual provides a
master/slave example with both RLL and
Stage program descriptions (they are
easily adapted for use with MODBUS).
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement