Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Abx Etns 1 07 SCM 1200 048

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

X-gateway Interface Addendum

Ethernet Slave Interface


Doc.Id. SCM-1200-048
Rev. 1.07

HMS Industrial Networks AB


 
Germany + 49 - 721 - 96472 - 0 ge-sales@hms-networks.com
Japan + 81 - 45 - 478 -5340 jp-sales@hms-networks.com
Sweden + 46 - 35 - 17 29 20 sales@hms-networks.com
U.S.A. + 1 - 312 - 829 - 0601 us-sales@hms-networks.com
France + 33 - 3 89 32 76 76 fr-sales@hms-networks.com
Italy + 39 - 347 - 00894 - 70 it-sales@hms-networks.com
China + 86 - 10 - 8532 - 3183 cn-sales@hms-networks.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-2
Document History ............................................................................................................................... P-2
Conventions & Terminology.............................................................................................................. P-3
Support .................................................................................................................................................. P-4

Chapter 1 About the Ethernet Slave Interface


General Description..............................................................................................................................1-1
Features...................................................................................................................................................1-1
External View ........................................................................................................................................1-2
Ethernet Interface Status LEDs...................................................................................................1-2
Connectors and Switches................................................................................................................1-2

Chapter 2 Filesystem
General....................................................................................................................................................2-1
Security Framework ..............................................................................................................................2-1
Structure..................................................................................................................................................2-2

Chapter 3 Installation and Configuration


General Information.............................................................................................................................3-1
Configuration Switches ........................................................................................................................3-1
Anybus IPconfig (HICP) .....................................................................................................................3-2
Address Resolution Protocol (ARP) ..................................................................................................3-2
Gateway Config Interface ....................................................................................................................3-3

Chapter 4 Web Interface


General....................................................................................................................................................4-1
Device Diagnostics (Masters/Scanners only) ...................................................................................4-2
AS-I Master Interface...................................................................................................................4-2
Profibus Master Interface ..............................................................................................................4-2
.....................................................................................................................................................4-2
DeviceNet Scanner Interface..........................................................................................................4-2
EtherNet/IP Scanner Interface.....................................................................................................4-2
Chapter 5 Modbus/TCP Server
General Information.............................................................................................................................5-1
Address Modes ......................................................................................................................................5-1
Modbus Exception Codes ...................................................................................................................5-2
Modbus Diagnostics .............................................................................................................................5-2
Data Representation in Modbus Address Mode ..............................................................................5-3
Supported Function Codes.............................................................................................................5-3
Input Register Map.......................................................................................................................5-3
Holding Register Map...................................................................................................................5-3
Data Representation in Anybus Address Mode ...............................................................................5-4
Supported Function Codes.............................................................................................................5-4
Coil & Register Map ...................................................................................................................5-4

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

Chapter 7 FTP Server


General....................................................................................................................................................7-1
Accessing the FTP Server Using Windows Explorer™ .................................................................7-1
Chapter 8 Telnet Server
General....................................................................................................................................................8-1
Accessing the Telnet Server using Microsoft Windows™ .............................................................8-1
General Commands ..............................................................................................................................8-2
admin ...........................................................................................................................................8-2
help...............................................................................................................................................8-2
version...........................................................................................................................................8-2
exit ...............................................................................................................................................8-2
File System Operations.........................................................................................................................8-3
dir.................................................................................................................................................8-3
md ................................................................................................................................................8-3
rd..................................................................................................................................................8-3
cd..................................................................................................................................................8-3
format ...........................................................................................................................................8-3
del.................................................................................................................................................8-4
ren ................................................................................................................................................8-4
move .............................................................................................................................................8-4
copy...............................................................................................................................................8-4
type ...............................................................................................................................................8-4
mkfile ...........................................................................................................................................8-4
append ..........................................................................................................................................8-5
df ..................................................................................................................................................8-5
Diagnostic Commands .........................................................................................................................8-5
arps ..............................................................................................................................................8-5
iface ..............................................................................................................................................8-5
sockets ..........................................................................................................................................8-5
routes ............................................................................................................................................8-5

Appendix A System Files


Configuration files................................................................................................................................ A-1
‘ethcfg.cfg’ .....................................................................................................................................A-1
‘ip_accs.cfg’ .................................................................................................................................. A-2
‘onoffln.cfg’...................................................................................................................................A-3
‘telwel.cfg’.....................................................................................................................................A-3
‘http.cfg’ .......................................................................................................................................A-4
Email files (email_1.cfg, email_2.cfg ... email_10.cfg) .................................................................. A-5
Password Files ...................................................................................................................................... A-6
‘ad_pswd.cfg’ & ‘sys_pswd.cfg’..................................................................................................... A-6
‘web_accs.cfg’................................................................................................................................ A-6
Virtual Files ...........................................................................................................................................A-7
Gateway Status Files ............................................................................................................................ A-8
General........................................................................................................................................ A-8
‘dynamic.txt’................................................................................................................................ A-8
‘master.txt’ .................................................................................................................................. A-8
‘static.txt’ ..................................................................................................................................A-11
Appendix B Server Side Include (SSI) Functionality
Functions ............................................................................................................................................... B-1
DisplayIP .................................................................................................................................... B-1
DisplaySubnet ............................................................................................................................. B-1
DisplayGateway .......................................................................................................................... B-1
DisplayDNS1............................................................................................................................. B-1
DisplayDNS2............................................................................................................................. B-1
DisplayHostName....................................................................................................................... B-2
DisplayDomainName.................................................................................................................. B-2
DisplayDhcpState........................................................................................................................ B-2
DisplayDhcpSupport ................................................................................................................... B-2
DisplayEmailServer..................................................................................................................... B-2
DisplaySMTPUser ..................................................................................................................... B-2
DisplaySMTPPswd..................................................................................................................... B-3
StoreEtnConfig............................................................................................................................ B-3
printf ........................................................................................................................................... B-4
scanf ............................................................................................................................................ B-6
GetText....................................................................................................................................... B-7
SaveToFile1 ................................................................................................................................ B-7
IncludeFile ................................................................................................................................... B-7
Changing the SSI Output.................................................................................................................... B-8
SSI Output String File ................................................................................................................ B-8
Temporary SSI Output change ..................................................................................................... B-9
Gateway Control .................................................................................................................................. B-9
Refreshing Dynamic Gateway Status Information......................................................................... B-9
Restarting the Gateway ................................................................................................................ B-9

