Connecting an Automation
Direct T1K-MODBUS
Last updated: April
27, 2006
Warning,
make sure the "OUTPUTS" switch is in the "ENABLE" position.
Configure the T1K-Modbus interface:
-
Set the X1 and X10 rotary UNIT ADRS switches
to select your desired unit address. Normally the first unit will be 1
(X1=1; X10=0), the second unit will be 2 (X1=2; X10=0), etc.
-
Set the dip switches to SW1, SW3 and SW4 on
and all others off (9600 baud).
-
Use the T1K-Modbus setup tool to set 1 stop
bit, Parity NONE, Communication Time-out to 60 Seconds and RTS ON and OFF
Delay Times to 0ms.
-
You will need a D2-DSCBL cable which you can
purchase from Automation Direct to connect your PC running the T1K-Modbus
setup tool with the T1K-Modbus module.
-
The T1K-Modbus manual can be found here.
Configure Serial 2 on the ICON:
-
Set Serial 2 type to Modbus master.
-
Set Serial 2 baud rate to 9600.
-
Set Serial 2 parity to None.
Connect your Terminator I/O to an ICON using
the T1K-Modbus interface by making the following cable:
15 pin male T1K-MODBUS connector (Radio
Shack number 276-1501) |
CAT 5 Color |
CN6 on ICON |
7 |
Brown |
C (Pin 3 on a 3 pin CN6 or Pin 4 on 4
pin CN6) |
9 to 13 to |
Orange |
B (Pin 2 on a 3 pin CN6 or Pin 3 on 4
pin CN6) |
6 to 10 to |
Orange/White |
A (Pin 1 on a 3 pin CN6 or Pin 2 on 4
pin CN6) |
Jumper 11 to 14 |
|
|
Jumper 12 to 15 |
|
|
You may order a T1K-Modbus-Connector
which plugs on the 15 pin male T1K-MODBUS connector and includes the above
jumpering.
Now you may use Modbus instructions to
read and write the I/O registers. The maximum number of element transfers
on the ICON is 128 (for either digital or 16 bit analog) and this is supported
by the T1K-Modbus interface. Configure your Modbus instructions as follows:
-
Set Com type to Serial 2.
-
Set Unit address to the unit address selected
by the X1 and X10 rotary switches (in decimal).
-
Set Register address and Command from table
below.
-
Select Register type as Unsigned int.
-
Set Time-out (10mS steps) to 100.
-
Set Retries to 3.
-
Set table length to the number register elements
to transfer (1-128).
Terminator I/O |
Modbus Address (Register address range) |
Modbus Command type (Register type) |
Digital Inputs |
1-1024 |
Read input discretes (2). |
Analog Inputs |
1-128 |
Read input registers (4). (You need to
read twice as many registers as A-D readings. The odd numbered register
in a pair is the A-D reading. The second even numbered register is the
status.) |
Digital Outputs |
1-1024 |
Set multiple coils (15) or Set single
coil (5). |
Analog Outputs |
1-128 |
Set multiple registers (16) or Set single
register (6). |
The lights should behave as follows:
-
The PWR light should always be on indicating
the power is good..
-
The RX light will flash if properly connected
to an ICON and the ICON is executing Modbus instructions on Serial 2.
-
The TX light will flash indicating that the
T1K-Modbus interface received a valid command and is issuing it's response.
(If the TX light does not flash, possible problems could be Modbus instruction
configured for wrong unit address, register address or command type or
the Serial 2 port is configured for the wrong baud rate or parity or the
T1K-Modbus interface is not configured as described above.
-
The run light comes on after a valid Modbus
command is received. If no command is received within 60 seconds the run
light goes off and the outputs are turned off. Then the ERR light flashes
to indicate no communication.
-
If a bad Modbus command is received the ERR
light comes on. For instance, incorrect parity will cause this light to
come on. If no communication is received within 60 seconds it will flash
to indicate no communication.
-
DIAG is on if there is an I/O system error
with the Terminator I/O modules. It is off if the I/O system is good. This
has nothing to do with Modbus communications.