With regard to the supply of products, the current issue of the follo w ing document is applicable: The
General Terms of Delivery for Products and Services of the Electrical Industry, published by the Central
Association of the Electrical Industry (Zentralverband Elektrotechnik und Elektroindustrie (ZVEI) e.V.) in
its most recent version as well as the supplementary clause: "Expa nded reservation of proprietor ship".
You have chosen a device manufactured by Pepperl+Fuchs. Pepperl+Fuchs develops, produces and distributes electronic sensors and interface modules for the
market of automation technology on a worldwide scale.
Before installing this equipment and put into operation, read this manual carefully.
This manual containes instructions and notes to help you through the installation
and commissioning step by step. This makes sure bring such a trouble-free use of
this product. This is for your benefit, since this:
•ensures the safe operation of the device
•helps you to exploit the full functionality of the device
•avoids errors and related malfunctions
•avoids costs by disruptions and any repairs
•increases the effectiveness and efficiency of your plant
Keep this manual at hand for subsequent operations on the device.
After opening the packaging please check the integrity of the device and the
number of pieces of supplied.
Symbols used
The following symbols are used in this manual:
Information!
This symbol indicates important information.
Attention!
This symbol warns of a potential failure. Non-compliance may lead to interruptions of
the device, the connected peri pheral syst ems, or pl ant, potent ial ly lead ing t o total malfunctioning.
Warning!
This symbol warns of an imminent danger. Non-compliance may lead to personal injuries that could be fatal or resu lt in material damages and destruction.
Contact
If you have any questions about the device, its functions, or accessories, please
contact us at:
This product was developed and manufactured under observance of the applicable European standards and guidelines.
Information!
A Declaration of Conformity can be requested from the manufacturer.
The product manufacturer, Pepperl+Fuchs GmbH, D-68307 Mannheim, has a
certified quality assurance system that conforms to ISO 9001.
26.9.2013
8
Page 9
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Safety
3.Safety
3.1Intended use
Warning!
This symbol warns of a possible danger. The protection of operating personnel and the
system against possible dang er is not guaranteed if the control inte rface unit is not
operated in accordance to its intended use.
3.2General safety information
Warning!
Safety and correct functioning of the device cannot be guaranteed if any operation
other than described in t his ope ra tio n ma nual i s per f or med . Con ne ct ing th e e qu ipmen t
and conducting any maintenance wor k und er power must e xclusi vely be perf ormed by
appropriately qualified perso nnel. In case a failure cannot be elim inated, the device
must be taken out of operation an d inadvertently operation must be prevented. Repair
work must be performed by the ma nufacturer only. Additions or modifi cations to the
equipment are not permitted and will void the warranty.
Information!
The operator is responsible for the observation of local safety standards.
3.2.1Disposal
Information!
Electronic waste is hazardous waste. Please comply with all local ordinances wh en
disposing this product!
The device does not contain batteries that need to be removed before disposing it.
26.9.2013
9
Page 10
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
General
4.General
4.1Product information
This system manual applies to the following Pepperl+Fuchs GmbH equipment:
1
Artikel Nr.
VBG-ENXK20-DMD-EV
VBG-ENXK20-DMD
VBG-ENXK20-D
1.AS-i Power24V capable.
Art
Schutzart
Schnittstelle, Feldbus
Gateway IP20
Gateway IP20
Gateway IP20
The devices can be operated directly on a 24V (PELV) power supply. The gateway VBG-ENX-K20DMD-EV is optimized with integrated data coupling coils and adjustable self-resetting fuses for
safe use also of powerful 24V power supplies. The gateways VBG-ENX-K20-D and VBG-ENXK20-DMD need to add in Power24V-operation a power supply decoupling unit.
EtherNet/IP +
ModbusTCP
EtherNet/IP +
ModbusTCP
EtherNet/IP +
ModbusTCP
Anzahl AS-i Kreise,
Anzahl der AS-i Master
2 AS-i networks, 2 AS-i
Masters
2 AS-i networks, 2 AS-i
Masters
2 AS-i networks, 2 AS-i
Masters
1 Netzteil, 1 Gateway
für 2 AS-i Kreise,
günstige Netzteile
yes, max. 4A/
AS-i network
no, max. 8A/
AS-i network,
redundant
supply
no, max. 8A/
AS-i network
Diagnose- und
Konfigurationsschnittstelle
Ethernet
Feldbus +
RS 232
Ethernet
Feldbus +
RS 232
Ethernet
Feldbus +
RS 232
Doppeladresserkennung
yes
yes
yes
AS-i Wächter
AS-i Power24V
optio
nal
optio
nal
optio
nal
Tab. 4-1.
The AS-i 3.0 EtherNet/IP+Modbus TCP Gateway serves to connect AS-i systems
to the superordinate Ethernet controller.
Information!
The device uses one of two protokols: EtherNet/IP or Modbus TCP. The selection
takes place in the menu (see chap. <Installati on > ).
Programmierung in C
10
26.9.2013
Page 11
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
General
4.2New Generati on of AS-i Gateways with ethernet diagnostics interface
The plus points of the new Gateway generation at a glance:
•Gateways now programmable in C
•Ethernet diagnostics interface for remote diagnostics
•Integrated web server: diagnostics for the Gateways and the AS-i circuits
over Ethernet possible with no additional software
•GSD configuration files already stored in the web server
•Earth fault monitor distinguishes between AS-i cable and sensor cable
•Current from both AS-i circuits in the "1 Gateway, 1 power supply for 2 AS-i
circuits" version can now be read directly on the unit
•Self-resetting fuses in the "1 Gateway, 1 power supply for 2 AS-i circuits" ver-
sion
•Device temperature display
•AS-i Power24V capable
•Interfaces for virtually every bus system and Ethernet solution
Information!
See also section <Functions of the new generation of AS-i Gateways> for further information.
4.3AS-i specification 3.0
The AS-i 3.0 devices already fulfil the AS-i specification 3.0.
The previous specifications (2.1 and 2.0) are supported as well.
Advanced Diagnostics
Diagnostics, which go far beyond the standard diagnostics facilitate the simple
detection of the occasionally occurring configuration errors and further irritations
towards the AS-i communication. So in case of an error the down time of machines can be minimized or you can initiate preventive maintenance.
Commissioning and monitoring
Commissioning, debugging and setting up of the AS-i parameters can also be accomplished with the use of push-buttons on the frontside of the gateway, the display and the LEDs. It is also possible to do the configuration with the software
"AS-i Control Tools".
26.9.2013
11
Page 12
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Specifications
5.Specifications
5.1Technical data
The technical data are placed in the data sheet. Please view the current version
on the web page: http://www.pepperl-fuchs.de.
12
26.9.2013
Page 13
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.Installation
6.1Dimensions
55
75
Warning!
85
Cover the top of the gateway w h en do ing any drilling work above the un it . N o p articles,
especially metal chips, should be allowed to enter the housing, since this could cause a
short circuit.
Information!
Please refer to installation instruction for this device for detailed mounting information.
6.2Connections
10
10
AWG24 ... 12
0,2 ... 2,5 mm
0,2 ... 2,5 mm
7
120
2
2
26.9.2013
13
Page 14
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.3Installing in the control cabinet
The AS-i/Gateway is installed in the control cabinet on 35mm DIN rails per DIN
EN 50 022.
Information!
The enclosure of the AS-i/Gateway is made of stainless steel. The unit is also suitable
for exposed wall mounting.
To install, place the unit on the upper edge of the DIN rail and then snap in the
lower edge.
-
-
+-+
+
[1]
[2]
6.4Removing
To remove, press the holding clamps [2] down using a screwdriver [1], press the
unit firmly against the upper rail guide and lift out.
14
-
-
+-+
+
3
1
2
26.9.2013
Page 15
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.5Commissioning
6.5.1
classical display
Switching to advanced display mode
OK
advanced display mode
1.12A
UNKNOWN SLAVE
ESC
The device handels multiple protocols! Please select one of them during the initial
operation.
6.5.2Select Modbus TCP
ETHERNET
QUICK SETUP
SLAVE ADR. TOOL
SLAVE TEST TOOL
ESC
LCD
ETHERNET
QUICK SETUP
SLAVE ADR TOOL
SLAVE TEST TOOL
menu structure see additional page
OK
MODBUS TCP X
ETHERNET/IP
LCD
26.9.2013
15
Page 16
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.5.2.1Displaying of Ethernet properties
ETHERNET
TCP/IP
MODBUS
ESC
ETHERNET
TCP/IP
MODBUS
ESC
6.5.2.2Setting of Ethernet properties
ETHERNET
LINK:
100 BASE-TX FDX
MAC ID:
00-16-77-002E-C3
ACTUAL VALUES
CONFIGURATION
ACTUAL VALUES
IP ADDRESS
192. 168. 000.254
NET MASK
255. 255. 255. 0
GATEW AY
0 .0 .0 .0
OK
OK
16
ETHERNET
TCP/IP
MODBUS
CONFIGURATION
STATIC
ACTUAL VALUES
CONFIGURATION
CONFIGURATION
DYNAMIC
When using DHCP, no adjustment is necessary
IP ADDRESS
192. 168. 42. 149
NET MASK
255. 255. 255. 0
GATEWAY
0 . 0 . 0. 0
If you do not have DHCP client access, please contact your network administrator. /
OK
26.9.2013
Page 17
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.5.2.3Setting of watchdog time
ETHERNET
TCP/IP
MODBUS
WATCHDOG TIME
200
ESC
in 10ms steps
000 = disable
"
6.5.3Select EtherNet/IP
ETHERNET
QUICK SETUP
SLAVE ADR. TOOL
SLAVE TEST TOOL
MODBUS TCP X
ETHERNET/IP
CHANGES TAKE
EFFECT ON NEXT
POWER ON
Restart the gateway to assume your changes
OK
OK
!
MODBUS TCP
ETHERNET/IP X
ETHERNET/IP
NOT ACTIVE
ACTIVATE IT?
YES
NO
↓
OK
↓
OK
26.9.2013
17
Page 18
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.5.3.1Select command interface mode
MODBUS TCP
ETHERNET/IP X
OK
TCP OBJECT
↓
ETHERNET OBJECT
OK
MAILBOX MODE
ESC
MAILBOX MODE
38 BYTE
OK
6.5.3.2Setting of EtherNet/IP properties
TCP/IP OBJECT
ETHERNET OBJECT
IF STATUS
IF CAPABILITY
IF CONTROL
...
If you do not have DHCP client access, please contact your network administrator. /
OK
↓
MAILBOX MODE
38 Byte:
Enchanced mailbox length for current device revision
36 Byte:
Compatibility mode for older devices
MAILBOX MODE
36 BYTE
USE DHCP
When using DHCP, no adjustment is necessary
OK
18
TCP/IP OBJECT
ETHERNET OBJECT
IF STATUS
IF CAPABILITY
IF CONTROL
PATH TO LINK OBJ.
TCP/IP CONFIG
Restart the gateway to as sume your changes
↓
OK
IP ADDRESS
192. 168. 42. 149
NET MASK
255. 255. 255. 0
GATEWAY
0 . 0 . 0. 0
26.9.2013
Page 19
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.5.4Connecting AS-i Slaves
AS-i
power
net
config error
U AS-i
AS-i active
prg enable
prj mode
AS-i Master
AS-i
power
net
config error
U AS-i
AS-i active
prg enable
prj mode
AS-i Master
LCD
1. 1
0.5s
AS-i
Slave 1
AS-i
Slave 5
LCD
1. 41
SEARCHING SLAVES
AS-i
Slave 1
AS-i
Slave 5
1. 5
0.5s
26.9.2013
19
Page 20
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.6Q uick setup
config error
1. 5
1xOK
ETHERNET
QUICK SETUP
SETUP
IO + PARAM. TEST
OK
WARNING:
OUTPUTS MAY BE
RESET
OK
LCD
STORE AS-I
CONFIGURATION
OK
STORE +PRJ MODE
↓
2x ESC
LCD
LCD
LCD
.
CONFIGURATION OK
LCD
HOST ERROR
NO CONNECTION
LCD
OK
STORE AS-I
CONFIGURATION
STORE +RUN
STORE +PRJ MODE
20
↓
LCD
26.9.2013
Page 21
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.7Error tracing
6.7.1Faulty slaves
power
net
config error
U AS-i
AS-i active
prg enable
AS-i
prj mode
AS-i Master
LCD
1.1
MISSING SLAVE
AS-i
Slave 1
AS-i
Slave 5
AS-i
Slave 24
6.7.2Error display (last error)
power
net
config error
U AS-i
AS-i active
prg enable
prj mode
AS-i
AS-i
Slave 1
AS-i
Slave 5
AS-i
Slave 24
AS-i Master
power
net
Config error
U AS-i
AS-i active
prg enable
prj mode
AS-Interface
AS-i
Slave 1
AS-i
Slave 5
AS-i
Slave 24
2s
LCD
1.24
MISSING SLAVE
2s
LCD
Host error
no connection
AS-i Master
set/↓
24
26.9.2013
21
Page 22
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.7.3Replacing the chip card
Always turn off power before inserting or removing the card!
[1]
[2]
22
[3]
old
new
26.9.2013
Page 23
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Installation
6.7.4Local parameter setting of AS-i/Gateways
Geräte+Chipdaten ungleich
(Werkskonfiguration geändert)
/Device+card data not equal
(Factory configuartion changed)
Fehlermeldung:
/Error message/
Geräte+Chipdaten gleich
/Device data+card data equal/
Karte leer + formatiert
/Card empty + formatted/
CHIPCARD AND
DATA
DIFFERENT
CARD->MASTER
MASTER->CARD
CONTINUE
Keine Meldung
/No message/
CHIPCARD FOUND
DATA WILL
BE SYNCHRONIZED
Daten werden synchronisiert:
/Data being synchronized/
MASTER->KARTE
Copy data CARD->MASTER
or MASTER->CARD
Daten kopieren
KARTE->MASTER oder
Keine Aktion erforderlich
/No action required/
Keine Aktion erforderlich
/No action required/
Copier données Carte->Maître ou
/Aucune action requise/
/Nessuna azione richiesta/
/Ninguna deción requrida/
/Aucune action requise/
/Nessuna azione richiesta/
/Ninguna deción requrida/
Maître-Carte
Copiare dati Chipcard->Master o
copiare dati Master->Chipcard
Copiar dates Chip->Maestro o
Maestro ->Chip
konfiguration)
DATA FROM
(Werks
/Data compatible (factory
configuration)/
Daten kompatibel
Daten nicht kompatibel
/Data not compatible/
Karte nicht formatiert
/Card not formatted/
26.9.2013
CHIPCARD TAKEN
Daten werden übernommen:
/Data being acepted/
CHIPCARD NOT
COMPATIBLE
Fehlermeldung:
/Error message/
NEW CHIPCARD
WILL BE FORMATTED
DATA WILL BE
/Formatting card /
SYNCHRONIZED
Karte wird formatiert:
Keine Aktion erforderlich
/No action required/
/Aucune action requise/
/Nessuna azione richiesta/
/Ninguna deción requrida/
Karte löschen
/Clear the card/
/Supprimer carte/
/Cancellare chipcard/
/Borrar chip/
Keine Aktion erforderlich
/No action required/
/Aucune action requise/
/Nessuna azione richiesta/
/Ninguna deción requrida/
23
Page 24
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.Electrical connection
7.1Overview of terminals, indicators and operating elements
[1]LEDs
[2]Ethernet interface
[3]LC display
[4]Buttons
[5]Terminals: Supply voltage and AS-i circuit
[6]Chip card
[7]RS232 diagnostics port
1. Only together with AS-i Control Tools
1
10
0,2 ... 2,5 mm
10
0,2 ... 2,5 mm
AWG24 ... 12
2
2
26.9.2013
24
Page 25
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.2AS-i bus connection
Blue
AS-i-
Brown
AS-i+
Blue
AS-i-
Brown
AS-i+
Yellow ASi ribbon cable
2-conductor AS-i round cable
(Recommended: flexible power cable
H05VV-F2x1,5 per DIN VDE 0281)
Information!
Electrical work is to be performed only by electrical technicians.
7.3Information about the device types
Information!
A listing of the individual device s and their features can be found in section <Produ ct
information>.
7.4AS-i and power supply terminal assignments
Information!
The cable indicated by grey must not have slaves or repeaters connected to it.
The yellow cable must not have AS-i po wer supp liers or additional masters co nnecte d
to it.
Information!
The function ground can be connected either to the grounding screw or to the terminal.
The function ground shoul d be made with as s hort a cable a s pos sible to e nsure g ood
EMC characteristics.
Therefore function grounding using the grounding screw is preferred.
26.9.2013
25
Page 26
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.4.1Electrical connection VBG-ENX-K20-D
ASI
+ASI-+ASI
-
-
+PWR
M4
5 mm max!
NC NC
-
-
+-+
+
Function ground
+ASI –
+ASI –
ASI +PWR– (max. 8A)
TerminalSignal / Description
+AS-i–
ASI +PWR–
FE
Connection to AS-i Circuit
Supply voltage for AS-i Circuit (max. 8 A)
Function ground
Information!
For additional information, plea se refer to the sect ion <AS -i and powe r supply t ermin al
assignments>.
26
26.9.2013
Page 27
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.4.2Electrical connection VBG-ENX-K20-DMD
M4
5 mm max!
-
-
+-+
+
Function ground
+ASI 1–
ASI 1 +PWR– (max. 8A)
+ASI 2–
+
ASI 2 +PWR– (max. 8A)
TerminalSignal / Description
+ASI 1–
+ASI 2–
ASI 1 +PWR–
ASI 2 +PWR–
FE
Connection to AS-i circuit1
Connection to AS-i circuit2
Supply voltage for AS-i circui t 1 (max. 8 A)
Supply voltage for AS-i circui t 2 (max. 8 A)
Function ground
Information!
AS-i circuits 1 and 2 are powered by separate power supplies.
Information!
For additional information, plea se refer to the sect ion <AS -i and powe r supply t ermin al
assignments>.
26.9.2013
27
Page 28
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.4.3Electrical connection VBG-ENX-K20-DMD-EV
M4
5 mm max!
Function ground
+ASI1- +ASI1- +ASI2-
+ASI1–
+ASI
1–
2–
+ASI
+
ASI +PWR– (max. 4A) / 24V, 0V
+ASI PWR 24V 0V
-
-
-
+
+-+
+
TerminalSignal / Description
+ASI 1–
+ASI 2–
ASI +PWR– /
24 V, 0 V
Connection to AS-i circuit1
Connection to AS-i circuit2
Supply voltage for AS-i circuits (max. 4 A) /
AS-i Power241 supply optional
FEFunction ground
1. The gateway is AS-i Power24V capable and can be operated directly on a 24V (PELV) power supply.
28
Information!
AS-i Circuit 1 and 2 are both powered from a
Bihl+Wiedemann GmbH power sup-
ply!
No other power supplies are approved!
Attention!
Earth fault detector sensor without function when using AS-i Power24!
Information!
For additional information, please refer to the sections: <AS-i and power supply terminal assignments> and <AS-i Power24V capable>.
26.9.2013
Page 29
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.5Ethernet interface
A
B
The ethernet interface consists of two RJ-45 sockets. It is placed on the left housing side (see section <Overview of terminals, indicators and operating elements>). The ethernet interface is driven according to the IEEE 802.3
7.6Dia gno stics interface
The service and diagnostics interface (in conjunction with AS-i Control Tools
software) is used for communication between the PC and the unit.
7.6.1Diagnostics port RS 232
The service and diagnostics interface is configured as a mini DIN-6 female and it
is placed at the top of the housing (see section <Overview of terminals, indicators
and operating elements>).
7.7Chip card
The configuration is stored in a fixed installed EEPROM and can be overwritten
by the chip card. The chip card does not have to be inserted in operation.
Warning!
Power must always be turned off when removing or inserting the chip card!
26.9.2013
29
Page 30
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.8Indicators and operating elements
7.8.1LED indicators – master
net
The LED’s on the front panel of the device indicate:
Power
The master is receiving sufficient power.
net(the bi-color LED indicates the state of the ethernet port)
LED red: no valid ENIP- or CIP connection.
LED green: at least one ENIP- or CIP connection present
config error
Configuration error.
At least one configured slave is missing, or at least one detected slave is not configured, or for at least one configured and detected slave the actual configuration data
does not match the nominal configuration data, or the master is in the startup process.
This LED flashes if a peripheral fault has been detected for at least one AS-i slave
on the AS-i network. If there a re con figurat ion erro rs as w ell as pe ripher y faults , only
the configuration error is displayed.
U AS-i
The AS-i network is sufficiently powered.
AS-i active
Normal operation is active
prg enable
Automatic single node replacem ent is enabled.
Exactly one slave is missing in the protected operating mode. The slave can be
replaced by another slave of the same type with address zero. The master automatically addresses the new slave to the faulty address and thus corrects the configuration error
prj mode
The AS-i master is in configuration mode.
30
26.9.2013
Page 31
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Electrical connection
7.8.2Buttons
The buttons are used for the following:
Mode/⇑
Switching between configuration mode and protected operating mode, and saving
the current AS-i configurati on as the nominal configuration.
Set/⇓
Selecting the address of and assigning an address to a slave.
OK, ESC
Changing to the advanced display mo de.
For additional information see section <Operation in advanced display mode>.
26.9.2013
31
Page 32
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation in advanced display mode
8.Operation in advanced display mode
Information!
You will find a description of the display menu in the separate document
"Display_Menue".
32
26.9.2013
Page 33
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
9.Advanced Diagnostics for AS-i Masters
The advanced AS-i diagnostics is intended to localize occasionally occurring configuration errors and to determine the quality of data transmission on AS-i without
using additional diagnostics tools.
AS-i Control Tools, a MS-Windows software designed to simplify AS-i installation
and used to program AS-i Control, enables operation of the advanced diagnostics
functions (LCS, error counters, and LOS).
9.1List of corrupted AS-i Slaves (LCS)
The LCS contains the information from the Delta list. In addition to the list of configured slaves (LPS), the list of detected slaves (LDS), and the list of activated
slaves (LAS), the AS-i master creates a fourth list, the list of corrupted slaves
(LCS) containing advanced diagnostics data used to diagnose the causes for intermittently occurring configuration errors on AS-i. This list contains entries for all
AS-i slaves that were responsible for at least one intermittent configuration error
since the list was last read or since the AS-i master was turned on. Furthermore,
intermittent AS-i power failures are listed in the LCS at the position of AS-i slave
with address 0.
Information!
Whenever the LCS is read it is deleted from memory.
Information!
The last intermittent configuration error can also be displaye d on the AS-i master:
Pressing the "Set" button on the AS-i master initiates the display of the AS-i slave
responsible for the last i ntermi ttent con figur ation err or. If a i ntermi ttent AS -i power failure occurred, the display show s 39 after pressing the "Set" button.
This function is only available if the device is in normal ope rating mod e of the prote cted
mode (display empty) or in the off- line phase (Display: "40").
9.2Protocol analysis: Counters for corrupted data telegrams
The AS-i master with advanced diagnostics provides a counter for telegram repetitions for each AS-i slave. The counter counts up every time a corrupted data telegram has been found, making it possible to determine the quality of the transmission if only a few telegrams are corrupt and the AS-i slave never caused a
configuration error.
Information!
The counter values are read vi a the host inter face and will be de leted after th ey were
read.
The highest possible counter v alue is 254. 255 indicates a counter overflow.
Displaying the protocol analysis is possible through the AS-i Control Tools software by using the command "Master | AS-i Diagnostics".
26.9.2013
33
Page 34
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
9.3Offline Phase for Configuration Errors
The AS-i masters with advanced diagnostics offer the possibility to set themselves into the offline phase when a configuration error occurs and thus are able
to transition the AS-i network into a safe operational state. This ensures a quick
reaction to a configuration error and the host can be relieved from this task. If any
problems occur on the AS-i network, the AS-i masters can independently switch
the AS-interface into a safe state.
There are two different ways to parameterize the AS-i master for this feature:
•Any configuration error occurring on AS-i switches the master from regular
operation in protected mode into the offline phase.
•o . A list with the addresses of slaves that can potential initiate the off-line
phase is defined (list of offline slaves LOS).
The user can decide how the system should react to a configuration error on
AS-i. Thus, the AS-i master can be set to the offline phase for critical AS-i slaves,
whereas for less critical slaves only the error message is sent to the host, but ASi is still running.
Like the advanced diagnostics, the parameterization "offline phase on configuration error" is also supported by "AS-i-Control-Tools"
(Command | Characteristics | Offline because of configuration error).
There are two options to reset the error message "OFFLINE BY LOS:
1.Deleting the complete LOS list on the affected AS-i network ("CLEAR ALL").
2.Power reset on the affected AS-i network.
Attention!
If a power reset occurs on the AS-i network 1 the complete double gateway will
be shut down.
9.4Functions of the AS-i Fault Detector
9.4.1Duplicate address detection
If two slaves on an AS-i network have the same address, a duplicate address exists. Since the master cannot communicate individually with these slaves any
longer, this is considered an error. Because the two slave replies interfere, it is impossible for the master to recognize the slave responses. This results in extremely unstable network behavior.
The duplicate address detection function is used to safely recognize a duplicate
address and to display it on the screen and in AS-i Control Tools.
A duplicate address causes a configuration error and is displayed on the screen.
Information!
Duplicate addresses can be recogn ize d onl y on an AS -i seg men t dir ec tly c onn ec ted t o
the master.
34
26.9.2013
Page 35
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
9.4.2Earth/Ground Fault Detector
An Earth/Ground Fault exists when the voltage
=0,5 U
U
GND
10% U
This error substantially limits the noise immunity of the AS-i communication.
Ground faults are indicated on the master´s display as well as in AS-i Control
Tools.
Information!
To recognize ground faults the master must be grounded with its machine ground connection.
Information!
A ground fault in one of the two networks of a double master in a version 1 power supply for two AS-i networks causes a ground fault in the other network as well because of
the the existing galvanic connection.
9.4.3Noise Detector
The noise detector detects AC voltages on AS-i, that are not initiated by an AS-i
master or AS-i slaves. These interference voltages can cause telegram disturbances.
A frequent cause are insufficiently shielded frequency inverters or improperly
routed cables.
Noises is indicated on the master´s display as well as in AS-i Control Tools.
.) is outside of the following range:
AS-i
≤ U
GND
≤ 90% U
AS-i
AS-i
U
(Nominal value of
GND
9.4.4Over-voltage Detector
Over-voltages are present if the conductors of an AS-i network that normally are
routed electrically symmetrical with respect to machine ground, are strongly electrically raised. A cause can for example be startup procedures of large consumers.
However, over-voltages do generally not interfere with the AS-i communication,
but can under certain circumstances cause incorrect sensor signals.
Over-voltages are indicated on the master´s display as well as in the AS-i Control
Tools.
26.9.2013
35
Page 36
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
9.5Functions of the new generation of AS-i Gateways
The new generation scores with further optimized diagnostics, several additional
functions and even greater operating convenience.
Information!
A listing of the individual devices and their features can be found in section
Generation of AS-i Gateways with ethernet diagnostics interface>.
9.5.1C-programmable Gateways
Main menu || SETUP || AS-I CONTROL || CONTROL FLAGS ||
The devices programmed in C are able themselves to take over a great number of
control tasks. In smaller systems the user will even be able to do without a PLC
altogether: if desired the C program can function as a full mini-PLC.In more complex applications the C-programmable Gateways make the work of the PLC easier - for example by pre-processing special functions.
Main menu || SETUP || CHIPCARD || AS-I CHIPCARD ||
Interchangeable memory card: redundant memory for C program and device configuration.
Chipcard
AS-i Chipcard
Format Chipcard
9.5.3Earth fault monitor
Main menu || DIAGNOSE || ASI WATCHDOG ||
The new earth fault monitor allows the service technician to detect whether an
earth fault has occurred directly on AS-i
1.
Earth fault
36
26.9.2013
Page 37
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
or on a sensor line.
1.
Earth fault sen.
The menu EFLT Ratio shows the asymmetry of the AS-i network, referenced to
ground (see sketch).
100%
0%
100%
%
%
AS-i +
AS-i -
EFLT Ratio: #
AS-i+ 2%
AS-i DC Voltage: 1
31,3V
$
EFLT Ratio: #
AS-i+ 100%
AS-i DC Voltage: 2
31,5V
9.5.4Current can be read directly on the unit
Now the devices display both the maximum current and the current actually
present in the respective AS-i circuit. Heavy consumers or a strong overload in an
AS-i circuit are then easy to detect. Plus you can set the maximum cu rrent in the
AS-i circuit on these devices. This ensures line protection even when using large
24V power supplies.
AS-i power
Reset
Maximal: 2
1,3A
26.9.2013
"
37
Page 38
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
Maximal: #
1,3A
current: 2
0,3A "
Current: #
0,3A
Current limiting 2
3,2A "
9.5.5Self-resetting fuses
Main menu || SETUP || CURRENT LIMIT ||
Thanks to self-resetting fuses in the "1 Gateway, 1 power supply for 2 AS-i circuits" Gateway version, when there is a short circuit in one of the two AS-i circuits
the other circuit and the Gateway remain operational - the host controller keeps
receiving diagnostic information from AS-i, which also provides meaningful assistance towards rapid troubleshooting.
The fuse resets itself periodically to check if the error is solved. The measured
current value is available as diagnostic information at the field on the display and
at the control level.
9.5.6AS-i Power24V capable
Main menu || SETUP || ASI POWER ||
Gateways for AS-i Power24V have been developed especially for use in small
systems. They don‘t need any special AS-i power supply. With a standard 24V
power supply a 50 m line lenght and with an AS-i power supply min. 100 m line
lenght can be realised.
38
Current limiting
3,2A
2
AS-i Power
24V geerdet
change
26.9.2013
Page 39
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Advanced Diagnostics for AS-i Masters
AS-i Power
AS-i PWR Supply
change
9.5.7Ethernet diagnostics interface with web server
These devices allow diagnostics for both the Gateway and the AS-i networks (including Safety technology) over Ethernet without additional software. AS-i network can be thus a part of a remote maintenance concept. Morover the configuration file are stored on the web server and so they are always within reach.
9.5.8Transitionless operating mode changes
Main menu || SETUP || MODE CHANGE ||
These devices are able to change the operating mode from projecting mod e to
the protected operating mode without having to first go to the "offline phase".
This means the Slave outputs are not cleared and the safe Slaves not turned off.
Activation and deactivation is set using the Ethernet start parameterization.
This function must be explicitly activated; the default setting is “Deactivated.”
The setting for activated and deactivated is saved, which means that it remains
set after a "power cycle".
Mode Change
Offline Phase
yes
change
26.9.2013
39
Page 40
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
10.EtherNet/IP interface
Objekt modelling
The attributes of bus participants are mapped into objects in the CIP family (DeviceNet, ControlNet and EtherNet/IP) bus systems.
In addition to for all EtherNet/IP devices common objects, there are other objects
in the AS-i gateways to access the data of the AS-i network:
0x06Connection manager1
0x47Device level ring1
0x48Quality of service1
0x64AS-i master1 for each AS-i circuit
0x65AS-i slave64 for each AS-i circuit
0x66E/A data1 for each AS-i circuit
0x67Advanced diagnos ics1 for each AS-i circuit
0x68Short command interface1
0x69Long command interface1
0x6BSafety Control Status external Mo nitor 1 for each AS-i circuit
86 (double master)
Tab. 10-2.
40
26.9.2013
Page 41
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
10.1Identity object
class code: 1 (0x01)
number of instanzes: 1
instance attributes
sor address
12 (0x0C)getcapability flags1 (announce-based ring node)
Common Services
Service Code Class Instance Service Name
1 (0x01)yesyesget attributes all
14 (0x0E)yesyesget attribute single
0 (linear), 1 (ring)
byte 0-3: ip-adress,
byte 4-9: mac-adress
Tab. 10-5.
Tab. 10-6.
42
26.9.2013
Page 43
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
10.3Quality of Service Object
Class Code: 72 (0x48)
number of instanzes: 1
instance attributes
Attribute IDAccess Rule NameValue
1 (0x01)get/set802.1q tag
enable
4 (0x04)get/setdscp urgentdscp after rfc 3168 for cip class 0/1
5 (0x05)get/setdscp scheduled dscp after rfc 3168 for cip class 0/1
6 (0x06)get/setdscp highdscp after rfc 3168 for cip class 0/1
7 (0x07)get/setdscp lowdscp after rfc 3168 for cip class 0/1
8 (0x08)get/setdscp explicitdscp after rfc 3168 for cip class 3/
Common Services
0 (disabled), 1 (enabled)
urgent (default 55)
scheduled (default 47)
high (default 43)
low (default 31)
ucmm (default 27)
Tab. 10-7.
Service Code Class Instance Service Name
14 (0x0E)noyesget attributes single
16 (0x10)noyesget attribute single
Tab. 10-8.
Information!
The new settings take effect only after a device restart.
Information!
If “802.1Q Tag Enable“ is tu rn ed o n, the VL AN ID s et i n the de vi ce me nu “E th erne t“ - >
“EtherNet/IP“ -> “VLAN ID“ is used.
Information!
The integrated switch uses four internal priority queues.
Information!
The VLAN ID is only used if in the EtherNet/IP Quality of Service Object (0x48)
Attribute 1 (802.1Q Tag Enable) is se t to 1 (= ON), so th at Et hernet frames ar e sent in
accordance with IEEE 802.1Q.
26.9.2013
43
Page 44
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
Mapping of the SDCP and 802.1D priorities to the queues is as follows:
class code: 102 (0x66)
Input and output data
1 instance for each AS-i circuit
Instance 1 equates to AS-i circuit 1
Instance 2 equates to AS-i circuit 2
attribute IDaccess rule namedevicenet data typedefault data
100getinput data image, single and A-slaves ARRAY[16] of
101getinput data image, B-slavesARRAY[16] of
102get/setoutput data image single and A-slavesARRAY[16] of
103get/setoutput data image, B-slavesARRAY[16] of
104get16-bit input data slave 1ARRAY[4] of INT
……………
134get16-bit input data slave 31ARRAY[4] of INT
135get/set16-bit output data slave 1ARRAY[4] of INT
……………
165get/set16-bit output data slave 31ARRAY[4] of INT
A-slaves map the data on channels 1 and 2.
B-slaves map the data on channels 3 and 4.
1=Off-Line by ConfigError
activated.
Tab. 10-23.
54
In addition to the access via the command interfaces, the 16-bit data for or by the
slaves with 16-bit value can by exchanged cyclically (profile 7.3., S-7.4, S-6.0, S-
7.5, S-7.A.8, S-7.A.9, S-7.A.A). Competing writing access attemps on 16-bit output data will not be blocked by every other. If 16-bit output data for a particular
slave are being transmitted both cyclically and acyclically with the command interface, the acyclically transmitted values will be overwritten by the cyclically transmitted values.
Data of all channels of a slave can be transmitted in a reserved data area. Therefore accessing 16-bit data is as easy as accessing digital data.
command[0]
toggle-bit and AS-i circuit[1]
data[2 … 11]
10.10Long Command Interface Object
class code: 105 (0x69)
1 instance
attributeIDaccess
100 (0x64)get/setcontentARRAY [38] of USINT
rule
namedevicenet
command[0]
toggle-bit and AS-i circuit[1]
data[2 … 37]
For special details acc. the command interface commands see the separat manual "AS-i 3.0 Command Interface".
data type
data type
default
data value
default
data value
Tab. 10-28.
Tab. 10-29.
56
26.9.2013
Page 57
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
10.11Safety Control/Status
10.11.1External Monitor
10.11.1.1 Safety Control Status external Monitor
class code: 107 (0x6B)
1 instance per AS-i circuit
attributeIDaccess
100 (0x64)getslave 1:ARRAY [8] of USINT
……………
130 (0x82)getslave 31:ARRAY [8] of USINT
131 (0x83)get/setsafety control slave1USINT
……………
161 (0xA1)get/setsafety control slave31USINT
rule
namedevicenet
safety status release circuit 1 [0]
safety status release circuit 2 [1]
…[2… 6]
safety status, release circuit8 [7]
safety status release circuit 1 [0]
safety status release circuit 2 [1]
…[2… 6]
safety status release circuit 8 [7]
data type
default
data value
Tab. 10-30.
Coding of states and colors see tab. <Coding of status bytes per OSSD>.
Safety control
Byte description
1 byte from the EtherNet/IP
bit 0: 1.Y1
bit 1: 1.Y2
bit 2: 2.Y1
bit 3: 2.Y2
bit 4 ... 7: reserved
Set (data write access)
The bits of the output byte s whic h hav e bee n set vi a t he host int erface are O Red wi th
the real and the homonymous hardware inputs of the device.
GET (data read access)
The information-bits of t he outputs 1.Y1, 1.Y 2, 1.Y2 and 2.Y2 which h ave been read
back only reflect the data bits set via the host interface.
26.9.2013
57
Page 58
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
EtherNet/IP interface
Coding of status bytes per OSSD
Bit [0 ... 3] State or. color
00
01
02
03
04
05
06
07
Bit [6]status or color
0no device flashing yellow
1at least one device flashing yellow
Bit [7]status or color
0no device flashing red
1at least one device flashing red
green permanent lighting
16
green flashing
16
yellow permanent lighting
16
yellow flashing
16
red permanent lighting
16
red flashing
16
grey or off
16
reserved
16
Tab. 10-31.
58
26.9.2013
Page 59
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
11.The Modbus Address Table
Cyclic data exchange similar to the Momentum Ethernet Adapter
The bits within the words of this block are arranged appropriate for the BLKM
(Block Move) function in Modicon's 984 Ladder Language (as proposed in the
Open Modbus Specification, Release 1.0). The bits are numbered from most
signicant bit to least signicant bit:
0no device flashing yellow
1at least one device flashing yellow
Bit [7]status or color
0no device flashing red
1at least one device flashing red
access data read access
green permanent lighting
16
green flashing
16
yellow permanent lighting
16
yellow flashing
16
red permanent lighting
16
red flashing
16
grey or off
16
reserved
16
2152142132122112102928272625242322212
0
Tab. 11-47.
Tab. 11-48.
The cyclical output identifier contains the 4 Safety Monitor bits 1.Y1, 1.Y2, 2.Y1
and 2.Y2. The monitoring element “Monitor input” and the start elements “Monitor
Start-Monitor Input” and “Activation using Monitor Input” access these data. In
contrast, the “Feedback circuit” element always accesses the EDM input. The bits
of the output bytes are ORed with the real and the homonymous hardware inputs
of the device.
26.9.2013
71
Page 72
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
Safety status external monitor (data for write access)
4x
acc
reference
bit value
„bit“1 2 3 4 5 6 78910111213141516
5889 r / wreservedSlave 1
5890 r / wreservedSlave 2
…………………
5919 r / wreservedSlave 31
data write access
ess
2152142132122112102928272625242
3
2.Y2
2.Y2
2.Y2
2
2
Slave 1
2.Y1
Slave 2
2.Y1
Slave 31
2.Y1
2
Slave 1
1.Y2
Slave 2
1.Y2
Slave 31
1.Y2
1
0
2
Slave 1
1.Y1
Slave 2
1.Y1
Slave 31
1.Y1
Tab. 11-49.
72
26.9.2013
Page 73
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
11.2AS-i circuit 1 data
11.2.1Permanent configuration data
AS-i circuit 1
permanent configuration data
4x referenceaccessdata
4385 ... 4400r/wpermanent parameter (PP)
4401 ... 4464r/wpermanent configuration data (PCD)
4465 ... 4468r/wlist of projected slaves (LPS)
11.2.2Enh anced diagnostic
AS-i circuit 1
enhanced diagnostic
4x referenceaccessdata
4609 ... 4672r/-
4673 ... 4676r/4677 ... 4680r/wlist of offline slaves LOS
4681 ... 4684r/-delta list
1. The transmission error counters and the LCS are reset each time they are read.
transmisson error counters
list of corrupted slaves LCS
0: success
32769: failure
32770: slave with 1st addr not detected
32771: slave with zero addr detected
32772: slave with 2nd addr detected
32773: delete error
32774: set error
32775: address stored temporarily
32776: extended ID1 stored temporarily
32777: error reading extended ID1
32778: parameter out of range
32779: invalid opcode
Tab. 11-52.
74
Set_Operation_Mode: A zero in the 4x reference 4865 act ivates the pro-
tected mode. All other values switch on the configuration mode.
Change_Slave_Address: This function will be executed, if the value 2 is written
to the 4x reference 4865. The va lue written in the 4x
reference 4867 will be the new address of the slave.
The old address has to be written to the 4x reference
4866 before.
Store_Actual_Parameters: If the value 3 is writ ten to the 4x reference 4865, the
actual parameters (PI) will be stored as parameters
projected (PP).
Store_Actual_Configuration: If the value 4 is written to the 4x reference 4865, the
actual AS-i configuration will be stored as projected
parameters (PCD, LPS).
Execute_command: If the value 5 is written to the 4x reference 4865, this
function will be executed. The value written in the 4x
reference 4867 will be sent as the in formation-part to a
slave, which the 4x reference has been written before
to the 4x reference 4866.
26.9.2013
Page 75
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
Information!
B addresses are located behind A addresses. Addresses 0 … 31 correspond to 0A … 31A, addresses 32 … 64 correspond to
0B … 31B.
11.3AS-i circuit 1 analog data
11.3.116 bit output data of AS-i slaves according to slave profile 7.3 or 7.4
AS-i circuit 1
16 bit output data of AS-i slaves according to slave profile 7.3 or 7.4
data
4x
reference
51251slave at address 1, channel 1
51262slave at address 1, channel 2
......
5248124slave at address 31, channel 4
11.3.216 bit input data of AS-i slaves according to slave profile 7.3 or 7.4
AS-i circuit 1
16 bit input data of AS-i slaves according to slave profile 7.3 or 7.4
4x
reference
52531slave at address 1, channel 1
52542slave at address 1, channel 2
......
5376124slave at address 31, channel 4
word
2152142132122112102928272625242322212
data
word
2152142132122112102928272625242322212
0
Tab. 11-53.
0
Tab. 11-54.
26.9.2013
75
Page 76
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
11.4AS-i circuit 2 data
11.4.1Process data and actual configuration data
AS-i circuit 2
process data and actual configuration data
4x referenceaccessdata
8193 ... 8208r/-input data image IDI
8209 ... 8224r/woutput data image ODI
8225 ... 8234r/w
8241 ... 8304r/-conguration data image CDI
8305 ... 8308r/-list of activated slaves LAS
8309 ... 8312r/-list of detected slaves LDS
8313 ... 8316r/-list of periphery faults LPF
8321r/-ec-flags
8322r/whi-flags
1. Writing to the refercences 8225 to 8234 invokes the Execution Control function. Write_Parameter() rather than writing the PI.
11.4.2Permanent configuration data
AS-i circuit 2
permanent configuration data
4x referenceaccessdata
8481 ... 8496r/wpermanent parameter (PP)
8497 ... 8560r/wpermanent configuration data (PCD)
8561 ... 8564r/wlist of projected slaves (LPS)
parameter image PI
1
Tab. 11-55.
Tab. 11-56.
11.4.3Enh anced diagnostic
AS-i circuit 2
enhanced diagnostic
4x referenceaccessdata
8705 ... 8768r/-
8769 ... 8772r/8773 ... 8776r/wlist of offline slaves (LOS)
8777 ... 8780r/-delta list
1. The transmission error counters and the LCS are reset each time they are read.
76
transmisson error counters
list of corrupted slaves (LCS)
0: success
32769: failure
32770: slave with 1st addr not detected
32771: slave with zero addr detected
32772: slave with 2nd addr detected
32773: delete error
32774: set error
32775: address stored temporarily
32776: extended ID1 stored temporarily
32777: error reading extended ID1
32778: parameter out of range
32779: invalid opcode
Tab. 11-58.
26.9.2013
77
Page 78
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
The Modbus Address Table
11.5AS-i circuit 2 analog data
11.5.116 bit output data of AS-i slaves according to slave profile 7.3 or 7.4
AS-i circuit 2
16 bit output data of as-i slaves according to slave profile 7.3 or 7.4
data
4x
reference
92211slave at address 1, channel 1
92222slave at address 1, channel 2
......
9344124slave at address 31, channel 4
11.5.216 bit input data of as-i slaves according to slave profile 7.3 or 7.4
AS-i circuit 2
16-bit input data of AS-i slaves according to slave profile 7.3 or 7.4
4x
reference
93491slave at address 1, channel 1
93502slave at address 1, channel 2
......
9472124slave at address 31, channel 4
word
2152142132122112102928272625242322212
data
word
2152142132122112102928272625242322212
0
Tab. 11-59.
0
Tab. 11-60.
11.6Modbus watchdog
The watchdog is set by default to 1000 msec (=100 in register 61441). This value
will be automaticly set after POWER ON of the gateway. Every write access on
any Modbus registers reloads the watchdog timer. If no values are written before
the watchdog timer is counted to zero the gateway will automaticly put all AS-i circuits that are not in conguration mode in a safe state by clearing the outputs. This
means they are reseted.
The timeout period can be adjusted if necessary at the address 61441 (in 10 ms
units, range 1 to 65536) but it will return to the default value on power cycle.
If zero is written to the address 61441, the watchdog is disabled.
The reference 2087 holds the default value for the watchdog timeout. This value
is set in the register 61441 after power on of the gateway. This period can be adjusted from 0 to 999 (0=watchdog disabled). Writing to this register also writes to
the register 61441.
Reading the address 61441 returns the watchdog holdup time remaining (reset to
value written at each output operation).
78
26.9.2013
Page 79
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
12.Operation via Ethernet IP (Modbus/TCP)
The AS-i/Gateway acts as a 1 or 2 complete Master for the AS-i and as a 256 bit
digital I/O module for Ethernet. All possibilities offered by AS-i can be used via
Ethernet TCP/IP.
The used Modbus/TCP protocol is similar to the Modbus protocol. Specifically, it
covers the use of Modbus messaging in an Intranet or Internet environment using
TCP/IP protocols. The only differences to the Modbus protocol are the form of any
"framing" sequence, error check pattern and address interpretation.
All requests are sent via TCP on registered port 502.
Data addresses in Modbus messages
All data addresses in Modbus messages are referenced to zero. The fi rst occurrenc e
of a data item is addressed as item number zero.
For example:
The coil known as "coil 1" in a pro grammable controller i s addressed as coil 000 0 in
the data address field of a Modbus message.
Coil 127 decimal is addressed as coil 007E hex (126 decimal).
Holding register 40001 is ad dressed as regist er 0000 in the dat a address field of the
message. The function code field already specifies a "holding register" operation.
Therefore the "4XXXX reference is implicit.
Holding register 40108 is addressed as register 006B hex (107 de cimal).
12.1Message Structure
Telegrams from the Modbus-Master (query-messages) and answers of the Modbus slaves have the same structure:
The request and response are prefixed by 6 bytes as follows:
T1
highT2low
Transaction identifier T1,T2: usually 0 - copied by server.
protocol identifier P1,P2:0
26.9.2013
P1
P2
high
lowB1highB2low
length field B1: upper byte of th e length field = 0 (since all mess ages
length field B2: lower byte of the length field = number of bytes follow-
unit identifier UI: value to indentifying the cl ient
funktion code F: Code of Modbus-function to be executed by the slave.
data bytes D1 ... Dn: Field to hold user-data.
are smaller then 256)
ing
Under certain circumstances the slave could answer
with an error-telegram. In this case the function-code in
the response-message is increased by 128.
The number of bytes is variable
UIFD1
highD2low
...Dn
low
79
Page 80
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
Information!
Checksum fields are not needed, becaus e the TCP/IP and link layer (eg. Ethernet)
instad are used to verfiy acc urate delivery of the packet.
Example transaction:
Read 1 register at offset 4 from UI 9. Return value is 5
In the following chapter are shown the support functions. Please note, that only
the related bytes are shown (bytes 0 - 3 are let away, because the values are 0).
This function allows to read the value of read/write-registers and the setting of
several read/write-registers:
request:17RR
response: 17BD1
highRRlowNRhighNRlowRWhighRWlow
NW
highNWlow
highD1low
RR: reference numb er for read (2 byte hex-value of register)
NR: word count for read (1 - 125) (2 byte)
RW: reference number for write (2 byte hex-value of register)
NW: word count for write (1 - 100) (2 Byte)
B: byte count (B = 2 x word count for write / 1 byte)
(redundant information to Word count but necessary)
D1 ... Dn: register value
BD1
highD1low
…Dn
highDnlow
…Dn
low
Example:
Read 2 registers at reference 0 and write 1 register at reference 3 of value 4660
returning values 4 and 4951.
.
request:17 RR
highRRlowNRhighNRlowRWhighRWlowNWhighNWlow
request:17 0000 00020003000102 4660
response:17BD1
highD1lowD2highD2low
BD1
highD1low
response:170400044951
12.2.4Exception codes
There is a defined set of exception codes to be returned by slaves in the event of
problems. Note that masters may send out commands "speculatively", and use
the success or exception codes received to determine which MODBUS commands the device is willing to respond to and to determine the size of the various
data regions available on the slave.
All exceptions are signaled by adding 128 to the function code of the request, and
following this byte by a single reason byte for example as follows:
For instance:
26.9.2013
81
Page 82
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
03 46 60 00 01 ⇒ 128 02
request: read 1 Register at index 4660
response: exce ption type 2 - „illegal data address“
List of exceptions:
•01 ILLEGAL FUNCTlON
The function code received in the query is not an allowable action for the
slave. This may be because the function code is only applicable to newer
controllers, and was not implemented in the unit selected. It could also indicate that the slave is in the wrong state to process a request of this type, for
example because it is unconfigured and is being asked to return register values.
•02 ILLEGAL DATA ADDRESS
The data address received in the query is not an allowable address for the
slave. More specifically, the combination of reference number and transfer
length is invalid. For a controller with 100 registers, a request with offset 96
and length 4 would succeed, a request with offset 96 and length 5 will generate exception 02.
•03 ILLEGAL DATA VALUE
A value contained in the query data field is not an allowable value for the
slave. This indicates a fault in the structure of the remainder of a complex
request, such as that the implied length is incorrect. It specifically does NOT
mean that a data item submitted for storage in a register has a value outside
the expectation of the application program, since the MODBUS protocol is
unaware of the significance of any particular value of any particular register.
•04 ILLEGAL RESPONSE LENGTH
Indicates that the request as framed would generate a response whose size
exceeds the available MODBUS data size. Used only by functions generating
a multi-part response, such as functions 20 and 21.
•05 ACKNOWLEDGE
Specialized use in conjunction with programming commands
•06 SLAVE DEVlCE BUSY
Specialized use in conjunction with programming commands
•07 NEGATlVE ACKNOWLEDGE
Specialized use in conjunction with programming commands
•08 MEMORY PARlTY ERROR
Specialized use in conjunction with function codes 20 and 21, to indicate that
the extended file area failed to pass a consistency check.
•0A GATEWAY PATH UNAVAILABLE
Specialized use in conjunction with Modbus Plus gateways, indicates that the
gateway was unable to allocate a Modbus Plus PATH to use to process the
request. Usually means that the gateway is misconfigured.
82
26.9.2013
Page 83
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Operation via Ethernet IP (Modbus/TCP)
•0B GATEWAY TARGET DEVICE FAILED TO RESPOND
Specialized use in conjunction with Modbus Plus gateways, indicates that no
response was obtained from the target device. Usually means that the device
is not present on the network.
26.9.2013
83
Page 84
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Data Transfer using CIP Messages in RSLogix5000
13.Data Transfer using CIP Messages in RSLogix5000
This chapter explains the data transfer of AS-i 3.0 EtherNet/IP Gateways using
CIP Messages in RSLogix5000.
13.1M SG instruction and Message Type Tag
! Include a MSG instruction.
! Create a new MESSAGE-type tag as control tag for the instruction.
84
! Select "Configure" on the "New Tag" window or "..."' next to the tag name to
open the "Message Configuration" window.
26.9.2013
Page 85
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Data Transfer using CIP Messages in RSLogix5000
! Select the "Communication" tab.
! Browse to the "AS-i Ethernet IP" module
! Check the "Connected" check box.
26.9.2013
85
Page 86
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Data Transfer using CIP Messages in RSLogix5000
13.2Example 1: read LAS
! Select the "Configuration" tab in the "Message Configuration" window
! Select:
!Message Type: CIP generic
!Service Type: Get attribute single
! As "Source element", create a new tag or select an existing tag to hold the
outgoing data
! As "Source length": "4" (16-bit data = 8 bytes)
26.9.2013
87
Page 88
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
System startup using AS-i Control Tools
14.System startup using AS-i Control Tools
The Windows based software AS-i Control Tools enables an easy and clear configuration of the AS-i network.
Information!
AS-i Control Tools must be installed first!
This way, the device driver is cop i ed int o the pr ev io us desig ne d fol de r in AS- i Con tr ol
Tools and should be recognized automatically.
1.Connect the device to the PC via its serial interface and the diagnostic inter-
face.
2.Start AS-i Control Tools.
3.Select Master | New.
88
4.Choose RS232 diagnostic interface as the protocol.
5.Select the appropriate settings (for example serial interface COM 2, station
address <auto>).
6.Select Master | AS-i configuration.
7.The AS-i configuration editor will be started. All detected and configured AS-
i slaves are displayed in this window.
26.9.2013
Page 89
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
System startup using AS-i Control Tools
8.Click on a slave to open the dialog window 'slave configuration'.
This window enables the user to edit a slave address and to set AS-i parameters or AS-i configuration data. Additionally, inputs and outputs can be
tested.
9.Click the second button on the right side of the tool bar to get a graphical
display of "AS-i Control Tools".
26.9.2013
89
Page 90
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
System startup using AS-i Control Tools
Configuring the AS-i network is easily accomplished by first connecting each AS-i
slave separately to the AS-i line and setting its address, followed by pressing the
button “Store configuration” to store the existing AS-i network in the AS-i master
as configuration data.
Furthermore, an AS-i Address Assistant is available, allowing to perform an address change of a new AS-i slave to the desired address as soon as it is connected to the AS-i network. The desired AS-i configuration can be created offline
ahead of time and can be stored to a file. When setting up the system the AS-i
slaves are then simply connected, one at a time, to the AS-i network. Further descriptions to all additional features of this software can be obtained from the integrated help file.
90
26.9.2013
Page 91
AS-i 3.0 EtherNet/IP+Modbus TCP Gateway
Appendix, Examples
15.Appendix, Examples
15.1Commissioning with RSLogix5000 V20 or higher
This document describes how to install and use an EDS file and an Add On Instruction for AS-i Ethernet IP Gateways in RSLogix5000 V20 or higher.