Appendix C Ethernet Transport Provider


General Information............................................................................................................................ C-1
Allocation of I/O Data ....................................................................................................................... C-1

Appendix D Technical Specification


Network Interface Details ..................................................................................................................D-1
Ethernet Connector Pinout (RJ45)....................................................................................................D-1
Preface

About This Document

How To Use This Document


This document describes network specific features and procedures needed when operating the Ethernet
interface for the Anybux X-gateway. For general information and operating instructions for the Anybus
X-gateway, consult the Anybus X-gateway User Manual.
The reader of this document is expected to be familiar with local area networks, and communication
systems in general.
For further information, documentation etc., please visit the HMS website, ‘www.anybus.com’.

Important User Information


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 com-
mitment 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 application meets all performance and safe-
ty requirements including any applicable laws, regulations, codes, and standards.
Anybus® is a registered trademark of HMS Industrial Networks AB. All other trademarks are the prop-
erty of their respective holders.

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

Summary of Recent Changes (v1.06... 1.07)

Change Page(s)
Corrected value of valid IP range 3-1
Changed Ethernet/IP server to Ethernet/IP adapter 1-1

Revision List

Revision Date Author Chapter Description


1.00 2004-09-28 PeP All First release
1.01 2004-10-05 PeP All Minor adjustments & corrections
1.02 2007-03-05 PeP C Added information about transport provider + misc. minor updates
1.03 2007-05-07 PeP A Minor update
1.04 2007-11-23 PeP 3-1, 5-1 Added missing information + misc. adjustments
1.05 2008-05-21 PeP B Minor update
1.06 2010-01-22 KeL 3, 5 Minor update
1.07 2010-05-16 KeL 1, 3 Minor update
About This Document P-3

Conventions & Terminology


The following conventions are used throughout this manual:
• Numbered lists provide sequential steps
• Bulleted lists provide information, not procedural steps
• The term ‘gateway’ is used when referring to the Anybus X-gateway
• The term ‘Ethernet Interface’ refers to the Ethernet Slave Interface for the X-gateway
• The term ‘user manual’ refers to the Anybus X-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.
About This Document P-4

Support

HMS Sweden (Head Office)


E-mail: support@hms-networks.com
Phone: +46 (0) 35 - 17 29 20
Fax: +46 (0) 35 - 17 29 09
Online: www.anybus.com

HMS North America


E-mail: us-support@hms-networks.com
Phone: +1-312-829-0601
Toll Free: +1-888-8-Anybus
Fax: +1-312-738-5873
Online: www.anybus.com

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

About the Ethernet Slave Interface

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

web server, or via industrial protocols such as FTP Server

Modbus/TCP and EtherNet/IP. A built in


email client can send email messages triggered Telnet Server
by a data event.

Ethernet
Dynamic content capabilities allows data
from the input/output buffers to be moni- Email Client

tored on web pages, or included in email mes- Input (from Gateway)


Buffer
sages. Web Server

• 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

This buffer holds data that shall be


sent through the gateway to another net-
work.

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

Ethernet Interface Status LEDs

LED Colour Indication Top mounted Ethernet interface


LINK Green Link OK
Off Link not OK
MSa Green Normal operation LINK
MS
Green, flashing Standby, not yet configured NS
ACT
Red Major fault, unrecoverable
Gateway
Red, flashing Minor fault, recoverable Status
Alt. Red/Green Hardware self test
Off No power
NSa Green EtherNet/IP connection(s) established
Green, flashing No EtherNet/IP connections Gateway
Status
Red Duplicate IP address
LINK
Red, flashing EtherNet/IP Connection Timeout MS
Alt. Red/Green Hardware self test NS
ACT
Off No power or no IP address set
ACT Green Receiving or sending packet
Off Not sending or receiving packet Bottom mounted Ethernet interface
Gateway (Consult the user manual for further details)
Status
a. Not used when using Modbus TCP

(Top mounted Ethernet interface)

1 2

Connectors and Switches


3

# 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

(consult the user manual for further details) 2


1

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.

Conventions & Limitations

• Case Sensitivity
The file system is case sensitive, i.e.‘Anybus.txt’ does not equal ‘Anybus.TXT’.

• Filename / Pathname length


