ABS EIP App 1 50
ABS EIP App 1 50
ABS EIP App 1 50
Anybus-S EtherNet/IP
Modbus/TCP, EtherNet/IP & IT Functionality
Rev.1.50
Table of Contents
Appendix A Miscellaneous
Control Register Area.......................................................................................................................... A-1
Firmware Upgrade ............................................................................................................................... A-2
Formatting the File System ................................................................................................................ A-2
Appendix C Connectors
Application Connector........................................................................................................................ C-1
Ethernet................................................................................................................................................. C-1
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 name Author
Open Modbus/TCP Specification Schneider Automation
RFC 821 Network Working Group
RFC 1918
ENIP Specifications ODVA
Anybus-S Parallel Design Guide HMS
Anybus-S Ethernet Development Specification v1.16
Document History
Change Page(s)
Major rewrite -
Revision List
Support
HMS America
E-mail: us-support@hms-networks.com
Phone: +1-773-404-2271
Toll Free: 888-8-Anybus
Fax: +1-773-404-1797
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
Chapter 1
Features
General
• Supports shielded (FTP) and unshielded (UTP) 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.
• Server Side Include (SSI) capability
• Web server
• Email client (Messages can be triggered by data events or directly by the application)
Industrial Protocols
• EtherNet/IP
- Group 2 and 3 server
• Modbus/TCP server
- Conforms to Modbus/TCP v1.0
About the Anybus-S EtherNet/IP 1-2
Overview
# Description Comment
1 Application Connector See C-1 “Application Connector”
2 Ethernet Connector See C-1 “Ethernet”
3 Configuration Switch 3-1 “TCP/IP Settings”
4 Anybus Watchdog Consult the general Anybus-S Parallel Design Guide for further information.
5 Status Indicators These LEDs indicate run time status and errors to the user, see below.
Status Indicators
These leds indicate run time status and errors to the user. During power up, a led test sequence is per-
formed according to the EtherNet/IP specification.
Link (Activity)
The behaviour of this led can be altered, see 10-99 “Alter LNK and ACT LED Functionality
(ALT_LNK_ACT_LEDS)”.
State Description
Off Link not sensed
Green Link sensed
• Led configuration 2
State Description
Off Link not sensed
Green Link sensed
Green, flashing Activity; receiving/transmitting ethernet packets
About the Anybus-S EtherNet/IP 1-3
Module Status
This led is required for EtherNet/IP conformance and must be labelled with one of the following:
“MS”, “Mod”, “Mod Status” or “Module Status”.
The behaviour of this led can be changed using the command ALT_MS_LED_FUNCTION, see 10-
100 “Alter Module Status LED Functionality (ALT_MS_LED_FUNCTION)”.
• Led configuration 1
State Description
Off No power
Green (1Hz) IP address not set using configuration switch.
Red (1Hz) Invalid MAC address. (Internal Error)
Red (2Hz) Failed to load Ethernet configuration from FLASH
Red (4Hz) Internal error (Fatal)
Red Duplicate IP address detected
• Led configuration 2
State Description
Off Operating at 10Mbit
Green Operating at 100Mbit
Red telephone flash Invalid MAC address.
(2 flashes on, long off)
Red telephone flash Failed to load Ethernet configuration from FLASH
(3 flashes on, long off)
Red telephone flash Internal error (Fatal)
(4 flashes on, long off)
Red telephone flash Duplicate IP address detected
(5 flashes on, long off)
State Description
Off No power
Green Controlled by a Scanner in Run state
Green, flashing Not configured, or Scanner in Idle state
Red, flashing A minor recoverable fault has been detected
Red A major unrecoverable fault has been detected
Alternating Green/Red Self-test in progress
• Led configuration 4
This configuration deactivates this led.
About the Anybus-S EtherNet/IP 1-4
Network Status
This led is required for EtherNet/IP conformance and must be labelled with one of the following: “NS”,
“Net”, “Net Status” or “Network Status”.
The behaviour of this led can be changed using the command ALT_NS_LED_FUNCTION, see 10-
101 “Alter Network Status LED Functionality (ALT_NS_LED_FUNCTION)”
• Led configuration 1
In this configuration, this led indicates the number established Modbus/TCP connections to the
module. The number of established connections is equal to the number of flashes on this led.
• Led configuration 2
This configuration deactivates this led.
State Description
Off No power or no IP address
Green On-line, one or more connections established (CIP Class 1 or 3)
Green, flashing On-line, no connections established
Red Duplicate IP address, fatal error
Red, flashing One or more connections timed out (CIP Class 1 or 3)
Alternating Green/Red Self test in progress
Activity
The behaviour of this led can be altered, see 10-99 “Alter LNK and ACT LED Functionality
(ALT_LNK_ACT_LEDS)”.
• Led configuration 2
In this configuration, this led is deactivated and the Activity and Link indications are merged.
Chapter 2
Basic Operation
EtherNet/IP
General
EtherNet/IP is based on the Control and Information protocol (CIP) which is also the application layer
for DeviceNet and ControlNet. The module acts as a Group 2 and 3 server on the EtherNet/IP net-
work.
The Input- and Output Data is accessed using I/O connections or Explicit messages towards the As-
sembly Object and the Parameter Input/Output Mapping Objects.
See also...
• 9-1 “CIP Object Implementation”
Data Exchange
I/O Data is exchanged on change of value, and can be accessed using I/O connections towards the As-
sembly Object. Parameter Data can be accessed acyclically via the Parameter Input- and Output Map-
ping Objects.
See also...
• 21-4 “Assembly Object, Class 04h”
• 21-6 “Parameter Data Input Mapping Object, Class B0h”
• 21-7 “Parameter Data Output Mapping Object, Class B1h”)
• 11-6 “Fieldbus Settings”)
Implementation Notes
Rockwell Automation PLCs uses the first four bytes consumed by a device defined for status informa-
tion. This status information is not defined in the EtherNet/IP specification, but all currently available
PLCs have this implementation.
By default, these four I/O bytes are parsed off and ignored. However, this behaviour can be changed
using the COPY_IO_STATUS mailbox command (see 10-71 “Copy I/O Status
(COPY_IO_STATUS)”.
Basic Operation 2-2
Modbus/TCP
General
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 Data areas via a
subset of the functions defined in the Modbus/TCP specification.
All Modbus/TCP messages are exchanged through TCP port no. 502. For detailed information regard-
ing the Modbus/TCP protocol, consult the Open Modbus Specification.
Addressing Modes
The module features two different modes of operation regarding the Modbus/TCP communication:
See also...
• 10-44 “Set Modbus Coil Area Size (MB_SET_COIL_AREA_SIZE)”
See also...
• 10-43 “Write Exception Status (WR_EXP_STAT)”
Basic Operation 2-3
Input Data
The Input Data is mapped to Coils & Registers as follows:
Output Data
The Output Data is mapped to Coils & Registers as follows:
Filesystem
General
The module features a built in filesystem, which is used to store information such as web files, network
communication settings, email messages etc.
The filesystem can be accessed using FTP, HTTP, Telnet, and directly by the application via the mailbox
interface.
Storage Areas
The filesystem consists of the different storage areas:
Conventions
• ‘\’ (backslash) is used as a path separator
• A ‘path’ originates from the system root and as such must begin with a ‘\’
• A ‘path’ must not end with a ‘\’
• Names may contain spaces (‘ ‘) but must not begin or end with one.
• Names must not contain one of the following characters: ‘\ / : * ? “ < > |’
• Names cannot be longer than 48 characters (plus null termination)
• A path cannot be longer than 256 characters (filename included)
• The maximum number of simultaneously open files is 40
• The maximum number of simultaneously open directories is 40
Important Note:
The non-volatile storage is located in FLASH memory. Each FLASH segment can only be erased ap-
proximately 1000000 times due to the nature of this type of memory.
The following operations will erase one or more FLASH segments:
• Deleting, moving or renaming a file or directory
• Writing or appending data to an existing file
• Formatting the filesystem
Basic Operation 2-6
Filesystem Overview
DGPLQURRW
XVHUURRW
XVHU
VVLBVWUFIJ
KWWSFIJ
HWKFIJFIJ
WHOZHOFIJ
SVZG SURWHFWHG
RQRIIOQFIJ
LSBDFFVFIJ V\VBSVZGFIJ
HPDLOBFIJ
SVZG SURWHFWHG
HPDLOBFIJ
DGBSVZGFIJ
HPDLO
HPDLOBFIJ
.
.
.
HPDLOBFIJ
System Files
The filesystem contains a set of files used for system configuration. These files, known as “system files”,
are regular ASCII files which can be altered using a standard text editor (such as the Notepad in Micro-
soft Windows™). Note that some of these files may also be altered by the Anybus module itself, e.g.
when using SSI (see 8-1 “Server Side Include (SSI)”).
The format of the system files are based on the concept of ‘keys’, where each ‘key’ can be assigned a
value, see example below.
Example:
[Key1]
value of key1
[Key2]
value of key2
The exact format of each system file is described in detail later in this document.
Chapter 3
TCP/IP Settings
The module offers three modes of operation regarding the TCP/IP settings:
The switches specify the binary value of the last byte of the IP address as
illustrated by the following example, where the IP address is set to 21
06% /6%
192.168.0.42.
EtherNet/IP
The TCP/IP settings can be accessed from EtherNet/IP through the TCP/IP Interface Object.
See also...
• 9-1 “CIP Object Implementation”
DHCP/BootP
The module can retrieve the TCP/IP settings from a DHCP or BootP server. If no DHCP server is
found, the module will fall back on it’s current settings (i.e. the settings currently stored in ‘\ethcfg.cfg’).
If no current settings are available (i.e. ‘ethcfg.cfg’ is missing, or contains invalid settings), the module
will halt and indicate an error on the on-board status LEDs (the settings may however still be accessed
using HICP, see 3-4 “Anybus IPconfig (HICP)”.
Basic Network Configuration 3-2
General
To be able to participate on the network, the module needs a valid TCP/IP configuration. These settings
are stored in the system file ‘\ethcfg.cfg’.
File Format:
[IP address]
xxx.xxx.xxx.xxx
[Subnet mask]
xxx.xxx.xxx.xxx • IP address
[DNS1 address]
xxx.xxx.xxx.xxx
• Primary and Secondary DNS
[DNS2 address]
xxx.xxx.xxx.xxx
Needed to be able to resolve host names
[Domain name] • Default domain name for not fully qualified host names
domain
• Host name
[Host name]
Anybus
See also...
• 5-1 “FTP Server”
• 11-6 “Fieldbus Settings”
Basic Network Configuration 3-3
IP Access Control
It is possible to specify which IP addresses that are permitted to connect to the module. This informa-
tion is stored in the system file ‘\ip_accs.cfg’.
File Format:
[Web]
• Nodes listed here may access the web server
xxx.xxx.xxx.xxx
[FTP]
• Nodes listed here may access the FTP server
xxx.xxx.xxx.xxx
[Modbus/TCP]
• Nodes listed here may access the module via Modbus/TCP
xxx.xxx.xxx.xxx
[EtherNet/IP]
• Nodes listed here may access the module via EtherNet/IP
xxx.xxx.xxx.xxx
[All]
• Fallback setting, used by the module when one or several of the
xxx.xxx.xxx.xxx
keys above are omitted
• ON/OFF-line trigger
File Format: 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 keys ‘[Timeout]’ and ‘[Commands]’ shall only given if the ON/OFF-line Trigger value is set
to ‘Modbus’.
Note: The settings in this file will be ignored if the application has issued
MB_ON_OFF_LINE_CONFIG.
See also...
• 10-42 “Modbus ON/OFF Line Configuration (MB_ON_OFF_LINE_CONFIG)”
• A-1 “Event Notification Cause/Source Registers”
Basic Network Configuration 3-4
FTP Server
General
The built in FTP server provides a way to access the file system using a standard FTP client.
The following port numbers are used for FTP communication:
• TCP, port 20 (FTP data port)
• TCP, port 21 (FTP command port)
See also...
• 10-19 “Disable FTP server (DISABLE_FTP_SERVER)”
Security Levels
The FTP-server features two security levels; admin and normal.
• Normal-level users
The root directory will be ‘\user’.
• Admin-level users
The root directory will be ‘\’, i.e. the user has unrestricted access to the file system.
User Accounts
The user accounts are stored in two files, which are protected from web access:
• ‘\user\pswd\sys_pswd.cfg’
This file holds the user accounts for normal-level users.
• ‘\pswd\ad_pswd.cfg’
This file holds the user accounts for admin-level users.
File Format:
Username1:Password1
Username2:Password2
Username3:Password3
Note 1: If no valid user accounts have been defined, or if the mailbox command
‘GLOBAL_ADMIN_MODE’ has been issued during startup, the module will grant Admin-level access
to all users. In such case, the FTP accepts any username/password combination, and the root directory
will be ‘\’.
Note 2: The FTP server shares user accounts with the Telnet server.
FTP Server 4-2
1. Open the Windows Explorer by right-clicking on the ‘Start’ button and selecting ‘Explore’.
3. Press enter. The Explorer will now attempt to connect to the module using the specified settings.
If successful, the built in file system is displayed in the Explorer window.
Chapter 5
Telnet Server
General
The built in Telnet server provides a way to access the file system using a standard Telnet client. The
server communicates through TCP port 23.
See also...
• 10-20 “Disable Telnet Server (DISABLE_TELNET_SERVER)”
Security Levels
Just like the FTP server, the Telnet server features two security levels; admin and normal.
• Normal-level users
The root directory will be ‘\user’.
• Admin-level users
The root directory will be ‘\’, i.e. the user has unrestricted access to the file system.
User Accounts
The Telnet server shares user accounts with the FTP server. If no valid user accounts have been defined,
or if the mailbox command ‘GLOBAL_ADMIN_MODE’ has been issued during startup, the module
will grant Admin-level access to all users. In such case, no login is required, and the root directory will
be ‘\’.
For more information, see 4-1 “User Accounts”
Telnet Server 5-2
General Commands
admin
• Syntax
admin
• Description
Provided that the user can supply a valid admin username/password combination, this command
provides Admin access rights to Normal-level users.
exit
• Syntax
exit
• Description
This command closes the Telnet session.
help
• Syntax
help [general|diagnostic|filesystem]
• Description
If no argument is specified, the following menu will be displayed.
General commands:
version
• Syntax
version
• Description
This command will display version information, serial number and MAC ID of the module.
Telnet Server 5-3
Diagnostic Commands
arps
• Syntax
arps
• Description
Display ARP stats and table
iface
• Syntax
iface
• Description
Display net interface stats
routes
• Syntax
routes
• Description
Display IP route table
sockets
• Syntax
sockets
• Description
Display socket list
append
• Syntax
append [file] [“The line to append”]
• Description
Appends a line to a file.
Telnet Server 5-4
cd
• Syntax
cd [path]
• Description
Changes current directory.
copy
• Syntax
copy [source] [destination]
• Description
This command creates a copy of the source file at a specified location.
del
• Syntax
del [file]
• Description
Deletes a file.
dir
• Syntax
dir [path]
• Description
Lists the contents of a directory. If no path is given, the contents of the current directory is listed.
df
• Syntax
df
• Description
Displays filesystem info.
format
• Syntax
format
• Description
Formats the filesystem. This command is only valid for admin level users.
Telnet Server 5-5
md
• Syntax
md [directory]
• Description
Creates a directory. If no path is given, the directory is created in the current directory.
mkfile
• Syntax
mkfile [filename]
• Description
Creates an empty file.
move
• Syntax
move [source] [destination]
• Description
This command moves a file or directory from the source location to a specified destination.
rd
• Syntax
rd [directory]
• Description
Removes a directory. The directory can only be removed if it is empty.
ren
• Syntax
ren [old name] [new name]]
• Description
Renames a file or directory.
type
• Syntax
type [filename]
• Description
Types the contents of a file.
Chapter 6
Web Server
General
The Anybus module features a flexible web server with SSI capabilities. The built in web pages can be
customized to fit a particular application and allow access to I/O data and configuration settings.
The web server communicates through port 80.
See also...
• 10-17 “Disable Web Server (DISABLE_WEB_SERVER)”
• 10-18 “Enable Web Server (ENABLE_WEB_SERVER)”
Protected Files
For security reasons, the following files are protected from web access:
• Files located in ‘\user\pswd’
• Files located in ‘\pswd’
• Files located in a directory which contains a file named ‘web_accs.cfg’
Authorization
Directories can be protected from web access by placing a file called ‘web_accs.cfg’ in the directory to
protect. This file shall contain a list of users that are allowed to access the directory and its subdirectories.
File Format:
Username1:Password1
Username2:Password2 • List of approved users.
...
UsernameN:PasswordN
• Optionally, a login message can be specified by including the
key [AuthName]. This message will be displayed by the web
[AuthName]
(message goes here)
browser upon accessing the protected directory.
The list of approved users can optionally be redirected to one or several other files.
Example:
In this example, the list of approved users will be loaded from the files ‘here.cfg’ and ‘too.cfg’.
[File path]
\i\put\it\over\here.cfg
\i\actually\put\some\of\it\over\here\too.cfg
[AuthName]
Yeah. Whatsda passwoid?
Note that when using this feature, make sure to put the user/password files in a directory that is pro-
tected from web access, see 6-1 “Protected Files”.
Web Server 6-3
Content Types
By default, the following content types are recognized by their file extension:
It is possible to configure/reconfigure the reported content types, and which files that shall be scanned
for SSI. This is done in the system file ‘\http.cfg’.
File Format:
[FileTypes]
FileType1:ContentType1
FileType2:ContentType2
...
FileTypeN:ContentTypeN
[SSIFileTypes]
FileType1
FileType2
...
FileTypeN
Note: Up to 50 content types and 50 SSI file types may be specified in this file.
Chapter 7
SMTP Client
General
The built in email client can send predefined email messages based on trigger-events in the dual port
memory (DPRAM). The application can also use the client directly via the mailbox interface.
The client supports SSI, however note that some SSI functions cannot be used in email messages (spec-
ified separately for each SSI function).
See also...
• 8-1 “Server Side Include (SSI)”
• 10-104 “Send Email (SEND_EMAIL)”
Server Settings
The module needs a valid SMTP server configuration in order to be able to send email messages. These
settings are stored in the system file ‘\ethcfg.cfg’. This file is read once during startup, i.e. any changes
requires that the module is restarted in order to have effect. See also...
• 10-14 “Set SMTP Server (SET_SMTP_SERVER)”
• 10-104 “Send Email (SEND_EMAIL)”
Event-Triggered Messages
As mentioned previously, the email client can send predefined message based on events in the DPRAM.
In operation, this works as follows:
1. The trigger source is fetched from the dual port memory
2. A logical AND is performed between the trigger source and a mask value
3. The result is compared to a reference value according to a specified operand
4. If the end result is true, the email is sent to the specified recipient(s).
Which events that shall cause a particular message to be sent, is specified separately for each message.
For more information, see 7-2 “Email Definitions”.
Note that the DPRAM is scanned once every 0.5 second, i.e. a trigger-event must be present longer than
0.5 seconds to ensure that it is detected by the Anybus module.
SMTP Client 7-2
Email Definitions
The email definitions are stored in the following two directories:
• ‘\user\email’
This directory holds up to 10 messages which can be altered by normal-level FTP-users.
• ‘\email’
This directory holds up to 10 messages which can be altered by admin-level FTP-users.
Email definition files must be named ‘email_1.cfg’, ‘email_2.cfg’... ‘email_10.cfg’ in order to be properly
recognized by the module.
File Format:
[Register]
Area, Offset, Type
[Register Match]
Value, Mask, Operand
[To]
recipient
[From]
sender
[Subject]
subject line
[Headers]
Optional extra headers
[Message]
message body
Note: Hexadecimal values must be written with the prefix ‘0x’ in order to be recognized by the module.
Chapter 8
General
Server Side Include (from now on referred to as SSI) functionality enables dynamic content to be used
on web pages and in email messages.
SSI are special commands embedded in the source document. When the Anybus module encounters
such a command, it will execute it, and replace it with the result (when applicable).
Syntax
The ‘X’s below represents a command opcode and parameters associated with the command.
<?--#exec cmd_argument=’XXXXXXXXXXXXXXXXXXXXXX’-->
Example
The following example causes a web page to display the Ethernet Mac ID of the module:
<HTML>
<HEAD><TITLE>SSI Test</TITLE></HEAD>
<BODY>
The Ethernet Mac ID of the Anybus module is:
<?--#exec cmd_argument=’DisplayMacID’-->
</BODY>
</HTML>
Resulting webpage:
Server Side Include (SSI) 8-2
Functions
DisplayMacID
This function returns the MAC ID in format xx:xx:xx:xx:xx:xx.
Syntax:
<?--#exec cmd_argument=’DisplayMacId’-->
DisplaySerial
This function returns the serial number of the Anybus module.
Syntax:
<?--#exec cmd_argument=’DisplaySerial’-->
DisplayFWVersion
This function returns the main firmware revision of the Anybus module.
Syntax:
<?--#exec cmd_argument=’DisplayFWVersion’-->
DisplayBLVersion
This function returns the bootloader firmware revision of the Anybus module.
Syntax:
<?--#exec cmd_argument=’DisplayBLVersion’-->
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’-->
Server Side Include (SSI) 8-3
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’-->
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
DHCP support can be disabled using the mailbox command DISABLE_DHCP, see 10-11 “Disable
DHCP (DISABLE_DHCP)”. This function returns ‘Arg1’ if it’s 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’-->
Server Side Include (SSI) 8-4
DisplaySMTPUser
This function returns the username used for SMTP authentication.
Syntax:
<?--#exec cmd:argument=’DisplaySMTPUser’-->
DisplaySMTPPswd
This function returns the password used for SMTP authentication.
Syntax:
<?--#exec cmd:argument=’DisplaySMTPPswd’-->
StoreEtnConfig
Note: This function cannot be used in email messages.
This SSI function stores a passed IP configuration in the configuration file ‘ethcfg.cfg’.
Syntax:
<?--#exec cmd_argument=’StoreEtnConfig’-->
Include this line in a HTML page and pass a form with new IP settings to it.
Default output:
Invalid IP address!
Invalid Subnet mask!
Invalid Gateway address!
Invalid IP address or Subnet mask!
Invalid Email Server IP address!
Invalid DHCP state!
Invalid DNS1!
Invalid DNS2!
Configuration stored correctly.
Failed to store configuration.
Server Side Include (SSI) 8-5
GetText
Note: This function cannot be used in email messages.
This SSI function gets the text from an object and stores it in the OUT area.
Syntax:
<?--#exec cmd arbgument=’GetText( "ObjName", OutWriteString ( offset ), n )’-->
Default output:
Success - Write succeeded
Failure - Write failed
printf
This SSI function includes a formatted string, which may contain data from the Anybus IN/OUT area,
on a web page. The formatting of the string is equal to the standard C function printf().
Syntax:
<?--#exec cmd_argument=’printf("String to write", Arg1, Arg2, ..., ArgN)’-->
Like the standard C function printf() the "String to write" for this SSI function contains two types of
objects: Ordinary characters, which are copied to the output stream, and conversion specifications, each
of which causes conversion and printing of the next successive argument to printf. Each conversion
specification begins with the character % and ends with a conversion character. Between the % and the
conversion character there may be, in order:
• 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) 8-6
The conversion characters and their meanings are shown below. If the character after the % is not a con-
version character, the behaviour is undefined.
The arguments that can be passed to the SSI function printf are:
Argument Description
InReadSByte(offset) Read a signed byte from position offset in the IN area
InReadUByte(offset) Read an unsigned byte from position offset in the IN area
InReadSWord(offset) Read a signed word from position offset in the IN area
InReadUWord(offset) Read an unsigned word from position offset in the IN area
InReadSLong(offset) Read a signed longword from position offset in the IN area
InReadULong(offset) Read an unsigned longword from position offset in the IN area
InReadString(offset) Read a string (char*) from position offset in the IN area
InReadFloat(offset) Read a floating point (float) value from position offset in the IN area
OutReadSByte(offset) Read a signed byte from position offset in the OUT area
OutReadUByte(offset) Read an unsigned byte from position offset in the OUT area
OutReadSWord(offset) Read a signed word (short) from position offset in the OUT area
OutReadUWord(offset) Read an unsigned word (short) from position offset in the OUT area
OutReadSLong(offset) Read a signed longword (long) from position offset in the OUT area
OutReadULong(offset) Read an unsigned longword (long) from position offset in the OUT area
OutReadString(offset) Read a null-terminated string from position offset in the OUT area
OutReadFloat(offset) Read a floating point (float) value from position offset in the OUT area
MbReadSByte(id) Read a signed byte (short) from the application via the mailbox interface
MbReadUByte(id) Read an unsigned byte (short) from the application via the mailbox inter-
face
MbReadSWord(id) Read a signed word from the application via the mailbox interface
MbReadUWord(id) Read an unsigned word from the application via the mailbox interface
MbReadSLong(id) Read a signed longword from the application via the mailbox interface
MbReadULong(id) Read an unsigned longword from the application via the mailbox inter-
face
MbReadString(id) Read a null-terminated string from the application via the mailbox inter-
face
MbReadFloat(id) Read a floating point (float) value from the application via the mailbox in-
terface
Server Side Include (SSI) 8-7
scanf
Note: This function cannot be used in email messages.
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 OUT area according to the passed arguments.
The formatting of the string is equal to the standard C function call scanf()
Syntax:
<?--#exec cmd_argument=’scanf( "ObjName", "format", Arg1, ..., ArgN), ErrVal1,
..., ErrvalN’-->
ObjName - The name of the object with the passed data string
format - Specifies how the passed string shall be formatted
Arg1 - ArgN - Specifies where to write the data
ErrVal1 -ErrValN - Optional; specifies the value/string to write in case of an error.
The conversion characters d, i, o, u and x may be preceded by l (letter ell) to indicate that a pointer to
‘long’ appears in the argument list rather than a ‘byte’ or a ‘short’
The arguments that can be passed to the SSI function scanf are:
Argument Description
OutWriteByte(offset) Write a byte to position offset in the OUT area
OutWriteWord(offset) Write a word to position offset in the OUT area
OutWriteLong(offset) Write a long to position offset in the OUT area
OutWriteString(offset) Write a string to position offset in the OUT area
OutWriteFloat(offset) Write a floating point value to position offset in the OUT area
MbWriteByte(id) Write a byte to the application via the mailbox interface
MbWriteWord(id) Write a word to the application via the mailbox interface
MbWriteLong(id) Write a longword to the application via the mailbox interface
MbWriteString(id) Write a string to the application via the mailbox interface
MbWriteFloat(id) Write a floating point value to the application via the mailbox interface
Default output:
Write succeeded
Write failed
Server Side Include (SSI) 8-8
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>
SaveToFile
Note: This function cannot be used in email messages.
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 [Append|Overwrite] parameter de-
termines if the specified file shall be overwritten, or if the data in the file shall be appended.
Syntax:
<?--#exec cmd_argument=’SaveToFile( "File name",
"Separator",[Append|Overwrite] )’-->
Default output:
Success - Form saved to file
Failure - Failed to save form
SaveDataToFile
Note: This function cannot be used in email messages.
This SSI function saves the data of a passed form to a file. The “Object name” parameter is optional, if
specified, only the data from that object will be stored. If not, the data from all objects in the form will
be stored.
The [Append|Overwrite] parameter determines if the specified file shall be overwritten, or if the data
in the file shall be appended.
Syntax:
<?--#exec cmd_argument=’SaveDataToFile( "File name", "Object
name",[Append|Overwrite] )’-->
Default output:
Success - Form saved to file
Failure - Failed to save form
DisplayRemoteUser
Note: This function cannot be used in email messages.
Server Side Include (SSI) 8-9
Syntax:
<?--#exec cmd_argument=’DisplayRemoteUser’-->
Server Side Include (SSI) 8-10
1. Changing SSI output defaults by creating a file called "\ssi_str.cfg" containing the output strings
for all SSI functions in the system
2. Temporary changing the SSI output by calling the SSI function "SsiOutput()".
If the file "\ssi_str.cfg" is found in the file system and the file is correctly according to the specification
below, the SSI functions will use the output strings specified in this file instead of the default strings.
The files shall have the following format:
[StoreEtnConfig]
Success: "String to use on success"
Invalid IP: "String to use when the IP address is invalid"
Invalid Subnet: "String to use when the Subnet mask is invalid"
Invalid Gateway: "String to use when the Gateway address is invalid"
Invalid Email server: "String to use when the SMTP address is invalid"
Invalid IP or Subnet: "String to use when the IP address and Subnet mask does
not match"
Invalid DNS1: "String to use when the primary DNS cannot be found"
Invalid DNS2: "String to use when the secondary DNS cannot be found"
Save Error: "String to use when storage fails"
Invalid DHCP state: "String to use when the DHCP state is invalid"
[scanf]
Success: "String to use on success"
Failure: "String to use on failure"
[IncludeFile]
Failure: "String to use when failure"1
[SaveToFile]
Success: "String to use on success"
Failure: "String to use on failure"1
[SaveDataToFile]
Success: “String to use on success”
Failure: “String to use on failure”1
[GetText]
Success: “String to use on success”
Failure: “String to use on failure”
The contents of this file can be redirected by placing the line ‘[File path]’ on the first row, and a file path
on the second.
Example:
[File path]
\user\ssi_strings.cfg
In this example, the settings described above will be loaded from the file ‘user\ssi_strings.cfg’.
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) )’-->
Chapter 9
General
The following CIP-objects are implemented in this product:
Mandatory Objects
Object Page
Identity Object, Class 01h 9-2
Message Router, Class 02h 9-4
Assembly Object, Class 04h 9-5
Connection Manager, Class 04h 9-7
Port Object, Class F4h 9-14
TCP/IP Interface Object, Class F5h 9-15
Ethernet Link Object, Class F6h 9-16
Object Page
Diagnostic Object, Class AAh 9-9
I/O Data Input Mapping Object, Class A0h 9-10
I/O Data Output Mapping Object, Class A1h 9-11
Parameter Data Input Mapping Object, Class B0h 9-12
Parameter Data Output Mapping Object, Class B1h 9-13
CIP Object Implementation 9-2
General Information
Object Description
-
Supported Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Reset
Class Attributes
Instance Attributes
Device Status
bit(s) Name
0 Module Owned
1 (reserved, ignore)
2 Configured
3 (reserved, ignore)
4... 7 Extended Device Status:
Value: Meaning:
0000b Unknown
0010b Faulted I/O Connection
0011b No I/O connection established
0100b Non-volatile configuration bad
0110b Connection in Run mode
0111b Connection in Idle mode
(other) (reserved)
8 Set for minor recoverable faults
9 Set for minor unrecoverable faults
10 Set for major recoverable faults
11 Set for major unrecoverable faults
12... 15 (reserved, ignore)
Reset Service
The Identity object provides a reset service. There are two different types of reset requests:
• Type 0: ‘Power Cycling Reset’
This service emulates a power cycling of the module.
• Type 1: ‘Out of box reset’
This service sets a “out of box” configuration and performs a reset.
Upon receiving a reset request, the default behaviour for the module is to reset itself. If the request is of
type 1 (‘Out of box reset’), the configuration file ‘ethcfg.cfg’ is erased.
If the application shall be notified about the reset (i.e. for resetting itself), there are two options for this:
2. Set the RST bit in the Module Status and Interrupt Notification registers when initialising the
module (ANYBUS_INIT.)
The reset service will then generate an Event Notification. The type of reset request that was is-
sued can be retrieved using GET_ID_RESET_PARAM.
It is then up to the application to reset itself and the module.
See also...
• 10-69 “Reset Notification (ID_RESET_NOTIFY)”
• 10-70 “Get Reset Parameter (GET_ID_RESET_PARAM)”
• 10-74 “Reset on IP Change (RST_ON_IP_CHANGE)”
• A-1 “Event Notification Cause/Source Registers”
CIP Object Implementation 9-4
General Information
Object Description
-
Supported Services
Class services: -
Instance services: -
Class Attributes
Instance Attributes
-
CIP Object Implementation 9-5
General Information
Object Description
This object provides access to I/O Data.
See also...
• 2-1 “EtherNet/IP”
Supported Services
Class services: Get Attribute Single
Instance services: Get Attribute Single
Set Attribute Single
Class Attributes
This instance is used as heartbeat for Input-Only connections, and does not carry any data.
This instance is used as heartbeat for listen-only connections, and does not carry any data.
Note that by default, only instance 64h is enabled. The remainder can be created by the application using
the I/O Data mapping functionality.
See also...
• 2-1 “Data Exchange”
• 9-10 “I/O Data Input Mapping Object, Class A0h”
• 10-53 “I/O Data Input Area Mapping (IO_INPUT_MAP)”
Note that by default, only instance 96h is enabled. The remainder can be created by the application using
the I/O Data mapping functionality.
See also...
• 2-1 “Data Exchange”
• 2-1 “Implementation Notes”
• 9-11 “I/O Data Output Mapping Object, Class A1h”
• 10-55 “I/O Data Output Area Mapping (IO_OUTPUT_MAP)”
• 10-71 “Copy I/O Status (COPY_IO_STATUS)”
CIP Object Implementation 9-7
General Information
Object Description
-
Supported Services
Class services: -
Instance services: Forward_Open
Forward_Close
Unconnected_Send1
Instance Descriptions
General
Class 1 connections are used to transfer I/O data, and can be established to instances in the Assembly
Object. Each Class 1 connection will establish two data transports; one consuming and one producing.
The heartbeat instances can be used for connections that shall only access inputs. Class 1 connections
use UDP transport.
• Total number of supported class 1 connections: 31
• Max input connection size: 509 bytes
• Max output connection size: 505 bytes
• Supported API: 2... 3200ms
• T->O Connection type: Point-to-point, Multicast
• O->T Connection type: Point-to-point
• Supported trigger type: Cyclic
1. Only if routing has been enabled. See 10-62 “Enable Routing (ENABLE_ROUTING)”.
CIP Object Implementation 9-8
Connection Types
• Exclusive-Owner connection
This type of connection controls the outputs of the Anybus module and does not depend on oth-
er connections.
- Max. no. of Exclusive-Owner connections: 1 per connection point
- Connection point O ⇒ T: Assembly Object, instance 96h (Default)
- Connection point T ⇒ O: Assembly Object, instance 64h (Default)
• Input-Only connection
This type of connection is used to read data from the Anybus module without controlling the
outputs. It does not depend on other connections.
- Max. no. of Input-Only connections: Up to 311
- Connection point O ⇒ T: Assembly Object, instance 03h (Default)
- Connection point T ⇒ O: Assembly Object, instance 64h (Default)
Note: If an Exclusive-Owner connection has been opened towards the module and times out,
the Input-Only connection times out as well. If the Exclusive-Owner connection is properly
closed, the Input-Only connection remains unaffected.
• Listen-Only connection
This type of connection requires another connection in order to exist. If that connection (Exclu-
sive-Owner or Input-Only) is closed, the Listen-Only connection will be closed as well.
- Max. no. of Input-Only connections: Up to 312
- Connection point O ⇒ T: Assembly Object, instance 04h (Default)
- Connection point T ⇒ O: Assembly Object, instance 64h (Default)
• Redundant-Owner connection
This connection type is not supported by the module.
General Information
Object Description
This object groups diagnostic information.
Supported Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Class Attributes
General Information
Object Description
This object can be used to access I/O Data, and is set up dynamically by the application. The mapped
attribute id:s are also available as vendor specific instance attributes (64h to 69h) in the Assembly Object.
See also...
• 9-5 “Assembly Object, Class 04h”
• 9-11 “I/O Data Output Mapping Object, Class A1h”
• 10-53 “I/O Data Input Area Mapping (IO_INPUT_MAP)”
Supported Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Class Attributes
General Information
Object Description
This object can be used to access I/O Data, and is set up dynamically by the application. The mapped
attribute id:s are also available as vendor specific instance attributes (96h to 9Bh) in the Assembly Ob-
ject.
See also...
• 9-5 “Assembly Object, Class 04h”
• 9-10 “I/O Data Input Mapping Object, Class A0h”
• 10-55 “I/O Data Output Area Mapping (IO_OUTPUT_MAP)”
Supported Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Set Attribute Single
Class Attributes
General Information
Object Description
This object can be used to access Parameter Data acyclically, and is set up dynamically by the application.
See also...
• 9-13 “Parameter Data Output Mapping Object, Class B1h”
• 10-49 “Parameter Data Input Mapping (PARAMETER_INPUT_MAP)”
Supported Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Class Attributes
Each attribute corresponds to a block of Input Parameter Data. Note that the size and location of each
block must be specified using by the application.
See also...
• 10-49 “Parameter Data Input Mapping (PARAMETER_INPUT_MAP)”
General Information
Object Description
This object can be used to access Output Data acyclically, and is set up dynamically by the application.
See also...
• 9-12 “Parameter Data Input Mapping Object, Class B0h”
• 10-51 “Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP)”
Supported Services
Class services: Get Attribute All
Instance services: Get Attribute Single
Set Attribute Single
Class Attributes
Each attribute corresponds to a block of Output Parameter Data. Note that the size and location of each
block must be specified using by the application.
See also...
• 10-51 “Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP)”
General Information
Object Description
-
Supported Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Class Attributes
General Information
Object Description
This object groups TCP/IP-related settings.
See also...
• 4-1 “Basic Network Configuration”
• 11-6 “Fieldbus Settings”
Supported Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Set Attribute Single
Class Attributes
Instance Attributes
General Information
Object Description
This object groups diagnostic information for the Ethernet interface.
See also...
• 4-1 “Basic Network Configuration”
Supported Services
Class services: Get Attribute All
Get Attribute Single
Instance services: Get Attribute All
Get Attribute Single
Class Attributes
Instance Attributes
Fault Information
When a mailbox command cannot be processed, the Message Information register in the header of the
response will indicate that an error occurred (Consult the Anybus-S Parallel Design Guide for more in-
formation). If the error code is ‘Invalid Other’ (Fh), extended error information is available in the Fault
Information register (Extended word 8).
The fault codes in the Fault Information register are:
Description
This command can be used to set the IP address, Gateway address, and Subnet mask. The settings in
this command overrides the settings in ‘ethcfg.cfg’.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 0001h
Extended Header Fault information
Message data Network settings.
Response data (the response holds a copy of the command data)
Description
This command returns the currently used network settings.
Note: This command may only be issued during runtime.
Initiated by Application
Command no. 0002h
Extended Header -
Message data -
Response data Currently used network settings.
Description
This command returns the MAC address of the module.
Initiated by Application
Command no. 0010h
Extended Header -
Message data -
Response data MAC Address, 6 bytes
Description
This mailbox command configures the timeout value used when trying to establish a connection to a
host.
Note: This command may only be issued during initialization.
Initiated by Application
Command no. 0003h
Extended Header Fault information
Message data Timeout Value
Response data (the response holds a copy of the command data)
• Timeout Value
Valid timeout values range from 1 to 255 seconds (Default = 75).
10-7
Description
This command is used to set the host and the default domain name.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 0032h
Extended Header Fault information
Message data Host and Domain settings
Response data (the response holds a copy of the command data)
Description
This command returns the configured host and default domain name settings.
Initiated by Application
Command no. 0034h
Extended Header -
Message data -
Response data Currently used Host and Domain settings
Host name
(string, null-terminated)
Response data
Domain name
(string, null-terminated)
10-9
Description
This command is used to enable / disable the ARP functionality.
Initiated by Application
Command no. 0014h
Extended Header Fault information
Message data ARP state
Response data (the response holds a copy of the command data)
• Config Value
00h: Disable
01h: Enable
10-10
Description
This command is used to enable / disable support for HICP (Anybus IP Config).
Initiated by Application
Command no. 0013h
Extended Header -
Message data HICP state
Response data (the response holds a copy of the command data)
• Config Value
00h: Disable
01h: Enable
10-11
Description
This command disables support for DHCP, and overrides the DHCP setting in the configuration file
‘ethcfg.cfg’. Furthermore, the DHCP configuration checkbox on the default web page will be excluded,
and the Anybus module will not report its DHCP status via HICP.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 0015h
Extended Header -
Message data -
Response data The response indicates if the command was accepted.
Description
This command configures the DNS server settings.
Note: This command may only be issued to during initialisation.
Initiated by Application
Command no. 0031h
Extended Header -
Message data DNS server settings
Response data The response indicates if the command was accepted.
• Primary DNS
IP address to primary DNS server.
• Secondary DNS
IP address to secondary DNS server, or 0.0.0.0 when using primary DNS only.
10-13
Description
This command returns the currently used DNS server settings.
Initiated by Application
Command no. 0033h
Extended Header -
Message data -
Response data DNS server settings.
• Primary DNS
IP address to primary DNS server, or 0.0.0.0 if unused.
• Secondary DNS
IP address to secondary DNS server, or 0.0.0.0 if unused.
10-14
Description
This mailbox command may be used to specify the IP address of the SMTP server.
Note 1: This command overrides the settings stored in the configuration file ‘ethcfg.cfg’.
Note 2: This command may only be issued during initialisation.
Initiated by Application
Command no. 000Eh
Extended Header Fault information
Message data SMTP server address
Response data (the response holds a copy of the command data)
Description
This command may be used to specify the address to the SMTP server in ASCII form.
Note 1: This command overrides the settings stored in the configuration file ‘ethcfg.cfg’.
Note 2: This command may only be issued during initialisation.
Initiated by Application
Command no. 0016h
Extended Header -
Message data SMTP server (string)
Response data (the response holds a copy of the command data)
• SMTP Server
ASCII string, null terminated (e.g. “192.168.1.42” or “smtp.server.com”)
10-16
Description
This function returns the currently used SMTP server IP address.
Initiated by Application
Command no. 000Fh
Extended Header -
Message data -
Response data SMTP server IP address
Description
This command disables the onboard web server. The web server is enabled by default.
Initiated by Application
Command no. 0004h
Extended Header -
Message data -
Response data -
Description
This command enables the onboard web server. The web server is enabled by default.
Initiated by Application
Command no. 0005h
Extended Header -
Message data -
Response data -
Description
This command disables the FTP server.
Initiated by Application
Command no. 0006h
Extended Header -
Message data -
Response data -
Description
This command disables the onboard Telnet server.
Initiated by Application
Command no. 0008h
Extended Header -
Message data -
Response data -
Description
This command instructs the module to run in Global Admin Mode. For more information, see 3-2 “Se-
curity Framework”.
Note: This command may only be issued during initialization.
Initiated by Application
Command no. 000Bh
Extended Header -
Message data -
Response data -
Description
This command disables the virtual files in the file system.
Note: This command may only be issued during initialization.
Initiated by Application
Command no. 0011h
Extended Header -
Message data -
Response data -
Open File (FILE_OPEN) Open a file for reading, writing, or appending. 10-24
Close File (FILE_CLOSE) Close a file previously opened using FILE_OPEN 10-25
Read Directory (DIR_READ) Read contents of a directory previously opened using DIR_OPEN 10-35
Close Directory (DIR_CLOSE) Close a directory previously opened using DIR_OPEN 10-37
Description
This command opens a file for reading, writing, or appending.
Initiated by Application
Command no. 0060h
Extended Header Mode, Filesize & Fault information
Message data Name and path to the file to open (NULL terminated)
Response data File Handle
• Mode
Value Mode
0000h Open a file in read mode
0001h Open a file in write mode. If the specified file does not exist, it will be created. If the
specified file already exists, it will be overwritten.
0002h Open a file in append mode. If the specified file does not exist, it will be created. If the
specified file exists, any data written to the file will be appended at end-of-file.
• Filesize
Current filesize (if applicable).
• File Handle
Unique identifier which must be used on all further operations associated with the file.
10-25
Description
This command closes a file previously opened using FILE_OPEN.
Initiated by Application
Command no. 0061h
Extended Header File Handle, Filesize & Fault information.
Message data -
Response data -
• File Handle
Handle of the file to close. See also 10-24 “File Handle”.
• Filesize
Size of the file.
10-26
Description
This command reads data from a file previously opened in read mode using FILE_OPEN.
Initiated by Application
Command no. 0062h
Extended Header File Handle, no. of bytes to read & Fault information
Message data -
Response data The read data is returned in the response data field.
• File Handle
File handle of the file to read data from. See also 10-24 “File Handle”.
• No. of bytes
Number of bytes to read minus 1 (i.e. a value of 42 will read 43 bytes).
• Data
The actual data read from the file (if applicable).
10-27
Description
This mailbox command writes data to a file previously opened in write or append mode using
FILE_OPEN.
Initiated by Application
Command no. 0063h
Extended Header File Handle & Fault information
Message data Data to write
A ‘Data size’ value of 0 (zero) indicates that the command was unsuccessful,
Response data
possibly due to a faulty handle, or that the module has run out of storage.
• File Handle
File handle of the file to write data to. See also 10-24 “File Handle”.
• No. of bytes
Number of bytes to write minus 1 (i.e. a value of 42 will read 43 bytes).
• Data
The actual data that shall be written.
10-28
Description
This mailbox command deletes a file from the file system.
Initiated by Application
Command no. 0064h
Extended Header Fault information
Message data Name and path to the file to delete (NULL terminated)
Response data The response data is a copy of the command data.
Description
This command renames a file in the filesystem.
Note: Although the filesystem supports path lengths of up to 256 characters, the total length of the
source and destination paths summed together must be less than 256 characters when using this com-
mand due to limitations in the mailbox command structure.
Initiated by Application
Command no. 0065h
Extended Header Fault information
Message data Name + Path of source and destination, both NULL terminated
Response data The response data is a copy of the command data.
Description
This command renames a file in the filesystem.
Note: Although the filesystem supports path lengths of up to 256 characters, the total length of the two
pathnames summed together must be less than 256 characters when using this command due to limita-
tions in the mailbox command structure.
Initiated by Application
Command no. 0066h
Extended Header Fault information
Message data Name + Path of source and destination, both NULL terminated
Response data The response data is a copy of the command data.
Description
This command copies a file in the filesystem to a specified location.
Note: Although the filesystem supports path lengths of up to 256 characters, the total length of the
source and destination paths summed together must be less than 256 characters when using this com-
mand due to limitations in the mailbox command structure.
Initiated by Application
Command no. 0067h
Extended Header Fault information
Message data Name + Path of source and destination, both NULL terminated
Response data The response data is a copy of the command data.
Description
This command creates a directory in the file system.
Initiated by Application
Command no. 0068h
Extended Header Fault information
Message data Path and name of the new directory, null terminated.
Response data The response data is a copy of the command data.
Description
This command deletes an empty directory from the file system.
Initiated by Application
Command no. 0069h
Extended Header -
Message data Path and name of the directory, null terminated.
Response data The response data is a copy of the command data.
Description
This command opens a directory and returns a descriptor that should be used on all further operations
on the directory.
See also 10-36 “Reading the Contents of a Directory”.
Initiated by Application
Command no. 006Ah
Extended Header -
Message data Path and name of the directory, null terminated.
Response data Directory handle & Fault information
• Directory Handle
Unique identifier which must be used on all further operations associated with the directory.
10-35
Description
This command reads the contents of a directory previously opened using DIR_OPEN. This must be
repeated until the response to the command is empty (i.e. until the response data size equals zero).
See also 10-36 “Reading the Contents of a Directory”.
Initiated by Application
Command no. 006Bh
Extended Header Directory Handle & Fault information
Message data -
Response data Details about one object in the directory.
• Directory Handle
Unique identifier which must be used on all further operations associated with the directory.
• Object Size
Size of object (i.e. filesize).
• Object Flags
Various flags specifying the nature of the object:
b7 b6 b5 b4 b3 b2 b1 b0
(reserved) SYS H RO DIR
Bit Description
DIR Directory flag 0: Object is a file
1: Object is a directory
RO Read only 0: Object can be read or written
1: Object is read-only
H Hidden 0: Object is visible
1: Object is hidden
SYS System 0: User object
1: System object
• Object Name
Name of object, null-terminated (e.g. filename or directory name).
6WDUW
2SHQGLUHFWRU\
XVLQJ',5B23(1
5HDGRQHGLUHFWRU\REMHFW
XVLQJ',5B5($'
SURFHVVGLUHFWRU\REMHFW
5HVSRQVHVL]H 1R
]HUR"
<HV
&ORVHWKHGLUHFWRU\
XVLQJ',5B&/26(
'RQH
10-37
Description
This command closes a directory previously opened using DIR_OPEN.
See also 10-36 “Reading the Contents of a Directory”.
Initiated by Application
Command no. 006Ch
Extended Header Directory Handle & Fault information
Message data -
Response data -
Description
This command mounts the RAM disc into a specified directory in the file system.
• The directory must be empty
• If the directory doesn’t exist it will be created.
Initiated by Application
Command no. 0018h
Extended Header -
Message data String containing RAM disc location, null terminated
Response data The response data is a copy of the command data.
• Path
RAM-disc location. Must be empty, or the command will fail.
10-39
Description
This mailbox command configures the timeout value used for Modbus/TCP connections. If an estab-
lished Modbus/TCP connection does not receive a request within the specified time, the connection will
be shut down by the Modbus/TCP server.
Valid timeout values are:
• 0 - No timeout is used for Modbus connections
• 10 - 65535 - Timeout value in seconds.
The default value is 60 seconds.
Note: This command may only be issued during initialization.
Initiated by Application
Command no. 0020h
Extended Header -
Message data Timeout value
Response data (the response holds a copy of the command data)
Description
This mailbox command disables the Modbus/TCP server.
Note: This may only be issued during initialization.
Initiated by Application
Command no. 0021h
Extended Header -
Message data -
Response data -
Description
This command configures the Modbus ON/OFF line setting.
Note: This command overrides the configuration stored in the configuration file ‘ethcfg.cfg’.
Initiated by Application
Command no. 0023h
Extended Header Time out value.
List of triggering modbus commands (up to 11 entries).
Message data
Data size = 0 = trigger for all commands.
Response data (the response holds a copy of the command data)
• Timeout Value
A value of 1 equals 100ms.
A value of 0 configures the ON/OFF line functionality to be triggered by the Link Status.
• Trigger Commands
Trigger Command = Modbus function code to trigger from
10-43
Description
This command is used to define the response to the Modbus command ‘Read exception status’ (FC7).
This means that the exception status value is set by the application, not by the Anybus module.
Initiated by Application
Command no. 0022h
Extended Header -
Message data Exception status byte
Response data (the response holds a copy of the command data)
Description
This command causes the module to operate in Modbus Address Mode, and defines part of the Input/
Output Areas as coil based.
See also...
• 2-2 “Modbus/TCP”
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 0024h
Extended Header -
Message data Coil Size In, Coil Size Out
Response data (the response holds a copy of the command data)
• Coil Size In
Number of bytes in the Input Area that shall be treated as coils.
Deregister Class
De-registers a previously registered class from the message router 10-61
(DEREGISTER_CLASS)
Enable Routing
Enables the routing and bridging functionality 10-62
(ENABLE_ROUTING)
10-63
Register Port (REGISTER_PORT) Registers a port in the port object
Route Unconnected Send Issued by the module upon receiving an unconnected send mes-
10-66
(ROUTE_REQUEST) sage
Enable Reset Notification
Enables Identity Object reset notification 10-68
(ENABLE_ID_RESET_NOTIFY)
Reset Notification
Reset notification 10-69
(ID_RESET_NOTIFY)
Get Reset Parameter
Get reset parameter 10-70
(GET_ID_RESET_PARAM)
Copy I/O Status
Changes the default behaviour regarding the I/O Status bytes 10-71
(COPY_IO_STATUS)
Disable EtherNet/IP
Disables the EtherNet/IP protocol support 10-72
(DISABLE_ETHERNET_IP)
Change Ethernet Port
Changes the port number reported in the Port Object 10-73
(CHANGE_ETHERNET_PORT)
Reset on IP Change Causes the module to issue a reset request to the identity object
10-74
(RST_ON_IP_CHANGE) when the IP configuration has been changed over EtherNet/IP
Enable Configuration Assembly Enables the application to take advantage of the configuration data
10-75
(ENABLE_CONFIG_SY) in the Forward_Open-request.
Configuration Assembly Request
Issued by the module upon receiving the Forward_Open-request 10-76
(CONFIG_SY_REQUEST)
Enable Exact IO Match Forces the module to only accept IO connection requests which
10-77
(ENABLE_IO_MATCH) exactly matches the sizes specified in Anybus_INIT
10-46
Description
This command is used to change Vendor ID, Device Type, Product Code, Major Revision, Minor Re-
vision, and Product Name in the Identity object to customize the developed product. Note that the
EDS-file must be modified accordingly.
Contact HMS for more information about obtaining a Product Code.
Note: This command can only be issued during module initialisation.
Initiated by Application
Command no. 0089h
Extended Header -
Vendor ID, Device Type, Product Code, Major/Minor Revision, Name length,
Message data
Name (ascii)
Response data (the response holds a copy of the command data)
Description
This mailbox command is used to customize the Vendor ID, Product Code and Product Name in the
Identity object. The EDS file needs to be adjusted accordingly.
Contact HMS for more information about obtaining a Product Code.
Note: This command can only be issued during module initialisation.
Initiated by Application
Command no. 0082h
Extended Header -
Message data Vendor ID, Product code, Name length, Name
Response data (the response holds a copy of the command data)
Description
This mailbox command is used to customize the Product Code of the module. This enables a configu-
ration tool to identify the product as a special implementation instead of a general Anybus-S module.
The EDS file needs to be adjusted accordingly.
Contact HMS for more information about obtaining a Product Code.
Note: This command can only be issued during module initialisation.
Initiated by Application
Command no. 0083h
Extended Header -
Message data Product code
Response data (the response holds a copy of the command data)
Description
This command maps blocks of Input Parameter Data to the Parameter Data Input Mapping Object, al-
lowing a ‘Get_Attribute_Single’-request to return a specified block of data. Up to 50 blocks can be
mapped this way.
Attributes are mapped in sequence, i.e. the first mapping specified corresponds to attribute #1, the sec-
ond to attribute #2 etc. The size and location of each block is specified separately for each attribute.
If zero length is specified for an attribute, that attribute will not be mapped. This way, it’s possible to for
example map only attributes 1 and 10 by specifying zero length for attributes 2 through 9. It is only nec-
essary to specify mapping information up to the last used attribute; the remainder will not be mapped.
If the mapping information for an attribute is invalid, the length and offset for that attribute will be set
to zero in the response, and the attribute will not be mapped.
See also...
• 9-12 “Parameter Data Input Mapping Object, Class B0h”
• 10-51 “Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP)”
Note: This command may only be issued during module initialisation, after Anybus_INIT.
Initiated by Application
Command no. 0084h
Extended Header Fault information
Message data Mapping information
Response data (the response holds a copy of the command data)
10-50
Command and response layout (example when only setting attribute 1-5)
Description
This command maps blocks of Output Parameter Data to the Parameter Data Output Mapping Object,
allowing a ‘Set_Attribute_Single’- or ‘Get_Attribute_Single’-request to set/return a specified block of
data. Up to 50 blocks can be mapped this way.
Attributes are mapped in sequence, i.e. the first mapping specified corresponds to attribute #1, the sec-
ond to attribute #2 etc. The size and location of each block is specified separately for each attribute.
If zero length is specified for an attribute, that attribute will not be mapped. This way, it’s possible to for
example map only attributes 1 and 10 by specifying zero length for attributes 2 through 9. It is only nec-
essary to specify mapping information up to the last used attribute; the remainder will not be mapped.
If the mapping information for an attribute is invalid, the length and offset for that attribute will be set
to zero in the response, and the attribute will not be mapped.
See also...
• 9-13 “Parameter Data Output Mapping Object, Class B1h”
• 10-49 “Parameter Data Input Mapping (PARAMETER_INPUT_MAP)”
Initiated by Application
Command no. 0085h
Extended Header Fault information
Message data Offset and length of the instances to map
Response data (the response holds a copy of the command data)
10-52
Command and response layout (example when only setting attribute 1-5)
Description
This command maps blocks of Input I/O Data to the I/O Data Input Mapping Object. Attributes are
mapped in sequence, i.e. the first mapping specified corresponds to attribute #1, the second to attribute
#2 etc. The size and location of each block is specified separately for each attribute. Up to 6 blocks can
be mapped this way.
The mapped attribute will be mirrored to the Assembly Object, instances 64h... 69h. If no mapping in-
formation is specified (i.e. if this command is never issued), all Input I/O data will be grouped in As-
sembly Object instance 64h.
If zero length is specified for an attribute, that attribute will not be mapped. This way, it’s possible to for
example map only attributes 1 and 6 by specifying zero length for attributes 2 through 5. It is only nec-
essary to specify mapping information up to the last used attribute; the remainder will not be mapped.
If the mapping information for an attribute is invalid, the length and offset for that attribute will be set
to zero in the response, and the attribute will not be mapped.
See also...
• 9-5 “Assembly Object, Class 04h”
• 9-10 “I/O Data Input Mapping Object, Class A0h”
• 10-55 “I/O Data Output Area Mapping (IO_OUTPUT_MAP)”
Note: This command may only be issued during module initialisation., after Anybus_INIT.
Initiated by Application
Command no. 0086h
Extended Header Fault information
Message data Offset and length of the instances to map
Response data (the response holds a copy of the command data)
10-54
Description
This command maps blocks of Output I/O Data to the I/O Data Output Mapping Object. Attributes
are mapped in sequence, i.e. the first mapping specified corresponds to attribute #1, the second to at-
tribute #2 etc. The size and location of each block is specified separately for each attribute. Up to 6
blocks can be mapped this way.
The mapped attribute will be mirrored to the Assembly Object, instances 96h... 6Bh. If no mapping in-
formation is specified (i.e. if this command is never issued), all Output I/O data will be grouped in As-
sembly Object instance 96h.
If zero length is specified for an attribute, that attribute will not be mapped. This way, it’s possible to for
example map only attributes 1 and 6 by specifying zero length for attributes 2 through 5. It is only nec-
essary to specify mapping information up to the last used attribute; the remainder will not be mapped.
If the mapping information for an attribute is invalid, the length and offset for that attribute will be set
to zero in the response, and the attribute will not be mapped.
See also...
• 9-5 “Assembly Object, Class 04h”
• 9-11 “I/O Data Output Mapping Object, Class A1h”
• 10-53 “I/O Data Input Area Mapping (IO_INPUT_MAP)”
Note: This command may only be issued during module initialisation., after Anybus_INIT.
Initiated by Application
Command no. 0087h
Extended Header Fault information
Message data Offset and length of the instances to map
Response data (the response holds a copy of the command data)
10-56
Description
This mailbox command is used to send an explicit unconnected message from the application directly
to a node in the network. The format of the message is the message router / request format. (For more
information, consult the EtherNet/IP Specification volume 1, section 2-4). This command will not re-
spond until the response from the remote host is received or a timeout has occurred.
Initiated by Application
Command no. 008Ah
Extended Header Destination IP address
Message data Unconnected message request
Response data Unconnected message response
Description
This message is used when the application has registered an EtherNet/IP class (See 10-60 “Register
Class (REGISTER_CLASS)”) in the module, and an explicit message request has been generated to this
class from a node in the EtherNet/IP network.
The format of the message is the message router / request format. (See EtherNet/IP Specification vol-
ume 1 section 2-4). The application will have to process the message, and respond to the module with
the data necessary to generate a response on the explicit message request for the object.
Initiated by Anybus
Command no. 008Dh
Extended Header -
Message data Explicit message request
Response data Requested data (or an error code)
Description
This mailbox command makes it possible for the application to register objects inside the message router
object. If there is a node on the network that sends an explicit message request to the module, address
to the registered class, the explicit message will generate an explicit message request telegram, which will
be sent from the module to the application. See 10-59 “UCMM Request (UCMM_REQUEST)”.
Initiated by Application
Command no. 008Bh
Extended Header -
Message data Class ID
Response data (the response holds a copy of the command data)
Description
This mailbox command makes it possible for the application to deregister objects inside the message
router object.
The following classes cannot be deregistered with this command;
• Class 02h - Message Router
• Class 04h - Assembly Object
Initiated by Application
Command no. 008Eh
Extended Header -
Message data Class ID
Response data (the response holds a copy of the command data)
Description
This mailbox command enables the routing functionality of the module.
Note: This command can only be sent during module initialization.
Initiated by Application
Command no. 0091h
Extended Header -
Message data -
Response data -
Description
This command is used to register a port in the Port Object (See EtherNet/IP specification vol. 1 chap-
ters 3 - 7). This must be done for each port in the application if routing is enabled. (See 10-62 “Enable
Routing (ENABLE_ROUTING)”). The message data shall contain the instance attributes 1, 2, 3, 4 and
7, in that order. The class attributes will be updated automatically after each received mailbox command.
Port 2 is reserved for the Anybus-S module, and it is not possible to register the same port twice.
Note: This command can only be sent during module initialization.
Initiated by Application
Command no. 0090h
Extended Header -
Message data Instance attributes 1,2,3,4 and 7.
Response data (the response holds a copy of the command data)
The [Port] section in the .EDS file should look like this to fit the example above:
[Port]
Port1 =
TCP, $ Port type
“TCP/IP”, $ Port name
“20 F5 24 01”, $ Path to object supporting this port
2; $ Port number
Port2 =
ControlNet, $ Port type
“ControlNet”, $ Port name
“20 F0 24 01”, $ Path to object supporting this port
3; $ Port number
10-66
Description
This mailbox message is generated by the module when it receives a valid unconnected send message,
i.e. a message addressed to a port registered by the application. The message data contains the whole
unconnected send message (See EtherNet/IP spec. Vol. 1 3-5.5.4). The response message from the ap-
plication shall contain either a successful or unsuccessful unconnected send response (See EtherNet/IP
spec. Vol. 1 3-5.5.4).
If 16 or more message requests are waiting to be processed by the application, the module will answer
with a “No resource” error code for all new requests until there are less than 16 unprocessed requests.
Note: This function requires routing to be enabled, see 10-62 “Enable Routing
(ENABLE_ROUTING)”.
Initiated by Anybus
Command no. 008Fh
Extended Header -
Message data The unconnected send message received by the module
Response data The application shall respond with the data returned by the target device.
10-67
Description
This command enables reset notification. When reset notification is enabled and the identity object re-
ceives a valid reset request, the module will send an ID_RESET_NOTIFY to the application. (See 10-
69 “Reset Notification (ID_RESET_NOTIFY)”)
It is possible to change how the module should react when the identity object receives a valid reset re-
quest, by altering the Notify Type Value (See below)
Note: This command can only be sent during module initialisation.
Initiated by Application
Command no. 0092h
Extended Header -
Message data Notify type
Response data (the response holds a copy of the command data)
Description
If reset notification is enabled (see 10-68 “Enable Reset Notification
(ENABLE_ID_RESET_NOTIFY)”), this mailbox message is sent to the applications when the identity
object receives a valid reset request.
The message data contains the type of reset received, see ENIP spec. 5-2.3.1 Reset Service.
Initiated by Anybus
Command no. 0093h
Extended Header -
Message data Reset Type
Response data (the response holds a copy of the command data)
Description
Using this command, it is possible to determine what type of reset that was received via EtherNet/IP
Initiated by Application
Command no. 0095h
Extended Header -
Message data -
Response data Reset Type
Description
When this message is sent to the module, the first four bytes in the connection a.k.a. Run/Idle header
is not stripped of the data but is passed to the DPRAM memory in front of the actual I/O data.
Initiated by Application
Command no. 0094h
Extended Header -
Message data -
Response data -
Description
This mailbox command disables support for the EtherNet/IP protocol.
Note: This command can only be sent during module initialization.
Initiated by Application
Command no. 000Ah
Extended Header -
Message data -
Response data -
Description
This command changes the port number reported by the Port Object.
Initiated by Application
Command no. 0096h
Extended Header -
Message data -
Response data -
• Port no.
Desired port number.
10-74
Description
This command instructs the module to issue a reset request towards the Identity Object when attribute
#5 in the TCP/IP Interface Object (TCP/IP Interface Object, Class F5h) has been altered. If the Iden-
tity Object is registered in the application, this causes a reset message to be sent to the application.
Initiated by Application
Command no. 0097h
Extended Header -
Message data -
Response data -
Description
This command enables the module (application) to take advantage of the configuration data in a
Forward_Open-request, and will cause the module to issue CONFIG_SY_REQUEST upon reception
of a Forward_Open-request that contains a data segment.
Note: This command may only be issued during initialization.
Initiated by Application
Command no. 0098h
Extended Header -
Message data -
Response data The response indicates if the command was accepted.
Description
If enabled, this command is issued spontaneously by the module upon reception of a Forward_Open-
request that contains a data segment.
Initiated by Anybus
Command no. 0099h
Extended Header -
Message data -
Response data -
• Fragment Type
Description
This command forces the module to only accept IO connection requests which exactly matches the sizes
specified in Anybus_INIT.
Note: This command may only be issued during module initialization.
Initiated by Application
Command no. 009Ah
Extended Header -
Message data -
Response data -
• Non-blocking
All mailbox operations on these sockets will respond directly - not block until the command is
performed. Up to 16 simultaneous non-blocking sockets are supported.
Note: Status information for all non-blocking sockets are available in the fieldbus specific area,
see 11-1 “Fieldbus Specific Area”.
• Blocking
Blocking sockets means that the Anybus will not respond to further socket commands until the
previous one has been completed (However, non-socket related commands can still be proc-
essed as normal). Up to 32 simultaneous blocking sockets are supported.
Note: Blocking sockets do not have any status information in the fieldbus specific area.
Description
This mailbox command creates a socket in non-blocking mode and associates it to a specific port
number. If the specified port number is 0, the Anybus module selects a free port.
The response message contains a socket descriptor and the port number. The socket descriptor shall be
used on all following operations on the socket.
Initiated by Application
Command no. 0040h
Extended Header -
Message data The socket type (TCP or UDP) and the port number to bind the socket to.
The response indicates if the command was accepted.
Response data The response indicates which socket descriptor that is used and the port
number the socket is associated to.
• Socket Type
Description
This mailbox command creates a socket in blocking mode and associates it to a specific port number. If
the specified port number is 0, the Anybus module selects a free port.
The response message contains a socket descriptor and the port number. This descriptor shall be used
on all following operations on this socket.
Initiated by Application
Command no. 003Fh
Extended Header -
Message data The socket type (TCP or UDP) and the port number to bind the socket to.
The response indicates if the command was accepted.
Response data The response indicates which socket descriptor that is used and the port
number the socket is associated to.
• Socket Type
Listen (LISTEN)
Description
This mailbox command makes a socket listen for new connections. If the Anybus module detects a con-
nection request on the specified socket, a new connected socket will be created, and the current socket
will continue listening for new connections. This means that multiple hosts can connect to one listening
socket simultaneously.
Note: This command can only be used on a TCP socket.
• Non-blocking sockets
Information about active connections on this socket can be read in the fieldbus specific area, see
11-1 “Memory Map” and 11-2 “Socket Status Structure”.
• Blocking sockets
Socket descriptors for new connections connected to this socket can be received by the mailbox
command ACCEPT, see 10-82 “Accept (ACCEPT)”.
Initiated by Application
Command no. 0041h
Extended Header Socket Descriptor, Fault Information
Message data -
Response data -
Accept (ACCEPT)
Description
When a connection request to a listening socket in blocking mode is received, this command receives
the socket descriptor of the newly created connected socket.
This command is blocking and will not respond until a connection request is received.
Initiated by Application
Command no. 0050h
Extended Header Socket Descriptor, Fault Information, Local Port no, Host Port no, Host IP
Message data -
Response data New socket descriptor
Connect (CONNECT)
Description
This mailbox command tries to establish a connection to a specified IP address and port number.
If the socket is of UDP type this command specifies the peer with which the socket is to be associated,
the address is to which datagrams are sent and the only address from which datagrams are received.
If the socket is of TCP type this command attempts to make a connection to another socket. TCP sock-
ets may CONNECT only once, while UDP sockets may use CONNECT multiple times to change their
association.
• Non-blocking sockets
If this command is correctly sent, it will be accepted regardless it’s possible to establish a con-
nection or not. The result of the operation is available in the fieldbus specific area, see 11-1
“Fieldbus Specific Area”.
• Blocking sockets
This command will block until a connection is established or the connection request is cancelled
due to timeout or connection error.
Initiated by Application
Command no. 0042h
Extended Header Socket Descriptor, Fault Information, Connection Result
Message data IP address, Port number
Response data (the response holds a copy of the command data)
10-84
Code Status
0003h Connected
0004h Connection Refused
0005h Connection Timeout
0006h Connection Failed
10-85
Send (SEND)
Description
This mailbox command writes data to a connected socket. A maximum of 256 bytes of data can be sent
using this command.
• Non-blocking sockets
If there isn’t enough space available for the data in the output buffers, the response will indicate
that the amount of data actually sent was less than requested.
• Blocking sockets
If there isn’t buffer space available for the data in the output buffers this command will block
until there is.
Initiated by Application
Command no. 0043h
Extended Header Socket Descriptor, Fault Information
Message data Data to send
Response data (the response holds a copy of the command data)
Receive (RECV)
Description
This mailbox command receives data from a connected socket.
If the specified socket is of TCP type this command will return the requested number of bytes from the
received data stream. If the available data is less than requested, all available data will be returned.
If the specified socket is of UDP type this command will return the requested amount of data from the
next received datagram. If the datagram is smaller than requested, the entire datagram will be returned
in the response message. If the datagram is larger than requested, the excess bytes will be discarded.
A maximum of 256 bytes of data can be received using this command.
• Non-blocking sockets
If no data is available on the socket the response will indicate that 0 bytes of data was received.
• Blocking sockets
If this command is called and no data is available the command will block until there is. If the
response indicates that 0 bytes of data was received the connection has been closed by the host.
The socket however is still valid and must be closed using the mailbox command CLOSE.
Initiated by Application
Command no. 0044h
Extended Header Socket Descriptor, Bytes to receive, Fault Information
Message data -
Response data Received data
Send To (SEND_TO)
Description
This mailbox command sends a UDP datagram to a specified IP address and port number. A maximum
of 256 bytes of data can be sent using this command. (Unconnected UDP sockets only)
Initiated by Application
Command no. 0045h
Extended Header Socket Descriptor, IP-address, Port number, Fault Information
Message data Data to send
Response data Sent data
Description
This mailbox command reads the next received datagram from a UDP type socket. The response mes-
sage contains the IP address and port number of the sender.
If the received datagram is smaller than requested, the entire datagram will be returned in the response
message. If the received datagram is larger than requested, the excess bytes will be discarded.
A maximum of 256 bytes of data can be received using this command.
• Non-blocking sockets
If the amount of data available on the socket is less than requested, this is reflected in the data
size of the response.
• Blocking sockets
If this command is called and no data is available the command will block until there is.
Initiated by Application
Command no. 0045h
Socket Descriptor, Bytes to receive, IP-address, Port number, Fault Informa-
Extended Header
tion
Message data -
Response data Received data
Close (CLOSE)
Description
This mailbox command causes a connected socket to shut down and release its socket descriptor.
• Blocking sockets
Commands still blocking on the socket when it is closed will be aborted and return indicating
0010h (Command aborted)
Note: If a host closes a TCP connection while there is still data available to read on the socket in the
client, the client socket will be indicated as connected until all data is read. In this case, if the client tries
to send data the mailbox response will report “Can’t send more”.
Initiated by Application
Command no. 0047h
Extended Header Socket Descriptor, Fault Information
Message data -
Response data -
Description
This mailbox command is used when sending messages larger than 256 bytes. Internally the fragments
are stored in a buffer until the last fragment is received. The message is then sent to the socket. The
maximum size of a fragmented message is 4096 bytes.
It is not possible to send multiple fragmented messages simultaneously. A fragmented message must be
completely sent before another fragmented message can be sent on the same or another socket.
• Non-blocking sockets
If there isn’t enough space available for the data in the output buffers, the response will indicate
that the amount of data actually sent was less than requested.
• Blocking sockets
If there isn’t buffer space available for the data in the output buffers this command will block
until there is.
Initiated by Application
Command no. 005Eh
Extended Header Socket descriptor, Fragment Type
Message data Data to send
Response data Sent Data
Value Description
0000h First fragment of a new message
0001h Subsequent fragment of the message
0002h Last fragment of the message. When this fragment is sent the entire message will be
sent to the socket.
10-91
Description
This mailbox command is used to receive fragmented messages larger than 256 bytes from a connected
socket. Internally the entire message will be read from the socket to a buffer. The fragments of the mes-
sage can then be read from the buffer using this command.
If the specified socket is of TCP type this command will return the requested number of bytes from the
received data stream. If the available data is less than requested, all available data will be returned.
If the specified socket is of UDP type this command will return the requested amount of data from the
next received datagram. If the datagram is smaller than requested, the entire datagram will be returned
in the response message. If the datagram is larger than requested, the excess bytes will be discarded.
The maximum size of a fragmented message is 4096 bytes.
• Non-blocking sockets
If no data is available on the socket the response will indicate that 0 bytes of data was received.
• Blocking sockets
If no data is available the command will block until there is. If the response indicates that 0 bytes
of data was received the connection has been closed by the host. The socket however is still valid
and must be closed using the mailbox command CLOSE.
Initiated by Application
Command no. 005Fh
Extended Header Socket descriptor, Fragment Type, Receive Data Size, Bytes Remaining,
Fault information
Message data -
Response data Received Data
10-92
Value Description
0000h Receive first fragment of a new message. This receives a new message from the net-
work. Any unread fragments from earlier received datagrams will be overwritten.
0001h Receive the next fragment of the message.
10-93
Description
This mailbox command sends a UDP datagram to a specified IP address and port number. This com-
mand is used when sending a fragment of a message larger than 256 byte. Internally the fragments are
stored in a buffer until the last fragment is received. The message is then sent to the socket. The maxi-
mum size of a fragmented message is 4096 bytes.
Initiated by Application
Command no. 005Ch
Extended Header Socket descriptor, Fragment Type, IP-address, Port number, No. of sent
bytes, Fault information
Message data Data to send
Response data Sent data
Value Description
0000h First fragment of a new message.
0001h Subsequent fragment of the message
0002h Last fragment of the message. When this fragment is sent the entire message will be
sent to the socket.
10-94
Description
This mailbox command reads the next received datagram from a UDP type socket. The response mes-
sage contains the IP address and port number of the sender.
This command is used to receive a fragment of a message larger than 256 bytes. The maximum total size
of a fragmented message is 4096 bytes. The maximal size of each fragment is 256 bytes.
If the received datagram is smaller than requested, the entire datagram will be returned in the response
message. If the received datagram is larger than requested, the excess bytes will be discarded.
For blocking sockets, the first fragment will block until there is data available on the socket.
Internally the entire message is read from the socket to a buffer. The fragments can then be read from
the buffer using this command.
• Non-blocking sockets
If no data is available on the socket the response will indicate that 0 bytes of data was received.
• Blocking sockets
If this command is called but there is no data available on the socket the command will block
and not return until there is data available.
Initiated by Application
Command no. 005Dh
Extended Header Socket descriptor, Fragment Type, Received data size, Bytes remaining, IP-
address, port number, Fault information
Message data -
Response data Received data
10-95
Value Description
0000h Receive first fragment of a new message. This receives a new message from the net-
work. Any unread fragments from earlier received datagrams will be overwritten.
0001h Receive the next fragment of the message.
10-96
Description
This command reads options from a socket.
Initiated by Application
Command no. 0051h
Extended Header Socket descriptor, Socket Option
Message data -
Response data Option Data
• Socket Options
Value Description
0000 0080h Get socket linger option (On/OFF and linger time)
0000 0008h Get socket keep-alive option (ON/OFF)
0000 0004h Get socket reuse address option (ON/OFF)
0000 000Ah Get multicast TTL value
0000 000Bh Get multicast loopback option
• Option Data
Data related to the specified socket option.
10-97
Description
This command changes the settings for a specified socket.
Initiated by Application
Command no. 0052h
Extended Header Socket descriptor, Socket Option
Message data Option Data
Response data -
• Socket Options
Value Description
0000 0080h Get socket linger option (On/OFF and linger time)
0000 0008h Get socket keep-alive option (ON/OFF)
0000 0004h Get socket reuse address option (ON/OFF)
0000 000Ah Get multicast TTL value
0000 000Bh Get multicast loopback option
0000 000Ch Add multicast membership to the socket
0000 000Dh Drop multicast membership from the socket
0000 2002h Turns off delayed ACKs (nagle algorithm)
• Option Data
Data related to the specified socket option.
10-98
Other Commands
Commands in this category:
Description
This command alters the behaviour of the Link and Activity LEDs.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 0017h
Extended Header -
Message data LED function
Response data (the response holds a copy of the command data)
Value Description
01h Led configuration 1 (Led 1 = Link, Led 4 = Activity)
02h Led configuration 2 (Led 1 = Link/Activity, Led 4 = Disabled)
10-100
Description
This function alters the behaviour of the Module Status LED.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 000Ch
Extended Header -
Message data LED function
Response data (the response holds a copy of the command data)
Value Description
01h Led configuration 1
02h Led configuration 2
03h Led configuration 3
04h Led configuration 4 (Disable)
10-101
Description
This function alters the behaviour of the Network Status LED.
Note: This command may only be issued during initialisation.
Initiated by Application
Command no. 000Dh
Extended Header -
Message data LED function
Response data (the response holds a copy of the command data)
Value Description
01h Led configuration 1
02h Led configuration 2
03h Led configuration 3
10-102
Description
This command returns the setting of the onboard switch.
Initiated by Application
Command no. 0012h
Extended Header -
Message data -
Response data Switch value
• Switch Value
b7 b6 b5 b4 b3 b2 b1 b0
Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 Switch 6 Switch 7 Switch 8
Description
This command sends a request to the configured DNS server for the IP address of a specified host.
Initiated by Application
Command no. 0030h
Extended Header -
Message data Host (string, null-terminated)
Response data IP address of host, or 0.0.0.0 if not found.
Description
This command sends an email to a specified recipient. The message data is sent as several fragments,
with a total maximum size of 1024 bytes. The maximum size of each fragment is 256 bytes.
Initiated by Application
Command no. 0070h
Extended Header Fault information
Message data Email message specification, fragmented.
Response data The response data is a copy of the command data.
• Fragment Type
This value must match the sequence of the fragments as follows:
Value Description
0000h This is the first fragment
0001h This is a subsequent fragment
0002h This is the last fragment
• SMTP Error
If an SMTP error occurred, the ‘SMTP Error’ word contains the error code from the SMTP serv-
er, see RFC 821 “Simple Mail Transfer Protocol” for more information.
• Fragment Data
The different parts of the email message shall be sent in the following order:
Description
This message is issued by the Anybus module when a SSI has requested data from the application.
Example:
The following SSI...
<?--#exec cmd_argument=’printf( “Data: %u”, MbReadWord( 42 ) )’-->
... will cause the module to issues a REQUEST_SSI_DATA message. The value ‘42’ will be
passed to the application.
Initiated by Anybus
Command no. 00A0h
Extended Header SSI Identifier
Message data SSI Data
Response data -
• SSI Identifier
Identifier which can be used as desired by the application to address a specific block of data.
• SSI Data
Data associated with the specified SSI Identifier.
10-107
Description
This message is issued by the Anybus module when a SSI writes data to the application.
Example:
The following SSI...
<?--#exec cmd_argument=’scanf( “Input”, ”%i”, MbWriteWord( 24 ) )’-->
... will cause the module to issues a WRITE_SSI_DATA message each time a form with an object
named “Input” is sent to the web server. The value ‘24’ will be passed to the application.
Initiated by Anybus
Command no. 00A0h
Extended Header SSI Identifier
Message data -
Response data SSI Data
• SSI Identifier
Identifier which can be used as desired by the application to address a specific block of data.
• SSI Data
Data associated with the specified SSI Identifier.
10-108
Description
This command writes data to the Output Area.
Initiated by Application
Command no. 00C0h
Extended Header Offset, No. of bytes
Message data Data
Response data The response data field holds a copy of the command data.
• Offset
Destination in Output Area.
• No. of Bytes
Number of bytes to write.
• Data
Data that shall be written.
Chapter 11
Memory Map
The Anybus module can handle 16 non-blocking sockets simultaneously. These can be accessed using
the mailbox socket interface to send and receive transparent data over the network. Information about
these 16 sockets can be read in the fieldbus specific area, see memory map below.
Socket Type
Value Description
00h No active socket (free to use)
01h TCP socket
02h UDP socket
03h - FFh (reserved)
Socket Status
Value Description
00h Not active
01h Listening
02h Connecting
03h Connected
04h Connection refused
05h Connection timed out
06h Connection failed
07h - FFh (reserved)
Socket Information
Bit Description
DA 0: Data Not Available
1: Data Available
Host IP-address
This is the host IP-address that the socket is associated with or connected to.
Fieldbus Specific Area 11-3
Status
Value Status
00h No connection
01h Connected
02h Connection time out
Appendix A
Miscellaneous
Fieldbus Type
The fieldbus type value for this product is 0083h.
Module Type
The module type value for this product is 0101h (Anybus-S).
Firmware Upgrade
The Anybus module supports firmware updates via FTP. Follow the steps below:
1. As a precaution, make a backup copy of the filesystem contents before proceeding.
2. Upload the new firmware file(s) to the system root (“\”), or to the ‘user\’-directory.
3. Reset the module and wait until the watchdog LED flashes 2Hz green (may take up to 1 minute).
4. Reset the module again. The new firmware is now operational.
Technical Specification
Electrical Specification
All Anybus-S/M modules feature cable shield filters designed in accordance with each network standard.
To be able to support this, the application must provide a connection to PE (Protective Earth) as de-
scribed in the general Anybus-S Parallel Design Guide. HMS cannot guarantee proper EMC behaviour
unless this requirement is fulfilled.
Power Supply
Supply Voltage
The module requires a regulated 5V power supply as specified in the Anybus-S Parallel Design Guide.
Power Consumption
The maximum power consumption is 450mA.
Environmental Specification
• Temperature
Test performed according to IEC-68-2-1 and IEC 68-2-2.
Operating: 0 to 70°C (32 to 158°F)
Storage: -25 to +85°C (-13 to 185°F)
• Humidity
The product is designed for a relative humidity of 5 to 95% non-condensing.
Test performed according to IEC 68-2-30.
• Emission: EN 50 081-2:1993
Tested per EN 55022 Class A: 1997
EN 55022 Class A: 1997
Connectors
Application Connector
(Consult the general Anybus-S Parallel Design Guide for more information)
Ethernet
The module supports RJ45 and board-to-board connectors:
RJ45 (Standard)
Pin Signal
1 TD+
2 TD-
3 RD+
4 Termination
5 Termination
1 8
6 RD-
7 Termination
8 Termination
Board to Board
Pin Signal
1 Shield
2 Termination (Connected to RJ45 pin 4 and 5)
3 Termination (Connected to RJ45 pin 4 and 5)
1
4 NC
5 TD+
6 TD-
7 RD+
8 Termination (Connected to RJ45 pin 7 and 8) 10
9 RD-
10 Termination (Connected to RJ45 pin 7 and 8)
Appendix D
Mechanical Specification
MM