ABX EIPM addendum
X-Gateway Interface Addendum
EtherNet/IP Scanner
Doc: HMSI-27-249
Rev: 2.00
Connecting DevicesTM
+$/067$'‡&+,&$*2‡.$5/658+(‡72.<2‡%(,-,1*‡0,/$12‡08/+286(‡&29(175<‡381(‡&23(1+$*(1
HMS Industrial Networks
Mailing address: Box 4126, 300 04 Halmstad, Sweden
Visiting address: Stationsgatan 37, Halmstad, Sweden
E-mail: [email protected]
Web: www.anybus.com
Table of Contents
Table of Contents
Preface
About This Document
How To Use This Document ............................................................................................................ P-1
Important User Information .............................................................................................................. P-1
Related Documents.............................................................................................................................. P-1
Document History ............................................................................................................................... P-1
Conventions & Terminology.............................................................................................................. P-3
Sales and Support ................................................................................................................................. P-3
Chapter 1
About the EtherNet/IP Scanner Interface
General Description..............................................................................................................................1-1
Features...................................................................................................................................................1-1
External Views.......................................................................................................................................1-1
Interface Status LEDs .................................................................................................................1-2
Chapter 2
File System
General Information.............................................................................................................................2-1
Structure..................................................................................................................................................2-2
System Files............................................................................................................................................2-2
Chapter 3
Network Configuration
TCP/IP Settings ....................................................................................................................................3-1
HICP (Anybus IPconfig) .....................................................................................................................3-2
DHCP .....................................................................................................................................................3-2
Speed and Duplex .................................................................................................................................3-2
IP Access Control .................................................................................................................................3-3
Gateway Config Interface ....................................................................................................................3-4
Chapter 4
Web Interface
General Information.............................................................................................................................4-1
Scan List Config ....................................................................................................................................4-2
Chapter 5
Data Exchange
General Information.............................................................................................................................5-1
Control & Status Word Details...........................................................................................................5-2
Status Word .................................................................................................................................5-2
Control Word ...............................................................................................................................5-2
Statistics List/Live List Interpretation ...............................................................................................5-3
Chapter 6
CIP Object Implementation
General Information.............................................................................................................................6-1
Identity Object, Class 01h....................................................................................................................6-2
General Information......................................................................................................................6-2
Class Attributes ...........................................................................................................................6-2
Instance Attributes........................................................................................................................6-2
Details: Status Attribute ..............................................................................................................6-3
Message Router, Class 02h...................................................................................................................6-4
General Information......................................................................................................................6-4
Class Attributes ...........................................................................................................................6-4
Instance Attributes........................................................................................................................6-4
Assembly Object, Class 04h ................................................................................................................6-5
General Information......................................................................................................................6-5
Class Attributes ...........................................................................................................................6-6
Instances .......................................................................................................................................6-6
Instance Attributes (Instances 101, 768... 831)............................................................................6-6
Instance Attributes (Instances 102, 1024... 1087) .......................................................................6-6
Connection Manager Object, Class 06h ............................................................................................6-7
General Information......................................................................................................................6-7
Class Attributes ...........................................................................................................................6-7
Instance Attributes, Instance 01h..................................................................................................6-7
Details: Class 1 Connections.........................................................................................................6-8
Details: Class 3 Target Connections..............................................................................................6-8
Diagnostic Object, Class AAh.............................................................................................................6-9
General Information......................................................................................................................6-9
Class Attributes ...........................................................................................................................6-9
Instance Attributes, Instance 01h..................................................................................................6-9
Connection Configuration Object, Class F3h ................................................................................6-10
General Information....................................................................................................................6-10
Class Attributes .........................................................................................................................6-10
Instance Attributes......................................................................................................................6-10
Port Object, Class F4h .......................................................................................................................6-11
General Information....................................................................................................................6-12
Class Attributes .........................................................................................................................6-12
Instance Attributes, Instance 02h................................................................................................6-12
TCP/IP Interface Object, Class F5h ...............................................................................................6-13
General Information....................................................................................................................6-13
Class Attributes .........................................................................................................................6-13
Instance Attributes......................................................................................................................6-13
Ethernet Link Object, Class F6h ......................................................................................................6-14
General Information....................................................................................................................6-14
Class Attributes .........................................................................................................................6-14
Instance Attributes......................................................................................................................6-14
Chapter 7
FTP Server
General Information.............................................................................................................................7-1
Chapter 8
E-mail Client
General Information.............................................................................................................................8-1
SMTP Server Settings ...........................................................................................................................8-1
E-mail Definitions.................................................................................................................................8-2
Appendix A Server Side Include (SSI)
Functions ...............................................................................................................................................A-2
DisplayMacID ............................................................................................................................ A-2
DisplaySerial ...............................................................................................................................A-2
DisplayFWVersion.....................................................................................................................A-2
DisplayBLVersion ...................................................................................................................... A-2
DisplayIP .................................................................................................................................... A-2
DisplaySubnet .............................................................................................................................A-2
DisplayGateway .......................................................................................................................... A-3
DisplayDhcpState........................................................................................................................ A-3
StoreIPConfig .............................................................................................................................. A-3
GetText.......................................................................................................................................A-4
printf ...........................................................................................................................................A-4
scanf ............................................................................................................................................ A-8
IncludeFile ...................................................................................................................................A-9
SaveToFile .................................................................................................................................. A-9
SaveDataToFile .......................................................................................................................... A-9
DisplayScannerMode .................................................................................................................A-10
SetScannerMode ........................................................................................................................A-10
Changing SSI output..........................................................................................................................A-11
SSI Output String File ..............................................................................................................A-11
Temporary SSI Output change ...................................................................................................A-12
Gateway Control ................................................................................................................................A-12
Refreshing Dynamic Gateway Status Information.......................................................................A-12
Restarting the Gateway ..............................................................................................................A-12
Appendix B Technical Specification
Scanner Interface Details .................................................................................................................... B-1
LAN (Ethernet) Connector Pinout (RJ45)....................................................................................... B-1
Important User Information
This document is intended to provide a good understanding of the functionality offered by the Interface described
here.
The reader is expected to be familiar with high level software design, and communication systems in general. The
use of advanced interface-specific functionality may require in-depth knowledge of networking internals and/or
information from the network specifications. In such cases, the persons responsible for the implementation of this
product should either obtain the necessary specifications to gain sufficient knowledge, or alternatively limit the
implementation in such a way that this is not necessary.
Liability
Every care has been taken in the preparation of this manual. Please inform HMS Industrial Networks AB of any
inaccuracies or omissions. The data and illustrations found in this document are not binding. We, HMS Industrial
Networks AB, reserve the right to modify our products in line with our policy of continuous product development.
The information in this document is subject to change without notice and should not be considered as a commitment by HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for any errors that
may appear in this document.
There are many applications of this product. Those responsible for the use of this device must ensure that all the
necessary steps have been taken to verify that the applications meet all performance and safety requirements including any applicable laws, regulations, codes, and standards.
HMS Industrial Networks AB will under no circumstances assume liability or responsibility for any problems that
may arise as a result from the use of undocumented features, timing, or functional side effects found outside the
documented scope of this product. The effects caused by any direct or indirect use of such aspects of the product
are undefined, and may include e.g. compatibility issues and stability issues.
The examples and illustrations in this document are included solely for illustrative purposes. Because of the many
variables and requirements associated with any particular implementation, HMS Industrial Networks AB cannot
assume responsibility for actual use based on these examples and illustrations.
Intellectual Property Rights
HMS Industrial Networks AB has intellectual property rights relating to technology embodied in the product described in this document. These intellectual property rights may include patents and pending patent applications
in the US and other countries.
Trademark Acknowledgements
Anybus ® is a registered trademark of HMS Industrial Networks AB. All other trademarks are the property of their
respective holders.
!
WARNING: This is a class A product. in a domestic environment this product may cause radio interference in
which case the user may be required to take adequate measures.
ESD Note: This product contains ESD (Electrostatic Discharge) sensitive parts that may be damaged if ESD
control procedures are not followed. Static control precautions are required when handling the
product. Failure to observe this may cause damage to the product.
Ethernet/IP Scanner X-Gateway Interface Addendum
Copyright© HMS Industrial Networks AB
Doc: HMSI-27-249, Rev: 2.00
May 2014
Preface
P. About This Document
P.1 How To Use This Document
This document describes network specific features and procedures needed when operating the EtherNet/IP Scanner Interface for the Anybus X-Gateway. For general information and operating instructions for the Anybus X-Gateway, consult the Anybus-X Generic Gateway User Manual.
The reader of this document is expected to be familiar with local area networks, and communication
systems in general.
P.2 Related Documents
Document
Anybus-X Generic Gateway User Manual
Anybus-S Ethernet 100mbit Fieldbus Appendix
EtherNet/IP Scanner Interface, Installation Sheet
Author
HMS
HMS
HMS
P.3 Document History
Revision List
Revision
1.00
1.10
1.11
1.12
Date
2007-05-22
2009-09-18
2011-08-22
May 2014
Author
PeP
KeL
KaD
SDa
Chapter
All
5
4
Several
Description
1st official release
New chapter
Updates and minor corrections
New hardware and Anybus Configuration Manager
P.4 Conventions & Terminology
The following conventions are used throughout this manual:
•
Numbered lists provide sequential steps
•
Bulleted lists provide information, not procedural steps
•
The term ‘X-Gateway’ refers to the Anybus X-Gateway
•
The term ‘Scanner interface’ refers to the Anybus-X EtherNet/IP Scanner Interface
•
The term ‘user manual’ refers to the Anybus-X Generic Gateway User Manual
•
Hexadecimal values are written in the format NNNNh, where NNNN is the hexadecimal value
•
16/32 bit values are generally stored in Motorola (big endian) format unless otherwise stated
•
The term “byte” always refers to a string of 8 bits
P.5 Sales and Support
For contact information and support, please refer to the contact and support pages at:
www.anybus.com/support
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 1
1. About the EtherNet/IP Scanner Interface
1.1 General Description
The EtherNet/IP Scanner interface provides EtherNet/IP scanner functionality for the Anybus
X-Gateway platform. It exchanges data with up to 64 EtherNet/IP nodes (adapters), and features additional IT functionality such as built-in FTP and web servers, and e-mail client capabilities.
Dynamic content capabilities allow data from the input/output buffers to be monitored on web pages,
or included in e-mail messages.
See “Data Exchange” on page 19.
1.2 Features
•
EtherNet/IP Scanner
•
FTP Server
•
Web Server
•
SMTP Client
•
10/100 Mbit operation, full or half duplex
•
On-board IP configuration switches
•
Shielded or unshielded cables
1.3 External Views
Front View
Top-mounted EtherNet/IP Scanner interface
Top View
Gateway
status
IP Configuration switches (See
“Network Configuration” on
page 12.)
LA
MS
MS
Not used
USB Gateway Config Connector. See
the X-Gateway User
Manual for further
details.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Ethernet Connector (See
“LAN (Ethernet) Connector Pinout (RJ45)” on
page 53.
Gateway Power
Conenctor. See the
X-gateway User
Manual for more
information.
Doc: HMSI-27-249, Rev: 2.00
Chapter 1 1-10
1.3.1 Interface Status LEDs
LED
Gateway Status
LA
MS
Colour
Green
Green, flashing
Off
Green
Green, flashing
Red
Red, flashing
Alt. Red/Green
NS
Off
Green
Green, flashing
Red
Red, flashing
Alt. Red/Green
Off
X-Gateway Interface Addendum: EtherNet/IP Scanner
Indication
Consult the user manual for further details.
Link established
Activity; receiving/transmitting data
No link or power off
Device operational
- Scanner in Run-state
Standby
- Scanner in Idle-state
- Scanner not configured
Major fault
- Major unrecoverable fault
Minor fault
- Minor recoverable fault (originated or timeout)
- Could not open an originated connection
Self test
- Scanner power-up self test in progress
No power
Connected
- At least one EtherNet/IP connection has been established (target or originated)
No connections
- No EtherNet/IP connections have been established (Class 1 or
Class 3, target or originated)
Duplicate IP
- Configured IP address already in use
Connection timeout
- One or several EtherNet/IP target connections have timed out
- The scanner can only leave this state if all timed-out target connections are re-established, or if the gateway is reset.
Self test
- Scanner power-up self test in progress
No power or no IP address
Doc: HMSI-27-249, Rev: 2.00
Chapter 2
2. File System
2.1 General Information
The scanner interface features a built-in file system that is used to store information such as web files,
network communication settings, e-mail messages etc. The file system can be accessed via FTP, the web
server, or via the built-in e-mail client (to use SSI).
Conventions & Limitations
•
‘\’ (backslash) is used as a path separator
•
A ‘path’ originates from the system root and as such must begin with a ‘\’
•
A ‘path’ must not end with a ‘\’
•
Names may contain spaces (‘ ’) but must not begin or end with one.
•
Names must not contain one of the following characters: ‘\ / : * ? “ < > |’
•
Names cannot be longer than 48 characters (plus null termination)
•
A path cannot be longer than 256 characters (filename included)
•
The maximum number of simultaneously open files is 40
•
The maximum number of simultaneously open directories is 40
Storage Areas
The file system features three different storage areas:
•
Area 0 (1151 kByte, Non-volatile)
This area is used for static files such as web files etc.
•
Area 1 (128 kByte, Non-volatile)
This area is used for configuration files etc.
•
Area 2 (1024 kByte, Volatile)
This area is used for temporary storage.
Important:
The non-volatile storage is located in FLASH memory. Each FLASH segment can only be erased approximately
1000000 times due to the nature of this type of memory.
The following operations will erase one or more FLASH segments:
•
Deleting, moving or renaming a file or directory
•
Writing or appending data to an existing file
•
Formatting the file system
•
Saving scanner configuration
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 2 2-12
2.2 Structure
Area 0
Area 1
Area 2
cfg
ssi_str.cfg
http.cfg
ip_accs.cfg
smtp.cfg
ip.cfg
etn.cfg
hicp.cfg
(scanner.cfg)
email
email
email_1.cfg
email_1.cfg
email_2.cfg
email_2.cfg
email_3.cfg
email_3.cfg
...
...
email_10.cfg
email_10.cfg
pswd
pswd
ad_pswd.cfg
sys_pswd.cfg
temp
static.txt
dynamic.txt
master.txt
2.3 System Files
The file system contains a set of files used for system configuration. These files, known as “system files”,
are regular ASCII files which can be altered using a standard text editor (such as the Notepad in Microsoft Windows™). These files may also be altered indirectly by the built-in web server when using the
Server Side Include functionality. Generally, the format of the system files are based on the concept of
‘keys’, where each ‘key’ can be assigned a value, see example below.
Example:
[Key1]
value of key1
[Key2]
value of key2
The exact format specification for each system file is described in detail elsewhere in this document.
Important:
Contrary to that stated above, the file ‘\cfg\scanner.cfg’ holds the scanner configuration in binary format. This file is created
automatically by the scanner interface and must not be altered manually.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 3
3. Network Configuration
3.1 TCP/IP Settings
To be able to participate on the network, the scanner interface needs a valid TCP/IP configuration.
These settings are stored in the system file ‘\cfg\ip.cfg’.
File Format:
[IP address]
xxx.xxx.xxx.xxx
[Subnet mask]
xxx.xxx.xxx.xxx
[Gateway address}
xxx.xxx.xxx.xxx
[DHCP]
ON or OFF
•
IP address
•
Subnet mask
•
Gateway address
•
DHCP
ON
OFF
[DNS1 address]
xxx.xxx.xxx.xxx
[DNS2 address]
xxx.xxx.xxx.xxx
[Domain name]
domain
- Enabled
- Disabled
•
Primary and Secondary DNS
•
Default domain
•
Host name
[Host name]
anybus
The network settings may also be affected by...
•
EtherNet/IP (See “TCP/IP Interface Object, Class F5h” on page 34.)
•
DHCP (See “DHCP” on page 13.)
•
HICP (See “HICP (Anybus IPconfig)” on page 13.)
•
SSI (See “Server Side Include (SSI)” on page 41.)
If the on-board switches are set to 0 (zero), the scanner interface will use the settings stored in
‘\cfg\ip.cfg’. If not, the switch setting overrides certain settings in this file, as follows:
SW SW SW SW SW SW SW SW
DHCP
Subnet
Gateway
IP address
1
2
3
4
5
6
7
8
Determined by ‘\cfg\ip.cfg’
OFF OFF OFF OFF OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF ON Disabled 255.255.255. 192.168.0.25 192.168.0.1
0
5
OFF OFF OFF OFF OFF OFF ON OFF Disabled 255.255.255. 192.168.0.25 192.168.0.2
0
5
...
...
...
...
...
...
...
...
...
...
...
...
ON ON ON ON ON ON OFF ON
Disabled 255.255.255. 192.168.0.25 192.168.0.25
0
5
3
ON ON ON ON ON ON ON OFF Disabled 255.255.255. 192.168.0.25 192.168.0.25
0
5
4
(invalid setting)
ON ON ON ON ON ON ON ON
Note: These switches are read during startup; any changes require a reset in order to take effect.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 3 3-14
3.2 HICP (Anybus IPconfig)
The scanner interface supports the HICP protocol used by the Anybus IPconfig utility, which can be
downloaded free of charge from the HMS website. This utility may be used to access the network settings of any Anybus product connected to the network via UDP port 3250.
Upon starting the program, the network is scanned for Anybus products. The network can be rescanned
at any time by clicking ‘Scan’. In the list of detected devices, the scanner interface will appear as ‘ABMEIP’.
To alter the settings of the interface, double-click on
its entry in the list. A window will appear, containing
the settings associated with the scanner interface.
Validate the new settings by clicking Set. The new IP
configuration will be stored in ‘\cfg\ip.cfg’.
Optionally, the configuration can be protected from
unauthorized access by a password. To enter a password, click on the ‘Change password’ checkbox, and
enter the password under ‘New password’.
The password is stored in the system file ‘\cfg\hicp.cfg’.
File Format:
[Password]
<password>
3.3 DHCP
The scanner interface can retrieve the TCP/IP settings from a DHCP server. If unsuccessful, it will fall
back on the current settings (i.e. the settings currently stored in ‘\cfg\ip.cfg’).
If no current settings are available (i.e. set to 0), the scanner interface will halt and indicate an error for
the on-board status LEDs (the network configuration can, however, still be accessed via HICP, see See
“HICP (Anybus IPconfig)” on page 13..
3.4 Speed and Duplex
The scanner interface supports 10 or 100 Mbit operation in full or half duplex. These settings are stored
in the system file ‘cfg\etn.cfg’. The settings can also be altered via the Ethernet Link Object. See “Ethernet Link Object, Class F6h” on page 35..
File Format:
[AutoNeg]
xxx
•
Autonegotiation; valid settings: ‘ON’ or ‘OFF’
[Speed]
xxx
•
Speed; valid settings: ‘100’ or ‘10’
[Duplex]
xxxx
•
Duplex; valid settings: ‘FULL’ or ‘HALF’
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 3 3-15
3.5 IP Access Control
It is possible to specify which IP addresses permitted to connect to the scanner interface. This information is stored in the system file ‘\cfg\ip_accs.cfg’.
File Format:
[Web]
xxx.xxx.xxx.xxx
•
Nodes listed here may access the web server.
[FTP]
xxx.xxx.xxx.xxx
•
Nodes listed here may access the FTP server.
[Ethernet/IP]
xxx.xxx.xxx.xxx
•
Nodes listed here may connect to the interface via EtherNet/IP.
[All]
xxx.xxx.xxx.xxx
•
Fallback setting, used by the interface when one or more of the
keys above are omitted.
Note: ‘*’ may be used as a wildcard to select IP series.
IMPORTANT:
Under no circumstances should the address ‘0.0.0.0’ be used for [All], as this will in effect prevent all external access to
the scanner interface. Failure to observe this will render the product unusable and require service from HMS support.
3.6 Gateway Config Interface
The X-Gateway and certain settings pertaining to the Ethernet Scanner interface may be configured by
using the software tool Anybus Configuration Manager (ACM), which is available from
www.anybus.com/support.
See also...
•
The Anybus X-gateway User Manual, for full details on using ACM.
•
The online help in ACM, for further help on the available settings.
Note that it is also possible to use the Hyper Terminal application if preferred.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 4
4. Web Interface
4.1 General Information
The Ethernet interface features a fast full featured web server with SSI capabilities. A default web interface provides access to most common options via any standard web browser. The web interface is however customizable and can be fully designed to fit a particular product.
The default web interface differs slightly depending on the network type on the other side of the gateway
(i.e. slave, master, fieldbus type etc.), however the basic functions are essentially the same. The scan list
config option will be described on the next page.
•
General Status
This page provides an overview of
the gateway initialization parameters
and general gateway diagnostics
(these values correspond to the
values set using the gateway config
interface).
•
IP Config
This page holds the current TCP/IP
settings, DNS configuration, and
SMTP server settings.
•
About
This page holds the software
version numbers and serial numbers
of the different components of the
gateway. This page also holds the
MAC-ID of the Ethernet interface.
General Status Page
X-Gateway Interface Addendum: EtherNet/IP Scanner
Start Page
IP Config Page
Doc: HMSI-27-249, Rev: 2.00
Chapter 4 4-18
4.2 Scan List Config
The Ethernet web interface provides the option to configure a scan list for the EtherNet/IP network.
In order to save the scan list, the scanner must be in idle mode. To put the scanner in idle mode, change
the operation mode in the gateway configuration interface using ACM or the HyperTerminal.
Choose the menu item Scan List Config to see the current empty scan list:
Check that the scanner is in idle mode by checking the current mode in the bottom left corner.
To add a network connection, press the add button (to the right of the list). This will present the window
below:
Note: Originator equals the scanner and target equals an adapter.
See the next page for a description of the items in the web interface.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 4 4-19
Editable settings:
Item
Communication
Transport Type
Data
#
IP Address
Originator -> Target
Target -> Originator
Originator -> Target
Target -> Originator
Data Rate (ms)
Originator -> Target
Target -> Originator
Timeout Multiplier
Connection Points Originator -> Target
Target -> Originator
Description
The IP address of the adapter
The only option is “Point to Point” (unicast)
Choose from “Point to Point” (unicast) or “Multicast”
The size (in bytes) of the data to be sent to the adapter
The offset from the start of the output area memory of the scanner
The size (in bytes) of the data to be received from the adapter
The offset from the start of the input area memory of the scanner
Number of milliseconds between each transfer of data to the adapter
Number of milliseconds between each transfer of data to the scanner
This number, applied to the data rate (the Requested Package Interval), states the amount of time allowed to pass before the connection is broken
Connection Points equals assembly instances, that can be obtained
from the manufacturer of the product
Connection Points equals assembly instances, that can be obtained
from the manufacturer of the product
When finished configuring an item in the scan list, press the “Ok” button. The newly configured item
will show up in the list:
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 6
6. CIP Object Implementation
6.1 General Information
EtherNet/IP is based on the Common Industrial Protocol (CIP) which is also the application layer used
by DeviceNet and ControlNet to exchange data between nodes.
The following CIP-objects are implemented:
•
Identity Object, Class 01h
•
Message Router, Class 02h
•
Assembly Object, Class 04h
•
Connection Manager Object, Class 06h
•
Diagnostic Object, Class AAh
•
Connection Configuration Object, Class F3h
•
Port Object, Class F4h
•
TCP/IP Interface Object, Class F5h
•
Ethernet Link Object, Class F6h
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-21
6.2 Identity Object, Class 01h
6.2.1 General Information
Object Description
Supported Services
Class services:
Get Attribute All
Get Attribute Single
Instance services:
Get Attribute All
Get Attribute Single
Set Attribute Single
Reset
6.2.2 Class Attributes
#
1
Access
Get
Name
Revision
Type
UINT
Value
0001h
6.2.3 Instance Attributes
#
1
2
3
4
5
6
7
103
Access
Get
Get
Get
Get
Get
Get
Get
Set
Name
Vendor ID
Device Type
Product Code
Revision
Type
UINT
UINT
UINT
Struct of:
USINT
USINT
Status
WORD
Serial Number UDINT
Product Name SHORT_STRING
Scanner Mode USINT
X-Gateway Interface Addendum: EtherNet/IP Scanner
Value
005Ah (HMS Industrial Networks AB)
000Ch (Communications Adapter)
0046h (Anybus-X EtherNet/IP Scanner)
Major fieldbus version
Minor fieldbus version
See 6-24 “Details: Status Attribute”
(Serial number)
“Anybus-X EtherNet/IP Scanner”
0: Idle mode
1: Run mode
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-22
6.2.4 Details: Status Attribute
bit(s)
0
1
2
3
4... 7
Name
Module Owned
(reserved)
Configured
(reserved)
Extended Device Status
8
9
10
11
Minor recoverable fault
Minor recoverable fault
Major recoverable fault
Major unrecoverable
fault
(reserved)
12... 15
X-Gateway Interface Addendum: EtherNet/IP Scanner
Comments
Value:
Meaning:
0000b
Unknown
0010b
Faulted I/O Connection
0011b
No I/O connection established
0100b
Non-volatile configuration bad
0110b
Connection in Run mode
0111b
Connection in Idle mode
-
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-23
6.3 Message Router, Class 02h
6.3.1 General Information
Object Description
Supported Services
Class services:
-
Instance services:
-
6.3.2 Class Attributes
-
6.3.3 Instance Attributes
-
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-24
6.4 Assembly Object, Class 04h
6.4.1 General Information
Object Description
The Input and Output buffers are represented through instances 101 and 102. In addition, the data associated with each EtherNet/IP connection is represented as dedicated instances (768... 831 and 1024...
1087).
Output Buffer
Input Buffer
Instance 768
1st Connection
Instance 1024
1st Connection
Instance 769
2nd Connection
Instance 101
Instance 1025
2nd Connection
Instance 102
Instance 770
3rd Connection
Instance N
Last Connection
(Unused data)
(Consumed Data)
Instance 1026
3rd Connection
Instance N
Last Connection
Initialised,
but not used
(Unused data)
Initialised,
but not used
(Produced Data)
Supported Services
Class services:
Get Attribute Single
Instance services:
Get Attribute Single
Set Attribute Single
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-25
6.4.2 Class Attributes
#
1
2
Access
Get
Get
Name
Revision
Max Instance
Type
UINT
UINT
Value
0002h
-
6.4.3 Instances
#
3
Contents
Heartbeat instance
101
Consumed Data (all connections)
102
Produced Data (all connections)
768
Consumed Data (1st connection)
769
1024
Consumed Data (2nd connection)
...
Consumed Data (64th connection)
Produced Data (1st connection)
1025
Produced Data (2nd connection)
...
1087
...
Produced Data (64th connection)
...
831
Description
Used as a heartbeat instance for connections only accessing one “real” connection point. No attributes are implemented for this instance.
Mapped to the Output buffer. Equals the contents of instances
768...831
Mapped to the Input buffer. Equals the contents of instances
1024...1087
Consumed data associated with I/O connection no. #1
(Configuration Object instance 1)
Consumed data associated with I/O connection no. #2
(Configuration Object instance 2)
...
Consumed data associated with I/O connection no. #64
(Configuration Object instance 64)
Produced data associated with I/O connection no. #1
(Configuration Object, instance 1)
Produced data associated with I/O connection no. #2
(Configuration Object, instance 2)
...
Produced data associated with I/O connection no. #64
(Configuration Object, instance 2)
6.4.4 Instance Attributes (Instances 101, 768... 831)
#
3
Access Name
Get/Set Consumed data
Type
Array of
BYTE
Value
Mapped to the Output buffer.
6.4.5 Instance Attributes (Instances 102, 1024... 1087)
#
3
Access
Get
Name
Produced data
X-Gateway Interface Addendum: EtherNet/IP Scanner
Type
Array of
BYTE
Value
Mapped to the Input buffer.
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-26
6.5 Connection Manager Object, Class 06h
6.5.1 General Information
Object Description
Supported Services
Class services:
Get Attributes All
Forward Open
Forward Close
Unconnected Send
Instance services:
Get Attributes All
6.5.2 Class Attributes
# Access
1 Get
Name
Data
Type
UINT
Value
0001h
Description
Revision 1
6.5.3 Instance Attributes, Instance 01h
# Access
1 Get
2 Get
Name
Open Requests
Open Format Rejects
3
Get
Open Resource Rejects UINT
4
Get
Open Other Rejects
UINT
5
6
Get
Get
Close Requests
Close Format Rejects
UINT
UINT
7
Get
Close Other Rejects
UINT
8
Get
Connection Timeouts UINT
X-Gateway Interface Addendum: EtherNet/IP Scanner
Type
UINT
UINT
Description
No. of received ‘Forward Open’-requests
No. of ‘Forward Open’-requests that have been rejected due
to bad format.
No. of ‘Forward Open’-requests that have been rejected due
to lack of resources
No. of ‘Forward Open’-requests that have been rejected for
reasons other than bad format or lack of resources.
No. of received ‘Forward Close’-requests.
No. of ‘Forward Close’-requests that have been rejected due
to bad format.
No. of ‘Forward Close’-requests that have been rejected for
reasons other than bad format.
No. of connection timeouts.
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-27
6.5.4 Details: Class 1 Connections
Class 1 connections are used to transfer I/O data. Each class 1 connection establishes two data transports; one consuming, and one producing.
No. of Supported Originated Class 1 Connections:
Max. Input Connection size:
Min. Output Connection size:
Supported Packet Rate (API):
Supported Trigger Types:
•
64
509 bytes
504 bytes
2...3200ms
Cyclic
Producing Assembly Instances 100, 101, 102
No. of Supported Target Class 1 Connections:
No. of Supported Transports
Supported Transport Types
Supported Packet Rate (API):
Supported Trigger Types:
20 per instance (sharing same transport)
1
Point-to-Point, Multicast
2...3200ms
Cyclic
Once a class 1 connection has been established, a transport is received. This transport may be of
Point-to-Point or Multicast type. If Point-to-Point, the data is transferred using UDP unicast
messages, and no other connections can access the data. If Multicast, the data is transferred with
UDP multicast messages, and other connections may use the same transport accessing the data.
Producing instances can only be assigned one transport. Therefore, if using Point-to-Point
connections, only 1 (one) Class 1 connection can be established. However, 20 connections can
be linked to each Multicast transport, allowing 20 Class 1 connections to be established if they
all use the same transport.
In order for a connection to use an existing transport, the connection data size must match the
data size of the existing transport, or an error response will be returned. If the connection RPI
(Requested Packet Interval) does not match the existing connections’s API (Actual Packet
Interval), the connection will still be established using the API of the existing transport. This API
will be returned in the response to the ‘Forward Open’-request.
•
Consuming Assembly Instance 150
No. of Supported Target Class 1 Connections:
No. of Supported Transports
Supported Transport Types
Supported Packet Rate (API):
1 per instance
1
Point-to-Point only
Unlimited
Since consuming instances are used to control the outputs, only one connection is allowed to
each consuming instance.The transport used for the connection must be Point-to-Point.
6.5.5 Details: Class 3 Target Connections
Class 3 connections are used to establish connections to the message router. Thereafter the connection
is used for explicit messaging. Class 3 connections use TCP connections.
Up to 16 simultaneous class 3 connections towards the message router is supported.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-28
6.6 Diagnostic Object, Class AAh
6.6.1 General Information
Object Description
This vendor specific object provides diagnostic information from the scanner interface.
Supported Services
Class services:
Get Attribute All
Instance services:
Get Attribute Single
6.6.2 Class Attributes
#
1
Access
Get
Name
Revision
Type
UINT
Comments
0001h
6.6.3 Instance Attributes, Instance 01h
#
01h
02h
03h
04h
0Ah
0Fh
12h
18h
19h
1Ah
1Bh
1Ch
1Dh
1Eh
1Fh
Access
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
Get
20h Get
Name
Serial number
Vendor ID
Fieldbus Type
Software version
Interface type
Input Buffer size
Output Buffer size
MAC ID
IP Address
Subnet mask
Gateway address
SMTP server address
DHCP state
Bootloader version
Application interface version
Fieldbus software version
X-Gateway Interface Addendum: EtherNet/IP Scanner
Type
UDINT
UINT
UINT
UINT
UINT
UINT
UINT
Array of USINT
UDINT
UDINT
UDINT
UDINT
UDINT
UDINT
UINT
Comments
Serial number
0083h = Ethernet
0201h = Master
Size of Input buffer (in bytes)
Size of Output buffer (in bytes)
Ethernet MAC ID of the interface (6 bytes)
Current IP address
Current subnet mask
Current gateway address
SMTP server address
0=DHCP enabled, 1=DHCP disabled
Interface bootloader version
Application interface software version
UINT
Fieldbus interface software version
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-29
6.7 Connection Configuration Object, Class F3h
6.7.1 General Information
Object Description
Supported Services
Class services:
Create
Delete
Restore
Get Attribute All
Get Attribute Single
Set Attribute Single
Kick Timer (4Bh)
Change Start (4Fh)
Get Status (50h)
Change Complete (51h)
Audit Changes (52h)
Instance services:
Delete
Restore
Get Attribute All
Set Attribute All
Get Attribute Single
6.7.2 Class Attributes
#
1
2
3
8
9
Access
Get
Get
Get
Get
Set
Name
Revision
Max Instance
No. of instances
Format number
Edit Signature
Type
UINT
UDINT
UDINT
UINT
UDINT
Value
0002h
0000 0040h (Maximum instance no. = 64)
0065h (format number for instance attribute 9)
Value written by configuration tool to detect modifications in instance attribute values.
6.7.3 Instance Attributes
One instance is created for each connection. All instance attributes except attribute #1 is stored in nonvolatile memory.
# Access
1 Get
2
Set
Name
Connection Status
Gen_status
(reserved)
Ext_status
Connection Flags
X-Gateway Interface Addendum: EtherNet/IP Scanner
Type
Struct of:
USINT
USINT
UINT
WORD
Comments
When a connection is not open, this attribute indicates
why
Connection flags
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-30
# Access
3 Set
5
Set
Name
Target Device ID
Vendor_id
Product_code
Major_rev
Minor_rev
Net connection parameters
Conn_timeout
Xport_class_and_trigger
Rpi_OT
Net_OT
Type
Struct of:
UINT
UINT
USINT
USINT
Struct of:
USINT
BYTE
UDINT
UINT
Rpi_TO
Net_TO
UDINT
UINT
Struct of:
USINT
USINT
Padded
EPATH
Struct of:
UINT
Array of
Octet
Struct of:
USINT
USINT
STRING2
Struct of:
6
Set
Connection Path
Open_path_size
(reserved)
Open connection path
7
Set
Config #1 Data
Config_data_size
Config_data
8
Set
9
Set
Connection name
Name_size
(reserved)
Connection_name
Implementation Defined
Attribute
Format_number
Impl_defined_data_size
Impl_defined_data
10 Set
Config #2 Data
Config_data_size
Config_data
11 Set
Proxy Device ID
Vendor_id
Product_type
Product_code
Major_rev
Minor_rev
X-Gateway Interface Addendum: EtherNet/IP Scanner
UINT
UINT
Array of:
UINT,
UINT,
UINT,
UINT,
UINT,
Struct of:
UINT
Array of
Octet
Struct of:
UINT
UINT
UINT
USINT
USINT
Comments
Device identification used by configuration software to
identify target devices associated with this instance.
Connection Timeout Multiplier
Transport Class and Trigger
Originator to target requested packet interval
Originator to target network connection parameters
(This attribute specifies the OT connection size)
Target to Originator requested packet interval
Target to Originator network target connection parameters
(This attribute specifies the TO connection size)
Path size in words (16-bit)
Reserved, ignore
Path used in the ‘Forward Open’-service of the Connection Manager
Length of Config_data in bytes
Config #1 data
Number of characters in the name
Reserved, ignore
User assigned connection name encoded in UNICODE
0101h
000Ah
Reserved:(ignore)
Offset OT:Offset of data in memory map
Reserved:(ignore)
Offset TO:Offset of data in memory map
Reserved:(ignore)
Length of Config_data in bytes
Config #2 data
Vendor ID
Device Type
Product Code
Major Revision
Minor Revision
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-31
6.8 Port Object, Class F4h
6.8.1 General Information
Object Description
Supported Services
Class services:
Get Attribute All
Get Attribute Single
Instance services:
Get Attribute All
Get Attribute Single
6.8.2 Class Attributes
#
1
2
3
Access
Get
Get
Get
8
9
Get
Get
Name
Revision
Max Instance
No. of instances
Entry Port
All Ports
Type
UINT
UINT
UINT
Value
0001h
0002h
0001h
UINT
0002h
Array of STRUCT 0000h 0000h
0000h 0000h
0004h 0002h
Description
Instance no. #2 (below)
Array of structure containing attributes 1 and
2 from each instance. Instance 1 is at byte offset 4. Instance 2 is at byte offset 8, etc. The 4
bytes at offset 0 shall be 0.
6.8.3 Instance Attributes, Instance 02h
#
1
2
3
4
8
Access
Get
Get
Get
Get
Get
Name
Port Type
Port Number
Port Object
Path Size
Path
Port Name
Node Address
X-Gateway Interface Addendum: EtherNet/IP Scanner
Type
UINT
UINT
Struct of:
UINT
Padded EPATH
SHORT_STIRNG
Padded EPATH
Value
0004h
0002h
0002h
20 F5 24 01h
‘TCP/IP’
-
Description
TCP/IP
Port 2
Path Size
TCP Interface Object (Class F5h,instance 1)
Name of port
EPATH describing our TCP/IP address
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-32
6.9 TCP/IP Interface Object, Class F5h
6.9.1 General Information
Object Description
This object provides the a mechanism to configure the TCP/IP settings via EtherNet/IP. Note that
writing to this object will affect the settings stored in the configuration file ‘ip.cfg’.
Supported Services
Class services:
Get Attribute All
Get Attribute Single
Instance services:
Get Attribute All
Get Attribute Single
Set Attribute Single
6.9.2 Class Attributes
#
1
2
3
Access
Get
Get
Get
Name
Revision
Max Instance
No. of instances
Type
UINT
UINT
UINT
Value
0001h
0001h
0001h
Description
Revision 1
1 is the highest instance number
1 instance is implemented
Description
1 = The interface configuration attribute
contains a valid configuration
Interface configuration attribute is settable. Capable of obtaining network configuration via DHCP.
0 - Configuration from non-volatile
memory
2 - Configuration from DHCP
Physical link -> Ethernet object
2 words
Ethernet Class, Instance 1
-
6.9.3 Instance Attributes
# Access
1 Get
Name
Status
Type
DWORD
Value
0000 0001h
2
Get
Configuration DWORD
Capability
0000 0014h
3
Get/Set Configuration DWORD
Control
4
Get
5
6
Port Object
Path Size
Path
Get/Set Interface Configuration
IP Address
Subnet Mask
Gateway Address
Name Server 1
Name Server 2
Domain Name
Get/Set Host Name
X-Gateway Interface Addendum: EtherNet/IP Scanner
-
Struct of:
UINT
Padded EPATH
Struct of:
0002h
20 F6 24 01h
UDINT
UDINT
UDINT
-
Currently used IP address
Currently used Subnet mask
Currently used Gateway Address
UDINT
UDINT
STRING
STRING
-
Primary DNS server
Secondary DNS server
Default domain name
Host name
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-33
6.10 Ethernet Link Object, Class F6h
6.10.1 General Information
Object Description
This object maintains link specific counters and status information for the Ethernet communications
interface.
Supported Services
Class services:
Get Attribute All
Get Attribute Single
Instance services:
Get Attribute All
Get Attribute Single
Set Attribute Single
6.10.2 Class Attributes
#
1
2
3
Access
Get
Get
Get
Name
Revision
Max Instance
No. of instances
Type
UINT
UINT
UINT
Value
0001h
0001h
0001h
Description
Revision 1
1 is the highest instance number
1 instance is implemented
Value
10 or 100
MAC address
Description
Actual speed (MBPS)
Interface flags
Ethernet MAC address
6.10.3 Instance Attributes
#
1
2
3
Access
Get
Get
Get
4
Get
Name
Interface Speed
Interface Flags
Physical Address
Type
UDINT
DWORD
Array of 6 USINTS
Interface Counters Struct of:
In Octets
UDINT
In Ucast Packets UDINT
In NUcast Packets UDINT
-
In Discards
In Errors
UDINT
UDINT
-
In Unknown Protos
Out Octets
Out Ucast Packets
Out Discards
Out Errors
UDINT
-
UDINT
UDINT
UDINT
UDINT
-
X-Gateway Interface Addendum: EtherNet/IP Scanner
Octets received on the interface
Unicast packets received on the interface
Non-unicast packets received on the interface
Inbound packets with unknown protocol
Inbound packets that contain errors
(In Discards not included)
Inbound packets with unknown protocol
Octets sent on the interface
Non-unicast packets sent on the interface
Outbound packets with unknown protocol
Outbound packets that contain errors
(Out Discards not included)
Doc: HMSI-27-249, Rev: 2.00
Chapter 6 6-34
# Access
5 Get
6
Name
Media Counters
Alignment Errors
Type
Struct of:
UDINT
Value
-
FCS Errors
UDINT
-
Single Collisions
UDINT
-
Multiple Collisions UDINT
-
SQE Test Errors
UDINT
-
Deferred Transmissions
UDINT
-
Late Collisions
UDINT
-
Excessive ColliUDINT
sions
MAC Transmit Er- UDINT
rors
Carrier Sense Er- UDINT
rors
-
Frame Too Long
UDINT
-
MAC Receive Errors
UDINT
-
Struct of:
UDINT
UDINT
-
Get/Set Interface Control
Control Bits
Force Interface
Speed
X-Gateway Interface Addendum: EtherNet/IP Scanner
Description
Frames received that are not an integral
number of octets in length.
Frames received that do not pass the FCS
check
Successfully transmitted frames which experienced exactly one collision
Successfully transmitted frames which experienced more than one collision
Number of times SQRE test error message
is generated
Frames for which the first transmission attempt is delayed because the medium is
busy
Number of times a collision is detected later than 512 bit-times into the transmission
of a packet
Frames for which a transmission fails due
to excessive collisions
Frames for which transmission fails due to
an internal MAC sublayer receive error
Times that the carrier sense condition was
lost or never asserted when attempted to
transmit a frame
Frames received that exceed the maximum
permitted frame size
Frames for which reception on an interface
fails due to an internal MAC sublayer receive error
Interface Control Bits
Speed at which the interface shall be forced
to operate.
Returns ‘Object state Conflict’ if autonegotiation is enabled.
Doc: HMSI-27-249, Rev: 2.00
Chapter 5
5. Data Exchange
5.1 General Information
The Scanner Interface exchanges data with another network as depicted below.
Status Word
EtherNet/IP
Network
Image
(Output)
Slave Interface
Statistics
List
EtherNet/IP
Network
Image
(Input)
Control Word
EtherNet/IP
Network
Image
(Input)
EtherNet/IP
Network
Image
(Output)
Other Network
EtherNet/IP Network
EtherNet/IP Scanner
The structure of the EtherNet/IP Network I/O is determined by the configuration created in the configuration tool.
Note: The input/output data sizes of the Scanner Interface are determined by the size of the actual configuration created using the configuration tool and cannot be set via the Gateway Config interface.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 5 5-36
5.2 Control & Status Word Details
5.2.1 Status Word
The Status Word holds general status information, as described in the X-gateway user manual. When
enabled, it is mapped to the two first bytes of the input area memory buffer.
See the X-gateway user manual for further information.
5.2.2 Control Word
The Control Word, if enabled, controls the communication towards the other nodes on the
EtherNet/IP network and is mapped to the two first bytes of the output area memory buffer. The current state can be configured from the fieldbus side in the Control/Status word or it can be configured
from the terminal interface.
Control Word Contents:
b15
b14
b13
b12
b11
b10
b9
b8
b7
Reset
(MSB)
Mode (b3,
b2)
00b
01b
10b
11b
Reset (b7)
0b
1b
b6
b5
b4
b3
b2
b1
b0
Master Mode
(LSB)
Meaning
Comments
Idle
Run
Meaning
Normal operation
Reset gateway
These settings can be configured from the fieldbus side, from the terminal interface or from the Gateway Config interface.
Comments
Setting this bit causes the gateway to perform a self-reset.
IMPORTANT: The Control- and Status Words can be disabled through the Gateway Configuration Interface. In
such a case, the master interface will enter ‘Run’ mode automatically after having completed the start up initialization sequence. If enabled, the scanner will start up in ‘Idle’ mode, and will not exchange data until the mode has been changed to
‘Run’.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 5 5-37
5.3 Statistics List/Live List Interpretation
Connections that are not open cannot be added to the live list for the EtherNet/IP Network Master, as
they can not be detected on the network. The status of open connections can be detected, though, and
this information will be read and added to the Address Live List. This list holds status information on
the number of open connections on the EtherNet/IP network that are either configured, active or faulted. This statistics list can be read from address 640h in the fieldbus specific area.
DPRAM
address
640h - 641h
642h - 643h
644h - 645h
646h - 647h
Address Live List
(bytes)
0-1
2-3
4-5
6-7
Description
No. of configured connections
No. of active connections
No. of faulted connections
(reserved)
For more information regarding the Live List, consult the X-gateway user manual.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 7
7. FTP Server
7.1 General Information
The built-in FTP server can be used to upload/download files to the file system using a standard FTP
client. The server uses the following port numbers:
•
TCP, port 20
FTP data port.
•
TCP, port 21
FTP command port.
Security Levels
The server features two security levels (below). Security level is set at a per-user basis.
•
Normal Users
The root directory will be ‘\cfg’.
Note: if no valid user accounts can be found, all users will be treated as Admin Users (below).
•
Admin Users
The root directory will be ‘\’, i.e. the user has unrestricted access to the file system.
Note: The factory default admin login is ‘ABX’ (username) and ‘FTPAccess’ (password).
User Accounts
The user accounts are stored in two files, which are protected from web access:
•
‘\cfg\pswd\sys_pswd.cfg’
This file holds account details for normal users.
•
‘\pswd\ad_pswd.cfg’
This file holds account details for admin users.
File Format:
The user accounts are stored in the following format:
Username1:Password1
Username2:Password2
Username3:Password3
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 7 7-39
Accessing the FTP Server Using Windows Explorer™
The FTP client in Windows Explorer provides an easy way to access the file system as follows:
1. Open the Windows Explorer by right-clicking on the ‘Start’ button and selecting ‘Explore’.
2. In the address field, type FTP://<user>:<password>@<address>
- Substitute <address> with the IP address of the scanner interface
- Substitute <user> with the username
- Substitute <password> with the password
3. Press enter.
The Explorer will now attempt to connect to the scanner interface using the specified settings.
If successful, the file system will be displayed in the Explorer window.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 8
8. E-mail Client
8.1 General Information
The built in e-mail client can send predefined e-mail messages based on trigger-events in the Input- and
Output buffers.
In operation, this works as follows:
1. The trigger source is fetched from the Input- or Output buffer
2. A logical AND is performed between the trigger source and a mask value
3. The result is compared to a reference value according to a specified operand
4. If the end result is true, the e-mail is sent to the specified recipient(s).
Note that the scanner interface process e-mail trigger events once every 0.5 seconds, which means that
a trigger-event must be present longer than 0.5 seconds to be detected properly.
Which events that shall cause a particular message to be sent, is specified separately for each message.
For more information, see 8-40 “E-mail Definitions”. The client supports SSI, however note that some
SSI functions cannot be used in e-mail messages (specified separately for each SSI function).
See also...
•
8-39 “SMTP Server Settings”
•
8-40 “E-mail Definitions”
•
A-41 “Server Side Include (SSI)”
8.2 SMTP Server Settings
The client needs a valid SMTP server configuration to be able to send e-mail messages. These settings
are stored in the system file ‘\cfg\smtp.cfg’.
File Format:
[SMTP address]
xxx.xxx.xxx.xxx
[SMTP username]
user
•
Outgoing email server address
•
SMTP server login. Optional.
[SMTP password]
password
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Chapter 8 8-41
8.3 E-mail Definitions
E-mail definitions are stored in the following directories:
•
‘\cfg\email’
This directory holds up to 10 messages which can be altered by normal-level FTP-users.
•
‘\email’
This directory holds up to 10 messages which can be altered by admin-level FTP-users.
E-mail definition files must be named ‘email_1.cfg’, ‘email_2.cfg’... ‘email_10.cfg’ in order to be properly
recognized by the client.
File Format:
[Register]
Area, Offset, Type
[Register Match]
Value, Mask, Operand
[To]
recipient
[From]
sender
[Subject]
subject line
[Headers]
Optional extra headers
[Message]
message body
Key
Area
Offset
Type
Value
Mask
Operand
To
From
Subject
Headers
Message
Value
Scanned for SSI
Source buffer. Possible values are ‘IN’ (Input buffer) or ‘OUT’ (Out- No
put buffer)
Source offset, written in decimal or hexadecimal.
Source data type. Possible values are ‘byte’, ‘word’, and ‘long’
Used as a reference value for comparison.
Mask value, applied on the trigger source prior to comparison (logical
AND).
Possible values are ‘<‘, ‘=’ or ‘>’
E-mail recipient
Yes
Sender e-mail address
E-mail subject. One line only.
Optional; may be used to provide additional headers.
The actual message.
Note: Hexadecimal values must be written with the prefix ‘0x’ in order to be recognized by the client.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A
A. Server Side Include (SSI)
General
Server Side Include (from now on referred to as SSI) functionality enables dynamic content on web pages and in e-mail messages.
SSIs are special commands embedded in the source document. When the scanner interface encounters
such a command, it will be executed, and if applicable, replaced by an output string.
Syntax
The ‘X’s below represents a command opcode and parameters associated with the command.
<?--#exec cmd_argument=’XXXXXXXXXXXXXXXXXXXXXX’-->
Example
The following example causes a web page to display the Ethernet Mac ID of the interface:
<HTML>
<HEAD><TITLE>SSI Test</TITLE></HEAD>
<BODY>
The Ethernet Mac ID of the scanner interface is:
<?--#exec cmd_argument=’DisplayMacID’-->
</BODY>
</HTML>
Resulting web page
The Ethernet Mac ID of the scanner interface is: 00:30:11:78:9A:BC
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-43
A.1 Functions
A.1.1 DisplayMacID
This function returns the MAC ID in format xx:xx:xx:xx:xx:xx.
Syntax:
<?--#exec cmd_argument=’DisplayMacId’-->
A.1.2 DisplaySerial
This function returns the serial number of the scanner interface.
Syntax:
<?--#exec cmd_argument=’DisplaySerial’-->
A.1.3 DisplayFWVersion
This function returns the main firmware revision of the scanner interface.
Syntax:
<?--#exec cmd_argument=’DisplayFWVersion’-->
A.1.4 DisplayBLVersion
This function returns the bootloader firmware revision of the scanner interface.
Syntax:
<?--#exec cmd_argument=’DisplayBLVersion’-->
A.1.5 DisplayIP
This function returns the current IP address.
Syntax:
<?--#exec cmd_argument=’DisplayIP’-->
A.1.6 DisplaySubnet
This function returns the current subnet mask.
Syntax:
<?--#exec cmd_argument=’DisplaySubnet’-->
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-44
A.1.7 DisplayGateway
This function returns the current gateway address.
Syntax:
<?--#exec cmd_argument=’DisplayGateway’-->
A.1.8 DisplayDhcpState
This function returns whether DHCP is enabled or disabled.
Syntax:
<?--#exec cmd_argument=’DisplayDhcpState( "Output when ON", "Output when OFF"
)’-->
A.1.9 StoreIPConfig
Note: This function cannot be used in e-mail messages.
This function stores a passed IP configuration in the configuration file ‘IP.cfg’.
Syntax:
<?--#exec cmd_argument=’StoreIPConfig’-->
Include this line in a HTML page and pass a form with new IP settings to it.
Accepted fields in form:
SetIp
SetSubnet
SetGateway
SetDhcpState - value "on" or "off"
SetDNS1
SetDNS2
SetHostName
SetDomainName
Default output:
Invalid IP address!
Invalid Subnet mask!
Invalid Gateway address!
Invalid IP address or Subnet mask!
Invalid DHCP state!
Invalid DNS1!
Invalid DNS2!
Configuration stored correctly.
Failed to store configuration.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-45
A.1.10 GetText
Note: This function cannot be used in e-mail messages.
This function gets the text from an object and stores it in the OUT area.
Syntax:
<?--#exec cmd argument=’GetText( "ObjName", OutWriteString ( offset ), n )’-->
ObjName
offset
n
- Name of object.
- Specifies the offset from the beginning of the OUT area.
- Specifies maximum number of characters to read (Optional)
Default output:
Success
Failure
- Write succeeded
- Write failed
A.1.11 printf
This function includes a formatted string, which may contain data from the Anybus IN/OUT area, on
a web page. The formatting of the string is equal to the standard C function printf().
Syntax:
<?--#exec cmd_argument=’printf("String to write", Arg1, Arg2,... , ArgN)’-->
Like the standard C function printf() the "String to write" for this SSI function contains two types of
objects: Ordinary characters, which are copied to the output stream, and conversion specifications, each
of which causes conversion and printing of the next successive argument to printf. Each conversion
specification begins with the character % and ends with a conversion character. Between the % and the
conversion character there may be, in order:
•
Flags (in any order), which modify the specification:
+
(space)
0
#
which specifies left adjustment of the converted argument in its field.
which specifies that the number will always be printed with a sign
if the first character is not a sign, a space will be prefixed.
for numeric conversions, specifies padding to the field with leading zeroes.
which specifies an alternate output form. For o, the first digit will be zero. For x or
X, 0x or 0X will be prefixed to a non-zero result. For e, E,f, g and G, the output will
always have a decimal point; for g and G, trailing zeros will not be removed.
•
A number specifying a minimum field width. The converted argument will be printed in a field
at least this wide, and wider if necessary. If the converted argument has
fewer characters than the field width it will be padded on the left (or
right, if left adjustment has been requested) to make up the field width.
The padding character is normally space, but can be 0 if the zero padding flag is present.
•
A period, which separates the field width from the precision.
•
A number, the precision, that specifies the maximum number of characters to be printed from a
string, or the number of digits to be printed after the decimal point for
e, E, or F conversions, or the number of significant digits for g or G
conversion, or the minimum number of digits to be printed for an integer (leading 0s will be added to make up the necessary width)
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-46
•
A length modifier h, l (letter ell), or L. "h" Indicates that the corresponding argument is to be
printed as a short or unsigned short; "l" indicates that the argument is
a long or unsigned long.
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-47
The conversion characters and their meanings are shown below. If the character after the % is not a conversion character, the behavior is undefined.
Character
d, i
o
x, X
u
c
s
f
e, E
g, G
%
Argument type, Converted to
byte, short; decimal notation (For signed representation. Use signed argument)
byte, short; octal notation (without a leading zero).
byte, short; hexadecimal notation (without a leading 0x or 0X), using abcdef for 0x or
ABCDEF for 0X.
byte, short; decimal notation.
byte, short;single character, after conversion to unsigned char.
char*; characters from the string are printed until a "\0" is reached or until the number of
characters indicated by the precision have been printed
float; decimal notation of the form [-]mmm.ddd, where the number of d’s is specified by
the precision. The default precision is 6; a precision of 0 suppresses the decimal point.
float; decimal notation of the form [-]m.dddddd e+-xx or[-]m.ddddddE+-xx, where the
number of d’s specified by the precision. The default precision is 6; a precision of 0 suppresses the decimal point.
float; %e or %E is used if the exponent is less than -4 or greater than or equal to the precision; otherwise %f is used. Trailing zeros and trailing decimal point are not printed.
no argument is converted; print a %
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-48
The arguments that can be passed to the SSI function printf are:
Argument
InReadSByte(offset)
InReadUByte(offset)
InReadSWord(offset)
InReadUWord(offset)
Description
Reads a signed byte from position offset in the input buffer
Reads an unsigned byte from position offset in the input buffer
Reads a signed word (short) from position offset in the input buffer
Reads an unsigned word (short) from position offset in the input
buffer
InReadSLong(offset)
Reads a signed longword (long) from position offset in the input buffer
InReadULong(offset)
Reads an unsigned longword (long) from position offset in the input
buffer
InReadString(offset)
Reads a string (char*) from position offset in the input buffer
InReadFloat(offset)
Reads a floating point (float) value from position offset in the input
buffer
OutReadSByte(offset)
Reads a signed byte from position offset in the output buffer
OutReadUByte(offset)
Reads an unsigned byte from position offset in the output buffer
OutReadSWord(offset)
Reads a signed word (short) from position offset in the output buffer
OutReadUWord(offset)
Reads an unsigned word (short) from position offset in the output
buffer
OutReadSLong(offset)
Reads a signed longword (long) from position offset in the output
buffer
OutReadULong(offset)
Reads an unsigned longword (long) from position offset in the output
buffer
OutReadString(offset)
Reads a NULL terminated string (char*) from position offset in the
output buffer
OutReadFloat(offset)
Reads a floating point (float) value from position offset in the output
buffer
MbReadSWord(id)
Used to control the gateway, see A-52 “Gateway Control”.
CipReadSByte(class, inst, attr)
Read a signed byte from a CIP-object
Read an unsigned byte from a CIP-object
CipReadUByte(class, inst, attr)
CipReadSWord(class, inst, attr)
Read a signed word from a CIP-object
CipReadUWord(class, inst, attr)
Read an unsigned word from a CIP-object
CipReadSLong(class, inst, attr)
Read a signed longword from a CIP-object
CipReadULong(class, inst, attr)
Read an unsigned longword from a CIP-object
CipReadFloat(class, inst, attr)
Read a floating point value from a CIP-object
CipReadShortString(class, inst, attr) Read a short string from a CIP-object
CipReadString(class, inst, attr)
Read a null-terminated string from a CIP-object
CipReadUByteArray(class, inst, attr) Read an unsigned byte-array from a CIP-object
CipReadUWordArray(class, inst, attr) Read an unsigned word-array from a CIP-object
CipReadULongArray(class, inst, attr) Read an unsigned longword-array from a CIP-object
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-49
A.1.12 scanf
Note: This function cannot be used in e-mail messages.
This function reads a string passed from an object in a HTML form, interprets the string according to
the specification in format, and stores the result in the OUT area according to the passed arguments.
The formatting of the string is equal to the standard C function call scanf()
Syntax:
<?--#exec cmd_argument=’scanf( "ObjName", "format", Arg1, ..., ArgN), ErrVal1,
..., ErrvalN’-->
ObjName
format
Arg1 - ArgN
ErrVal1 -ErrValN
- The name of the object with the passed data string
- Specifies how the passed string shall be formatted
- Specifies where to write the data
- Optional; specifies the value/string to write in case of an error.
Character Input, Argument Type
d
Decimal number; byte, short
i
Number, byte, short. The number may be in octal (leading 0(zero)) or hexadecimal (leading 0x or 0X)
o
Octal number (with or without leading zero); byte, short
u
Unsinged decimal number; unsigned byte, unsigned short
x
Hexadecimal number (with or without leading 0x or 0X); byte, short
c
Characters; char*. The next input characters (default 1) are placed at the indicated spot.
The normal skip over white space is suppressed; to read the next non-white space character, use %1s.
s
Character string (not quoted); char*, pointing to an array of characters large enough for
the string and a terminating "\0" that will be added.
e, f, g
Floating-point number with optional sign, optional decimal point and optional exponent;
float*
%
Liteal %; no assignment is made.
The conversion characters d, i, o, u and x may be preceded by l (letter ell) to indicate that a pointer to
‘long’ appears in the argument list rather than a ‘byte’ or a ‘short’
The arguments that can be passed to the SSI function scanf are:
Argument
OutWriteByte(offset)
OutWriteWord(offset)
OutWriteLong(offset)
OutWriteString(offset)
OutWriteFloat(offset)
CipWriteByte(class, inst, attr)
CipWriteWord(class, inst, attr)
CipWriteLong(class, inst, attr)
CipWriteFloat(class, inst, attr)
Description
Writes a byte to position offset in the output buffer
Writes a word (short) to position offset in the output buffer
Writes a long to position offset in the output buffer
Writes a string to position offset in the output buffer
Writes a floating point (float) value to position offset in the output
buffer
Write a byte value to a CIP-object
Write a word value to a CIP-object
Write a longword to a CIP-object
Write a floating point value to a CIP-object
Default output:
Write succeeded
Write failed
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-50
A.1.13 IncludeFile
This function includes the contents of a file on a web page.
Syntax:
<?--#exec cmd_argument=’IncludeFile( "File name" )’-->
Default output:
Success
Failure
- <File content>
- Failed to open <filename>
A.1.14 SaveToFile
Note: This function cannot be used in e-mail messages.
This function saves the contents of a passed form to a file. The passed name/value pair will be written
to the file "File name" separated by the "Separator" string. The [Append|Overwrite] parameter determines if the specified file shall be overwritten, or if the data in the file shall be appended.
Syntax:
<?--#exec cmd_argument=’SaveToFile( "File name",
"Separator",[Append|Overwrite] )’-->
Default output:
Success
Failure
- Form saved to file
- Failed to save form
A.1.15 SaveDataToFile
Note: This function cannot be used in e-mail messages.
This SSI function saves the data of a passed form to a file. The “Object name” parameter is optional, if
specified, only the data from that object will be stored. If not, the data from all objects in the form will
be stored.
The [Append|Overwrite] parameter determines if the specified file shall be overwritten, or if the data
in the file shall be appended.
Syntax:
<?--#exec cmd_argument=’SaveDataToFile( "File name", "Object
name",[Append|Overwrite] )’-->
Default output:
Success
Failure
X-Gateway Interface Addendum: EtherNet/IP Scanner
- Form saved to file
- Failed to save form
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-51
A.1.16 DisplayScannerMode
This function returns the current scanner mode (run or idle state).
Syntax:
<?--#exec cmd_argument=’DisplayScannerMode
( "Output when Run", “Output when Idle” )’-->
A.1.17 SetScannerMode
Note: This function cannot be used in e-mail messages.
This function is used to set the EtherNet/IP scanner to Run or Idle. A variable called ‘scanner_state’
shall be sent to the page with the value ‘run’ or ‘idle’ (other values will be ignored).
Syntax:
<?--#exec cmd_argument=’SetScannerMode’-->
Default output:
Failure
- Change scanner mode not possible
See also...
•
6-23 “Identity Object, Class 01h”
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-52
A.2 Changing SSI output
There is two methods of changing the output strings from SSI functions:
1. Changing SSI output defaults by creating a file called "\ssi_str.cfg" containing the output strings
for all SSI functions in the system
2. Temporary changing the SSI output by calling the SSI function "SsiOutput()".
A.2.1 SSI Output String File
If the file "\ssi_str.cfg" is found in the file system and the file is correctly according to the specification
below, the SSI functions will use the output strings specified in this file instead of the default strings.
The files shall have the following format:
[StoreEtnConfig]
Success: "String to use on success"
Invalid IP: "String to use when the IP address is invalid"
Invalid Subnet: "String to use when the Subnet mask is invalid"
Invalid Gateway: "String to use when the Gateway address is invalid"
Invalid IP or Subnet: "String to use when the IP address and Subnet mask does
not match"
Invalid DNS1: "String to use when the primary DNS cannot be found"
Invalid DNS2: "String to use when the secondary DNS cannot be found"
Save Error: "String to use when storage fails"
Invalid DHCP state: "String to use when the DHCP state is invalid"
[scanf]
Success: "String to use on success"
Failure: "String to use on failure"
[IncludeFile]
Failure: "String to use when failure"1
[SaveToFile]
Success: "String to use on success"
Failure: "String to use on failure"1
[SaveDataToFile]
Success: “String to use on success”
Failure: “String to use on failure”1
[GetText]
Success: “String to use on success”
Failure: “String to use on failure”
The contents of this file can be redirected by placing the line ‘[File path]’ on the first row, and a file path
on the second.
Example:
[File path]
\user\ssi_strings.cfg
In this example, the settings described above will be loaded from the file ‘user\ssi_strings.cfg’.
1. ‘%s’ includes the filename in the string
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix A A-53
A.2.2 Temporary SSI Output change
The SSI output for the next SSI function to be called can be temporarily altered using the SSI function
“SsiOutput()”. Note that this will only affect the output string for the next SSI function, after that, the
output strings will be reverted to their defaults, or to the strings defined in the file ‘\ssi_str.cfg’.
The maximum size of a string is 128 bytes.
Syntax:
<?--#exec cmd_argument=’SsiOutput( "Success string", "Failure string" )’-->
Example:
This example shows how to change the output strings for a scanf SSI call.
<?--#exec cmd_argument=’SsiOutput ( "Parameter1 updated", "Error" )’-->
<?--#exec cmd_argument="scanf( "Parameter1", "%d", OutWriteByte(0) )’-->
A.3 Gateway Control
A.3.1 Refreshing Dynamic Gateway Status Information
The system files ‘dynamic.txt’ holds dynamic status information from the gateway and the onboard network interfaces. To provide up-to-date information, this file needs to be refreshed before use.
The following SSI command sequence will instruct the gateway to refresh the file:
Syntax:
<?--#exec cmd_argument=’printf( “Data: %u”, MbReadSWord( 21 ) )’-->
A.3.2 Restarting the Gateway
It is possible to reset the gateway using the following SSI command sequence:
Syntax:
<?--#exec cmd_argument=’printf( “Data: %u”, MbReadSWord( 1 ) )’-->
X-Gateway Interface Addendum: EtherNet/IP Scanner
Doc: HMSI-27-249, Rev: 2.00
Appendix B
B. Technical Specification
B.1 Scanner Interface Details
•
EtherNet/IP Scanner
•
FTP Server
•
Web Server
•
SMTP Client
•
10/100 Mbit operation, full or half duplex
•
On-board IP configuration switches
•
Shielded or unshielded cables
•
DHCP capable
•
HICP capable (supports the Anybus IPconfig utility from HMS)
•
DNS support
B.2 LAN (Ethernet) Connector Pinout (RJ45)
Pin
1
2
3
4
5
6
7
8
Signal
TD+
TDRD+
Termination
Termination
RDTermination
Termination
X-Gateway Interface Addendum: EtherNet/IP Scanner
1
8
Doc: HMSI-27-249, Rev: 2.00
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