Filenames can be a maximum of 48 characters long. Pathnames can be 256 characters in total,
filename included.

• 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’”.

Global Admin Mode


If no admin password file (See A-6 “Password Files”) is found, the interface will run in Global Admin
Mode; i.e. all users will have Admin access rights. No login is needed for Telnet, and the FTP server
accepts any username/password combination.
Global Admin Mode is primarily intended for product configuration and development.
Filesystem 2-2

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.

Root directory for Admin users

Root directory for Normal 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

email_1.cfg
.
.
.
(User defined email files)
email_10.cfg

tmp (volatile, suitable for temporary files)

static.txt (General gateway information)


dynamic.txt (Gateway status information)
master.txt (Master status information. Master/Scanner configurations only)

ssi_str.cfg (SSI output strings)


http.cfg (Web server settings)
ethcfg.cfg (Network settings)
telwel.cfg (Telnet welcome message)
onoffln.cfg (ON/OFF-line configuration)
ip_accs.cfg (IP addresses of allowed clients)

pswd
(Files in this derectory and its subdirectories
are protected from acces through the webserver)
ad_pswd.cfg (Passwords for Admin mode users)

email

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

Installation and Configuration

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.

1. 255 is used for local broadcasts.


Installation and Configuration 3-2

Anybus IPconfig (HICP)


HMS IP Configuration Protocol, or HICP, provides a simple way to configure Anybus based ethernet
interfaces using a user friendly software utility from HMS called Anybus IPconfig.

During startup, the utility scans the network


for Anybus based ethernet interfaces. If
needed, the network can be rescanned by
clicking ‘Scan’.
To edit the settings of the ethernet interface,
double click on it’s entry in the list.

A window will appear, containing the IP configuration and


password settings. The IP configuration can be edited di-
rectly.
To enter a password, click on the ‘Change password’ check-
box, and enter the password under ‘New password’. (If the
interface has already been assigned a password, first enter
the old password under ‘Password’.).
When done, click ‘Set’. The new IP configuration will now
be stored in the file ‘ethcfg.cfg’.

Address Resolution Protocol (ARP)


The IP address can be changed during runtime using the ARP command from a PC. This method can
be used to reconfigure ethernet interfaces that already has been configured, or even to reconfigure in-
terfaces outside the host’s subnet.
Below is an example on how to change the IP address from a Microsoft Windows™ command prompt:

arp -s <IP address> <MAC address>


ping <IP address>
arp -d <IP address>

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

Gateway Config Interface


The Gateway Config Interface features the following Ethernet-specific settings:

---------------------------------------------------
Change configuration
---------------------------------------------------
Ethernet IP + MBTCP + WEB Slave (Upper)

Input I/O data size (bytes): 20


Output I/O data size (bytes): 20
Offline option: Clear
Control word / Status word: Disabled
Modbus Address Mode: Enabled
Run/Idle Header Disabled

• Input I/O data size (bytes)


Specifies the amount of Input I/O Data to exchange on Ethernet .

• Output I/O data size (bytes)


Specifies the amount of Output I/O Data to exchange on Ethernet.

• Offline option
(Consult the Anybus X-gateway User Manual for further information).

• Control / Status word


This settings enables/disables representation of the Control/Status word on Ethernet.
(Consult the Anybus X-gateway User Manual for further information).

• Modbus Address Mode


This setting specifies the layout of the Modbus register map.
(See also 5-1 “Address Modes”)

• 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.

General Status Page IP Configuration Page

1. The Device Diagnostic pages are only available on network master/scanner interfaces.
Web Interface 4-2

Device Diagnostics (Masters/Scanners only)


These pages are unique to each network type, and is only available on network master interfaces. The
diagnostic pages for each supported network are described below.

AS-I Master Interface

The diagnostic page for this device holds the list of


configured slaves, activated slaves, detected slaves,
peripheral fault, and the I/O configuration and ID
code for each AS-Interface slave.
Additional advanced diagnostics can be viewed by
clicking ‘Advanced’ link in the upper right corner.
For more information about how these diagnostic
figures shall be interpreted, consult the Anybus-X
AS-I Network Interface Addendum.

Profibus Master Interface

AS-Interface Diagnostic (Standard)

The diagnostic page for this device holds the cur-


rent status of each slave on the Profibus network.
For more information about how these diagnostic
figures shall be interpreted, consult the Anybus-X
Profibus Master Network Interface Addendum.

Profibus Master Diagnostic Page

DeviceNet Scanner Interface

The diagnostic page for this device holds the cur-


rent status of each node on the DeviceNet network.
Additional advanced diagnostics can be viewed by
clicking ‘Advanced’ link in the upper right corner.
For more information regarding how to interpret
these diagnostic figures, consult the Anybus-X De-
viceNet Scanner Network Interface Addendum.

EtherNet/IP Scanner Interface


DeviceNet Scanner Diagnostic Page

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.

• Modbus Address Mode (Default)


In this mode, the Input- and Output Buffers are mapped to different Modbus register types.
Note that coil addressing is not possible in this mode.
See also...
- 5-3 “Data Representation in Modbus Address Mode”
• Anybus Address Mode
Compared to Modbus Addressing Mode, this mode allows data to be addressed in a more flexible
manner. Note however that several function codes can be used to access the very same data.
While this may appear confusing at first, it allows data to be manipulated in ways not possible in
Modbus Addressing Mode (e.g. it is possible to manipulate individual bits of a register by access-
ing coils associated with the same memory location).
See also...
- 5-4 “Data Representation in Anybus Address Mode”

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”

