Ethernet Communications Modules, 3rd Edition, Rev. D
5-22
Chapter 5: MODBUS TCP for H0/H2/H4-ECOM100
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ECOM100 IBOX
The following information is an explanation of how to use IBox instructions when using
ECOM100s for Modbus TCP. There are 2 specific IBOX's that can help with Modbus TCP
communications (ECRX and ECWX) and another IBOX (ECOM100) that must be used to
sequence these instructions. Use this information in conjunction with the material covered
earlier in this chapter on Modbus functionality.
The ECOM100 IBOX must be placed at the top of ladder, with no input logic. You will need
one box for each ECOM100 you wish to use. The slot location of the ECOM100 is assigned
to an ECOM # here, as well as the address ranges needed by the instruction. This range MUST
be unique and cannot be used for any other purpose. The same is true for ANY workspace
V-memory assignment in any IBOX used.
These instructions auto-sequence themselves, but
Direct
Logic octal addressing still must be
used. There is a Modbus spreadsheet located on our Tech Support site that can be used to
convert the Modbus addresses in the slaves to octal addressing that is required in the ECRX and
ECWX boxes.
Follow this link: http://support.automationdirect.com/docs/modbus_conversion.xls, or
use this application note AN-MISC-010, which is located https://support.automationdirect.
com/technotes.html and select AN-MISC-010 to download the spreadsheet.
Once you have used the spreadsheet to determine the appropriate DL address to use for your
desired Modbus address, place this value into the “From Slave Element” field. Enter the # of
bytes you wish to retrieve, and enter the appropriate DL address you want to receive this data.
The “Slave ID” at this time has no bearing to the actual slave, it will be tied to the IP address of
the Modbus device in the NetEdit and Peer-Peer setup below.
For example, if you want to read the first Modbus coils, you would place “GY1” in “From Slave
Address”, the # of bytes, and you could place the data into C400, for example. For Holding
Registers, you would place the data into V-memory locations. The example program at the
bottom will READ V40001 and V40002 from the Modbus slave, and immediately WRITE
V7766 and V7767 ( RTC Seconds and Minutes) to 40003 and 40004. So if the slave has no
data there, the PLC will send Seconds and Minutes values (except the DL05 which will send 0
unless it has the Real-Time Clock module installed).
Network #1 uses the Hx-ECOM100 in Slot 1. This would be the only slot in 05, first slot in
06, and second slot in 205/405 models.
It will use the range of V-memory from V400 - V502 as the working status, workspace and
buffer. These locations must not be used anywhere else.
Make sure Dipswitch 7 is turned ON in the ECOM100.
The Modbus converter spreadsheet from ADC Tech Support site will be extremely useful
to convert Modbus addresses into the octal-based addressing required in the instructions.
NOTE: NetEdit 3 MUST be used to setup the ECOM100 "Peer-to-Peer Config" table in
the ECOM100. This is what determines if the communications are ModbusTCP or ECOM.
On the first PLC scan, set the Comm Success & Comm Error count registers to 0.
Also SETS C106, which is the enable logic to the ECxX boxes.
Once the ECRX and ECWX IBoxes are enabled, the ECOM100 IBox will automatically
sequence them, no manual control of the port busy bits is required.
This example uses C106 with a SET on First Scan, it could be changed to whatever logic
the user desires such as SP1.
ECOM100 Config
ECOM100
ECOM100#
Slot
Status
Workspace
Msg Buffer (65 WORDs)
ECOM100
K1
K1
V400
V401
V402–V502
1
2
3
_FirstScan
RX/WX Ok Count
SPO
LD
K0
OUT
V505
RX/WX Fail Count
OUT
V506
C106
SET
NOP
Содержание H0-ECOM
Страница 1: ...HX ECOM Manual Manual Number HX ECOM M...