Abx Etns 1 07 SCM 1200 048
Abx Etns 1 07 SCM 1200 048
Abx Etns 1 07 SCM 1200 048
Table of Contents
Chapter 2 Filesystem
General....................................................................................................................................................2-1
Security Framework ..............................................................................................................................2-1
Structure..................................................................................................................................................2-2
Chapter 6 Ethernet/IP
General....................................................................................................................................................6-1
Identity Object, Class 01h....................................................................................................................6-2
Assembly Object, Class 04h ................................................................................................................6-3
Diagnostic Object, Class AAh.............................................................................................................6-5
TCP/IP Interface Object, Class F5h .................................................................................................6-6
Ethernet Link Object, Class F6h ........................................................................................................6-7
Warning: This is a class A product. In a domestic environment this product may cause radio interfer-
ence 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.
About This Document P-2
Related Documents
Document Author
Anybus-X Generic Gateway User Manual HMS
Anybus-S Ethernet 100mbit Fieldbus Appendix HMS
Anybus-X Ethernet Interface Installation Sheet HMS
Open Modbus/TCP Specification, v 1.0 Schneider Electric
Document History
Change Page(s)
Corrected value of valid IP range 3-1
Changed Ethernet/IP server to Ethernet/IP adapter 1-1
Revision List
Support
HMS Germany
E-mail: ge-support@hms-networks.com
Phone: +49-721-96472-0
Fax: +49-721-964-7210
Online: www.anybus.com
HMS Japan
E-mail: jp-support@hms-networks.com
Phone: +81-45-478-5340
Fax: +81-45-476-0315
Online: www.anybus.com
HMS China
E-mail: cn-support@hms-networks.com
Phone: +86 10 8532 3023
Online: www.anybus.com
HMS Italy
E-mail: it-support@hms-networks.com
Phone: +39 039 59662 27
Fax: +39 039 59662 31
Online: www.anybus.com
HMS France
E-mail: mta@hms-networks.com
Phone: +33 (0) 3 89 32 76 41
Fax: +33 (0) 3 89 32 76 31
Online: www.anybus.com
Chapter 1
General Description
The Ethernet Slave interface implements a multi purpose communication solution for the Anybus X-
gateway platform, offering industrial protocol support as well as web and email capabilities.
The interface exchanges data via two data
buffers a.k.a. the Input and Output Buffers.
These buffers can be accessed via a built in Filesystem
Ethernet
Dynamic content capabilities allows data
from the input/output buffers to be moni- Email Client
• Input Buffer
This buffer holds data from the gate- Modbus/TCP
way, i.e. data from another network. Server
Output
(to Gateway)
Buffer
EtherNet/IP
• Output Buffer Adapter
Features
• 10/100Mbit operation in full or half duplex
• On board IP configuration switches
• DNS Capability
• DHCP/ARP/Anybus IPconfig (HICP) support
• Flexible filesystem (1.4MB)
• Per-user security framework
• Web Server with dynamic data capability
• Email Client with dynamic data capability
• Event triggered email handling
• FTP Server
• Telnet Server
• EtherNet/IP Adapter
• Modbus/TCP Server
• Supports the Ethernet Transport Provider
About the Ethernet Slave Interface 1-2
External View
1 2
# Description
1 Ethernet Connector (RJ45)
(see D-1 “Ethernet Connector Pinout (RJ45)”)
2 Manual IP Configuration switches 1 RJ45 8 IP Address
(see 3-1 “Configuration Switches”)
3 Gateway power connector (Bottom mounted Ethernet interface)
(consult the user manual for further details)
4 Gateway config connector 4
8 RJ45 1
IP Address
Chapter 2
Filesystem
General
Web content, email messages, and configuration data are stored in files within a built in filesystem. The
filesystem is a fixed-size storage area with a hierarchical directory structure. Files can be grouped in di-
rectories for increased readability, and a security framework protects important files from unauthorized
access.
• Case Sensitivity
The file system is case sensitive, i.e.‘Anybus.txt’ does not equal ‘Anybus.TXT’.
• Free Space
Approximately 1.4MB non-volatile (FLASH), and 1MB volatile.
• Data Corruption
Each FLASH segment can be rewritten approximately 1000000 times before data corruption.
One or more flash segments will be erased upon deleting, renaming or moving a file, appending
data to an existing file, or formatting the filesystem.
Security Framework
The filesystem features two security levels; Admin and Normal. Security level is set at a per user basis,
unless running in Global Admin Mode (see below).
• Admin Users
Admin users has unrestricted access to the filesystem through FTP and Telnet. User accounts
for Admin users are defined in the file ‘ad_pswd.cfg’.
• Normal User
Normal users are restricted to the \user\ directory and it’s subdirectories, i.e. when a normal user
connects via FTP or telnet, this will be their root directory. User accounts for normal users are
defined in the file ‘sys_pswd.cfg’.
Files within the file system can be protected from web access through username/password authoriza-
tion, see A-6 “Password Files” and A-6 “‘web_accs.cfg’”. It is also possible to configure which IP ad-
dresses and what protocols that are allowed to connect to the ethernet interface, see A-2 “‘ip_accs.cfg’”.
Structure
The figure below illustrates the structure of the file system, where the system files are located, and which
areas that can be accessed by Normal/Admin users.
user
pswd
(Files in this derectory and its subdirectories
are protected from acces through the webserver)
sys_pswd.cfg (Passwords for Normal mode users)
email_1.cfg
.
.
.
(User defined email files)
email_10.cfg
pswd
(Files in this derectory and its subdirectories
are protected from acces through the webserver)
ad_pswd.cfg (Passwords for Admin mode users)
email_1.cfg
(Admin defined email files)
email_10.cfg
For more information about the configuration files shown above, see A-1 “System Files”.
Chapter 3
General Information
The ethernet interface offers several ways to configure it’s network settings:
• Configuration Switches (below)
• Configuration File (See A-1 “‘ethcfg.cfg’”)
• Anybus IPconfig (HICP client) (See 3-2 “Anybus IPconfig (HICP)”)
• Via the Web Interface (See 4-1 “Web Interface”)
• ARP (See 3-2 “Address Resolution Protocol (ARP)”)
• EtherNet/IP (see 6-6 “TCP/IP Interface Object, Class F5h”)
If the configuration switches are set to a value other than 0 (zero), the network configuration will be
determined by the value of the switches, see 3-1 “Configuration Switches” (below).
If the configuration switches are set to 0 (zero), the network configuration will be loaded from the file
‘etccfg.cfg’. If this file cannot be found, the ethernet interface will attempt to retrieve it’s network set-
tings from a DHCP/BootP server. If no server is found, the interface will indicate an error on the Net-
work Status LED. (Note that the network configuration can still be set using ARP or HICP). The
interface supports DHCP Reboot, i.e. it will ask the DHCP/BootP for the IP address stored in the con-
figuration file. If the address is free to use, it will be assigned to the ethernet interface. If not, it will be
assigned a new address.
Configuration Switches
The configuration switch provides an easy way to configure the interface for intranet use. The switch
represents the binary value of the last byte in the IP address.
If the switch is set to a value between 1-2541, the interface will use the settings described below.
IP address: 192.168.0.n (n reflects the binary value of the switches)
Subnet mask: 255.255.255.0 (fixed)
Gateway address: 0.0.0.0 (fixed)
Example:
The switches are set to 00010100 (20 decimal). The IP address of the eth-
1 2 3 4 5 6 7 8
ON ernet interface will be 192.168.0.20
(MSB) (LSB)
Note 1: These settings can only be used on a local network; this is because the IP address that is being
set belongs to the private address set, see RFC 1918.
Note 2: Depending on if the ethernet interface is top or bottom mounted, the orientation of the switch-
es are different.
The ‘arp -s’ command will store the IP and MAC (printed on the back of the Anybus-X gateway)
addresses in the PC’s ARP table. When the ‘ping’ command is executed, the PC sends this infor-
mation to the interface using the MAC address. The interface detects that it was addressed with
the correct MAC address and adopts the IP settings sent by the PC. The new settings are then
stored in the file ‘ethcfg.cfg’.
IMPORTANT: As the Arp command automatically configures the subnet mask to 255.255.255.0, the first three
bytes of the IP address must be the same as for the PC executing the command.
Example:
PC - 10.10.12.67
Interface- 10.10.12.x (Where x is a value between 1 and 254)
Installation and Configuration 3-3
---------------------------------------------------
Change configuration
---------------------------------------------------
Ethernet IP + MBTCP + WEB Slave (Upper)
• Offline option
(Consult the Anybus X-gateway User Manual for further information).
• Run/Idle Header
This setting enables/disables the use of a run/idle header. If the header is enabled and indicating
Idle the X-gateway will stop copy data and use the ‘Offline options’ settings instead.
See also...
• 5-1 “Modbus/TCP Server”
• 6-1 “Ethernet/IP” (6-3 “Assembly Object, Class 04h”)
Chapter 4
Web Interface
General
The ethernet interface features a fast full featured web server with SSI capabilities. A default web inter-
face provides access to most common options via any standard web browser. The web interface is how-
ever fully customizable and can be tailor made to fit a particular product (For more information, see B-
1 “Creating Your Own Configuration”).
The default web interface differs slightly depending on network type (i.e. slave, master, fieldbus type etc),
however some basic functions are essentially the same.
• Device Diagnostics1
These pages are different depending on
network type, and holds diagnostic infor-
mation about the network interface. For
more information, see 4-2 “Device Diag-
nostics (Masters/Scanners only)”.
• General Status
This page provides an overview of the
gateway initialisation parameters and
general gateway diagnostics (these values
corresponds to the values set using the
gateway config interface).
• IP Config
This page holds the current TCP/IP set- Start Page
tings, 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.
1. The Device Diagnostic pages are only available on network master/scanner interfaces.
Web Interface 4-2
The diagnostic page for this interface displays the number of Configured, Active and Erroneous con-
nections.
Chapter 5
Modbus/TCP Server
General Information
The Modbus/TCP protocol is an implementation of the standard Modbus protocol running on top of
TCP/IP. The built in Modbus/TCP server provides access to the Input- and Output Buffers via a subset
of the functions defined in the Modbus/TCP specification. While this means that it can communicate
with devices that comply with this protocol, it does not mean that all services available in the Modbus/
TCP protocol specification are supported.
Modbus/TCP messages are exchanged through TCP port no. 502 and the server handles up to 8 con-
current connections.
For detailed information regarding the Modbus/TCP protocol, consult the Open Modbus Specifica-
tion.1
Address Modes
The Input- and Output Buffers are mapped to 16-bit Modbus registers on the Modbus/TCP side. The
Ethernet interface features two modes of representation, which affects the Modbus register map.
Note: Modbus Address Mode is enabled by setting the ‘Modbus Address Mode’-setting in the Gateway
Config Interface to ‘Enable’. Anybus Address Mode is enabled by setting the very same parameter to
‘Disable’.
See also...
• 3-3 “Gateway Config Interface”
02h Illegal Data Address The Query contains an illegal data address
Modbus Diagnostics
The Modbus/TCP server features several diagnostic counters which increments on pre-defined events.
These counters may provide valuable clues when troubleshooting the network communication, and can
be accessed through the standard diagnostics command (function code 0x08).
The following sub-functions are implemented:
# Meaning Description
00h Return Query Data Data passed in the Query shall be looped back in the response.
0Ah Clear Counters and Diagnostic Register Clears all diagnostic counters in the server.
0Ch Return Bus Communication Error Count Returns the number of CRC-errors encountered by the server.
0Dh Return Bus Exception Error Count Returns the number of exception responses returned by the server.
0Eh Return Slave Message Count Returns the number of messages addressed to the server (broadcast
included)
Modbus/TCP Server 5-3
Each Input Register corresponds to two bytes in the Input Buffer as follows:
Each Holding Register corresponds to two bytes in the Output Buffer as follows:
The Input & Output Buffers are mapped to coils and registers as follows:
Ethernet/IP
General
The interface can act as a Group 2 and 3 server on an EtherNet/IP network. EtherNet/IP is based on
the Common Industrial Protocol (CIP) which is also the application layer used by DeviceNet and Con-
trolNet to exchange data between node
Implemented Objects
EtherNet/IP requires some mandatory objects; these are implemented as well as some vendor specific
objects. The mandatory objects are the ones in the specification from ODVA.
The following vendor specific objects are implemented:
Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Reset
Class Attributes
Reset Service
The Identity object provides a reset service. There are two different types of reset requests:
Services
Class services: Get Attribute Single
Instance services: Get Attribute Single
Set Attribute Single
Description
The Assembly Object holds all I/O data used for I/O connections.
Class Attributes
Depending on the type of gateway and how it has been set up to operate, up to 10 bytes (bytes
0...9) may be occupied by the Status Word and the Live List, see below. (For further information
about the Status Word and the Live List, consult the main user manual)
Status Word (2 bytes) Bytes 0...1 Status Word (2 bytes) Bytes 0...1
Bytes 2...3 Bytes 2...3
Live List (8 bytes) ... Live List (8 bytes)
...
... ...
Data from
gateway (14 bytes)
... ...
Example A: Example B:
I/O Data Size = 24 bytes I/O Data Size = 24 bytes
Live List = Enabled Live List = Disabled
Control & Status Word = Enabled Control & Status Word = Enabled
Depending on how the gateway is set to operate, the first 2 bytes (bytes 0...1) may be occupied
by the Control Word, see below. (For more information about the Control Word, consult the
main user manual).
...
Data to
gateway (22 bytes)
Data to ...
gateway (22 bytes) ...
... ...
Example A: Example B:
I/O Data Size = 24 bytes I/O Data Size = 22 bytes
Control Word = Enabled Control Word = Disabled
Ethernet/IP 6-5
Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Description
This vendor specific object provides diagnostic information from the ethernet interface.
Class Attribute
Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Set Attribute Single
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 ‘ethcfg.cfg’.
Class Attributes
Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Description
This object maintains link specific counters and status information for the Ethernet communications
interface.
Class Attributes
FTP Server
General
It is possible to upload/download files to/from the file system using a standard FTP client. Depending
on security settings, different parts of the filesystem can be accessed by the user:
• Normal users
The root directory will be ‘\user’ unless the user has Admin access rights, see below.
• Admin users
The user will have unrestricted access to the file system, i.e. the root directory will be ‘\’.
ftp://user:password@<address>/
Substitute ‘user’ and ‘password’ with a valid username and password combination, and replace
<address> with the hostname or IP address of the ethernet interface.
Note: The factory default admin login is ‘ABX’ (username) and ‘FTPAccess’ (password
Chapter 8
Telnet Server
General
Using a Telnet client, the user can access the filesystem in the ethernet interface using a command line
interface similar to the Microsoft Windows™ command prompt. Depending on security settings, dif-
ferent parts of the filesystem can be accessed by the user:
• Normal users
The root directory will be ‘\user’ unless the user has Admin access rights, see below.
• Admin users
The user will have unrestricted access to the file system, i.e. the root directory will be ‘\’.
telnet <address>
(Substitute <address> with the hostname or IP address of the ethernet interface)
The server will now prompt for a valid username password combination:
If successful, you are now logged in and can enter commands using the built in command line interface.
\>
Note: The factory default admin login is ‘ABX’ (username) and ‘FTPAccess’ (password).
Telnet Server 8-2
General Commands
admin
Syntax:
admin
Provided that the user can supply a valid admin username/password combination, this command
enables admin access rights to normal users. (This command has no effect in Global Admin
Mode).
help
Syntax:
help [general|diagnostic|filesystem]
General commands:
version
Syntax:
version
This command will display version information, serial number and MAC ID of the interface.
exit
Syntax:
exit
dir
Syntax:
dir [path]
Lists the contents of a directory. If no path is given, the contents of the current directory is listed.
md
Syntax:
md [[path][directory name]]
Creates a directory. If no path is given, the directory is created in the current directory.
rd
Syntax:
md [[path][directory name]]
cd
Syntax:
cd [path]
format
Syntax:
format
Formats the filesystem. This is a privileged command and can only be called in administration
mode.
Telnet Server 8-4
del
Syntax:
del [[path][filename]]
Deletes a file.
ren
Syntax:
ren [[path][old name]] [[path][new name]]
move
Syntax:
move [[source path][source file]] [[destination path]]
This command moves a file or directory from the source location to a specified destination.
copy
Syntax:
copy [[source path][source file]] [[destination path][destination file]]
type
Syntax:
type [[path][filename]]
mkfile
Syntax:
mkfile [[path][filename]]
append
Syntax:
append [[path][filename]] [“The line to append”]
df
Syntax:
df
Diagnostic Commands
The following commands can be viewed by the command ‘help diagnostic’
arps
Syntax:
arps
iface
Syntax:
iface
sockets
Syntax:
sockets
routes
Syntax:
routes
System Files
System files typically contain parameters which controls the general behavior of the interface, or provide
status information from the gateway. These files are common ASCII files which can be edited with any
text editor. Note that depending on security settings, some of these files may be inaccessible for normal
users. Generally, the interface has to be restarted in order for any changes in these files to have effect.
Note: It is very important to follow the exact syntax specifications for each configuration file, otherwise
the interface might have problems interpreting it, which can result in a faulty or non-expected behaviour.
Configuration files
‘ethcfg.cfg’
This file contains the network configuration and is read by the interface at start up. The settings in this
file may be affected by several mailbox- and SSI commands. For more information about network con-
figuration see 3-1 “Installation and Configuration”.
Fileformat::
• IP address
[IP address]
10.10.12.212
• Subnet mask
[DHCP/BOOTP] • DHCP/BootP
OFF ‘ON’ - Enabled
[Speed]
‘OFF’ - Disabled
Auto
• Speed
[Duplex] Auto - Default. Auto negotiation will be used
Auto
100 - Forces the interface to operate only at 100mbit
[SMTP address] 10 - Forces the interface to operate only at 10mbit
0.0.0.0
• Duplex
[SMTP username] Auto - Default. Auto negotiation will be used
username
Full - Forces the interface to operate only at full duplex
[SMTP password] Half - Forces the interface to operate only at half duplex
password
• SMTP server/login settings
[DNS1 address]
Username and Password is only necessary if required by the
0.0.0.0
server.
[DNS2 address]
0.0.0.0 • Primary and Secondary DNS
Only required in order to be able to resolve host names
[Domain name]
hms.se
• Domain Name (Optional)
[Host name]
Anybus • Host Name (Optional)
System Files A-2
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\eth_settings.cfg
In this example, the settings described above will be loaded from the file ‘user\eth_settings.cfg’.
This permits normal users to access the network configuration settings.
‘ip_accs.cfg’
This file specifies which IP addresses and what protocols that are allowed to connect to the interface,
and is structured as follows:
[Web]
[FTP]
[Telnet]
[Modbus/TCP]
[Ethernet/IP]
[All]
The allowed IP addresses are specified separately for each protocol under the corresponding
header. The wildcard ‘*’ can be used to allow series of IP addresses. If a protocol header is not
given, the system will use the settings specified under the header ‘All’. If the ‘All’ header is not
given, the protocol will not accept any connections.
Example:
[Web]
10.10.12.*
10.10.13.*
[FTP]
10.10.12.*
[Telnet]
10.10.12.*
[All]
*.*.*.*
The above example will allow all IP addresses beginning with 10.10.12 to access using all proto-
cols. Addresses beginning with 10.10.13 will be able to access the web server, but not the FTP
and Telnet servers. The Modbus/TCP server and the Ethernet/IP adapter will accept connec-
tions from any IP address.
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]
\my_settings\ip_access_rights.cfg
In this example, the settings described above will be loaded from the file
‘\my_settings\ip_access_rights.cfg’.
IMPORTANT: Do not under any circumstances enter address ‘0.0.0.0’ for [All], since this will in effect prevent any
external access to the scanner interface altogether. Failure to observe this will render the product unusable and require service
from the HMS support office.
System Files A-3
‘onoffln.cfg’
The ON/OFF line functionality is by default configured to be triggered by the Link Status. It can how-
ever be configured to be triggered by for example a Modbus command. This is done by creating the file
‘\onoffln.cfg’.
• ON/OFF-line trigger
Example: Values: ‘Link’, ‘EIP’ and ‘Modbus’
[ON/OFF-line trigger]
Modbus
• Timeout
Value: Timeout value. A value of 10 equals 1000ms.
[Timeout]
10 • Commands (Optional)
[Commands] Selects what Modbus commands that must be
3, 16, 23 received during the timeout period.
If the keyword ‘ALL’ is given, the ON/OFF line
functionality will trigger on all Modbus commands.
The headings ‘[Timeout]’ and ‘[Commands]’ shall only given if the ON/OFF-line Trigger value
is set to ‘Modbus’.
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]
\my_settings\on-off-line_configuration.cfg
In this example, the settings described above will be loaded from the file ‘\my_settings\on-off-
line_configuration.cfg’.
‘telwel.cfg’
The default Telnet welcome message can be changed by creating this file. It shall contain the new wel-
come message in ASCII form.
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]
\my_settings\telnet_welcome_message.txt
In this example, the welcome message will be loaded from the file
‘\my_settings\telnet_welcome_message.txt’.
System Files A-4
‘http.cfg’
By default, the built in web server recognizes the following file types based on their filename extension:
It is possible to add additional content types by adding them in ‘http.cfg’ under the heading [FileTypes].
When a file is requested through the web server it will first search for the file types specified in this file.
If it’s not found in this file it will search for it among the default content types. This means that adding
file type in this file will replace it’s predefined type. If a file extension is not recognized, the content type
is set to binary data “/”.
It is also possible to reconfigure which filetypes that shall be scanned for SSI by adding them under the
heading [SSIFileTypes]. Up to 50 additional SSI file types can be defined.
[SSIFileTypes] [SSIFileTypes]
FileType1
htm
FileType2
html
... xml
FileTypeN
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\config\http_configuration.cfg
System Files A-5
These files contain predefined email messages and information on how and when to send them. Each
email message is triggered by an event in the Input/Output buffers1. The Input and Output buffers are
scanned once every 0.5 second, i.e. an event must be present longer than 0.5 seconds in order to be de-
tected. It is possible to define up 10 user defined, and 10 admin defined messages, each triggered by dif-
ferent events. These shall be placed in the directories “\user\email\” for normal user configurable
messages and “\email” for administrator-configurable messages. The files must be named ‘email_1.cfg’,
‘email_2.cfg’ ... ‘email_10.cfg’.
Fileformat:
[Register]
Buffer, Offset, Type
[Register match]
Match Value, Mask, Match operand
[To]
Recipient(s)
[From]
Sender
[Subject]
Subject line
[Headers]
Extra Headers
[Message]
Message body
Parameter Description
Buffera Trigger source buffer. Possible values are ‘IN’ or ‘OUT’
Offseta Trigger source offset from the start of the buffer, shall be written in decimal or hexadecimal.
Type Trigger source data type. Possible values are ‘byte’, ‘word’, and ‘long’
Match Valuea Value to compare with the source data. Shall be written in decimal or hexadecimal.
Maska The interface performs a logical ‘and’ on the source data and this Mask before the value is
compared with the Match Value. The value shall be written in decimal or hexadecimal.
Match Operand Specifies how the data shall be compared with the Match Value. Possible values: ‘<‘, ‘=’, ‘>’
Recipient(s) Destination email addresses, semicolon separated
Sender Sender email address
Subject line Email subject (One line only)
Extra Headers Optional. May be useful for advanced users when for example sending HTML emails etc.
Message Body Actual message. Can contain SSI (See B-1 “Server Side Include (SSI) Functionality”).
a. Hexadecimal values must be written in the format 0xN where ‘N’ is the hexadecimal value.
The trigger data is read from the location specified by the parameters Buffer, and Offset. A logical AND
is performed between the read data and the Mask value, and the result is compared with the Match Value
parameter according to the Match Operand If the result is true, the email message is sent to the specified
recipient.
1. In order to be able to use this feature, a valid SMTP server account must have been set in the system file
‘ethcfg.cfg’ (See A-1 “‘ethcfg.cfg’”).
System Files A-6
Password Files
User/password information for FTP and Telnet is stored in the files ‘sys_pswd.cfg’ (Normal users) and
‘ad_pswd.cfg’ (Admin users). These files must be placed in ‘\user\pswd’ and ‘\pswd\ respectively.
These directories are protected from web browser access.
The file format is the following:
User1:password1
User2:password2
...
User3:password3
Example:
User:Password
Example:
Username
‘web_accs.cfg’
To protect a directory from web access, a file called ‘web_accs.cfg’ must be placed in the directory to
protect. This file shall contain a list of users that are allowed to browse the protected directory and its
subdirectories. Multiple of these password files may be present in the system, allowing different users to
access different files and directories.
The file format is the same as for the ‘ad_pswd.cfg’ and ‘sys_pswd.cfg’ files, except that the optional
parameter ‘AuthName’ can be added. The value of this parameter will be presented in the login window.
If it is not given, the requested file/pathname will be presented instead.
(AuthName)
User:Password
[AuthName]
(Message goes here)
The contents of this file can be redirected by placing the line ‘[File path]’ on the first row, followed by
a list of password files.
System Files A-7
Example:
[File path]
\user\pswd\my_passwords\web_pswd.cfg
\user\pswd\my_passwords\more_pswd.cfg
[AuthName]
(Message goes here)
In this example, the accepted user/passwords will be loaded from the files
‘\user\pswd\my_passwords\web_pswd.cfg’ and
‘\user\pswd\my_passwords\more_pswd.cfg’
If any errors in the format of these files is detected the user/password protection will be ignored.
Virtual Files
The interface also contains a virtual file system containing a set of files used to build the default config-
uration webpage. The virtual file system can be overwritten or disabled, but not erased; A file with the
same name in the file system replaces the file in the virtual file system until it is removed.
\index.htm - Points to the contents of config.htm
\config.htm - Configuration frame page
\configform.htm - Configuration form page
\configform2.htm - Configuration form page
\store.htm - Configuration store page
\logo.jpg - HMS logo
\configuration.gif - Configuration picture
\boarder.bg.gif - picture
\boarder_m_bg.gif - picture
System Files A-8
General
These files are made up of lists of keys and their values, in the following format:
Fileformat:
<Key Name>=<Value>
Type Meaning
Hex8 Single hexadecimal value, 8 bit
Hex16 Single hexadecimal value, 16 bit
Hex32 Single hexadecimal value, 32 bit
Hex48 Single hexadecimal value, 48 bit
Hex8 List Multiple hexadecimal values, separated by dots (.)
Example: 48.4F.4D.45.52.20.53.49.4D.53.4F.4E
Binary list Multiple boolean values (no separation).
Example: 110101101101100100011
‘dynamic.txt’
This file contains the value of the Control and Status words, and must be refreshed before use (See B-
9 “Refreshing Dynamic Gateway Status Information”).
‘master.txt’
This file is only present in master/scanner configuration and contains master/scanner related status in-
formation. This file must be refreshed before use in order to provide accurate information (see B-9 “Re-
freshing Dynamic Gateway Status Information”).
‘static.txt’
This file is updated during startup and contains the current I/O configuration and various information
about the onboard network interfaces.
Functions
DisplayIP
Syntax:
<?--#exec cmd_argument=’DisplayIP’-->
DisplaySubnet
Syntax:
<?--#exec cmd_argument=’DisplaySubnet’-->
DisplayGateway
Syntax:
<?--#exec cmd_argument=’DisplayGateway’-->
DisplayDNS1
Syntax:
<?--#exec cmd_argument=’DisplayDNS1’-->
DisplayDNS2
Syntax:
<?--#exec cmd_argument=’DisplayDNS2’-->
Server Side Include (SSI) Functionality B-2
DisplayHostName
Syntax:
<?--#exec cmd_argument=’DisplayHostName’-->
DisplayDomainName
Syntax:
<?--#exec cmd_argument=’DisplayDomainName’-->
DisplayDhcpState
Syntax:
<?--#exec cmd_argument=’DisplayDhcpState( "Output when ON", "Output when OFF"
)’-->
DisplayDhcpSupport
This function returns ‘Arg1’ if DHCP is enabled and ‘Arg2’ if it’s disabled.
Syntax:
<?--#exec cmd_argument=’DisplayDhcpSupport( "Arg1", "Arg2" )’-->
DisplayEmailServer
Syntax:
<?--#exec cmd_argument=’DisplayEmailServer’-->
DisplaySMTPUser
Syntax:
<?--#exec cmd_argument=’DisplaySMTPUser’-->
Server Side Include (SSI) Functionality B-3
DisplaySMTPPswd
Syntax:
<?--#exec cmd_argument=’DisplaySMTPPswd’-->
StoreEtnConfig1
This SSI function stores a passed IP configuration in the configuration file ‘ethcfg.cfg’.
Syntax:
<?--#exec cmd_argument=’StoreEtnConfig’-->
Include this line in a HTML page and pass a form with new IP settings to it.
Default output:
Invalid IP address!
Invalid Subnet mask!
Invalid Gateway address!
Invalid IP address or Subnet mask!
Invalid Email Server IP address!
Invalid DHCP state!
Invalid DNS1!
Invalid DNS2!
Configuration stored correctly.
Failed to store configuration.
For information about how to change the SSI output, please see chapter B-8 “Changing the SSI Output”
printf
This SSI function includes a formatted string which may contain data from the Input/Output buffers,
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:
• 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)
• 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 along or unsigned long.
Server Side Include (SSI) Functionality B-5
The conversion characters and their meanings are shown below. If the character after the % is not a con-
version character, the behaviour is undefined.
The arguments that can be passed to the SSI function printf are:
Argument Description
InReadSByte(offset) Reads a signed byte from position offset in the input buffer
InReadUByte(offset) Reads an unsigned byte from position offset in the input buffer
InReadSWord(offset) Reads a signed word (short) from position offset in the input buffer
InReadUWord(offset) 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 B-9 “Gateway Control”.
Server Side Include (SSI) Functionality B-6
scanf1
This SSI 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 output buffer according to the passed argu-
ments. 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 - The name of the object with the passed data string
format - Specifies how the passed string shall be formatted
Arg1 - ArgN - Specifies where to write the data
ErrVal1 -ErrValN - Optional; specifies the value/string to write in case of an error.
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 Description
OutWriteByte(offset) Writes a byte to position offset in the output buffer
OutWriteWord(offset) Writes a word (short) to position offset in the output buffer
OutWriteLong(offset) Writes a long to position offset in the output buffer
OutWriteString(offset) Writes a string to position offset in the output buffer
OutWriteFloat(offset) Writes a floating point (float) value to position offset in the output buffer
Default output:
Write succeeded
Write failed
For information about changing the default SSI output, see B-8 “Changing the SSI Output”.
GetText1
This SSI function gets the text from an object and stores it in the Output buffer.
Syntax:
<?--#exec cmd_argument=’GetText( "ObjName", OutWriteString ( offset ), n )’-->
Default output:
Success - Write succeeded
Failure - Write failed
For information about changing the default SSI output, see B-8 “Changing the SSI Output”.
SaveToFile1
This SSI function saves the contents of a passed form to a file. The passed name/value pair will be writ-
ten to the file "File name" separated by the "Separator" string. The contents can either be Appended to
the file or overwrite the current content of the file.
Syntax:
<?--#exec cmd_argument=’SaveToFile( "File name",
"Separator",[Append|Overwrite] )’-->
Default output:
Success - Form saved to file
Failure - Failed to save form
For information about changing the default SSI output, see B-8 “Changing the SSI Output”.
IncludeFile
Syntax:
<?--#exec cmd_argument=’IncludeFile( "File name" )’-->
Default output:
Success - <File content>
Failure - Failed to open <filename>
For information about changing the default SSI output, see B-8 “Changing the SSI Output”.
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()".
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 Email server: "String to use when the SMTP 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" To include filename %s can be included
to the string once
[SaveToFile]
Success: "String to use on success"
Failure: "String to use on failure" To include filename %s can be included to
the string once
[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’.
Server Side Include (SSI) Functionality B-9
The SSI output for the next called SSI function can be changed with the SSI function "SsiOutput()" The
next called SSI function will use the output according to this call. Thereafter the SSI functions will use
the default outputs or the outputs 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) )’-->
Gateway Control
The system files ‘dynamic.txt’ and ‘master.txt’ (master/scanner configurations only) holds dynamic sta-
tus information from the gateway and the onboard network interfaces. In order to provide accurate in-
formation, these files must be refreshed prior to displaying their contents.
The following SSI command sequence will instruct the gateway to refresh it’s status files:
Syntax:
<?--#exec cmd_argument=’printf( “Data: %u”, MbReadSWord( ID ) )’-->
(Substitute ‘ID’ with a value from the table below)
ID Action
20 Refresh ‘master.txt’
21 Refresh ‘dynamic.txt’
It is possible to reset the gateway using the following SSI command sequence:
Syntax:
<?--#exec cmd_argument=’printf( “Data: %u”, MbReadSWord( 1 ) )’-->
Appendix C
General Information
The Ethernet interface supports the Transport Provider protocol, which allows a host to control the net-
work interface on the other side of the gateway using the standardized Anybus-S API.
This includes...
• Anybus OPC Server
• Anybus NetTool for DeviceNet
• Anybus NetTool for PROFIBUS
• Custom applications based on the Anybus-S API
(Slave)
(Other network)
(Slave)
Ethernet
(Slave)
OPC Server
(Slave)
Example:
Transport Provider I/O Size = (I/O Size, Interface A) - (I/O Size, Interface B)
I/O Size, Interface A = 30 bytes
I/O Size, Interface B = 20 bytes
Transport Provider I/O Size = 10 bytes
Interface A Interface B
I/O Size = 30 bytes I/O Size = 20 bytes
10 bytes
This data is transported as I/O Data
10 bytes
through the Ethernet Transport Provider
Note: In case the Transport Provider shall handle the complete I/O image towards the other network,
set the I/O size to 0 (zero) on the Ethernet interface.
Appendix D
Technical Specification
General
• 10 and 100mbit operation, full or half duplex
• Twisted-pair cables
• Flexible file system providing both volatile and non-volatile storage areas
• Security framework
• Integrated FTP server provides easy file management using standard FTP clients.
• Telnet server featuring a command line interface
• Server Side Include (SSI) capability
• Web server
• Email client (Messages can be triggered by I/O data events)
• IP Access Control
• DHCP/ARP/HICP support
• DNS support
Control Protocols
• Modbus/TCP
Conforms to Modbus/TCP v1.0.
• Ethernet/IP
Group 2 and 3 server capable.