1. Open Modbus/TCP Specifiction, v. 1.0, Schneider Electric


Modbus/TCP Server 5-2

Modbus Exception Codes


With the exception of broadcast messages, the Modbus Master expects a normal response upon sending
a Query. If no response is returned (e.g. due to a transmission error), this will eventually trigger a timeout
condition in the Master.
If the server receives a Query but is for some reason unable to process it (i.e. the Modbus master tries
to access a non-existent Register), an exception response is returned to inform the master of the nature
of the error.
The following exception codes may be returned by the server:
# Meaning Description
01h Illegal Function The Query contains an illegal or unsupported function call

02h Illegal Data Address The Query contains an illegal data address

03h Illegal Data Value The Query contains invalid data

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

Data Representation in Modbus Address Mode

Supported Function Codes

The following function codes can be used in this mode:

Modbus Function Function Code Direction Associated with Buffer


Read Holding Registers 3 Gateway to Modbus Output Buffer
Read Input Registers 4 Input Buffer
Write Single Register 6 Modbus to Gateway Output Buffer
Force Multiple Registers 16
Mask Write Register 22

Input Register Map

Each Input Register corresponds to two bytes in the Input Buffer as follows:

Register # Buffer Location in Buffer Comments


1 Input Buffer 0x000... 0x001 Applicable Modbus functions:
2 0x002... 0x003 - Read Input Registers
3 0x004... 0x005
4 0x006... 0x007
5 0x008... 0x009
6 0x00A... 0x00B
... ...
255 0x1FC... 0x1FD
256 0x1FE... 0x1FF

Holding Register Map

Each Holding Register corresponds to two bytes in the Output Buffer as follows:

Register # Buffer Location in Buffer Comments


1 Output Buffer 0x000... 0x001 Applicable Modbus functions:
2 0x002... 0x003 - Read Holding Registers
3 0x004... 0x005 - Write Single Register
- Force Multiple Registers
4 0x006... 0x007
- Mask Write Register
5 0x008... 0x009
6 0x00A... 0x00B
... ...
255 0x1FC... 0x1FD
256 0x1FE... 0x1FF
Modbus/TCP Server 5-4

Data Representation in Anybus Address Mode

Supported Function Codes

The following function codes can be used in this mode:

Modbus Function Function Code Direction Associated with Buffer


Read Coil 1 Gateway to Modbus Input- and Output Buffers
Read Input Discretes 2
Read Holding Registers 3
Read Input Registers 4
Write Coil 5 Modbus to Gateway Output Buffer
Write Single Register 6
Force Multiple Coils 15
Force Multiple Registers 16
Mask Write Register 22
Read/Write Registers 23 Bidirectional Input- and Output Buffers

Coil & Register Map

The Input & Output Buffers are mapped to coils and registers as follows:

Register # Coil # Buffer Location in Buffer Comments


1 1... 16 Input Buffer 0x000... 0x001 Applicable Modbus functions:
2 17... 32 0x002... 0x003 - Read Coil
3 33... 48 0x004... 0x005 - Read Input Discretes
- Read Holding Registers
4 49... 64 0x006... 0x007
- Read Input Registers
5 65... 80 0x008... 0x009 - Read/Write Registers
6 81... 96 0x00A... 0x00B
7 97... 112 0x00C... 0x00D
... ... ...
255 4065... 4080 0x1FC... 0x1FD
256 4081... 4096 0x1FE... 0x1FF
257 4097... 4112
... ... - - (reserved)
1024 16369... 16384
1025 16385... 16400 Output Buffer 0x000... 0x001 Applicable Modbus functions:
1026 16401... 16416 0x002... 0x003 - Read Coil
1027 16417... 16432 0x004... 0x005 - Read Input Discretes
- Read Holding Registers
1028 16433... 16448 0x006... 0x007
- Read Input Registers
1029 16449... 16464 0x008... 0x009 - Write Coil
1030 16465... 16480 0x00A... 0x00B - Write Single Register
1031 16481... 16496 0x00C... 0x00D - Force Multiple Coils
... ... ... - Force Multiple Registers
- Mask Write Register
1279 20449... 20464 0x1FC... 0x1FD
- Read/Write Registers
1280 20465... 20480 0x1FE... 0x1FF

Note 1: The table above applies to all function codes.


Note 2: Coils are mapped MSB first, i.e. coil 0 corresponds to bit 15 of register 0.
Chapter 6

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:

Class Name Contents


01h Identity Object Hods general information and status about the interface.
04h Assembly Object Holds the Input and Output data buffers.
AAh Diagnostic Object Contains diagnostic information about the ethernet interface.
F5h TCP/IP Interface Object Holds the IP settings of the interface.
F6h Ethernet Link Object Holds the low level communication properties of the interface.

I/O Data Representation


The Input & Output buffers can be accessed from EtherNet/IP via the Assembly Object, instances 64h
(Input) and 96h (Output). For more information, see 6-3 “Assembly Object, Class 04h”. Note that this
data can also be accessed via Modbus/TCP, the email client, or the built in web server.
Ethernet/IP 6-2

Identity Object, Class 01h

Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Reset

Class Attributes

# Access Name Type Value Description


