16 Setting the D2–DCM switches Setting the Switches

16 Setting the D2–DCM switches Setting the Switches
16
Setting the Switches
Setting the D2–DCM switches
The D2–DCM has two banks of dipswitches that allow you to select the communication
parameters necessary for your application. In quite a few cases, you may not have to change
the switches at all. The D2–DCM comes set from the factory for:
D
DirectNET Slave operation
D
9600 Baud
D
Station Address 1
D
Odd Parity
D
Hex Mode
Host Computer or
Operator Interface
Connection
If you’re using a host computer or operator interface as the master station you should set the
D2–DCM to match the master station parameters. Check the documentation that came with
your computer or operator interface panel to determine the available communication
parameters.
You’ll need to know the following things.
D
Baud rate
D
Parity settings
D
Protocol required
Your operator interface must use one of the following protocols.
D
DirectNET
D
K-sequence
D
Hostlink (DirectNET was called Hostlink on the old TIt or Simaticr TI products.
Some Operator Interface manufacturers may still refer to it this way.)
D
MODBUS RTU
DirectNET Interface
Connection
If you’re using the D2–DCM as a DirectNET interface, you’ll need to know whether the
D2–DCM is being used in a master station, slave station, or peer station. Once you’ve
determined how the D2–DCM will be used, proceed with the dipswitch settings.
Master – Slave Network
Peer as Master Network
D2–DCM as Master
D2–DCM as Peer
D2–DCM as Slave
Data Communications Module, 2nd Edition, 2/03
D2–DCM as Peer
17
17
Setting the Switches
D2–DCM
Switch Settings
Once again, the switches should be set at the factory for the following type of operation.
D
DirectNET Slave
D
9600 Baud
D
Station Address 1
D
Odd Parity
D
Hex Mode
If these settings are acceptable, then you can go ahead and install the D2–DCM into the
base. If not, you’ll have to change the switch settings.
There are two small banks of switches located next to the blue rotary switches on the one of
the D2–DCM circuit boards. These dipswitches are used to select the communications
settings. The following diagram shows the switch locations and their purpose.
SW3
1
2
3
4
COM Timeout Enable
Hexadecimal Mode
Network
Protocol
Switch Positions
Protocol
1
DirectNET Slave
OFF
DirectNET Master
OFF
DirectNET Peer
ON
MODBUS RTU
ON
2
OFF
ON
OFF
ON
COM Timeout Disable
ASCII Mode
OFF ON
SW5
ON
1
2
3
4
5
6
7
8
Switch Positions
Time*
6
7
8
0 OFF OFF OFF
2 ON OFF OFF
NO Parity
5 OFF ON OFF
Set
to OFF
10 ON ON OFF
20 OFF OFF ON
50 ON OFF ON Delay Time
100 OFF ON ON
500 ON ON ON
*Delay time in milliseconds
Baud Rate
ODD Parity
Self Test
Switch Positions
Baud
1
2
3
300 ON OFF OFF
600 OFF ON OFF
1200 ON ON OFF
2400 OFF OFF ON
4800 ON OFF ON
9600 OFF ON ON
19200 ON ON ON
38400 OFF OFF OFF
OFF ON
Data Communications Module, 2nd Edition, 2/03
18
Setting the Switches
Protocol Selection: Positions 1 and 2 on SW3 select the D2–DCM protocol and the master
or slave settings. The D2–DCM primarily uses two protocols, DirectNET and MODBUS
RTU protocol. Here’s some information to help you choose.
Communications Port for DirectSOFT32 Programming: If you plan to program the CPU
through the D2–DCM, then you can use either DirectNET protocol or our proprietary
protocol, called K-sequence. Although it is not listed in the switch settings, K-sequence is
also available whenever the D2–DCM is set for DirectNET slave operation.
Computer or Operator Interface: If you’re using the D2–DCM to connect a computer or
operator interface, check your documentation to see which protocol is being used. Since the
D2–DCM is always a slave station when it’s connected to a computer or operator interface,
you should select DirectNET slave or MODBUS RTU slave. Note, there are also a handful
of operator interfaces that have been designed to use our proprietary K-sequence protocol. If
you have one of these, or if you need to use K-sequence for some reason, make sure you set
the D2–DCM for DirectNET Slave operation. Peer to Peer works in Hexadecimal mode only.
DirectNET Master / Slave: In a DirectNET master / slave network, one D2–DCM should be
set as a master and the rest should be set as slaves.
DirectNET Peer as Master: This is a variation of the master / slave protocol and should be
selected when you only have two stations that can each initiate requests. Each station must
have a D2–DCM as the network interface.
MODBUS RTU Slave: The D2–DCM can also be a MODBUS slave (in the RTU or HEX
mode). The D2–DCM cannot be a MODBUS master station. If you’re going to use
MODBUS, make sure your software package supports the DL205 products. See Appendix
C for more information.
Communication Timeout: Position 3 on SW3 selects the communication timeout. For most
cases, you should leave this switch in the OFF position. Communication Timeout Disable is
normally used only if you’re developing your own DirectNET programs. By disabling the
timeout, you can send one DirectNET component without any communication timeout
problems. If you have this timeout disabled and a communication error does occur, you must
restart communications by sending a retry or an End of Transmission (EOT) command. If you
want to know more, see the DirectNET manual for details.
ASCII / HEX Mode: Position 4 on SW3 selects between ASCII and HEX modes of data
representation. If you want the fastest communication possible, use HEX mode, which is the
default. The difference is in the way the data is represented. The same data is twice as long in
ASCII format, so if there’s more data, it takes longer to transfer. If you have a device on the network
that requires ASCII mode, then set the switch for ASCII mode, otherwise, use HEX mode.
Baud Rate: Positions 1 – 3 on SW5 are used to set the baud rate for the D2–DCM. There are
eight baud rate selections available ranging from 300bps to 38.4Kbps. All stations must
have the same baud rate before the communications will operate correctly. Usually,
you should use the highest baud rate possible unless noise problems appear. If noise
problems appear, try reducing the baud rates.
Parity: Position 4 on SW5 selects between the two parity options, odd or none. If you’re using
all DL205 equipment, you should use odd parity. Odd parity uses eleven bits total (1 start bit, 8
data bits, 1 stop bit, and 1 parity bit).
Some devices require no parity, which uses only 10 bits (1 start bit, 8 data bits, and 1 stop bit).
Self-Test: Position 5 on SW5 selects the factory self-test and should always be switched off.
If the self-test is on, the module will not operate correctly.
Response Delay Time: Positions 6–8 on SW4 set the response delay time. The delay time
specifies the amount of time the D2–DCM waits to send the data after it has raised the RTS
signal line. This is normally set to 0, and is typically only adjusted if you are using the
D2–DCM with a radio modem. If you are using the D2–DCM with a radio modem, check your
modem documentation to help you choose the proper setting. Also, if you’re considering the
use of a modem, check out Appendix D. It may be of some help.
Data Communications Module, 2nd Edition, 2/03
19
19
Setting the Switches
Address Selection
Switch
The D2–DCM station address is set by the two
rotary switches located on one of the D2–DCM’s
circuit boards. Addresses are in hexadecimal
format with valid addresses from 0 (only used
for the master station) to hexadecimal 5A. The
addresses do not have to be consecutive, but each
station must have a unique address.
The top rotary switch is used to set the most
significant digit of the HEX address. The bottom
switch is used to set the least significant digit of the
HEX address. For example, to set a D2–DCM
address of HEX 10 (decimal 16), set the top rotary
switch to 1 and the bottom rotary switch to 0. If
you’re using the D2–DCM as a master, make sure
you select address 0.
Even though the D2–DCM address is set in
hexadecimal, it’s a good idea to remember the
decimal equivalent. This is because the decimal
address is used most often. For example, a RLL
communications program, the DirectSOFT32
Programming Software, and our DSData Server all
use the decimal equivalent of the HEX address. It’s
easy to convert from hex to decimal.
Example: Switches set for 3C
X10
HEX Format
0 1 2 3 4 5 6 7 8 9
A B C
D
E
F
10 11 12 13 14 15
X1
HEX 3C
3 x 16 = 48
+
C = 12
= 60 decimal
Warning: The D2–DCM address switch settings are only read at power up. If you want to
change the address, you must remove the module from the base to access the switches.
Your system can be damaged if you install or remove system components before
disconnecting the system power. To minimize the risk of equipment damage, electrical
shock, or personal injury, always disconnect the system power before installing or removing
any system component.
Data Communications Module, 2nd Edition, 2/03
20
Setting the Switches
Online / Offline
Switch
On the front of the unit, just to the left of the LEDs,
you’ll notice a small slide switch. This switch is
labeled ON (for online) and OFF (for offline). If you
want to communicate through the D2–DCM, make
sure this switch is in the ON position.
In the OFF position, this switch logically
disconnects the D2–DCM from the network (just
as if you pulled the cable from the connector).
Once this switch is moved to the OFF position, the
D2–DCM will not communicate with the network. If
you move the switch to the ON position, the
D2–DCM will communicate with the network, but
not until the master sends another request for
communication. This does not operate like the
reset switch on many personal computers.
Data Communications Module, 2nd Edition, 2/03
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