1 Get Revision UINT 0001h Revision 1

Instance Attributes, Instance 01h

# Access Name Type Value Description


1 Get Vendor ID UINT Default: 005Ah HMS Industrial Networks AB
2 Get Device Type UINT Default: 000Ch Communication Adapter
3 Get Product Code UINT Default: 000Eh Anybus-S Ethernet
4 Get Revision Struct of: -
USINT Major fieldbus version
USINT Minor fieldbus version
5 Get Status WORD - Device status, see table below
6 Get Serial Number UDINT (unique serial number) Serial number of the interface
7 Get Product Name SHORT_STRING Anybus-S EtherNet/IP Name of product

Status Attribute Extended Device Status

bit(s) Name Description Value Meaning


0 Module Owned - 0000b Unknown
1 (reserved) - 0010b Faulted I/O Connection
2 Configured - 0011b No I/O connection established
3 (reserved) - 0100b Non volatile configuration bad
4-7 Extended Device Status (See table on the right) 0110b Connection in Run mode
8 Minor recoverable fault - 0111b Connection in Idle mode
9 Minor recoverable fault -
10 Major recoverable fault -
11 Major unrecoverable fault -
12 - 15 (reserved) -

Reset Service
The Identity object provides a reset service. There are two different types of reset requests:

Reset Type Action


Power Cycling Reset (Type 0) This will cause the interface to emulate a power cycling reset.
Out of box reset (Type 1) This will cause the interface to delete the configuration file ‘ethcfg.cfg’ and reset.
Ethernet/IP 6-3

Assembly Object, Class 04h

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

# Access Name Type Value Description


1 Get Revision UINT 0002h Revision 2
2 Get Max Instance UINT 0096h The highest instance no.
Ethernet/IP 6-4

Instance Attributes, Instance 64h

# Access Name Type Value Description


3 Get Input Buffer Array of BYTE - Mapped to Input Buffer

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)
...

Input Buffer (24 bytes)


Input Buffer (24 bytes)

Bytes 9...10 Data from


...
Bytes 11...12 gateway (22 bytes)

... ...
Data from
gateway (14 bytes)
... ...

Bytes 22...23 Bytes 22...23

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

Instance Attributes, Instance 96h

# Access Name Type Value Description


3 Set Output Buffer Array of BYTE - Mapped to Output Buffer

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).

Control Word (2 bytes) Bytes 0...1 Bytes 0...1


Bytes 2...3
...
Output Buffer (22 bytes)

Live List (8 bytes)


Output Buffer (24 bytes)

...
Data to
gateway (22 bytes)
Data to ...
gateway (22 bytes) ...

... ...

... Bytes 20...21


Bytes 22...23

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

Diagnostic Object, Class AAh

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

# Access Name Type Value Description


1 Get Revision UINT 0001h Revision 1

Instance Attributes, Instance 01h

# Access Name Type Description


01h Get Serial number UDINT Serial number
02h Get Vendor ID UINT Manufacturer Vendor ID
03h Get Fieldbus Type UINT Fieldbus Type
04h Get Software version UINT Interface software revision
07h Get Watchdog counter out UINT Counter, incremented every 1ms
0Ah Get Interface Type UINT Interface Type (0083h = Ethernet)
0Fh Get Input buffer size UINT Size of Input buffer (in bytes)
12h Get Output buffer size UINT Size of output buffer (in bytes)
18h Get MAC ID Array of USINT Ethernet MAC address of the interface (6 bytes)
19h Get IP Address UDINT Current IP address
1Ah Get Subnet mask UDINT Current subnet mask
1Bh Get Gateway address UDINT Current gateway address
1Ch Get SMTP server address UDINT SMTP server address
1Dh Get DHCP state UDINT 0=DHCP enabled, 1=DHCP disabled
1Eh Get Bootloader version UDINT Bootloader firmware version
1Fh Get Application interface version UINT Application interface software version
20h Get Fieldbus software version UINT Fieldbus interface software version
Ethernet/IP 6-6

TCP/IP Interface Object, Class F5h

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

# Access Name Type Value Description


1 Get Revision UINT 0001h Revision 1
2 Get Max Instance UINT 0001h 1 is the highest instance number
3 Get No. of instances UINT 0001h 1 instance is implemented

Instance Attributes, Instance 01h

# Access Name Type Value Description


1 Get Status DWORD 00000001h 1 = The interface configuration attribute con-
tains a valid configuration
2 Get Configuration DWORD 00000014h Interface configuration attribute is settable.
Capability Capable of obtaining network configuration
via DHCP.
3 Get/Set Configuration DWORD - 0 - Configuration from non-volatile memory
Control 2 - Configuration from DHCP
4 Get Port Object Struct of: Physical link -> Ethernet object
Path Size UINT 0002h 2 words
Path Padded EPATH 20 F6 24 01h Ethernet Class, Instance 1
5 Get/Set Interface Con- Struct of: -
figuration
IP Address UDINT - Currently used IP address
Subnet Mask UDINT - Currently used Subnet mask
Gateway UDINT - Currently used Gateway Address
Address
Name Server 1 UDINT - Primary DNS server
Name Server 2 UDINT - Secondary DNS server
Domain Name STRING - Default domain name
6 Get/Set Host Name STRING - Host name
Ethernet/IP 6-7

Ethernet Link Object, Class F6h

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

# Access Name Type Value Description


1 Get Revision UINT 0001h Revision 1
2 Get Max Instance UINT 0001h 1 is the highest instance number
3 Get No. of instances UINT 0001h 1 instance is implemented

Instance Attributes, Instance 01h

# Access Name Type Value Description


1 Get Interface Speed UDINT 10 or 100 (MBPS) Actual communication speed
2 Get Interface Flags DWORD - -
3 Get Physical Address Array of 6 USINTS MAC address Ethernet MAC address
Chapter 7

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 ‘\’.

• Global Admin Mode


Any username/password combination will be accepted. All users has unrestricted access to the
file system, i.e. the root directory will be ‘\’.
For more information about the security framework, see 2-1 “Security Framework”.

Accessing the FTP Server Using Windows Explorer™


To access the FTP server using the Windows Explorer™, open an explorer window, and type the fol-
lowing in the Address following:

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 ‘\’.

• Global Admin Mode


No login is required in this mode. All users have unrestricted access to the file system, i.e. the
root directory will be ‘\’.

Accessing the Telnet Server using Microsoft Windows™


To access the telnet server using the telnet client provided with Microsoft Windows™, type the follow-
ing in the command prompt:

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:

HMS Anybus-S Ethernet module


Login: <user>
Password: <password>
(Substitute <user> and <password> with a valid user/password combination)

If successful, you are now logged in and can enter commands using the built in command line interface.

Login OK (Admin mode)

\>

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]

If no argument is specified, the following menu will be displayed.

General commands:

help - Help with menus


version - Display version information
exit - Exit station program

Also try ‘help [general|diagnostic|filesystem]’

version

Syntax:
version

This command will display version information, serial number and MAC ID of the interface.

exit

Syntax:
exit

This command closes the Telnet session.


Telnet Server 8-3

File System Operations


For commands where filenames, directory names or paths shall be given as an argument the names can
be written directly or within quotes. For names including spaces the filenames must be surrounded by
quotes. It is also possible to use relative pathnames using ‘.’, ‘\’ and ’..’

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]]

Removes a directory. The directory can only be removed if it is empty.

cd

Syntax:
cd [path]

Changes current directory.

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]]

Renames a file or directory.

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]]

This command creates a copy of the source file at a specified location.

type

Syntax:
type [[path][filename]]

Types the contents of a file.

mkfile

Syntax:
mkfile [[path][filename]]

Creates an empty file.


Telnet Server 8-5

append

Syntax:
append [[path][filename]] [“The line to append”]

Appends a line to a file.

df

Syntax:
df

Displays filesystem info.

Diagnostic Commands
The following commands can be viewed by the command ‘help diagnostic’

arps

Syntax:
arps

Display ARP stats and table

iface

Syntax:
iface

Display net interface stats

sockets

Syntax:
sockets

Display socket list

routes

Syntax:
routes

Display IP route table


Appendix A

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

[Subnet mask] • Default Gateway address


255.255.255.0 IP address of the default network gateway/router. Must not
be confused with the IP address of the Anybux-X Ethernet
[Gateway address]
0.0.0.0 interface.

[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:

Content Type File Extension(s) Scanned for SSI


text/html *.htm; *.html; *.shtm Yes
image/gif *.gif No
image/jpeg *.jpeg; *.jpg; *.jpe No
image/x-png *.png No
application/x-javascript *.js No
text/plain *.bat; *.txt; *.c; *.h; *.cpp No
application/x-zip-compressed *.zip No
application/octet-stream *.exe; *.com No
text/vnd.wap.wml *.wml No
application/vnd.wap.wmlc *.wmlc No
image/vnd.wap.wbmp *.wbmp No
text/vnd.wap.wmlscript *.wmls Yes
application/vnd.wap.wmlscript *.wmlsc No
text/xml *.xml No
application/pdf *.pdf No

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.

File Format Example


[FileTypes] [FileTypes]
FileType1:ContentType1
tif:image/tiff
FileType2:ContentType2
tiff:image/tiff
... doc:application/msword
FileTypeN:ContentTypeN
avi:video/x-msvideo

[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

Email files (email_1.cfg, email_2.cfg ... email_10.cfg)

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

‘ad_pswd.cfg’ & ‘sys_pswd.cfg’

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

In this example, the username is ‘User’, and the password is ‘Password’.

If no ‘:’ is present, the password will be equal to the username.

Example:
Username

In this example, both username and password will be ‘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.

File format: xxx.xxx.xxx.xxx

(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

Gateway Status Files

General

These files are made up of lists of keys and their values, in the following format:

Fileformat:
<Key Name>=<Value>

• <Key Name> is a unique identifier.


• <Value> is a value associated with the <Key Name>. It can either be a single hexadecimal value,
a list of hexadecimal values, or a binary list:

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”).

Key Name Meaning Type


ModuleInfoAbs1.Controlword Ethernet interface controlword value Hex16
ModuleInfoAbs1.Statusword Ethernet interface statusword value Hex16
ModuleInfoAbs2.Controlword Other network interface controlword value Hex16
ModuleInfoAbs2.Statusword Other network interface controlword value Hex16

‘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”).

Profibus Master Specific Contents

Key Name Meaning Type


ModuleInfoAbs2.Configured List of configured slaves (128 entries) Binary List
1: Configured, 0: Not Configured
ModuleInfoAbs2.DataTransfer List of slaves in data transfer (128 entries) Binary List
1: Slave in Data Transfer, 0: Slave not in Data Transfer
ModuleInfoAbs2.Diagnostics List of slaves with diagnostics (128 entries) Binary List
1: Slave Diagnostics available, 0: Slave Diagnostics not available
System Files A-9

DeviceNet Scanner Specific Contents

Key Name Meaning Type


ModuleInfoAbs2.NodeActive List of active nodes (64 entries). 1: Node Active, 0: Node not Active Binary List
ModuleInfoAbs2.NodeIdle List of idle nodes (64 entries). 1: Node Idle, 0: Node not Idle Binary List
ModuleInfoAbs2.NodeFaulted List of faulted nodes (64 entries). 1: Faulted, 0: Not faulted Binary List
ModuleInfoAbs2.NodeStatus List containing the status of each node Hex8 List
00: No error, Node is not in the scanlist
46: Duplicate MACID failure
47: Scanner configuration error
48: Device communication error
49: Incorrect device identity
4A: Data overrun error
4B: No network traffic detected
4C: No network traffic to the scanner detected
4D: Incorrect I/O data size
4E: Device does not exist
4F: Transmit failure
50: Device is in ‘Idle’ mode
51: Device is in ‘Fault’ mode
52: Fragmentation error
53: Unable to initialise device
54: Node not yet initialised
55: Receive buffer overflow
56: Node changed to ‘Idle’ mode
57: Shared master error
58: Shared choice error
59: ADR failed
5A: CAN port disabled by application
5B: Bus-off condition detected
5C: No bus power detected
5F: Updating flash
60: In test mode
61: Scanner halted by application
62: Unrecoverable firmware failure
63: Unrecoverable hardware failure
ModuleInfoAbs2.Connections Current number of established connections towards other nodes. Hex8
ModuleInfoAbs2.PacketRate Current expected packet rate. Hex16
ModuleInfoAbs2.Baudrate Currently used baudrate. 00: 125kbps, 01: 250kbps, 02: 500kbps. Hex8
ModuleInfoAbs2.MacId DeviceNet MacID Hex8
System Files A-10

AS-I Master Specific Contents

Key Name Meaning Type


ModuleInfoAbs2.Configured List of configured slaves (64 entries) Binary List
1: Slave Configured, 0: Slave not Configured
ModuleInfoAbs2.Active List of Active Slaves (64 entries) Binary List
1: Slave Active, 0: Slave not Active
ModuleInfoAbs2.Detected List of Detected Slaves (64 entries) Binary List
1: Slave Detected, 0: Slave not Detected
ModuleInfoAbs2.Fault List of Peripheral Fault (64 entries) Binary List
1: Peripheral Fault, 0: No fault
ModuleInfoAbs2.IOConfig List w. I/O Configuration of each slave (64 entries). Hex8 List
ModuleInfoAbs2.IDCode List w. ID Codes of each slave (64 entries). Hex8 List
ModuleInfoAbs2.Status Bit field containing misc. status information: Hex16
Bit 0: Offline mode
Bit 1: (reserved)
Bit 2: EEPROM OK
Bit 3 Automatic addressing enabled (set by the user)
Bit 4: Periphery fault
Bit 5: (reserved)
Bit 6: (reserved)
Bit 7: (reserved)
Bit 8: Offline phase active
Bit 9: Voltage on AS-Interface too low
Bit 10: Normal operation
Bit 11: 1: Configuration Mode
Bit 12: Automatic programming possible
Bit 13: (reserved)
Bit 14: Slave with address 0 exists
Bit 15: Actual configuration matches configured configuration
ModuleInfoAbs2.ConfigMode Current operation mode Hex8
1: Configuration Mode, 0. Protected Mode
ModuleInfoAbs2.NibbleMode Data Format Hex8
1: Nibble Mode, 0: Byte Mode
System Files A-11

‘static.txt’

This file is updated during startup and contains the current I/O configuration and various information
about the onboard network interfaces.

Key Name Meaning Type


ModuleInfoAbs1.InputIoSize Ethernet Input buffer size. Hex16
ModuleInfoAbs1.InputParSize (not used) -
ModuleInfoAbs1.OutputIoSize Ethernet Output buffer size. Hex16
ModuleInfoAbs1.OutputParSize (not used) -
ModuleInfoAbs1.FieldbusType Fixed value of 0083. Hex16
ModuleInfoAbs1.ModuleType Fixed value of 0101. Hex16
ModuleInfoAbs1.SerialNumber Ethernet interface serial number. Hex32
ModuleInfoAbs1.BootloaderVersion Ethernet interface bootloader revision. Hex16
ModuleInfoAbs1.SoftwareVersion Ethernet interface software revision. Hex16
ModuleInfoAbs1.EthernetMacId Ethernet interface MacID. Hex48
ModuleInfoAbs2.InputIoSize Other network interface Input I/O buffer size. Hex16
ModuleInfoAbs2.InputParSize Other network interface Input Parameter Data buffer size. Hex16
ModuleInfoAbs2.OutputIoSize Other network interface Output I/O buffer size. Hex16
ModuleInfoAbs2.OutputParSize Other network interface Output Parameter Data buffer size. Hex16
ModuleInfoAbs2.FieldbusType Other network interface type: 0035 = FIP IO Hex16
0001 = Profibus DP 0040 = Modbus Plus
0005 = Profibus DPV1 0045 = Modbus RTU
0011 = Interbus 0065 = ControlNet
0015 = LonWorks 0083 = Ethernet
0020 = CANOpen 0090 = CC-Link
0025 = DeviceNet 0091 = AS-Interface
ModuleInfoAbs2.ModuleType Other network interface class: Hex16
0101 = Slave interface 0201 = Master interface.
ModuleInfoAbs2.SerialNumber Other network interface serial number. Hex32
ModuleInfoAbs2.BootloaderVersion Other network interface bootloader revision. Hex16
ModuleInfoAbs2.SoftwareVersion Other network interface software revision. Hex16
ModuleInfoAbs2.EthernetMacId Other interface MacID (Ethernet<>Ethernet configurations only) Hex48
Gateway.SerialNumber Generic gateway serial number Hex32
Gateway.BootloaderVersion Generic gateway bootloader revision Hex16
Gateway.LibraryVersion Generic gateway library revision. Hex16
Gateway.ApplicationVersion Generic gateway application revision. Hex16
Gateway.ProductVersion Generic gateway product revision. Hex16
Appendix B

Server Side Include (SSI) Functionality


The SSI functionality makes it possible to display or alter I/O data and configuration settings on a web
page. It is also possible to use SSI functions in email messages, however due to natural reasons some SSI
functions cannot be used in email messages.

Functions

DisplayIP

This function returns the currently used IP address.

Syntax:
<?--#exec cmd_argument=’DisplayIP’-->

DisplaySubnet

This function returns the currently used Subnet mask.

Syntax:
<?--#exec cmd_argument=’DisplaySubnet’-->

DisplayGateway

This function returns the currently used Gateway address.

Syntax:
<?--#exec cmd_argument=’DisplayGateway’-->

DisplayDNS1

This function returns the address of the primary DNS server.

Syntax:
<?--#exec cmd_argument=’DisplayDNS1’-->

DisplayDNS2

This function returns the address of the secondary DNS server.

Syntax:
<?--#exec cmd_argument=’DisplayDNS2’-->
Server Side Include (SSI) Functionality B-2

DisplayHostName

This function returns the hostname.

Syntax:
<?--#exec cmd_argument=’DisplayHostName’-->

DisplayDomainName

This function returns the default domain name.

Syntax:
<?--#exec cmd_argument=’DisplayDomainName’-->

DisplayDhcpState

This function returns whether DHCP/BootP is enabled or disabled.

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

This function returns the currently used SMTP server address.

Syntax:
<?--#exec cmd_argument=’DisplayEmailServer’-->

DisplaySMTPUser

This function returns the username used for SMTP authentication.

Syntax:
<?--#exec cmd_argument=’DisplaySMTPUser’-->
Server Side Include (SSI) Functionality B-3

DisplaySMTPPswd

This function returns the password used for SMTP authentication.

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.

Accepted fields in form:


SetIp
SetSubnet
SetGateway
SetEmailServer
SetDhcpState - value "on" or "off"
SetDNS1
SetDNS2
SetHostName
SetDomainName
SetSMTPUser
SetSMTPPswd

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”

1. This function cannot be used within email messages


Server Side Include (SSI) Functionality B-4

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:

• Flags (in any order), which modify the specification:


- which specifies left adjustment of the converted argument in its field.
+ which specifies that the number will always be printed with a sign
(space) if the first character is not a sign, a space will be prefixed.
0 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)
• 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.

Character Argument type, Converted to


d, i byte, short; decimal notation (For signed representation. Use signed argument)
o byte, short; octal notation (without a leading zero).
x, X byte, short; hexadecimal notation (without a leading 0x or 0X), using abcdef for 0x or ABCDEF
for 0X.
u byte, short; decimal notation.
c byte, short;single character, after conversion to unsigned char.
s char*; characters from the string are printed until a "\0" is reached or until the number of char-
acters indicated by the precision have been printed
f float; decimal notation of the form [-]mmm.ddd, where the number of d’s is specified by the pre-
cision. The default precision is 6; a precision of 0 suppresses the decimal point.
e, E 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 deci-
mal point.
g, G 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 %

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.

Character Input data, 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 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”.

1. This function cannot be used within email messages


Server Side Include (SSI) Functionality B-7

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 )’-->

ObjName - Name of object.


offset - Specifies the offset from the beginning of the output buffer.
n - Specifies maximum number of characters to read (Optional)

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

This SSI function includes the contents of a file on a web page.

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. This function cannot be used within email messages


Server Side Include (SSI) Functionality B-8

Changing the 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()".

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 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

Temporary SSI Output change

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

Refreshing Dynamic Gateway Status Information

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’

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 ) )’-->
Appendix C

Ethernet Transport Provider

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)

Allocation of I/O Data


The Transport Provider uses parts of the Input- and Output Buffers to transfer I/O data. The amount
of data allocated for the Transport Provider is defined as the difference in I/O sizes between the two
network interfaces.

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

This data is available as I/O Data


20 bytes 20 bytes on the Ethernet side (e.g. Modbus/TCP, EtherNet/IP)

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

Network Interface Details

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.

Ethernet Connector Pinout (RJ45)


Pin Signal
1 TD+
2 TD-
3 RD+
4 Termination
5 Termination 1 8
6 RD-
7 Termination
8 Termination

You might also like