Fieldbus Appendix Anybus-S EtherNet/IP Modbus/TCP, EtherNet/IP & IT Functionality Rev.1.54 HMS Industrial Networks AB Germany + 49 - 721 - 96472 - 0 Japan + 81 - 45 - 478 -5340 Sweden + 46 - 35 - 17 29 20 U.S.A. + 1 - 312 - 829 - 0601 France + 33 - 3 89 32 76 76 Italy + 39 - 347 - 00894 - 70 China + 86 - 10 - 8532 - 3183 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] Table of Contents Table of Contents Preface About This Document How To Use This Document .............................................................................................................P-1 Important User Information...............................................................................................................P-1 Related Documents ..............................................................................................................................P-2 Document History................................................................................................................................P-2 Conventions & Terminology ..............................................................................................................P-3 Support ...................................................................................................................................................P-3 Chapter 1 About the Anybus-S EtherNet/IP Features .................................................................................................................................................. 1-1 Overview ................................................................................................................................................ 1-2 Status Indicators........................................................................................................................... 1-2 Chapter 2 Basic Operation EtherNet/IP .......................................................................................................................................... 2-1 General ........................................................................................................................................ 2-1 Data Exchange............................................................................................................................ 2-1 Implementation Notes................................................................................................................... 2-1 Modbus/TCP ........................................................................................................................................ 2-2 General ........................................................................................................................................ 2-2 Addressing Modes ........................................................................................................................ 2-2 Supported Exception Codes .......................................................................................................... 2-2 Anybus Addressing Mode (Default) ............................................................................................. 2-3 Modbus Addressing Mode ............................................................................................................ 2-4 Filesystem............................................................................................................................................... 2-5 General ........................................................................................................................................ 2-5 Filesystem Overview ...................................................................................................................... 2-6 System Files.................................................................................................................................. 2-6 Chapter 3 Basic Network Configuration TCP/IP Settings.................................................................................................................................... 3-1 Ethernet Configuration File (‘ethcfg.cfg’)......................................................................................... 3-2 General ........................................................................................................................................ 3-2 IP Access Control ................................................................................................................................. 3-3 On/Off Line Configuration................................................................................................................ 3-4 Anybus IPconfig (HICP) ..................................................................................................................... 3-5 ARP Gleaning........................................................................................................................................ 3-5 Chapter 4 FTP Server General ................................................................................................................................................... 4-1 Table of Contents II Chapter 5 Telnet Server General ................................................................................................................................................... 5-1 General Commands.............................................................................................................................. 5-2 Diagnostic Commands......................................................................................................................... 5-3 File System Operations ........................................................................................................................ 5-3 Chapter 6 Web Server General ................................................................................................................................................... 6-1 Authorization......................................................................................................................................... 6-2 Content Types ....................................................................................................................................... 6-3 Chapter 7 SMTP Client General ................................................................................................................................................... 7-1 Email Definitions.................................................................................................................................. 7-2 Chapter 8 Server Side Include (SSI) Functions................................................................................................................................................ 8-2 Changing SSI output .......................................................................................................................... 8-10 SSI Output String File............................................................................................................... 8-10 Temporary SSI Output change.................................................................................................... 8-11 Chapter 9 CIP Object Implementation General ................................................................................................................................................... 9-1 Identity Object, Class 01h ................................................................................................................... 9-2 General Information ..................................................................................................................... 9-2 Class Attributes ........................................................................................................................... 9-2 Instance Attributes ....................................................................................................................... 9-2 Device Status................................................................................................................................ 9-3 Reset Service ................................................................................................................................. 9-3 Message Router, Class 02h .................................................................................................................. 9-4 General Information ..................................................................................................................... 9-4 Class Attributes ........................................................................................................................... 9-4 Instance Attributes ....................................................................................................................... 9-4 Assembly Object, Class 04h ................................................................................................................ 9-5 General Information ..................................................................................................................... 9-5 Class Attributes ........................................................................................................................... 9-5 Instance 03h Attributes (Heartbeat, Input-Only).......................................................................... 9-5 Instance 04h Attributes (Heartbeat, Listen-Only) ........................................................................ 9-5 Instance 05h Attributes (Configuration Data) .............................................................................. 9-5 Instance 64h... 69h Attributes (Producing Instances) .................................................................... 9-6 Instance 96h... 9Bh Attributes (Consuming Instance) ................................................................... 9-6 Connection Manager, Class 06h ......................................................................................................... 9-7 General Information ..................................................................................................................... 9-7 Instance Descriptions .................................................................................................................... 9-7 Class 1 Connection Details........................................................................................................... 9-7 Class 3 Connection Details........................................................................................................... 9-8 Table of Contents III Diagnostic Object, Class AAh ............................................................................................................ 9-9 General Information ..................................................................................................................... 9-9 Class Attributes ........................................................................................................................... 9-9 Instance Attributes, Instance 01h ................................................................................................. 9-9 I/O Data Input Mapping Object, Class A0h ................................................................................. 9-10 General Information ................................................................................................................... 9-10 Class Attributes ......................................................................................................................... 9-10 Instance Attributes, Instance 01h ............................................................................................... 9-10 I/O Data Output Mapping Object, Class A1h.............................................................................. 9-11 General Information ................................................................................................................... 9-11 Class Attributes ......................................................................................................................... 9-11 Instance Attributes, Instance 01h ............................................................................................... 9-11 Parameter Data Input Mapping Object, Class B0h....................................................................... 9-12 General Information ................................................................................................................... 9-12 Class Attributes ......................................................................................................................... 9-12 Instance Attributes, Instance 01h ............................................................................................... 9-12 Parameter Data Output Mapping Object, Class B1h.................................................................... 9-13 General Information ................................................................................................................... 9-13 Class Attributes ......................................................................................................................... 9-13 Instance Attributes, Instance 01h ............................................................................................... 9-13 Port Object, Class F4h....................................................................................................................... 9-14 General Information ................................................................................................................... 9-14 Class Attributes ......................................................................................................................... 9-14 Instance Attributes, Instance 02h ............................................................................................... 9-14 TCP/IP Interface Object, Class F5h ............................................................................................... 9-15 General Information ................................................................................................................... 9-15 Class Attributes ......................................................................................................................... 9-15 Instance Attributes ..................................................................................................................... 9-15 Ethernet Link Object, Class F6h...................................................................................................... 9-16 General Information ................................................................................................................... 9-16 Class Attributes ......................................................................................................................... 9-16 Instance Attributes ..................................................................................................................... 9-16 Chapter 10 Fieldbus Specific Mailbox Commands Fault Information................................................................................................................................ 10-1 Table of Contents IV General Configuration Commands.................................................................................................. 10-2 Set Ethernet Configuration (SET_ETN_CONFIG)............................................................... 10-3 Read Ethernet Configuration (READ_ETN_CONFIG)....................................................... 10-4 Get MAC Address (GET_MAC_ADDR)............................................................................ 10-5 Connection Timeout (CONNECT_TIMEOUT) .................................................................... 10-6 Set Host and Domain (SET_HOST_DOMAIN).................................................................. 10-7 Get Host and Domain (GET_HOST_DOMAIN) ................................................................ 10-8 Disable / Enable ARP Config (ARP_CFG_CONTROL) ................................................... 10-9 Disable / Enable HICP (HICP_CFG_CONTROL) ......................................................... 10-10 Disable DHCP (DISABLE_DHCP) .................................................................................. 10-11 Set DNS Server Settings (SET_DNS_SERVERS) ............................................................ 10-12 Get DNS Server Settings (GET_DNS_SERVERS)........................................................... 10-13 Set SMTP Server (SET_SMTP_SERVER)........................................................................ 10-14 Set SMTP Server by Name (SET_SMTP_SERVER_NAME) ........................................ 10-15 Get SMTP Server (GET_SMTP_SERVER)...................................................................... 10-16 Disable Web Server (DISABLE_WEB_SERVER)........................................................... 10-17 Enable Web Server (ENABLE_WEB_SERVER)............................................................ 10-18 Disable FTP server (DISABLE_FTP_SERVER) ............................................................. 10-19 Disable Telnet Server (DISABLE_TELNET_SERVER) ................................................ 10-20 Global Admin Mode (GLOBAL_ADMIN_MODE)......................................................... 10-21 Disable Virtual File System (DISABLE_VFS) ................................................................... 10-22 Mailbox File System Interface......................................................................................................... 10-23 Open File (FILE_OPEN)..................................................................................................... 10-24 Close File (FILE_CLOSE)................................................................................................... 10-25 Read File (FILE_READ)..................................................................................................... 10-26 Write File (FILE_WRITE) .................................................................................................. 10-27 Delete File (FILE_DELETE) ............................................................................................. 10-28 Move File (FILE_MOVE) ................................................................................................... 10-29 Rename File (FILE_RENAME) ......................................................................................... 10-30 Copy File (FILE_COPY) ...................................................................................................... 10-31 Create Directory (DIR_CREATE)........................................................................................ 10-32 Delete Directory (DIR_DELETE) ........................................................................................ 10-33 Open Directory (DIR_OPEN) ............................................................................................... 10-34 Read Directory (DIR_READ) ............................................................................................... 10-35 Close Directory (DIR_CLOSE) ............................................................................................. 10-37 Create RAM disc (CREATE_RAM_DISC) ...................................................................... 10-38 Modbus/TCP Specific Commands................................................................................................ 10-39 Modbus Connection Timeout (MB_CONN_TIMEOUT)..................................................... 10-40 Disable Modbus/TCP server (DISABLE_MB_TCP).......................................................... 10-41 Modbus ON/OFF Line Configuration (MB_ON_OFF_LINE_CONFIG) ..................... 10-42 Write Exception Status (WR_EXP_STAT)......................................................................... 10-43 Set Modbus Coil Area Size (MB_SET_COIL_AREA_SIZE).......................................... 10-44 Table of Contents V EtherNet/IP Specific Commands..................................................................................................10-45 Set Product Info All (PRODUCT_INFO_ALL) ................................................................ 10-46 Set Product Info (SET_PRODUCT_INFO) ........................................................................ 10-47 Set Product Code (SET_PRODUCT_CODE) ..................................................................... 10-48 Parameter Data Input Mapping (PARAMETER_INPUT_MAP) .................................... 10-49 Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP) .................... 10-51 I/O Data Input Area Mapping (IO_INPUT_MAP)........................................................... 10-53 I/O Data Output Area Mapping (IO_OUTPUT_MAP) .................................................... 10-55 Send UCMM (SEND_UCMM) .......................................................................................... 10-57 UCMM Request (UCMM_REQUEST).............................................................................. 10-59 Register Class (REGISTER_CLASS).................................................................................. 10-60 Deregister Class (DEREGISTER_CLASS) ........................................................................ 10-61 Enable Routing (ENABLE_ROUTING) ........................................................................... 10-62 Register Port (REGISTER_PORT) ...................................................................................... 10-63 Route Unconnected Send (ROUTE_REQUEST).................................................................. 10-66 Enable Reset Notification (ENABLE_ID_RESET_NOTIFY) ........................................ 10-68 Reset Notification (ID_RESET_NOTIFY).......................................................................... 10-69 Get Reset Parameter (GET_ID_RESET_PARAM)........................................................... 10-70 Copy I/O Status (COPY_IO_STATUS) ............................................................................. 10-71 Disable EtherNet/IP (DISABLE_ETHERNET_IP) ...................................................... 10-72 Change Ethernet Port (CHANGE_ETHERNET_PORT) ............................................... 10-73 Reset on IP Change (RST_ON_IP_CHANGE).................................................................. 10-74 Enable Configuration Assembly (ENABLE_CONFIG_SY) .............................................. 10-75 Configuration Assembly Request (CONFIG_SY_REQUEST)............................................ 10-76 Enable Exact IO Match (ENABLE_IO_MATCH).......................................................... 10-77 Mailbox Socket Interface ................................................................................................................. 10-78 Socket Non-Blocking (SOCKET_NB)................................................................................... 10-79 Socket Blocking (SOCKET_B)............................................................................................... 10-80 Listen (LISTEN) ................................................................................................................... 10-81 Accept (ACCEPT) ................................................................................................................. 10-82 Connect (CONNECT) ........................................................................................................... 10-83 Send (SEND) ......................................................................................................................... 10-85 Receive (RECV)...................................................................................................................... 10-86 Send To (SEND_TO)............................................................................................................ 10-87 Receive From (RECV_FROM) ............................................................................................. 10-88 Close (CLOSE) ...................................................................................................................... 10-89 Send Fragment (SEND_FRAG)........................................................................................... 10-90 Receive Fragment (RECV_FRAG) ....................................................................................... 10-91 Send Fragment To (SEND_FRAG_TO) ............................................................................. 10-93 Receive Fragment From (RECV_FRAG_FROM) ............................................................... 10-94 Get Socket Option (GET_SOCKET_OPTION) ................................................................. 10-96 Set Socket Option (SET_SOCKET_OPTION) ................................................................... 10-97 Socket Options ......................................................................................................................... 10-98 Other Commands ...........................................................................................................................10-101 Alter LNK and ACT LED Functionality (ALT_LNK_ACT_LEDS)..........................10-102 Alter Module Status LED Functionality (ALT_MS_LED_FUNCTION).....................10-103 Alter Network Status LED Functionality (ALT_NS_LED_FUNCTION)...................10-104 Get DIP Switch (GET_DIP_SWITCH)............................................................................10-105 DNS Request (DNS_REQUEST).....................................................................................10-106 Send Email (SEND_EMAIL) ...........................................................................................10-107 Request SSI Data (REQUEST_SSI_DATA) ..................................................................10-109 Write SSI Data (WRITE_SSI_DATA)............................................................................10-110 Write Output Area (WRITE_OUTPUT_AREA) ...........................................................10-111 Table of Contents VI Chapter 11 Fieldbus Specific Area Memory Map ....................................................................................................................................... 11-1 Socket Status Structure....................................................................................................................... 11-2 Network Status.................................................................................................................................... 11-3 EtherNet/IP Status ............................................................................................................................ 11-3 Appendix A Miscellaneous Control Register Area.......................................................................................................................... A-1 Firmware Upgrade ............................................................................................................................... A-2 Formatting the File System ................................................................................................................ A-2 IP-related implementation details...................................................................................................... A-2 Appendix B Technical Specification Electrical Specification .........................................................................................................................B-1 Protective Earth (PE) Requirements.............................................................................................B-1 Isolation .......................................................................................................................................B-1 Power Supply................................................................................................................................B-1 Environmental Specification...............................................................................................................B-2 Regulatory Compliance ........................................................................................................................B-2 Appendix C Connectors Application Connector........................................................................................................................ C-1 Ethernet................................................................................................................................................. C-1 Appendix D Mechanical Specification Measurements, Connectors & LEDs................................................................................................D-1 Preface About This Document How To Use This Document This document is intended to be used in conjunction with the Anybus-S Parallel Design Guide. The reader of this document is expected to have basic knowledge in the EtherNet/IP and Modbus/TCP networking systems, and communication systems in general. Please consult the general Anybus-S Parallel Design Guide for general information about the Anybus-S platform. Note: This document describes the functionality provided by the latest firmware release. Some features may be missing or working somewhat differently in older firmware releases. Please contact HMS to obtain the latest version. Important User Information The data and illustrations found in this document are not binding. We, HMS Industrial Networks AB, reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be considered as a commitment by HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for any errors that may appear in this document. There are many applications of this product. Those responsible for the use of this device must ensure that all the necessary steps have been taken to verify that the application meets all performance and safety requirements including any applicable laws, regulations, codes, and standards. Anybus® is a registered trademark of HMS Industrial Networks AB. All other trademarks are the property of their respective holders. The examples and illustrations in this document are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular implementation, HMS cannot assume responsibility or liability for actual use based on these examples and illustrations. Warning: This is a class A product. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures. ESD Note: This product contains ESD (Electrostatic Discharge) sensitive parts that may be damaged if ESD control procedures are not followed. Static control precautions are required when handling the product. Failure to observe this may cause damage to the product. About This Document P-2 Related Documents Document name Open Modbus/TCP Specification RFC 821 RFC 1918 ENIP Specifications Anybus-S Parallel Design Guide Anybus-S Ethernet Development Specification v1.16 Author Schneider Automation Network Working Group ODVA HMS Document History Summary of Recent Changes (1.52... 1.54) Change Updated Frontpage contact info and support info Section ‘Preface’ - Updated Support Information - Updated User Information Corrected misspelled SSI command Corrected terms used for EtherNet/IP in sections ‘About the Anybus-S EtherNet/IP’ and ‘Basic Operation’ Corrected function code for Read/Write registers in section ‘Modbus Addressing Mode’ Section ‘Ethernet Link Object, Class F6h’ - Corrected class number for the Connection Manager - Corrected version of Ethernet link object Added Socket Option table in section ‘Mailbox Socket Interface’ Corrected addresses in section ‘Fieldbus Specific Area’ Page(s) 1 P-3 P-1 1-1, 2-1 2-4 9-7 9-16 10-98 11-1 Revision List Revision <1.30 1.30 1.31 1.32 1.40 1.50 1.51 1.52 Date 2003-05-23 2003-09-24 2003-10-15 2005-01-13 2006-06-22 2006-10-19 2007-01-19 Author(s) PeP PeP ToT PeP PeP PeP ToT 1.53 1.54 2008-10-15 HeS 2008-10-27 HeS Chapter(s) All 8, 3 10 All All 3, B, C 2, 3, 4, 5, 6, 11 All All Description (See previous versions) Major update Minor update Minor corrections in the response messages Misc. updates Major update/rewrite Misc. minor corrections & updates Added connection limits for the onboard TCP servers, additions and corrections to the fieldbus-specific area Misc. minor corrections & updates Misc. minor corrections & updates About This Document P-3 Conventions & Terminology The following conventions are used throughout this document: • Numbered lists provide sequential steps • Bulleted lists provide information, not procedural steps • Mailbox commands that must to be sent “during module initialization” must be sent between the “START_INIT” and “END_INIT” commands. • The term ‘module’ is used when referring to the ABS-EIP-2. • The term ‘application’ is used when referring to the hardware that is connected to the Anybus Application Connector. • Hexadecimal values are written in the format NNNNh or 0xNNNN, where NNNN is the hexadecimal value. • Binary values are written in the format NNNNb, where NNNN is the binary value. • All pictures in this manual shows the standard version of this product. However, other connectors, leds and switches may be present depending on configuration. • 16/32 bit values are written in big endian Motorola format • Floating point values are in the IEEE Standard 754 format Support HMS Sweden (Head Office) E-mail: Phone: Fax: Online: [email protected] +46 (0) 35 - 17 29 20 +46 (0) 35 - 17 29 09 www.anybus.com HMS North America E-mail: Phone: Toll Free: Fax: Online: [email protected] +1-312-829-0605 888-8-Anybus +1-312-738-5873 www.anybus.com HMS Germany E-mail: Phone: Fax: Online: [email protected] +49-721-96472-0 +49-721-964-7210 www.anybus.com HMS Japan E-mail: Phone: Fax: Online: [email protected] +81-45-478-5340 +81-45-476-0315 www.anybus.com About This Document P-4 HMS China E-mail: Phone: Online: [email protected] +86 10 8532 3023 www.anybus.com HMS Italy E-mail: Phone: Fax: Online: [email protected] +39 039 59662 27 +39 039 59662 31 www.anybus.com HMS France E-mail: Phone: Fax: Online: [email protected] +33 (0) 3 89 32 76 41 +33 (0) 3 89 32 76 31 www.anybus.com Chapter 1 About the Anybus-S EtherNet/IP The Anybus-S EtherNet/IP communication module provides instant integration in any ethernet based lan via SMTP, FTP, Telnet, HTTP as well as EtherNet/IP and Modbus/TCP. Additional protocols can be implemented on top of TCP/IP or UDP using the transparent socket interface. The data exchange can be monitored via the built in web server, Modbus/TCP, or using event triggered email messages. SSI (Sever Side Include) technology enables web pages and email messages to carry dynamic content such as I/O data, configuration settings, or even application specific data passed to the Anybus module through the mailbox interface. As a member of the Anybus concept of interchangeable network products, the Anybus-S EtherNet/IP is compatible with any product that supports the Anybus-S application interface with only little or no software adjustments. 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 - Adapter class, Message server, Message client • Modbus/TCP server - Conforms to Modbus/TCP v1.0 About the Anybus-S EtherNet/IP 1-2 Overview 1 4 3 2 # 1 2 3 4 5 Description Application Connector Ethernet Connector Configuration Switch Anybus Watchdog Status Indicators Link (Activity) 1 2 Module Status Activity 4 3 Network Status 5 Comment See C-1 “Application Connector” See C-1 “Ethernet” 3-1 “TCP/IP Settings” Consult the general Anybus-S Parallel Design Guide for further information. 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 performed according to the EtherNet/IP specification. Link (Activity) The behaviour of this led can be altered, see 10-102 “Alter LNK and ACT LED Functionality (ALT_LNK_ACT_LEDS)”. • Led configuration 1 (Default) State Off Green • Description Link not sensed Link sensed Led configuration 2 State Off Green Green, flashing Description Link not sensed Link sensed 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 10103 “Alter Module Status LED Functionality (ALT_MS_LED_FUNCTION)”. • Led configuration 1 State Off Green (1Hz) Red (1Hz) Red (2Hz) Red (4Hz) Red • Led configuration 2 State Off Green Red telephone flash (2 flashes on, long off) Red telephone flash (3 flashes on, long off) Red telephone flash (4 flashes on, long off) Red telephone flash (5 flashes on, long off) • Description Operating at 10Mbit Operating at 100Mbit Invalid MAC address. Failed to load Ethernet configuration from FLASH Internal error (Fatal) Duplicate IP address detected Led configuration 3 (Default) State Off Green Green, flashing Red, flashing Red Alternating Green/Red • Description No power IP address not set using configuration switch. Invalid MAC address. (Internal Error) Failed to load Ethernet configuration from FLASH Internal error (Fatal) Duplicate IP address detected Description No power Controlled by a Scanner in Run state Not configured, or Scanner in Idle state A minor recoverable fault has been detected A major unrecoverable fault has been detected 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 10104 “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. • Led configuration 3 (Default) State Off Green Green, flashing Red Red, flashing Alternating Green/Red Description No power or no IP address On-line, one or more connections established (CIP Class 1 or 3) On-line, no connections established Duplicate IP address, fatal error One or more connections timed out (CIP Class 1 or 3) Self test in progress Activity The behaviour of this led can be altered, see 10-102 “Alter LNK and ACT LED Functionality (ALT_LNK_ACT_LEDS)”. • Led configuration 1 (Default) The Activity led flashes green each time a packet is received or transmitted. • 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 Common Industrial protocol (CIP) which is also the application layer for DeviceNet and ControlNet. The module acts as an adapter class product on the EtherNet/IP network. The Input- and Output Data is accessed using I/O connections or Explicit messages towards the Assembly Object and the Parameter Input/Output Mapping Objects. The following port numbers are used for EtherNet/IP communication: • Port 2222 (I/O Data) • Port 41818 (Encapsulated CIP messages) 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 Assembly Object. Parameter Data can be accessed acyclically via the Parameter Input- and Output Mapping Objects. See also... • 9-5 “Assembly Object, Class 04h” • 9-12 “Parameter Data Input Mapping Object, Class B0h” • 9-13 “Parameter Data Output Mapping Object, Class B1h” Implementation Notes Rockwell Automation PLCs uses the first four bytes consumed by a device defined for status information. 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 and the Modbus TCP server can handle a maximum of 8 simultaneous connections. For detailed information regarding the Modbus/ TCP protocol, consult the Open Modbus Specification. Addressing Modes The module features two different modes of operation regarding the Modbus/TCP communication: • Anybus Addressing Mode (Default) Compared to Modbus Addressing Mode, this mode allows data to be addressed in a more flexible manner. Note however that several function codes can be used to access the same data in the module. While this may appear confusing at first, it allows data to be manipulated in ways not possible in Modbus Addressing Mode (e.g. it is possible to manipulate individual bits of a register by accessing coils associated with the same memory location). See also... - 2-3 “Anybus Addressing Mode (Default)” • Modbus Addressing Mode In this mode, the Input- and Output Data areas are mapped to different function codes. See also... - 2-4 “Modbus Addressing Mode” See also... • 10-44 “Set Modbus Coil Area Size (MB_SET_COIL_AREA_SIZE)” Supported Exception Codes Code 0x01 0x02 0x03 Name Illegal function Illegal data address Illegal data value Description The function code in the query is not supported The data address received in the query is outside the initialized memory area The data in the request is illegal See also... • 10-43 “Write Exception Status (WR_EXP_STAT)” Basic Operation 2-3 Anybus Addressing Mode (Default) Supported Function Codes The following function codes can be used in this mode: Modbus Function Read Coil Read Input Discretes Read Multiple Registers Read Input Registers Write Coil Write Single Register Force Multiple Coils Force Multiple Registers Mask Write Register Read/Write Registers Function Code 1 2 3 4 5 6 15 16 22 23 Associated with... Input- and Output Data Output Data Input- and Output Data Coil & Register Map The data is mapped to Coils & Registers as follows: Register # 1 2 3 4 ... 1024 1025 1026 1027 1028 ... 2048 Coil # Area 1... 16 Input Data 17... 32 33... 48 49... 64 ... 16369... 16384 16385... 16400 Output Data 16401... 16416 16417... 16432 16433... 16448 ... 32753... 32768 Offset in Area 000h... 001h 002h... 003h 004h... 005h 006h... 007h ... 7FEh... 7FFh 000h... 001h 002h... 003h 004h... 005h 006h... 007h ... 7FEh... 7FFh Comments - - Note 1: The table above applies to all function codes. Note 2: Coils are mapped MSB first, i.e. coil #1 corresponds to bit 15 of register #1. Basic Operation 2-4 Modbus Addressing Mode Supported Function Codes The following function codes can be used in this mode: Modbus Function Read Multiple Registers Read Input Registers Write Single Register Force Multiple Registers Mask Write Register Read/Write Registers Function Code 3 4 6 16 22 23 Associated with... Output Data Input Data Output Data Input Data The Input Data is mapped to Coils & Registers as follows: Register # 1 2 3 5 1024 Input Data Bytes 000h + Coil Size In 002h + Coil Size In 004h + Coil Size In ... 7FEh + Coil Size In Comments Each register corresponds to two bytes of Input Data. Coil # 1... 8 9... 16 17... 24 ... 16377... 16384 Input Data Bytes 000h 001h 002h ... 7FFh Comments Each coil corresponds a single bit of Input Data. Note: Coils are mapped MSB first, i.e. coil #1 corresponds to the most significant bit of Input Data byte 000h Output Data The Output Data is mapped to Coils & Registers as follows: Register # 1 2 3 5 1024 Output Data Bytes 000h + Coil Size Out 002h + Coil Size Out 004h + Coil Size Out ... 7FEh + Coil Size Out Comments Each register corresponds to two bytes of Output Data. Coil # 1... 8 9... 16 17... 24 ... 16377... 16384 Output Data Byte 000h 001h 002h ... 7FFh Comments Each coil corresponds a single bit of Output Data Note: Coils are mapped MSB first, i.e. coil #1 corresponds to the most significant bit of Output Data byte 000h Basic Operation 2-5 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: • Non-volatile area (approx. 1Mb) This section is intended for static files such as web files, configuration files etc. • Volatile area (approx. 1Mb) This area is intended for temporary storage; data placed here will be lost in case of power loss or reset. Note that this area is not available by default, and must be mounted by the application during initialisation (see 10-38 “Create RAM disc (CREATE_RAM_DISC)”) 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 approximately 1000000 times due to the nature of this type of memory. The following operations will erase one or more FLASH segments: • Deleting, moving or renaming a file or directory • Writing or appending data to an existing file • Formatting the filesystem Basic Operation 2-6 Filesystem Overview (admin root) (user root) user ssi_str.cfg http.cfg ethcfg.cfg telwel.cfg pswd onoffln.cfg ip_accs.cfg RAM (protected) sys_pswd.cfg (volatile, optional) email email_1.cfg pswd (protected) . . . email_10.cfg ad_pswd.cfg email email_1.cfg . . . email_10.cfg 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 Microsoft 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 Basic Network Configuration TCP/IP Settings The module offers three modes of operation regarding the TCP/IP settings: • Settings specified via Mailbox Interface The application can specify the IP-settings during startup via the mailbox interface. Note that this overrides any settings specified by the on-board Configuration Switches (above) or in the ethernet configuration file (below). See also... - 10-3 “Set Ethernet Configuration (SET_ETN_CONFIG)” • Settings specified in Ethernet Configuration File (‘ethcfg.cfg’) If the on-board switches are set to 0 (zero), and no settings have been specified by the application during startup, the module will use the settings stored in the system file ‘ethcfg.cfg’. If this file is missing, the module will attempt to retrieve the settings via DHCP or HICP for 30 seconds. If no configuration has been received within this period, the module will halt and indicate an error on the on-board LEDs. Note: This file does not exist by default and has to be created by the user as necessary. See also... - 3-2 “Ethernet Configuration File (‘ethcfg.cfg’)” • Settings specified by Configuration Switches If no settings have been downloaded via the mailbox interface, the IP settings can be specified using the on-board switches. If set to a non-zero value, the module will use the following settings: IP Address: Gateway: Subnet: DHCP: 192.168.0.x 255.255.255.0 255.255.255.0 OFF (x = binary switch value) 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 192.168.0.42. 1 2 3 4 5 ON 6 7 8 (MSB) (LSB) 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 or gleaning, see 3-5 “Anybus IPconfig (HICP)” and 3-5 “ARP Gleaning”). Basic Network Configuration 3-2 Ethernet Configuration File (‘ethcfg.cfg’) General Basic network settings are stored in the system file ‘\ethcfg.cfg’. Note that the IP-settings may be specified by other sources, see 3-1 “TCP/IP Settings”. File Format: [IP address] xxx.xxx.xxx.xxx [Subnet mask] xxx.xxx.xxx.xxx [Gateway address} xxx.xxx.xxx.xxx • IP address • Subnet mask • Gateway address • DHCP/BootP ON - Enabled OFF - Disabled [DHCP/BOOTP] ON or OFF [Speed] Auto • Auto - Default. Auto negotiation will be used. 100 - Forces the module to operate only at 100mbit 10 - Forces the module to operate only at 10mbit [Duplex] Auto [SMTP address] xxx.xxx.xxx.xxx • [DNS1 address] xxx.xxx.xxx.xxx • [Host name] Anybus SMTP server/login settings Username and Password is only necessary if required by the server. • [DNS2 address] xxx.xxx.xxx.xxx [Domain name] domain Duplex Auto - Default. Auto negotiation will be used. Full - Forces the module to operate only at full duplex Half - Forces the module to operate only at half duplex [SMTP username] username [SMTP password] password Speed Primary and Secondary DNS Needed to be able to resolve host names • Default domain name for not fully qualified host names • Host name • HICP password [HICP password] password Note: This file does not exist by default and has to be created by the user as necessary. The settings in this file may also be affected by... • EtherNet/IP (See 3-1 “EtherNet/IP”). • HICP (See 3-5 “Anybus IPconfig (HICP)”) • SSI (See 8-1 “Server Side Include (SSI)”) See also... Basic Network Configuration 3-3 • 3-1 “TCP/IP Settings” • 4-1 “FTP Server” IP Access Control It is possible to specify which IP addresses that are permitted to connect to the module. This information is stored in the system file ‘\ip_accs.cfg’. File Format: [Web] xxx.xxx.xxx.xxx • Nodes listed here may access the web server [FTP] xxx.xxx.xxx.xxx • Nodes listed here may access the FTP server [Modbus/TCP] xxx.xxx.xxx.xxx • Nodes listed here may access the module via Modbus/TCP [EtherNet/IP] xxx.xxx.xxx.xxx • Nodes listed here may access the module via EtherNet/IP [Telnet] xxx.xxx.xxx.xxx • Nodes listed here may access the module via Telnet [All] xxx.xxx.xxx.xxx • Fallback setting, used by the module when one or several of the keys above are omitted. If this value is not specified, the module will accept all connections regardless of the other settings in this file. Note: ‘*’ may be used as a wildcard to select IP series. Basic Network Configuration 3-4 On/Off Line Configuration By default, the On/Off Line indication (Event Notification) is triggered by the Link Status. Other triggering options can however be specified in the system file ‘\onoffln.cfg’, which looks as follows: • File Format: [ON/OFF-line trigger] Modbus ON/OFF-line trigger source Values: ‘Link’ (default), ‘EIP’ and ‘Modbus’ • Timeout Value Range: 1... 65535 (default = 1). [Timeout] 10 [Commands] 3, 16, 23 A value of 10 equals 1000ms. • Commands (Optional) Selects what Modbus commands that must be received during the timeout period. If the keyword ‘ALL’ is given (default), the ON/OFF line functionality will trigger on all Modbus commands. Note 1: The keys ‘[Timeout]’ and ‘[Commands]’ shall only given if the ON/OFF-line Trigger value is set to ‘Modbus’. Note 2: 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-5 Anybus IPconfig (HICP) The module supports the HICP protocol used by the Anybus IPconfig utility from HMS, which can be downloaded free of charge from the HMS website. This utility may be used to configure the network settings of any Anybus product connected to the network. Note that if successful, this will replace the settings currently stored in the configuration file (‘ethcfg.cfg’). Upon starting the program, the network is scanned for Anybus products. The network can be rescanned at any time by clicking ‘Scan’. In the list of detected devices, the module will appear as ‘ABSEIP’. To alter its network settings, double-click on its entry in the list. A window will appear, containing the IP configuration and password settings. Validate the new settings by clicking ‘Set’, or click ‘Cancel’ to abort. Optionally, the configuration may be protected from unauthorized access by a password. To enter a password, click on the ‘Change password’ checkbox, and enter the password under ‘New password’. When protected, any changes in the configuration requires that the user supplies a valid password. When done, click ‘Set’. The adopted configuration will be stored in the ethernet configuration file. Note: The HICP protocol communicates over UDP port 3250. ARP Gleaning The module supports the Address Resolution Protocol (ARP), allowing the IP settings to be altered using the ARP-command on a PC. Syntax: arp -s <IP address> <MAC address> ping <IP address> arp -d <IP address> The ‘arp -s’ command stores the IP and MAC address in the PCs ARP-table. When the ‘ping’-command is issued, the PC will address the module with the new IP address; the module recognizes that it was addressed with the correct MAC address and adopts the new IP address from the ‘ping’ message. If successful, new settings will be stored in the ethernet configuration file as follows: IP Address: Gateway: Subnet: DHCP: xxx.xxx.xxx.xxx 0.0.0.0 255.255.255.0 OFF (value supplied in ARP command) (no gateway) Note: This functionality may cause problems if multiple devices continuously issue ‘ping’-messages towards the module. The reason for this lies in the very nature of this functionality; since the module adopts the IP address from all ‘ping’-messages, any additional ‘ping’-messages may cause the module to change back and forth between old and new settings. See also... • 10-9 “Disable / Enable ARP Config (ARP_CFG_CONTROL)” Chapter 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) The FTP server can handle a maximum of 16 simultaneous connections. 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: The format of these files are as follows: 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 FTP Connection Example (Windows Explorer) The built in FTP client in Windows Explorer can easily be used to access the file system as follows: 1. Open the Windows Explorer by right-clicking on the ‘Start’ button and selecting ‘Explore’. 2. In the address field, type FTP://<user>:<password>@<address> - Substitute <address> with the IP address of the Anybus module - Substitute <user> with the username - Substitute <password> with the password 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. The Telnet server can handle a maximum of 8 simultaneous connections. 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: help version exit - Help with menus - Display version information - Exit station program Also try ‘help [general|diagnostic|filesystem]’ 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 File System Operations For commands where filenames, directory names or paths shall be given as an argument the names can be written directly or within quotes. For names including spaces the filenames must be surrounded by quotes. It is also possible to use relative pathnames using ‘.’, ‘\’ and ’..’ 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 and can handle a maximum of 48 simultaneous connections. See also... • 10-17 “Disable Web Server (DISABLE_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’ Default Web Pages The Anybus module contains a set of virtual files that can be used when building a web page for configuration of network parameters. These virtual files can be overwritten (not erased) by placing files with the same name in the root of disc 0. This makes it possible to, for example, replace the HMS logo by uploading a new logo named ‘\logo.jpg’. It is also possible to make links from a web page to the virtual configuration page. In that case the link shall point to ‘\config.htm’. These virtual files are: \index.htm \config.htm \configform.htm \configform2.htm \store.htm \logo.jpg \configuration.gif \boarder.bg.gif \boarder_m_bg.gif - Points to the Configuration Configuration Configuration Configuration HMS logo Configuration picture picture contents of config.htm frame page form page form page store page picture Web Server 6-2 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 ... UsernameN:PasswordN [AuthName] (message goes here) • List of approved users. • Optionally, a login message can be specified by including the key [AuthName]. This message will be displayed by the web 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 protected 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: Content Type text/html image/gif image/jpeg image/x-png application/x-javascript text/plain application/x-zip-compressed application/octet-stream text/vnd.wap.wml application/vnd.wap.wmlc image/vnd.wap.wbmp text/vnd.wap.wmlscript application/vnd.wap.wmlscriptc text/xml application/pdf File Extension *.htm, *.html, *.shtm *.gif *.jpeg, *.jpg, *.jpe *.png *.js *.bat, *.txt, *.c, *.h, *.cpp, *.hpp *.zip *.exe, *.com *.wml *.wmlc *.wbmp *.wmls *.wmlsc *.xml *.pdf 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 (specified separately for each SSI function). See also... • 8-1 “Server Side Include (SSI)” • 10-107 “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... • 9-8 “Set SMTP Configuration (SET_SMTP_CONFIG)” • 10-107 “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 Key Area Offset Type Value Mask Operand To From Subject Headers Message Value Scanned for SSI Source area in DPRAM. Possible values are ‘IN’ or ‘OUT’ No Source offset, written in decimal or hexadecimal. Source data type. Possible values are ‘byte’, ‘word’, and ‘long’ Used as a reference value for comparison. Mask value, applied on the trigger source prior to comparison (logical AND). Possible values are ‘<‘, ‘=’ or ‘>’ Email recipient Yes Sender email address Email subject. One line only. Optional; may be used to provide additional headers. The actual message. Note: Hexadecimal values must be written with the prefix ‘0x’ in order to be recognized by the module. Chapter 8 Server Side Include (SSI) 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. Accepted fields in form: SetIp SetSubnet SetGateway SetEmailServer SetDhcpState - value "on" or "off" SetDNS1 SetDNS2 SetHostName SetDomainName SetSMTPUser SetSMTPPswd Default output: Invalid IP address! Invalid Subnet mask! Invalid Gateway address! Invalid IP address or Subnet mask! Invalid Email Server IP address! Invalid DHCP state! Invalid DNS1! Invalid DNS2! Configuration stored correctly. Failed to store configuration. GetText Note: This function cannot be used in email messages. Server Side Include (SSI) 8-5 This SSI function gets the text from an object and stores it in the OUT area. Syntax: <?--#exec cmd_argument=’GetText( "ObjName", OutWriteString ( offset ), n )’--> ObjName offset n - Name of object. - Specifies the offset from the beginning of the OUT area. - Specifies maximum number of characters to read (Optional) Default output: Success Failure - Write succeeded - Write failed 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: • Flags (in any order), which modify the specification: + (space) 0 # which specifies left adjustment of the converted argument in its field. which specifies that the number will always be printed with a sign if the first character is not a sign, a space will be prefixed. for numeric conversions, specifies padding to the field with leading zeroes. which specifies an alternate output form. For o, the first digit will be zero. For x or X, 0x or 0X will be prefixed to a non-zero result. For e, E,f, g and G, the output will always have a decimal point; for g and G, trailing zeros will not be removed. • A number specifying a minimum field width. The converted argument will be printed in a field at least this wide, and wider if necessary. If the converted argument has fewer characters than the field width it will be padded on the left (or right, if left adjustment has been requested) to make up the field width. The padding character is normally space, but can be 0 if the zero padding flag is present. • A period, which separates the field width from the precision. • A number, the precision, that specifies the maximum number of characters to be printed from a string, or the number of digits to be printed after the decimal point for e, E, or F conversions, or the number of significant digits for g or G conversion, or the minimum number of digits to be printed for an integer (leading 0s will be added to make up the necessary width) • 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 conversion character, the behaviour is undefined. Character d, i o x, X u c s f e, E g, G % Argument type, Converted to byte, short; decimal notation (For signed representation. Use signed argument) byte, short; octal notation (without a leading zero). byte, short; hexadecimal notation (without a leading 0x or 0X), using abcdef for 0x or ABCDEF for 0X. byte, short; decimal notation. byte, short;single character, after conversion to unsigned char. char*; characters from the string are printed until a "\0" is reached or until the number of characters indicated by the precision have been printed float; decimal notation of the form [-]mmm.ddd, where the number of d’s is specified by the precision. The default precision is 6; a precision of 0 suppresses the decimal point. float; decimal notation of the form [-]m.dddddd e+-xx or[-]m.ddddddE+-xx, where the number of d’s specified by the precision. The default precision is 6; a precision of 0 suppresses the decimal point. float; %e or %E is used if the exponent is less than -4 or greater than or equal to the precision; otherwise %f is used. Trailing zeros and trailing decimal point are not printed. no argument is converted; print a % The arguments that can be passed to the SSI function printf are: Argument InReadSByte(offset) InReadUByte(offset) InReadSWord(offset) InReadUWord(offset) InReadSLong(offset) InReadULong(offset) InReadString(offset) InReadFloat(offset) OutReadSByte(offset) OutReadUByte(offset) OutReadSWord(offset) OutReadUWord(offset) OutReadSLong(offset) OutReadULong(offset) OutReadString(offset) OutReadFloat(offset) MbReadSByte(id) MbReadUByte(id) MbReadSWord(id) MbReadUWord(id) MbReadSLong(id) MbReadULong(id) MbReadString(id) MbReadFloat(id) Description Read a signed byte from position offset in the IN area Read an unsigned byte from position offset in the IN area Read a signed word from position offset in the IN area Read an unsigned word from position offset in the IN area Read a signed longword from position offset in the IN area Read an unsigned longword from position offset in the IN area Read a string (char*) from position offset in the IN area Read a floating point (float) value from position offset in the IN area Read a signed byte from position offset in the OUT area Read an unsigned byte from position offset in the OUT area Read a signed word (short) from position offset in the OUT area Read an unsigned word (short) from position offset in the OUT area Read a signed longword (long) from position offset in the OUT area Read an unsigned longword (long) from position offset in the OUT area Read a null-terminated string from position offset in the OUT area Read a floating point (float) value from position offset in the OUT area Read a signed byte (short) from the application via the mailbox interface Read an unsigned byte (short) from the application via the mailbox interface Read a signed word from the application via the mailbox interface Read an unsigned word from the application via the mailbox interface Read a signed longword from the application via the mailbox interface Read an unsigned longword from the application via the mailbox interface Read a null-terminated string from the application via the mailbox interface Read a floating point (float) value from the application via the mailbox interface 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 format Arg1 - ArgN ErrVal1 -ErrValN - The name of the object with the passed data string - Specifies how the passed string shall be formatted - Specifies where to write the data - Optional; specifies the value/string to write in case of an error. Character Input, Argument Type d Decimal number; byte, short i Number, byte, short. The number may be in octal (leading 0(zero)) or hexadecimal (leading 0x or 0X) o Octal number (with or without leading zero); byte, short u Unsinged decimal number; unsigned byte, unsigned short x Hexadecimal number (with or without leading 0x or 0X); byte, short c Characters; char*. The next input characters (default 1) are placed at the indicated spot. The normal skip over white space is suppressed; to read the next non-white space character, use %1s. s Character string (not quoted); char*, pointing to an array of characters large enough for the string and a terminating "\0" that will be added. e, f, g Floating-point number with optional sign, optional decimal point and optional exponent; float* % Liteal %; no assignment is made. The conversion characters d, i, o, u and x may be preceded by l (letter ell) to indicate that a pointer to ‘long’ appears in the argument list rather than a ‘byte’ or a ‘short’ The arguments that can be passed to the SSI function scanf are: Argument OutWriteByte(offset) OutWriteWord(offset) OutWriteLong(offset) OutWriteString(offset) OutWriteFloat(offset) MbWriteByte(id) MbWriteWord(id) MbWriteLong(id) MbWriteString(id) MbWriteFloat(id) Default output: Write succeeded Write failed Description Write a byte to position offset in the OUT area Write a word to position offset in the OUT area Write a long to position offset in the OUT area Write a string to position offset in the OUT area Write a floating point value to position offset in the OUT area Write a byte to the application via the mailbox interface Write a word to the application via the mailbox interface Write a longword to the application via the mailbox interface Write a string to the application via the mailbox interface Write a floating point value to the application via the mailbox interface 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 Failure - <File content> - 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 written to the file "File name" separated by the "Separator" string. The [Append|Overwrite] parameter determines if the specified file shall be overwritten, or if the data in the file shall be appended. Syntax: <?--#exec cmd_argument=’SaveToFile( "File name", "Separator",[Append|Overwrite] )’--> Default output: Success Failure - Form saved to file - Failed to save form Server Side Include (SSI) 8-9 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 Failure - Form saved to file - Failed to save form DisplayRemoteUser Note: This function cannot be used in email messages. This SSI function returns the user name on an authentication session. Syntax: <?--#exec cmd_argument=’DisplayRemoteUser’--> Server Side Include (SSI) 8-10 Changing SSI output There is two methods of changing the output strings from SSI functions: 1. Changing SSI output defaults by creating a file called "\ssi_str.cfg" containing the output strings for all SSI functions in the system 2. Temporary changing the SSI output by calling the SSI function "SsiOutput()". SSI Output String File If the file "\ssi_str.cfg" is found in the file system and the file is correctly according to the specification below, the SSI functions will use the output strings specified in this file instead of the default strings. The files shall have the following format: [StoreEtnConfig] Success: "String to use on success" Invalid IP: "String to use when the IP address is invalid" Invalid Subnet: "String to use when the Subnet mask is invalid" Invalid Gateway: "String to use when the Gateway address is invalid" Invalid Email server: "String to use when the SMTP address is invalid" Invalid IP or Subnet: "String to use when the IP address and Subnet mask does not match" Invalid DNS1: "String to use when the primary DNS cannot be found" Invalid DNS2: "String to use when the secondary DNS cannot be found" Save Error: "String to use when storage fails" Invalid DHCP state: "String to use when the DHCP state is invalid" [scanf] Success: "String to use on success" Failure: "String to use on failure" [IncludeFile] Failure: "String to use when failure"1 [SaveToFile] Success: "String to use on success" Failure: "String to use on failure"1 [SaveDataToFile] Success: “String to use on success” Failure: “String to use on failure”1 [GetText] Success: “String to use on success” Failure: “String to use on failure” The contents of this file can be redirected by placing the line ‘[File path]’ on the first row, and a file path on the second. Example: [File path] \user\ssi_strings.cfg In this example, the settings described above will be loaded from the file ‘user\ssi_strings.cfg’. 1. ‘%s’ includes the filename in the string Server Side Include (SSI) 8-11 Temporary SSI Output change The SSI output for the next called SSI function can be changed with the SSI function “SsiOutput()” The next called SSI function will use the output according to this call. Thereafter the SSI functions will use the default outputs or the outputs defined in the file ‘\ssi_str.cfg’. The maximum size of a string is 128 bytes. Syntax: <?--#exec cmd_argument=’SsiOutput( "Success string", "Failure string" )’--> Example: This example shows how to change the output strings for a scanf SSI call. <?--#exec cmd_argument=’SsiOutput ( "Parameter1 updated", "Error" )’--> <?--#exec cmd_argument="scanf( "Parameter1", "%d", OutWriteByte(0) )’--> Chapter 9 CIP Object Implementation General The following CIP-objects are implemented in this product: Mandatory Objects Object Identity Object, Class 01h Message Router, Class 02h Assembly Object, Class 04h Connection Manager, Class 06h Port Object, Class F4h TCP/IP Interface Object, Class F5h Ethernet Link Object, Class F6h Page 9-2 9-4 9-5 9-7 9-14 9-15 9-16 Vendor Specific Objects Object Diagnostic Object, Class AAh I/O Data Input Mapping Object, Class A0h I/O Data Output Mapping Object, Class A1h Parameter Data Input Mapping Object, Class B0h Parameter Data Output Mapping Object, Class B1h Page 9-9 9-10 9-11 9-12 9-13 CIP Object Implementation 9-2 Identity Object, Class 01h 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 # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Type UINT UINT UINT Struct of: USINT USINT WORD UDINT SHORT_STRING Value Default: 005Ah Default: 000Ch Default: 0002h Description HMS Industrial Networks AB Communication Adapter Anybus-S EtherNet/IP Major fieldbus version Minor fieldbus version Device status, see table below (set at production) Name of product Instance Attributes # 1 2 3 4 Access Get Get Get Get Name Vendor ID Device Type Product Code Revision 5 6 7 Get Get Get Status Serial Number Product Name Serial number ‘Anybus-S EtherNet/IP’ CIP Object Implementation 9-3 Device Status bit(s) 0 1 2 3 4... 7 Name Module Owned (reserved, ignore) Configured (reserved, ignore) 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) Set for minor recoverable faults Set for minor unrecoverable faults Set for major recoverable faults Set for major unrecoverable faults (reserved, ignore) 8 9 10 11 12... 15 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: 1. Issue ENABLE_ID_RESET_NOTIFY to the module during initialisation. The reset service will then cause the module to issue ID_RESET_NOTIFY, and if necessary delete the configuration file ‘ethcfg.cfg’. ID_RESET_NOTIFY specifies the type of reset request that was issued. It is then up to the application to reset itself and the module. 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 issued 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 Message Router, Class 02h General Information Object Description Supported Services Class services: Instance services: - Class Attributes - Instance Attributes - CIP Object Implementation 9-5 Assembly Object, Class 04h 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 # 1 2 Access Get Get Name Revision Max Instance Type UINT UINT Value 0002h - Description Revision 2 The highest initiated instance no. Instance 03h Attributes (Heartbeat, Input-Only) This instance is used as heartbeat for Input-Only connections, and does not carry any data. Instance 04h Attributes (Heartbeat, Listen-Only) This instance is used as heartbeat for listen-only connections, and does not carry any data. Instance 05h Attributes (Configuration Data) No attributes are implemented for this instance. See also... • 10-75 “Enable Configuration Assembly (ENABLE_CONFIG_SY)” • 10-76 “Configuration Assembly Request (CONFIG_SY_REQUEST)” CIP Object Implementation 9-6 Instance 64h... 69h Attributes (Producing Instances) # 3 Name Produced Data Access Get Type Array of BYTE Value This data corresponds to the Input I/O Data Note: By default, only instance 64h is enabled. The remainder can be created by the application using the ‘I/O Data Input Area Mapping’-command. 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)” Instance 96h... 9Bh Attributes (Consuming Instance) # 3 Name Consumed Data Access Set Type Array of BYTE Value This data corresponds to the Output I/O Data. Note: By default, only instance 96h is enabled. The remainder can be created by the application using the ‘I/O Data Output Area Mapping’-command. 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 Connection Manager, Class 06h General Information Object Description Supported Services Class services: - Instance services: Forward_Open Forward_Close Unconnected_Send1 Instance Descriptions (No supported instance attributes) Class 1 Connection Details 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 other 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 (Exclusive-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. Class 3 Connection Details • Explicit message connection Class 3 connections are used to establish connections towards the message router. Thereafter, the connection is used for explicit messaging. Class 3 connections use TCP transport. - No. of simultaneous Class 3 connections: 16 - Supported API: ≥2ms - T->O Connection type: Point-to-point - O->T Connection type: Point-to-point - Supported trigger type: Application 1. Shared with Exclusive-Owner and Listen-Only connections 2. Shared with Exclusive-Owner and Input-Only connections CIP Object Implementation 9-9 Diagnostic Object, Class AAh General Information Object Description This object groups diagnostic information. Supported Services Class services: Get Attribute All Instance services: Get Attribute Single Class Attributes # 1 Access Get Name Revision Type UINT Value 0001h Instance Attributes, Instance 01h # 01h 02h 03h 04h 0Ah 0Fh 11h 12h 14h Access Get Get Get Get Get Get Get Get Get Name Module serial number Vendor ID Fieldbus Type Module Software version Module Type IN cyclic I/O length IN total length OUT cyclic I/O length OUT total length Type UDINT UINT UINT UINT UINT UINT UINT UINT UINT Description Serial number Manufacturer Vendor ID Fieldbus Type Module software version Module Type Size of I/O Input data (in bytes) Total input data size in bytes (I/O + Parameter Data) Size of I/O Output data (in bytes) Total Output data size in bytes (I/O + Parameter Data) CIP Object Implementation 9-10 I/O Data Input Mapping Object, Class A0h 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 # 1 Access Get Name Data Type UINT Value 0001h Description Revision 1 Instance Attributes, Instance 01h # 1 2 3 4 5 6 Access Get Get Get Get Get Get Name Data Data Data Data Data Data Type Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Description Mapped I/O data (also available in Assembly Instance 64h) Mapped I/O data (also available in Assembly Instance 65h) Mapped I/O data (also available in Assembly Instance 66h) Mapped I/O data (also available in Assembly Instance 67h) Mapped I/O data (also available in Assembly Instance 68h) Mapped I/O data (also available in Assembly Instance 69h) CIP Object Implementation 9-11 I/O Data Output Mapping Object, Class A1h 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 Object. 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 # 1 Access Get Name Data Type UINT Value 0001h Description Revision 1 Instance Attributes, Instance 01h # 1 2 3 4 5 6 Access Get/Set Get/Set Get/Set Get/Set Get/Set Get/Set Name Data Data Data Data Data Data Type Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Description Mapped I/O data (also available in Assembly Instance 96h) Mapped I/O data (also available in Assembly Instance 97h) Mapped I/O data (also available in Assembly Instance 98h) Mapped I/O data (also available in Assembly Instance 99h) Mapped I/O data (also available in Assembly Instance 9Ah) Mapped I/O data (also available in Assembly Instance 9Bh) CIP Object Implementation 9-12 Parameter Data Input Mapping Object, Class B0h 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 # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Instance Attributes, Instance 01h 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... • # 01h 02h 02h 02h 02h 02h ... 32h 10-49 “Parameter Data Input Mapping (PARAMETER_INPUT_MAP)” Access Get Get Get Get Get Get ... Get Name Data Data Data Data Data Data ... Data Type Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT ... Array of USINT Description Mapped block if Input Parameter Data Mapped block if Input Parameter Data Mapped block if Input Parameter Data Mapped block if Input Parameter Data Mapped block if Input Parameter Data Mapped block if Input Parameter Data ... Mapped block if Input Parameter Data CIP Object Implementation 9-13 Parameter Data Output Mapping Object, Class B1h 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 # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Instance Attributes, Instance 01h 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... • # 01h 02h 01h 02h 01h 02h ... 32h 10-51 “Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP)” Access Get/Set Get/Set Get/Set Get/Set Get/Set Get/Set ... Get/Set Name Data Data Data Data Data Data ... Data Type Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT Array of USINT ... Array of USINT Description Mapped block of Output Parameter Data Mapped block of Output Parameter Data Mapped block of Output Parameter Data Mapped block of Output Parameter Data Mapped block of Output Parameter Data Mapped block of Output Parameter Data ... Mapped block of Output Parameter Data CIP Object Implementation 9-14 Port Object, Class F4h General Information Object Description Supported Services Class services: Get Attribute All Get Attribute Single Instance services: Get Attribute All Get Attribute Single Class Attributes # 1 2 3 8 Access Get Get Get Get Name Revision Max Instance No. of instances Entry Port Type UINT UINT UINT UINT Value 0001h 0002h 0001h 0002h 9 Get All Ports Array of STRUCT {UINT; UINT;} 0000h 0000h 0000h 0000h 0004h 0002h Description Revision 1 2 is the highest instance number 1 instance is implemented Returns the instance of the Port object that describes the port. Array of structure containing attributes 1 and 2 from each instance. Instance 1 is at byte offset 4. Instance 2 is at byte offset 8, etc. The 4 bytes at offset 0 shall be 0. (Default) Instance Attributes, Instance 02h # 1 2 3 4 8 Access Get Get Get Get Get Name Port Type Port Number Port Object Path Size Path Port Name Node Address Type UINT UINT Struct of: UINT Padded EPATH SHORT_STIRNG Padded EPATH Value 0004h 0002h Comments TCP/IP Port 2 0002h 20 F5 24 01h ‘TCP/IP’ - TCP class, Instance 1 Name of port - CIP Object Implementation 9-15 TCP/IP Interface Object, Class F5h General Information Object Description This object groups TCP/IP-related settings. See also... • 3-1 “Basic Network Configuration” Supported Services Class services: Get Attribute All Get Attribute Single Instance services: Get Attribute All Get Attribute Single Set Attribute Single Class Attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Instance Attributes # 1 2 Access Get Get Name Status Configuration Capability Type DWORD DWORD Value 00000014h Comments - Attribute #5 is settable - Capable of obtaining network configuration via DHCP. 3 Get/Set Configuration Control DWORD - 4 Get 5 Get/Set Port Object Path Size Path Interface Configuration IP Address Subnet Mask Gateway Address Name Server 1 Name Server 2 Domain Name Host Name Struct of: UINT 0002h Padded EPATH 20 F6 24 01h Struct of: Value: Meaning: 0 Configuration from non-volatile memory (i.e. ‘ethcfg.cfg’) 2 Configuration from DHCP Path to Ethernet Class, Instance 1 6 Get/Set UDINT UDINT UDINT - IP address Subnet mask Gateway Address UDINT UDINT STRING STRING - Primary DNS Secondary DNS Default domain name Host name CIP Object Implementation 9-16 Ethernet Link Object, Class F6h General Information Object Description This object groups diagnostic information for the Ethernet interface. See also... • 3-1 “Basic Network Configuration” Supported Services Class services: Get Attribute All Get Attribute Single Instance services: Get Attribute All Get Attribute Single Class Attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 2 Type UDINT DWORD Array of 6 USINTS Struct of: WORD UINT Value 10 or 100 (MAC ID) - Comments Actual ethernet interface speed Physical network address Auto-negotiation, duplex, and speed. Instance Attributes # 1 2 3 6 Access Get Get Get Get/Set Name Interface Speed Interface Flags Physical Address Interface Control Chapter 10 Fieldbus Specific Mailbox Commands 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 information). 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: Register Value 0001h 0002h 0003h 0004h 0005h 0006h 0007h 0008h 0009h 000Ah 000Bh 000Ch 000Dh 000Eh 000Fh 0010h 0011h 0012h 0013h 0015h 0016h 0017h 0018h 0019h 001Ah 001Bh 001Ch 001Dh 001Eh 001Fh 0020h 0021h 0022h 0023h 0024h 0025h 0026h Description Invalid IP-address or Subnet mask Invalid socket type No free socket Invalid socket Not connected Command failed Invalid data size Invalid fragment type Fragment error Invalid timeout time Can’t send more Failed to open file or file not found Invalid file descriptor Invalid open method No email server configured Command aborted Too many registered objects Object already registered Deregistering invalid object Unsupported Command Failed to send UCMM command No timeout Invalid port number Duplicate port number EPATH too big Mapping Failed Reset notification unsupported Too many open files Failed to create directory Failed to delete directory Failed to rename file Failed to move file Failed to copy file Too many open directories Failed to open directory or directory not found Failed to resolve hostname with DNS Timed out resolving hostname with DNS 10-2 General Configuration Commands Commands in this category: Mailbox Commands Set Ethernet Configuration (SET_ETN_CONFIG) Read Ethernet Configuration (READ_ETN_CONFIG) Get MAC Address (GET_MAC_ADDR) Connection Timeout (CONNECT_TIMEOUT) Set Host and Domain (SET_HOST_DOMAIN) Get Host and Domain (GET_HOST_DOMAIN) Disable / Enable ARP Config (ARP_CFG_CONTROL) Disable / Enable HICP (HICP_CFG_CONTROL) Description Page Set network settings 10-3 Retrieve the currently used network settings 10-4 Retrieve the ethernet MAC address from the module 10-5 Set the connection timeout value 10-6 Set host and default domain names 10-7 Returns the currently used host and domain 10-8 Disable/enable ARP support 10-9 Disable/enable HICP support 10-10 Disable DHCP (DISABLE_DHCP) Disable DHCP support 10-11 Configures the DNS server settings 10-12 Returns the currently used DNS server settings 10-13 Configures the SMTP server IP address 10-14 Configures the SMTP server address 10-15 Returns the currently used SMTP server IP address 10-16 This command disables the built in web server 10-17 This command enables the built in web server 10-18 This command disables the built in FTP server 10-19 This command disables the built in telnet server 10-20 This command instruct the module to run in global admin mode 10-21 Disable the virtual file system 10-22 Set DNS Server Settings (SET_DNS_SERVERS) Get DNS Server Settings (GET_DNS_SERVERS) Set SMTP Server (SET_SMTP_SERVER) Set SMTP Server by Name (SET_SMTP_SERVER_NAME) Get SMTP Server (GET_SMTP_SERVER) Disable Web Server (DISABLE_WEB_SERVER) Enable Web Server (ENABLE_WEB_SERVER) Disable FTP server (DISABLE_FTP_SERVER) Disable Telnet Server (DISABLE_TELNET_SERVER) Global Admin Mode (GLOBAL_ADMIN_MODE) Disable Virtual File System (DISABLE_VFS) 10-3 Set Ethernet Configuration (SET_ETN_CONFIG) 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 Command no. Extended Header Message data Response data Application 0001h Fault information Network settings. (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message dataword 1 Message dataword 2 Message dataword 3 Message dataword 4 Message dataword 5 Message dataword 6 Command (ID) 4002h 0001h 000Ch 0001h 0001h 0000h 0000h IP address (high) IP address (low) Subnet mask (high) Subnet mask (low) Gateway address (high) Gateway address (low) Expected response (ID) 0002h 0001h 000Ch 0001h 0001h 0000h 0000h Fault information IP address (high) IP address (low) Subnet mask (high) Subnet mask (low) Gateway address (high) Gateway address (low) Fieldbus Specific Message SET_ETN_CONFIG 12 bytes of data (6 words) 10-4 Read Ethernet Configuration (READ_ETN_CONFIG) Description This command returns the currently used network settings. Note: This command may only be issued during runtime. Initiated by Command no. Extended Header Message data Response data Application 0002h Currently used network settings. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0002h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0002h 000Ch 0001h 0001h 0000h 0000h IP address (high) IP address (low) Subnet mask (high) Subnet mask (low) Gateway address (high) Gateway address (low) Fieldbus Specific Message READ_ETN_CONFIG 12 bytes of data (6 words) Response dataword 1 Response dataword 2 Response dataword 3 Response dataword 4 Response dataword 5 Response dataword 6 10-5 Get MAC Address (GET_MAC_ADDR) Description This command returns the MAC address of the module. Initiated by Command no. Extended Header Message data Response data Application 0018h MAC Address, 6 bytes Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0018h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0018h 0006h 0001h 0001h 0000h 0000h MAC Address (high) MAC Address (mid) MAC Address (low) Fieldbus Specific Message GET_MAC_ADDR 6 bytes of data (3 words) Response dataword 1 Response dataword 2 Response dataword 3 10-6 Connection Timeout (CONNECT_TIMEOUT) 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 Command no. Extended Header Message data Response data Application 0003h Fault information Timeout Value (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte 1 • Command (ID) 4002h 0003h 0001h 0001h 0001h 0000h 0000h Timeout Value Expected response (ID) 0002h 0003h 0001h 0001h 0001h 0000h 0000h Fault information Timeout Value Timeout Value Valid timeout values range from 1 to 255 seconds (Default = 75). Fieldbus Specific Message CONNECT_TIMEOUT 1 data byte 10-7 Set Host and Domain (SET_HOST_DOMAIN) 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 Command no. Extended Header Message data Response data Application 0032h Fault information Host and Domain settings (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0032h (size) 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0032h (size) 0001h 0001h 0000h 0000h Fault information Host name (string, null-terminated) Host name (string, null-terminated) Domain name (string, null-terminated) Domain name (string, null-terminated) Message data Fieldbus Specific Message SET_HOST_DOMAIN 10-8 Get Host and Domain (GET_HOST_DOMAIN) Description This command returns the configured host and default domain name settings. Initiated by Command no. Extended Header Message data Response data Application 0034h Currently used Host and Domain settings Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0034h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0034h (size) 0001h 0001h 0000h 0000h - Fieldbus Specific Message GET_HOST_DOMAIN Host name (string, null-terminated) Response data Domain name (string, null-terminated) 10-9 Disable / Enable ARP Config (ARP_CFG_CONTROL) Description This command is used to enable / disable the ARP functionality. Initiated by Command no. Extended Header Message data Response data Application 0014h Fault information ARP state (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte • Config Value 00h: 01h: Disable Enable Command (ID) 4002h 0014h 0001h 0001h 0001h 0000h 0000h Config Value Expected response (ID) 0002h 0014h 0001h 0001h 0001h 0000h 0000h Fault information Config Value Fieldbus Specific Message ARP_CFG_CONTROL 1 data byte 10-10 Disable / Enable HICP (HICP_CFG_CONTROL) Description This command is used to enable / disable support for HICP (Anybus IP Config). Initiated by Command no. Extended Header Message data Response data Application 0013h HICP state (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte • Config Value 00h: 01h: Disable Enable Command (ID) 4002h 0013h 0001h 0001h 0001h 0000h 0000h Config Value Expected response (ID) 0002h 0013h 0001h 0001h 0001h 0000h 0000h Fault information Config Value Fieldbus Specific Message HICP_CFG_CONTROL 1 data byte 10-11 Disable DHCP (DISABLE_DHCP) 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 Command no. Extended Header Message data Response data Application 0015h The response indicates if the command was accepted. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0015h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0015h 0000h 0001h 0001h 0000h 0000h Fault information Fieldbus Specific Message DISABLE_DHCP 1 data byte 10-12 Set DNS Server Settings (SET_DNS_SERVERS) Description This command configures the DNS server settings. Note: This command may only be issued to during initialisation. Initiated by Command no. Extended Header Message data Response data Application 0031h DNS server settings The response indicates if the command was accepted. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 Message data word 4 • Command (ID) 4002h 0031h 0008h 0001h 0001h 0000h 0000h Primary DNS (msb) Primary DNS (lsb) Secondary DNS (msb) Secondary DNS (lsb) Expected response (ID) 0002h 0031h 0008h 0001h 0001h 0000h 0000h Fault information Primary DNS (msb) Primary DNS (lsb) Secondary DNS (msb) Secondary DNS (lsb) Fieldbus Specific Message SET_DNS_SERVERS 8 bytes (4 words) of data 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 Get DNS Server Settings (GET_DNS_SERVERS) Description This command returns the currently used DNS server settings. Initiated by Command no. Extended Header Message data Response data Application 0033h DNS server settings. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 • Command (ID) 4002h 0033h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0033h 0008h 0001h 0001h 0000h 0000h Fault information Primary DNS (msb) Primary DNS (lsb) Secondary DNS (msb) Secondary DNS (lsb) 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. Fieldbus Specific Message GET_DNS_SERVERS (size of data) 10-14 Set SMTP Server (SET_SMTP_SERVER) 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 Command no. Extended Header Message data Response data Application 000Eh Fault information SMTP server address (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message dataword 1 Message dataword 2 Command (ID) 4002h 000Eh 0004h 0001h 0001h 0000h 0000h SMTP IP address (high) SMTP IP address (low) Expected response (ID) 0002h 000Eh 0004h 0001h 0001h 0000h 0000h Fault information SMTP IP address (high) SMTP IP address (low) Fieldbus Specific Message SET_SMTP_SERVER 4 bytes of data (2 words) 10-15 Set SMTP Server by Name (SET_SMTP_SERVER_NAME) 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 Command no. Extended Header Message data Response data Application 0016h SMTP server (string) (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Data • Command (ID) 4002h 0016h (size) 0001h 0001h 0000h 0000h SMTP Server (String, null-terminated) Expected response (ID) 0002h 0016h (size) 0001h 0001h 0000h 0000h Fault information SMTP Server (String, null-terminated) Fieldbus Specific Message SET_SMTP_SERVER_NAME SMTP Server ASCII string, null terminated (e.g. “192.168.1.42” or “smtp.server.com”) 10-16 Get SMTP Server (GET_SMTP_SERVER) Description This function returns the currently used SMTP server IP address. Initiated by Command no. Extended Header Message data Response data Application 000Fh SMTP server IP address Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 000Fh 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 000Fh 0004h 0001h 0001h 0000h 0000h Fault information SMTP IP address (high) SMTP IP address (low) Fieldbus Specific Message GET_SMTP_SERVER 4 bytes of data (2 words) Response dataword 1 Response dataword 2 10-17 Disable Web Server (DISABLE_WEB_SERVER) Description This command disables the onboard web server. The web server is enabled by default. Initiated by Command no. Extended Header Message data Response data Application 0004h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0004h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0004h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message DISABLE_WEB_SERVER 10-18 Enable Web Server (ENABLE_WEB_SERVER) Description This command enables the onboard web server. The web server is enabled by default. Initiated by Command no. Extended Header Message data Response data Application 0005h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0005h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0005h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message ENABLE_WEB_SERVER 10-19 Disable FTP server (DISABLE_FTP_SERVER) Description This command disables the FTP server. Initiated by Command no. Extended Header Message data Response data Application 0006h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0006h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0006h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message DISABLE_FTP_SERVER 10-20 Disable Telnet Server (DISABLE_TELNET_SERVER) Description This command disables the onboard Telnet server. Initiated by Command no. Extended Header Message data Response data Application 0008h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0008h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0008h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message DISABLE_TELNET_SERVER 10-21 Global Admin Mode (GLOBAL_ADMIN_MODE) Description This command instructs the module to run in Global Admin Mode. For more information, see 3-2 “Security Framework”. Note: This command may only be issued during initialization. Initiated by Command no. Extended Header Message data Response data Application 000Bh - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 000Bh 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 000Bh 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message GLOBAL_ADMIN_MODE 10-22 Disable Virtual File System (DISABLE_VFS) Description This command disables the virtual files in the file system. Note: This command may only be issued during initialization. Initiated by Command no. Extended Header Message data Response data Application 0011h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0011h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0011h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message DISABLE_VFS 10-23 Mailbox File System Interface The filesystem is available to the application through the mailbox interface. Note that the application always has unrestricted access to the filesystem, regardless of security mode. Commands in this category: Mailbox Command Description Page 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 File (FILE_READ) Read data from a file 10-26 Write File (FILE_WRITE) Write data to a file. 10-27 Delete File (FILE_DELETE) Delete a file 10-28 Move File (FILE_MOVE) Moves a file 10-29 Rename File (FILE_RENAME) Rename a file 10-30 Copy File (FILE_COPY) Copy a file 10-31 Create Directory (DIR_CREATE) Create a new directory 10-32 Delete Directory (DIR_DELETE) Delete an empty directory 10-33 Open Directory (DIR_OPEN) Open a directory 10-34 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 Create RAM disc (CREATE_RAM_DISC) Mounts the RAM disc into a specified directory in the file system. 10-38 10-24 Open File (FILE_OPEN) Description This command opens a file for reading, writing, or appending. Initiated by Command no. Extended Header Message data Response data Application 0060h Mode, Filesize & Fault information Name and path to the file to open (NULL terminated) File Handle Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data • Expected response (ID) 0002h 0060h 0004h 0001h 0001h 0000h 0000h Filesize (high) Filesize (low) Fault information File Handle (high) File Handle (low) Fieldbus Specific Message FILE_OPEN Response data word 1 Response data word 2 Mode Value 0000h 0001h 0002h • Command (ID) 4002h 0060h (size) 0001h 0001h 0000h 0000h Mode Path + filename (String, null-terminated) Mode Open a file in read mode 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. 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 Close File (FILE_CLOSE) Description This command closes a file previously opened using FILE_OPEN. Initiated by Command no. Extended Header Message data Response data Application 0061h File Handle, Filesize & Fault information. - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 • Command (ID) 4002h 0061h 0000h 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) - Expected response (ID) 0002h 0061h 0000h 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) Filesize (high) Filesize (low) Fault information File Handle Handle of the file to close. See also 10-24 “File Handle”. • Filesize Size of the file. Fieldbus Specific Message FILE_CLOSE 10-26 Read File (FILE_READ) Description This command reads data from a file previously opened in read mode using FILE_OPEN. Initiated by Command no. Extended Header Message data Response data Application 0062h File Handle, no. of bytes to read & Fault information The read data is returned in the response data field. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0062h 0000h 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) No. of bytes - Expected response (ID) 0002h 0062h (size) 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) No. of bytes Fault information Data • 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). Fieldbus Specific Message FILE_READ Bytes read Maximum 256 bytes. Response data 10-27 Write File (FILE_WRITE) Description This mailbox command writes data to a file previously opened in write or append mode using FILE_OPEN. Initiated by Command no. Extended Header Message data Response data Application 0063h File Handle & Fault information Data to write A ‘Data size’ value of 0 (zero) indicates that the command was unsuccessful, possibly due to a faulty handle, or that the module has run out of storage. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data • Command (ID) 4002h 0063h (number of bytes to write) 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) - Expected response (ID) 0002h 0063h (number of written bytes) 0001h 0001h 0000h 0000h File Handle (high) File Handle (low) Fault information Data Data 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. Fieldbus Specific Message FILE_WRITE Max. 256 bytes 10-28 Delete File (FILE_DELETE) Description This mailbox command deletes a file from the file system. Initiated by Command no. Extended Header Message data Response data Application 0064h Fault information Name and path to the file to delete (NULL terminated) The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0064h (size) 0001h 0001h 0000h 0000h Path + filename (String, null-terminated) Expected response (ID) 0002h 0064h (size) 0001h 0001h 0000h 0000h Fault information Path + filename (String, null-terminated) Fieldbus Specific Message FILE_DELETE Maximum 256 bytes 10-29 Move File (FILE_MOVE) 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 command due to limitations in the mailbox command structure. Initiated by Command no. Extended Header Message data Response data Application 0065h Fault information Name + Path of source and destination, both NULL terminated The response data is a copy of the command data. Command and response layout Command (ID) 4002h 0065h (size) 0001h 0001h 0000h 0000h Source: Path + filename (String, null-terminated) Message data Destination: Path + filename (String, null-terminated) Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Expected response (ID) 0002h Fieldbus Specific Message 0065h FILE_MOVE (size) Size of path strings 0001h 0001h 0000h 0000h Fault information Source: Path + filename (String, null-terminated) Destination: Path + filename (String, null-terminated) 10-30 Rename File (FILE_RENAME) 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 limitations in the mailbox command structure. Initiated by Command no. Extended Header Message data Response data Application 0066h Fault information Name + Path of source and destination, both NULL terminated The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0066h (size) 0001h 0001h 0000h 0000h Old: Path + filename (String, null-terminated) New: Path + filename (String, null-terminated) Expected response (ID) 0002h 0066h (size) 0001h 0001h 0000h 0000h Fault information Old: Path + filename (String, null-terminated) New: Path + filename (String, null-terminated) Fieldbus Specific Message FILE_RENAME Size of path strings 10-31 Copy File (FILE_COPY) 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 command due to limitations in the mailbox command structure. Initiated by Command no. Extended Header Message data Response data Application 0067h Fault information Name + Path of source and destination, both NULL terminated The response data is a copy of the command data. Command and response layout Command (ID) 4002h 0067h (size) 0001h 0001h 0000h 0000h Source: Path + filename (String, null-terminated) Message data Destination: Path + filename (String, null-terminated) Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Expected response (ID) 0002h Fieldbus Specific Message 0067h FILE_COPY (size) Size of path strings 0001h 0001h 0000h 0000h Fault information Source: Path + filename (String, null-terminated) Destination: Path + filename (String, null-terminated) 10-32 Create Directory (DIR_CREATE) Description This command creates a directory in the file system. Initiated by Command no. Extended Header Message data Response data Application 0068h Fault information Path and name of the new directory, null terminated. The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0068h (size) 0001h 0001h 0000h 0000h Path + name (String, null-terminated) Expected response (ID) 0002h 0068h (size) 0001h 0001h 0000h 0000h Fault information Path + name (String, null-terminated) Fieldbus Specific Message DIR_CREATE Size of path string 10-33 Delete Directory (DIR_DELETE) Description This command deletes an empty directory from the file system. Initiated by Command no. Extended Header Message data Response data Application 0069h Path and name of the directory, null terminated. The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0069h (size) 0001h 0001h 0000h 0000h Path + name (String, null-terminated) Expected response (ID) 0002h 0069h (size) 0001h 0001h 0000h 0000h Fault information Path + name (String, null-terminated) Fieldbus Specific Message DIR_DELETE Size of path string 10-34 Open Directory (DIR_OPEN) 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 Command no. Extended Header Message data Response data Application 006Ah Path and name of the directory, null terminated. Directory handle & Fault information Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data • Command (ID) 4002h 006Ah (size) 0001h 0001h 0000h 0000h Path + name (String, null-terminated) Expected response (ID) 0002h 006Ah 0004h 0001h 0001h 0000h 0000h Fault information Directory Handle (high) Directory Handle (low) Fieldbus Specific Message DIR_OPEN Response data word 1 Response data word 2 Directory Handle Unique identifier which must be used on all further operations associated with the directory. 10-35 Read Directory (DIR_READ) 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 Command no. Extended Header Message data Response data Application 006Bh Directory Handle & Fault information Details about one object in the directory. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 006Bh 0000h 0001h 0001h 0000h 0000h Directory Handle (high) Directory Handle (low) - Expected response (ID) 0002h 006Bh (size) 0001h 0001h 0000h 0000h Directory Handle (high) Directory Handle (low) Fault information Object Size (long) Object Flags Object Name (string, null-terminated) Fieldbus Specific Message DIR_READ (See DIR_OPEN) Response data byte 1 Response data byte 2 Response data byte 3 Response data byte 4 Response data byte 5 Response data... 10-36 • 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 (reserved) • Bit DIR Description Directory flag RO Read only H Hidden SYS System b3 b2 b1 b0 SYS H RO DIR 0: Object is a file 1: Object is a directory 0: Object can be read or written 1: Object is read-only 0: Object is visible 1: Object is hidden 0: User object 1: System object Object Name Name of object, null-terminated (e.g. filename or directory name). Reading the Contents of a Directory The following flowchart illustrates the process of reading the contents of a directory: Start Open directory (using DIR_OPEN) Read one directory object (using DIR_READ) (process directory object) Response size = zero? Yes Close the directory (using DIR_CLOSE) Done No 10-37 Close Directory (DIR_CLOSE) Description This command closes a directory previously opened using DIR_OPEN. See also 10-36 “Reading the Contents of a Directory”. Initiated by Command no. Extended Header Message data Response data Application 006Ch Directory Handle & Fault information - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 006Ch 0000h 0001h 0001h 0000h 0000h Directory Handle (high) Directory Handle (low) - Expected response (ID) 0002h 006Ch 0000h 0001h 0001h 0000h 0000h Directory Handle (high) Directory Handle (low) Fault information Fieldbus Specific Message DIR_CLOSE (See DIR_OPEN) 10-38 Create RAM disc (CREATE_RAM_DISC) 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 Command no. Extended Header Message data Response data Application 0018h String containing RAM disc location, null terminated The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data • Command (ID) 4002h 0018h (size) 0001h 0001h 0000h 0000h Path (String, null-terminated) Expected response (ID) 0002h 0018h (size) 0001h 0001h 0000h 0000h Path (String, null-terminated) Path RAM-disc location. Must be empty, or the command will fail. Fieldbus Specific Message CREATE_RAM_DISC Size of data in bytes 10-39 Modbus/TCP Specific Commands Commands in this category: Mailbox Commands Modbus Connection Timeout (MB_CONN_TIMEOUT) Disable Modbus/TCP server (DISABLE_MB_TCP) Modbus ON/OFF Line Configuration (MB_ON_OFF_LINE_CONFIG) Write Exception Status (WR_EXP_STAT) Set Modbus Coil Area Size (MB_SET_COIL_AREA_SIZE) Description Set the timeout value for Modbus/TCP connections Disables the Modbus/TCP server Configures the Modbus ON/OFF line setting Page 10-40 10-41 10-42 Defines the response to the Modbus command ‘Read Exception 10-43 Status’ This command affects the Modbus addressing scheme and defines 10-44 part of the I/O data as coil-based 10-40 Modbus Connection Timeout (MB_CONN_TIMEOUT) Description This mailbox command configures the timeout value used for Modbus/TCP connections. If an established 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 Command no. Extended Header Message data Response data Application 0020h Timeout value (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Command (ID) 4002h 0020h 0002h 0001h 0001h 0000h 0000h Timeout value Expected response (ID) 0002h 0020h 0002h 0001h 0001h 0000h 0000h Timeout value Fieldbus Specific Message MB_CONN_TIMEOUT 2 bytes (1 word) 10-41 Disable Modbus/TCP server (DISABLE_MB_TCP) Description This mailbox command disables the Modbus/TCP server. Note: This may only be issued during initialization. Initiated by Command no. Extended Header Message data Response data Application 0021h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0021h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0021h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message DISABLE_MB_TCP 10-42 Modbus ON/OFF Line Configuration (MB_ON_OFF_LINE_CONFIG) Description This command configures the Modbus ON/OFF line setting. Note: This command overrides the configuration stored in the configuration file ‘onoffln.cfg’. Initiated by Command no. Extended Header Message data Response data Application 0023h Time out value. List of triggering modbus commands (up to 11 entries). Data size = 0 = trigger for all commands. (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte 1 Message databyte 2 ... Message databyte <=11 • Command (ID) 4002h 0023h (size) 0001h 0001h 0000h 0000h Timeout value Trigger command 1 Trigger command 2 ... Trigger command <=11 Expected response (ID) 0002h 0023h (size) 0001h 0001h 0000h 0000h Fault information Trigger command 1 Trigger command 2 ... Trigger command <=11 Fieldbus Specific Message MB_ON_OFF_LINE_CONFIG Up to 11 bytes 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 Write Exception Status (WR_EXP_STAT) 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 Command no. Extended Header Message data Response data Application 0022h Exception status byte (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Command (ID) 4002h 0022h 0001h 0001h 0001h 0000h 0000h Exception status byte Expected response (ID) 0002h 0022h 0001h 0001h 0001h 0000h 0000h Exception status byte Fieldbus Specific Message WR_EXP_STAT 1 data byte 10-44 Set Modbus Coil Area Size (MB_SET_COIL_AREA_SIZE) 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 Command no. Extended Header Message data Response data Application 0024h Coil Size In, Coil Size Out (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 • Command (ID) 4002h 0024h 0004h 0001h 0001h 0000h 0000h Coil Size In Coil Size Out Expected response (ID) 0002h 0024h 0004h 0001h 0001h 0000h 0000h Coil Size In Coil Size Out Coil Size In Number of bytes in the Input Area that shall be treated as coils. • Coil Size Out Number of bytes in the Output Area that shall be treated as coils. Fieldbus Specific Message Set Modbus Coil Area Size 4 bytes of data 10-45 EtherNet/IP Specific Commands Commands in this category: Command Set Product Info All (PRODUCT_INFO_ALL) Set Product Info (SET_PRODUCT_INFO) Set Product Code (SET_PRODUCT_CODE) Parameter Data Input Mapping (PARAMETER_INPUT_MAP) Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP) I/O Data Input Area Mapping (IO_INPUT_MAP) I/O Data Output Area Mapping (IO_OUTPUT_MAP) Description Send UCMM (SEND_UCMM) Sends an unconnected message to another node UCMM Request (UCMM_REQUEST) Issued by the module when a UCMM request is addressed to a user-registered object 10-46 Customizes EtherNet/IP product info 10-47 10-48 10-49 Maps Parameter Data to the Parameter Input/Output Objects 10-51 10-53 Maps I/O data to the Assembly Object 10-55 Register Class (REGISTER_CLASS) Registers an EtherNet/IP object in the message router object Deregister Class (DEREGISTER_CLASS) Enable Routing (ENABLE_ROUTING) Page 10-57 10-59 10-60 De-registers a previously registered class from the message router 10-61 Enables the routing and bridging functionality 10-62 10-63 Register Port (REGISTER_PORT) Registers a port in the port object Route Unconnected Send (ROUTE_REQUEST) Enable Reset Notification (ENABLE_ID_RESET_NOTIFY) Reset Notification (ID_RESET_NOTIFY) Get Reset Parameter (GET_ID_RESET_PARAM) Copy I/O Status (COPY_IO_STATUS) Disable EtherNet/IP (DISABLE_ETHERNET_IP) Change Ethernet Port (CHANGE_ETHERNET_PORT) Reset on IP Change (RST_ON_IP_CHANGE) Enable Configuration Assembly (ENABLE_CONFIG_SY) Configuration Assembly Request (CONFIG_SY_REQUEST) Enable Exact IO Match (ENABLE_IO_MATCH) Issued by the module upon receiving an unconnected send message 10-66 Enables Identity Object reset notification 10-68 Reset notification 10-69 Get reset parameter 10-70 Changes the default behaviour regarding the I/O Status bytes 10-71 Disables the EtherNet/IP protocol support 10-72 Changes the port number reported in the Port Object 10-73 Causes the module to issue a reset request to the identity object 10-74 when the IP configuration has been changed over EtherNet/IP Enables the application to take advantage of the configuration data 10-75 in the Forward_Open-request. Issued by the module upon receiving the Forward_Open-request 10-76 Forces the module to only accept IO connection requests which exactly matches the sizes specified in Anybus_INIT 10-77 10-46 Set Product Info All (PRODUCT_INFO_ALL) Description This command is used to change Vendor ID, Device Type, Product Code, Major Revision, Minor Revision, 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 Command no. Extended Header Message data Response data Application 0089h Vendor ID, Device Type, Product Code, Major/Minor Revision, Name length, Name (ascii) (the response holds a copy of the command data) Command and response layout Command Message ID (ID) Message information 4002h Command 0089h Data size (size) Frame count 0001h Frame number 0001h Offset high 0000h Offset low 0000h Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Vendor ID (high byte) Message data byte 2 Vendor ID (low byte) Message data byte 3 Device type (high byte) Message data byte 4 Device type (low byte) Message data byte 5 Product code (high byte) Message data byte 6 Product code (low byte) Message data byte 8 Major revision Message data byte 9 Minor revision Message data byte 10 Product name length Message data byte 11 Product name 1st character ... ... Message data byte n Product name last character Expected response (ID) 0002h 0089h (size) 0001h 0001h 0000h 0000h Fault information Vendor ID (high byte) Vendor ID (low byte) Device type (high byte) Device type (low byte) Product code (high byte) Product code (low byte) Major revision Minor revision Product name length Product name 1st character ... Product name last character Fieldbus Specific Message PRODUCT_INFO_ALL Message data size Vendor ID Device Type Product Code Major revision Minor revision Length of prod. name Product name 1st character ... Last character 10-47 Set Product Info (SET_PRODUCT_INFO) 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 Command no. Extended Header Message data Response data Application 0082h Vendor ID, Product code, Name length, Name (the response holds a copy of the command data) Command and response layout Command Message ID (ID) Message information 4002h Command 0082h Data size (size) Frame count 0001h Frame number 0001h Offset high 0000h Offset low 0000h Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Vendor ID (high byte) Message data byte 2 Vendor ID (low byte) Message data byte 3 Product code (high byte) Message data byte 4 Product code (low byte) Message data byte 5 Product name length Message data byte 6 Product name 1st character Message data byte 7 Product name 2st character ... ... Message data byte n Product name last character Expected response (ID) 0002h 0082h (size) 0001h 0001h 0000h 0000h Vendor ID (high byte) Vendor ID (low byte) Product code (high byte) Product code (low byte) Product name length Product name 1st character Product name 2st character ... Product name last character Fieldbus Specific Message SET_PRODUCT_INFO Vendor ID “ Product code “ Product name, max 32 char. “ “ “ “ 10-48 Set Product Code (SET_PRODUCT_CODE) Description This mailbox command is used to customize the Product Code of the module. This enables a configuration 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 Command no. Extended Header Message data Response data Application 0083h Product code (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Command (ID) 4002h 0083h 0002h 0001h 0001h 0000h 0000h Product Code Expected response (ID) 0002h 0083h 0002h 0001h 0001h 0000h 0000h Product Code Fieldbus Specific Message SET_PRODUCT_CODE 2 bytes of data (1 word) 10-49 Parameter Data Input Mapping (PARAMETER_INPUT_MAP) Description This command maps blocks of Input Parameter Data to the Parameter Data Input Mapping Object, allowing 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 second 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 necessary 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 Command no. Extended Header Message data Response data Application 0084h Fault information Mapping information (the response holds a copy of the command data) 10-50 Command and response layout (example when only setting attribute 1-5) Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 Message data word 4 Message data word 5 Message data word 6 Message data word 7 Message data word 8 Message data word 9 Message data word 10 Command (ID) 4002h 0084h 0014h 0001h 0001h 0000h 0000h Offset Length Offset Length Offset Length Offset Length Offset Length Expected response (ID) 0002h 0084h 0014h 0001h 0001h 0000h 0000h Fault information Offset Length Offset Length Offset Length Offset Length Offset Length Fieldbus Specific Message PARAMETER_INPUT_MAP 20 bytes of data (10 words) Offset Number of bytes to map Attribute 2 Attribute 3 Attribute 4 Attribute 5 10-51 Parameter Data Output Area Mapping (PARAMETER_OUTPUT_MAP) 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 second 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 necessary 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)” Note: This command may only be issued during module init. Initiated by Command no. Extended Header Message data Response data Application 0085h Fault information Offset and length of the instances to map (the response holds a copy of the command data) 10-52 Command and response layout (example when only setting attribute 1-5) Command (ID) 4002h Expected response (ID) 0002h Command 0085h 0085h Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 Message data word 4 Message data word 5 Message data word 6 Message data word 7 Message data word 8 Message data word 9 Message data word 10 0014h 0001h 0001h 0000h 0000h Offset Length Offset Length Offset Length Offset Length Offset Length 0014h 0001h 0001h 0000h 0000h Fault information Offset Length Offset Length Offset Length Offset Length Offset Length Message ID Message information Fieldbus Specific Message PARAMETER_OUTPUT_M AP 20 bytes of data (10 words) Offset Number of bytes to map Attribute 2 Attribute 3 Attribute 4 Attribute 5 10-53 I/O Data Input Area Mapping (IO_INPUT_MAP) 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 information is specified (i.e. if this command is never issued), all Input I/O data will be grouped in Assembly 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 necessary 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 Command no. Extended Header Message data Response data Application 0086h Fault information Offset and length of the instances to map (the response holds a copy of the command data) 10-54 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 Message data word 4 Message data word 5 Message data word 6 Message data word 7 Message data word 8 Message data word 9 Message data word 10 Message data word 11 Message data word 12 Command (ID) 4002h 0086h 0014h 0001h 0001h 0000h 0000h Offset Length Offset Length Offset Length Offset Length Offset Length Offset Length Expected response (ID) 0002h 0086h 0014h 0001h 0001h 0000h 0000h Fault information Offset Length Offset Length Offset Length Offset Length Offset Length Offset Length Fieldbus Specific Message IO_INPUT_MAP 20 bytes of data (10 words) Offset Number of bytes to map Instance 65h Instance 66h Instance 67h Instance 68h Instance 69h 10-55 I/O Data Output Area Mapping (IO_OUTPUT_MAP) 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 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 96h... 6Bh. If no mapping information is specified (i.e. if this command is never issued), all Output I/O data will be grouped in Assembly 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 necessary 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 Command no. Extended Header Message data Response data Application 0087h Fault information Offset and length of the instances to map (the response holds a copy of the command data) 10-56 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 Message data word 4 Message data word 5 Message data word 6 Message data word 7 Message data word 8 Message data word 9 Message data word 10 Message data word 11 Message data word 12 Command (ID) 4002h 0087h 0014h 0001h 0001h 0000h 0000h Offset Length Offset Length Offset Length Offset Length Offset Length Offset Length Expected response (ID) 0002h 0087h 0014h 0001h 0001h 0000h 0000h Fault information Offset Length Offset Length Offset Length Offset Length Offset Length Offset Length Fieldbus Specific Message IO_OUTPUT_MAP 20 bytes of data (10 words) Offset Number of bytes to map Instance 97h Instance 98h Instance 99h Instance 9Ah Instance 9Bh 10-57 Send UCMM (SEND_UCMM) 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 respond until the response from the remote host is received or a timeout has occurred. Initiated by Command no. Extended Header Message data Response data Application 008Ah Destination IP address Unconnected message request Unconnected message response Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Message data byte 2 Message data byte 3 ... ... Message data byte n Command ID 4002h 008Ah (data size) 0001h 0001h 0000h 0000h Destination IP high word Destination IP low word Service Request Request Path Size (in words) Expected response ID 0002h 008Ah (data size) 0001h 0001h 0000h 0000h Destination IP high word Destination IP low word Fault Information Padded EPATHa (Service Dependant) Fieldbus Specific Message SEND_UCMM Size of data Destination IP high word Destination IP low word (optional service data) a. See EtherNet/IP Specification, Appendix C - ‘Data Management’ The following example (see next page) uses the SEND_UCMM command to retrieve data from a node on the network. The remote node is an Allen Bradley ControlLogix5000 with a 1756-ENBT/A Ethernet/ IP module. It has VendorID 0001h, Product Type 000C, Product Code 003Ah, Version 1.33 and Serial Number 00121E63h. The request that is sent to the remote node is ‘Get_Attribute_All’ (0x01) to Class 0x01 and Instance 0x01. This is the identity object, see 5-2.2 in the EtherNet/IP specification for more information about the response. 10-58 Send UCMM Example Command ID 4002h 008Ah 0006h 0001h 0001h 0000h 0000h 0A0Ah 0E50h 01h (Get_Attribute_All) 02h (2 words) Expected response ID 0002h 008Ah 001Eh 0001h 0001h 0000h 0000h 0A0Ah 0E50h Fault Information 81h 00h 00h General Status Data byte 4 (Segment Data) 20ha 01h (Class #1) 00h Additional Status Data byte 5 (Segment Type) 24hb 01h Vendor ID (LSB) Data byte 6 (Segment Data) 01h (Instance #1) 00h 0Ch 00h 3Ah 00h 01h 21h 30h 00h 63h 1Eh 12h 00h 0Bh (11) 31h (‘1’) 37h (‘7’) 35h (‘5’) 36h (‘6’) 2Dh (‘-’) 45h (‘E’) 4Eh (‘N’) 42h (‘B’) 54h (T1’) 2Fh (‘/’) 41h (‘A’) Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Data byte 1 (Service Request) Data byte 2 (Request Path Length) Data byte 3 (Segment Type) a. Segment Type = Logical Segment Logical Type = Class ID Logical Format = 8bit Logical Address b. Segment Type = Logical Segment Logical Type = Instance ID Logical Format = 8bit Logical Address. Fieldbus Specific Message SEND_UCMM Size of data Destination IP (high word) Destination IP (low word) Get_Attiribute_All reply (reserved) Vendor ID (MSB) Product Type (LSB) Product Type (MSB) Product Code (LSB) Product Code (MSB) Version (Major) Version (Minor) Status (LSB) Status (MSB) Serial no. (LSB) Serial no. Serial no. Serial no. (MSB) Product Name Length Product Name Char #1 Product Name Char #2 Product Name Char #3 Product Name Char #4 Product Name Char #5 Product Name Char #6 Product Name Char #7 Product Name Char #8 Product Name Char #9 Product Name Char #10 Product Name Char #11 10-59 UCMM Request (UCMM_REQUEST) 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 volume 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 Command no. Extended Header Message data Response data Anybus 008Dh Explicit message request Requested data (or an error code) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Message data byte 2 Message data byte 3 ... ... Message data byte n Command (ID) 4002h 008Dh (size) 0001h 0001h 0000h 0000h Service Request Request Path Size (in words) Padded EPATHa (optional service data) Expected response (ID) 0002h 008Dh (size) 0001h 0001h 0000h 0000h Reply Service Reserved (00h) General Status Size of Additional Status Additional Status Response_data a. Request path according to the EtherNet/IP Specification, Appendix C - ‘Data Management’ Fieldbus Specific Message UCMM_REQUEST Data size 10-60 Register Class (REGISTER_CLASS) 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 Command no. Extended Header Message data Response data Application 008Bh Class ID (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Message data byte 2 Command (ID) 4002h 008Bh 0002h 0001h 0001h 0000h 0000h Class ID (high byte) Class ID (low byte) Expected response (ID) 0002h 008Bh 0002h 0001h 0001h 0000h 0000h Fault information Class ID (high byte) Class ID (low byte) Fieldbus Specific Message REGISTER_CLASS 2 bytes of data (1 word) 10-61 Deregister Class (DEREGISTER_CLASS) 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 Command no. Extended Header Message data Response data Application 008Eh Class ID (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Message data byte 2 Command (ID) 4002h 008Eh 0002h 0001h 0001h 0000h 0000h Class ID (high byte) Class ID (low byte) Expected response (ID) 0002h 008Eh 0002h 0001h 0001h 0000h 0000h Fault information Class ID (high byte) Class ID (low byte) Fieldbus Specific Message DEREGISTER_CLASS 2 bytes of data (1 word) 10-62 Enable Routing (ENABLE_ROUTING) Description This mailbox command enables the routing functionality of the module. Note: This command can only be sent during module initialization. Initiated by Command no. Extended Header Message data Response data Application 0091h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0091h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0091h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message ENABLE_ROUTING 10-63 Register Port (REGISTER_PORT) Description This command is used to register a port in the Port Object (See EtherNet/IP specification vol. 1 chapters 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 Command no. Extended Header Message data Response data Application 0090h Instance attributes 1,2,3,4 and 7. (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Data byte 1 Data byte 2 Data byte 3 Data byte 4 Data byte 5 Data byte 6 Data byte 7 ... Data byte n Data byte n+1 Data byte n+2 Data byte n+3 ... Data byte z Data byte z+1 Data byte z+2 Command (ID) 4002h 0090h (size) 0001h 0001h 0000h 0000h Port Type (high) Port Type (low) Port Number (high) Port Number (low) Port Object Size (high) Port Object Size (low) Expected response (ID) 0002h 0090h (size) 0001h 0001h 0000h 0000h Fault Information Port Type (high) Port Type (low) Port Number (high) Port Number (low) Port Object Size (high) Port Object Size (low) Port Object EPATH (Padded)a Port Object EPATH (Padded)a Port Name Length Port Name Char #1 Port Name Char #2 ... Port Name Char #n Node address Node address Port Name Length Port Name Char #1 Port Name Char #2 ... Port Name Char #n Node address Node address Fieldbus Specific Message REGISTER_PORT Size of data in bytes (Continued on next page) 10-64 a. See EtherNet/IP Specification, Appendix C - ‘Data Management’ Register Port Example The following example registers a ControlNet redundant port (3) with port number 3. The port object points to class F0h (ControlNet object) instance 01h. The name of the port is “ControlNet”, and the node address is 8 on port 3. Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Data byte 1 Data byte 2 Data byte 3 Data byte 4 Data byte 5 Data byte 6 Data byte 7 Data byte 8 Data byte 9 Data byte 10 Data byte 11 Data byte 12 Data byte 13 Data byte 14 Data byte 15 Data byte 16 Data byte 17 Data byte 18 Data byte 19 Data byte 20 Data byte 21 Data byte 22 Data byte 23 Continued on next page... Command (ID) 4002h 0090h 0017h 0001h 0001h 0000h 0000h 00h 03h 00h 03h 00h 02h 20h F0h 24h 01h 0Ah 43h 6Fh 6Eh 74h 72h 6Fh 6Ch 4Eh 65h 74h 03h 08h Expected response (ID) 0002h 0090h 0017h 0001h 0001h 0000h 0000h Fault Information 00h 03h 00h 03h 00h 02h 20h F0h 24h 01h 0Ah 43h 6Fh 6Eh 74h 72h 6Fh 6Ch 4Eh 65h 74h 03h 08h Fieldbus Specific Message REGISTER_PORT 23 bytes of data Port Type (high) Port Type (low) Port Number (high) Port Number (low) Port Object Size (high) Port Object Size (low) Port Object EPATH Port Object EPATH Port Object EPATH Port Object EPATH Port Name Length Port name: “C” Port name: “o” Port name: “n” Port name: “t” Port name: “r” Port name: “o” Port name: “l” Port name: “N” Port name: “e” Port name: “t” Port to leave node = 3 On ControlNet = 8 10-65 The [Port] section in the .EDS file should look like this to fit the example above: [Port] Port1 = TCP, “TCP/IP”, “20 F5 24 01”, 2; $ $ $ $ Port Port Path Port type name to object supporting this port number Port2 = ControlNet, “ControlNet”, “20 F0 24 01”, 3; $ $ $ $ Port Port Path Port type name to object supporting this port number 10-66 Route Unconnected Send (ROUTE_REQUEST) 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 application 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 Command no. Extended Header Message data Response data Anybus 008Fh The unconnected send message received by the module The application shall respond with the data returned by the target device. 10-67 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data byte 1 Message data byte 2 Message Request Command (ID) 4002h 008Fh (size) 0001h 0001h 0000h 0000h Transaction ID (low) Transaction ID (high) Priority / Time tick Time-out ticks Msg. req. size (low) Msg. req. size (high) Service Code Request Path Size Req. Path (Padded EPATH) Request Data 00h (PAD) (Only if Msg.req.size is odd) Message databyte n Route Path Size 00h (reserved) Route Path Expected response (ID) 0002h 008Fh (size) 0001h 0001h 0000h 0000h Successful response: Transaction ID (low) Transaction ID (high) General Status = 00h 00h (Reserved) Service Response Data Unsuccessful response: Transaction ID (low) Transaction ID (high) General Status = 00h Size of additional status Fieldbus Specific Message ROUTE_REQUEST Datasize Response data byte 1 Response data byte 2 Response data byte n Response data byte 1 Response data byte 2 Additional status Remaining path size Response data byte n 10-68 Enable Reset Notification (ENABLE_ID_RESET_NOTIFY) Description This command enables reset notification. When reset notification is enabled and the identity object receives a valid reset request, the module will send an ID_RESET_NOTIFY to the application. (See 1069 “Reset Notification (ID_RESET_NOTIFY)”) It is possible to change how the module should react when the identity object receives a valid reset request, by altering the Notify Type Value (See below) Note: This command can only be sent during module initialisation. Initiated by Command no. Extended Header Message data Response data Application 0092h Notify type (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Databyte • Command (ID) 4002h 0092h 0001h 0001h 0001h 0000h 0000h Notify type Expected response (ID) 0002h 0092h 0001h 0001h 0001h 0000h 0000h Notify type Fieldbus Specific Message ENABLE_ID_RESET_NOTIFY 1 byte of data (See below) Notify Type Value 00h: When the identity object receives a valid reset request, the module sends an ID_RESET_NOTIFY to the application. 01h: When the identity object receives a valid reset request, the configuration file is erased, and the module sends an ID_RESET_NOTIFY to the application. 10-69 Reset Notification (ID_RESET_NOTIFY) 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 Command no. Extended Header Message data Response data Anybus 0093h Reset Type (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Databyte • Command (ID) 4002h 0093h 0001h 0001h 0001h 0000h 0000h Reset Type Reset Type Value 00h: Power on reset 01h: Out of box configuration Expected response (ID) 0002h 0093h 0001h 0001h 0001h 0000h 0000h Reset Type Fieldbus Specific Message ID_RESET_NOTIFY 1 byte of data (See below) 10-70 Get Reset Parameter (GET_ID_RESET_PARAM) Description Using this command, it is possible to determine what type of reset that was received via EtherNet/IP Initiated by Command no. Extended Header Message data Response data Application 0095h Reset Type Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 • Command (ID) 4002h 0095h 0000h 0001h 0001h 0000h 0000h - Reset Type Value 00h: Power on reset 01h: Out of box configuration Expected response (ID) 0002h 0095h 0001h 0001h 0001h 0000h 0000h Reset Type Fieldbus Specific Message GET_ID_RESET_PARAM Response Databyte 10-71 Copy I/O Status (COPY_IO_STATUS) 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 Command no. Extended Header Message data Response data Application 0094h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0094h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0094h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message COPY_IO_STATUS 10-72 Disable EtherNet/IP (DISABLE_ETHERNET_IP) Description This mailbox command disables support for the EtherNet/IP protocol. Note: This command can only be sent during module initialization. Initiated by Command no. Extended Header Message data Response data Application 000Ah - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 000Ah 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 000Ah 0000h 0001h 0001h 0000h 0000h Fault information Fieldbus Specific Message DISABLE_ETHERNET_IP 10-73 Change Ethernet Port (CHANGE_ETHERNET_PORT) Description This command changes the port number reported by the Port Object. Initiated by Command no. Extended Header Message data Response data Application 0096h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Databyte • Command (ID) 4002h 0096h 0001h 0001h 0001h 0000h 0000h Port no. Port no. Desired port number. Expected response (ID) 0002h 0096h 0001h 0001h 0001h 0000h 0000h Port no. Fieldbus Specific Message Change Ethernet Port 10-74 Reset on IP Change (RST_ON_IP_CHANGE) 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 Identity Object is registered in the application, this causes a reset message to be sent to the application. Initiated by Command no. Extended Header Message data Response data Application 0097h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0097h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0097h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message RST_ON_IP_CHANGE 10-75 Enable Configuration Assembly (ENABLE_CONFIG_SY) 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 Command no. Extended Header Message data Response data Application 0098h The response indicates if the command was accepted. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0098h 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 0098h 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message ENABLE_CONFIG_SY 10-76 Configuration Assembly Request (CONFIG_SY_REQUEST) Description If enabled, this command is issued spontaneously by the module upon reception of a Forward_Openrequest that contains a data segment. Initiated by Command no. Extended Header Message data Response data Anybus 0099h - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Fragmented Message Data • Command (ID) 4002h 0099h 0000h 0001h 0001h 0000h 0000h Fragment Type Prod. Conn. Point (word) Con. Conn. Point (word) Configuration Data Fieldbus Specific Message CONFIG_SY_REQUEST Fragment Type Fragment Type 0000h 0001h 0002h • Expected response (ID) 0002h 0099h 0000h 0001h 0001h 0000h 0000h Fragment Type Prod. Conn. Point (word) Con. Conn. Point (word) Configuration Data Description First fragment of new message Subsequent fragment Last fragment. Signals the end of the fragmented data. Fragmented Message Data The data in this message is fragmented, which means that the message will be issued repeatedly until all data has been transferred. The first fragment contains the Producing/Consuming Connection Point, followed by a block of Configuration Data. The remaining fragments only contains Configuration Data. The application must monitor the Fragment Type-register. Upon reception of the last fragment, the application shall assemble and process the Configuration Data as a complete message. 10-77 Enable Exact IO Match (ENABLE_IO_MATCH) 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 Command no. Extended Header Message data Response data Application 009Ah - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 009Ah 0000h 0001h 0001h 0000h 0000h - Expected response (ID) 0002h 009Ah 0000h 0001h 0001h 0000h 0000h - Fieldbus Specific Message ENABLE_IO_MATCH 10-78 Mailbox Socket Interface The Anybus module features a transparent socket interface, allowing the application to send and receive transparent data via TCP/IP or UDP/IP. The mailbox socket interface can be used in two modes: • 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 processed as normal). Up to 32 simultaneous blocking sockets are supported. Note: Blocking sockets do not have any status information in the fieldbus specific area. Commands in this category: Mailbox Command Socket non-blocking (SOCKET_NB) Socket blocking (SOCKET_B) Listen (LISTEN) Accept (ACCEPT) Connect (CONNECT) Send (SEND) Receive (RECEIVE) Send To (SEND_TO) Receive From (RECV_FROM) Close (CLOSE) Send Fragment (SEND_FRAG) Receive Fragment (RECV_FRAG) Send Fragment To (SEND_FRAG_TO) Receive Fragment From (RECV_FRAG_FROM) Get Socket Option (GET_SOCKET_OPTION) Set Socket Option (SET_SOCKET_OPTION) Description Creates a socket in non-blocking mode. Page 10-79 Creates a socket in blocking mode. 10-80 Starts listen on a socket for incoming connections. 10-81 Accepts connections for sockets in blocking mode. 10-82 Tries to connect a socket to a client. 10-83 Sends a message to a connected socket. 10-85 Receives a message form a connected socket. 10-86 Sends a message to an unconnected UDP socket to a specified host. Receives a message from an unconnected UDP socket. 10-87 10-88 Closes a socket (and connection). 10-89 Sends a fragment of a message with a maximum total size of 4096 bytes. Receives a fragment of a message with a total maximum size of 4096 bytes. Sends a fragment of a message with a total maximum size of 4096 bytes to an unconnected UDP socket. Receives a fragment of a message with a total maximum size of 4096 bytes from an unconnected UDP socket. Read options from a socket. 10-90 10-96 Sets options to a socket 10-97 10-91 10-93 10-94 10-79 Socket Non-Blocking (SOCKET_NB) 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 Command no. Extended Header Message data Response data Application 0040h The socket type (TCP or UDP) and the port number to bind the socket to. The response indicates if the command was accepted. The response indicates which socket descriptor that is used and the port number the socket is associated to. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message dataword 1 Message dataword 2 • Command (ID) 4002h 0040h 0004h 0001h 0001h 0000h 0000h Socket type Port number Socket Type Value 0001h 0002h Socket type TCP socket UDP socket Expected response (ID) 0002h 0040h 0004h 0001h 0001h 0000h 0000h Fault information Socket descriptor Port number Fieldbus Specific Message SOCKET_NB 4 bytes of data (2 words) 10-80 Socket Blocking (SOCKET_B) 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 Command no. Extended Header Message data Response data Application 003Fh The socket type (TCP or UDP) and the port number to bind the socket to. The response indicates if the command was accepted. The response indicates which socket descriptor that is used and the port number the socket is associated to. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message dataword 1 Message dataword 2 • Command (ID) 4002h 003Fh 0004h 0001h 0001h 0000h 0000h Socket type Port number Socket Type Value 0001h 0002h Socket type TCP socket UDP socket Expected response (ID) 0002h 003Fh 0004h 0001h 0001h 0000h 0000h Fault information Socket descriptor Port number Fieldbus Specific Message SOCKET_B 4 bytes of data (2 words) 10-81 Listen (LISTEN) Description This mailbox command makes a socket listen for new connections. If the Anybus module detects a connection 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 Command no. Extended Header Message data Response data Application 0041h Socket Descriptor, Fault Information - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0041h 0000h 0001h 0001h 0000h 0000h Socket descriptor (reserved, set to 0000h) - Expected response (ID) 0002h 0041h 0000h 0001h 0001h 0000h 0000h Socket descriptor Fault information Fieldbus Specific Message LISTEN 10-82 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 Command no. Extended Header Message data Response data Application 0050h Socket Descriptor, Fault Information, Local Port no, Host Port no, Host IP New socket descriptor Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0050h 0000h 0001h 0001h 0000h 0000h Socket descriptor (reserved, set to 0000h) - Expected response (ID) 0002h 0050h 0002h 0001h 0001h 0000h 0000h Socket Descriptor Local Port No. Host Port No. Host IP-address word 1 Host IP-address word 2 Fault information New socket descriptor Fieldbus Specific Message ACCEPT Response dataword 10-83 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 sockets 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 connection 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 Command no. Extended Header Message data Response data Application 0042h Socket Descriptor, Fault Information, Connection Result IP address, Port number (the response holds a copy of the command data) 10-84 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data word 1 Message data word 2 Message data word 3 • Command (ID) 4002h 0042h 0006h 0001h 0001h 0000h 0000h Socket descriptor (reserved, set to 0000h) IP address (high) IP address (low) Port number Expected response (ID) 0002h 0042h 0006h 0001h 0001h 0000h 0000h New Socket Descriptor Connection result Fault information IP address (high) IP address (low) Port number Connection Result Code (Only for blocking sockets) Code 0003h 0004h 0005h 0006h Status Connected Connection Refused Connection Timeout Connection Failed Fieldbus Specific Message CONNECT 6 bytes of data (3 words) 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 Command no. Extended Header Message data Response data Application 0043h Socket Descriptor, Fault Information Data to send (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0043h (size) 0001h 0001h 0000h 0000h Socket descriptor (reserved, set to 0000h) Data to send Expected response (ID) 0002h 0043h (size) 0001h 0001h 0000h 0000h Socket Descriptor Fault information Sent data Fieldbus Specific Message SEND Max. 256 bytes 10-86 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 Command no. Extended Header Message data Response data Application 0044h Socket Descriptor, Bytes to receive, Fault Information Received data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0044h 0000h 0001h 0001h 0000h 0000h Socket descriptor Bytes to receive (in bytes) - Expected response (ID) 0002h 0044h (size) 0001h 0001h 0000h 0000h Socket Descriptor Fault information Received data Fieldbus Specific Message RECV Maximum 256 bytes Response data 10-87 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 Command no. Extended Header Message data Response data Application 0045h Socket Descriptor, IP-address, Port number, Fault Information Data to send Sent data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0045h (size) 0001h 0001h 0000h 0000h Socket descriptor IP-address (high) IP-address (low) Port number (reserved, set to 0000h) Data to send Expected response (ID) 0002h 0045h (size) 0001h 0001h 0000h 0000h Socket descriptor IP-address (high) IP-address (low) Port number Fault information Sent data Fieldbus Specific Message SEND_TO Maximum 256 bytes Destination IP address Port number 10-88 Receive From (RECV_FROM) Description This mailbox command reads the next received datagram from a UDP type socket. The response message 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 Command no. Extended Header Message data Response data Application 0045h Socket Descriptor, Bytes to receive, IP-address, Port number, Fault Information Received data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0046h 0000h 0001h 0001h 0000h 0000h Socket descriptor Receive data size (reserved, set to 0000h) - Expected response (ID) 0002h 0046h (size) 0001h 0001h 0000h 0000h Socket descriptor IP address (high) IP address (low) Port number Fault information Received data Fieldbus Specific Message RECV_FROM Maximum 256 bytes Senders IP-address Sender port number Response data 10-89 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 Command no. Extended Header Message data Response data Application 0047h Socket Descriptor, Fault Information - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0047h 0000h 0001h 0001h 0000h 0000h Socket descriptor - Expected response (ID) 0002h 0047h 0000h 0001h 0001h 0000h 0000h Socket descriptor Fault information Fieldbus Specific Message CLOSE 10-90 Send Fragment (SEND_FRAG) 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 Command no. Extended Header Message data Response data Application 005Eh Socket descriptor, Fragment Type Data to send Sent Data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data • Command (ID) 4002h 005Eh (size) 0001h 0001h 0000h 0000h Socket descriptor Fragment type (reserved, set to 0000h) Data to send Expected response (ID) 0002h 005Eh (size) 0001h 0001h 0000h 0000h Socket descriptor Fragment type No. of sent bytes Fault information Sent data Fieldbus Specific Message SEND_FRAG Max. 256 bytes/fragment See below (Only in last fragment) Fragment Type Value Value 0000h 0001h 0002h Description First fragment of a new message Subsequent fragment of the message Last fragment of the message. When this fragment is sent the entire message will be sent to the socket. 10-91 Receive Fragment (RECV_FRAG) 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 message 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 Command no. Extended Header Message data Response data Application 005Fh Socket descriptor, Fragment Type, Receive Data Size, Bytes Remaining, Fault information Received Data 10-92 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 005Fh 0000h 0001h 0001h 0000h 0000h Socket descriptor Fragment type a Receive data size (reserved, set to 0000h) - Expected response (ID) 0002h 005Fh (size) 0001h 0001h 0000h 0000h Socket Descriptor Fragment type Bytes remaining Fault information Received data Fieldbus Specific Message RECV_FRAG Max. 256 bytes/fragment See below Response data a. The receive data size is only used if the Fragment type = 0000h • Fragment Type Value Value 0000h 0001h Description Receive first fragment of a new message. This receives a new message from the network. Any unread fragments from earlier received datagrams will be overwritten. Receive the next fragment of the message. 10-93 Send Fragment To (SEND_FRAG_TO) Description This mailbox command sends a UDP datagram to a specified IP address and port number. This command 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 maximum size of a fragmented message is 4096 bytes. Initiated by Command no. Extended Header Message data Response data Application 005Ch Socket descriptor, Fragment Type, IP-address, Port number, No. of sent bytes, Fault information Data to send Sent data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Command (ID) 4002h 005Ch (size) 0001h 0001h 0000h 0000h Socket descriptor Fragment type Expected response (ID) 0002h 005Ch (size) 0001h 0001h 0000h 0000h Socket Descriptor Fragment type Extended word 3 IP-address (high)a IP-address (high)a Extended word 4 IP-address (low)a IP-address (low)a Extended word 5 Port numbera (reserved, set to 0000h) Data to send Port numbera No. of sent bytes Fault information Sent data Extended word 6 Extended word 7 Extended word 8 Message data Fieldbus Specific Message SEND_FRAG_TO Max. 256 bytes/fragment See below Destination IP address Destination Port number (Only in last fragment) a. IP-address and Port Number shall only be given in the first fragment. • Fragment Type Value Value 0000h 0001h 0002h Description First fragment of a new message. Subsequent fragment of the message Last fragment of the message. When this fragment is sent the entire message will be sent to the socket. 10-94 Receive Fragment From (RECV_FRAG_FROM) Description This mailbox command reads the next received datagram from a UDP type socket. The response message 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 Command no. Extended Header Message data Response data Application 005Dh Socket descriptor, Fragment Type, Received data size, Bytes remaining, IPaddress, port number, Fault information Received data 10-95 Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 • Command (ID) 4002h 005Dh 0000h 0001h 0001h 0000h 0000h Socket descriptor Fragment type Receive data size (reserved, set to 0000h) - Expected response (ID) 0002h 005Dh (size) 0001h 0001h 0000h 0000h Socket Descriptor Fragment type Bytes remaining IP-address (high) IP-address (low) Port number Fault information Received data Fieldbus Specific Message RECV_FRAG_FROM Max. 256 bytes/fragment The senders IP address The senders port number Response data Fragment Type Value Value 0000h 0001h Description Receive first fragment of a new message. This receives a new message from the network. Any unread fragments from earlier received datagrams will be overwritten. Receive the next fragment of the message. 10-96 Get Socket Option (GET_SOCKET_OPTION) Description This command reads options from a socket. Initiated by Command no. Extended Header Message data Response data Application 0051h Socket descriptor, Socket Option Option Data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0051h 0000h 0001h 0001h 0000h 0000h Socket Descriptor Socket Option HI Socket Option LO Expected response (ID) 0002h 0051h Option data size 0001h 0001h 0000h 0000h Socket Descriptor Socket Option HI Socket Option LO Option Data Socket Options The following options are used to Get settings from a socket: SO_LINGER SO_KEEPALIVE SO_REUSEADDR IP_MULTICAST_TTL IP_MULTICAST_LOOP For more information see section Socket Options page10-98. Fieldbus Specific Message GET_SOCKET_OPTION Response data 10-97 Set Socket Option (SET_SOCKET_OPTION) Description This command changes the settings for a specified socket. Initiated by Command no. Extended Header Message data Response data Application 0052h Socket descriptor, Socket Option Option Data - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0052h Option data size 0001h 0001h 0000h 0000h Socket Descriptor Socket Option HI Socket Option LO Expected response (ID) 0002h 0052h Option data size 0001h 0001h 0000h 0000h Socket Descriptor Socket Option HI Socket Option LO Option Data Fault Information Option data Socket Options The following options are used to Set settings on a socket: SO_LINGER SO_KEEPALIVE SO_REUSEADDR IP_MULTICAST_TTL IP_MULTICAST_LOOP IP_ADD_MEMBERSHIP IP_DROP_MEMBERSHIP TCP_NODELAY For more information see section Socket Options page10-98. Fieldbus Specific Message SET_SOCKET_OPTION 10-98 Socket Options Name Option Value DataType Description SO_LINGER 0x00000080 struct { UINT32 l_onoff UINT32 l_linger } Controls the action taken when unsent data is queued on a socket that is being closed. This option is only valid for TCP sockets. l_onoff 0:Linger OFF (default) Other:Linger ON l_linger Normally defines the linger timeout. NOT SUPPORTED, ALWAYS SET TO 0. If SO_LINGER is disabled, Socket Close returns immediately and the connection is gracefully closed in the background. SO_KEEPALIVE 0x00000008 UINT32 l_keepalive If SO_LINGER is enabled with a zero timeout, Socket Close returns immediately and the connection is reset. Enables/disables keep alive probes on a socket. This option is only valid for TCP sockets. l_keepalive SO_REUSEADDR 0x00000004 UINT32 l_reuseaddr Keep alive can be used to detect if the host is still active, and if not close down the connection. If keep alive is enabled a keep alive probe will be sent to the host after 2 hours with no data being sent or received on a connection. This packet is designed to provoke an ACK response from the host. If no ACK is received another 8 keep alive probes will be sent with 75 seconds interval, and if non of them is ACKed the connection will be reset. Enables/disables reuse address option on a socket. This option is only valid for TCP sockets. l_reuseaddr IP_MULTICAST_TTL 0x0000000A UINT8 b_ttl 0:Keep alive OFF (default) Other: Keep alive ON 0:Reuse address OFF (default) Other: Reuse address ON When reuse address option is enabled it is possible to reuse a TCP port even if the port is busy in TIME_WAIT state. If the port is busy in other states an error will still be generated. This can be useful for a server implementation that is shut down and directly restarted while sockets are still active on its port. Sets the TTL value for multicast packets. This option is only valid for UDP sockets. b_ttl 1-255 (Default 1) The TTL value is part of the IP packet header and specifies the number of routers a packet is allowed to pass before it shall be deleted. The default value of 1 prevents multicast packets from being forwarded beyond the local network. 10-99 IP_MULTICAST_LOOP 0x0000000B UINT8 b_multicastloop Enables/disables multicast packet loopback. This option is only valid for UDP sockets. l_reuseaddr IP_ADD_MEMBERSHIP 0x0000000C struct { UINT32 l_multiaddr UINT32 l_interface } 0:Multicast loopback OFF 1: Multicast loopback ON (default) Adds membership to a multicast group. This option is only valid for UDP sockets. l_multiaddr l_interface IP_DROP_MEMBERSHIP 0x0000000D struct { UINT32 l_multiaddr UINT32 l_interface } IP address of multicast group to join. IP address of interface to join (own IP address) By joining a multicast group the local multicast router will be notified about the multicast membership (using IGMP) and the local interface network driver will enable reception of multicast datagrams destined for this multicast address. Drops membership from a multicast group. This option is only valid for UDP sockets. l_multiaddr IP address of multicast group to leave. l_interface IP address of interface (own IP address) TCP_NODELAY 0x00002002 UINT32 l_nodelay By leaving a multicast group the local multicast router will be notified and the local interface network driver will disable reception of multicast datagrams destined for this multicast address. Enables/disables the Nagle algorithm on a socket. This option is only valid on TCP sockets. l_nodelay l_nodelay 0:Nagle algorithm ON (default) Other:Nagle algorithm OFF For some applications, especially request/response applications, the performance over a TCP connection may be poor due to the interaction between the Nagle algorithm and the delayed acknowledgment functionality. Then the TCP_NODELAY option can be used to disable the Nagle algorithm to increase performance. For more information about Nagle algorithm see RFC 896. 10-100 10-101 Other Commands Commands in this category: Mailbox Command Alter LNK and ACT Led Functionality (ALT_LNK_ACT_LEDS) Alter Module Status LED Functionality (ALT_MS_LED_FUNCTION) Alter Network Status LED Functionality (ALT_NS_LED_FUNCTION) Get DIP Switch GET_DIP_SWITCH DNS Request (DNS_REQUEST) Send Email (SEND_EMAIL) Request SSI Data (REQUEST_SSI_DATA) Write SSI Data (WRITE_SSI_DATA) Write Output Area (WRITE_OUTPUT_AREA) Description Alter the behaviour of the Link and Activity LEDs. Page 10-102 Alter the behaviour of the Module Status LED 10-103 Alter the behaviour of the Network Status LED 10-104 Returns the setting of the onboard DIP switch 10-105 Asks the configured DNS server for the IP address of a spec- 10-106 ified host Sends an email message to a specified recipient 10-107 Requests SSI data from the application (issued by the Anybus module) Writes SSI data to the application (issued by the Anybus module) Writes data to the Output Area 10-109 10-110 10-111 10-102 Alter LNK and ACT LED Functionality (ALT_LNK_ACT_LEDS) Description This command alters the behaviour of the Link and Activity LEDs. Note: This command may only be issued during initialisation. Initiated by Command no. Extended Header Message data Response data Application 0017h LED function (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte 1 • Command (ID) 4002h 0017h 0001h 0001h 0001h 0000h 0000h LED configuration Expected response (ID) 0002h 0017h 0001h 0001h 0001h 0000h 0000h Fault information LED configuration Fieldbus Specific Message ALT_LNK_ACT_LEDS 1 data byte LED Configuration Value Value 01h 02h Description Led configuration 1 (Led 1 = Link, Led 4 = Activity) Led configuration 2 (Led 1 = Link/Activity, Led 4 = Disabled) 10-103 Alter Module Status LED Functionality (ALT_MS_LED_FUNCTION) Description This function alters the behaviour of the Module Status LED. Note: This command may only be issued during initialisation. Initiated by Command no. Extended Header Message data Response data Application 000Ch LED function (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte 1 • Command (ID) 4002h 000Ch 0001h 0001h 0001h 0000h 0000h LED configuration LED Configuration byte value Value 01h 02h 03h 04h Description Led configuration 1 Led configuration 2 Led configuration 3 Led configuration 4 (Disable) Expected response (ID) 0002h 000Ch 0001h 0001h 0001h 0000h 0000h Fault information LED configuration Fieldbus Specific Message ALT_MS_LED_FUNCTION 1 data byte 10-104 Alter Network Status LED Functionality (ALT_NS_LED_FUNCTION) Description This function alters the behaviour of the Network Status LED. Note: This command may only be issued during initialisation. Initiated by Command no. Extended Header Message data Response data Application 000Dh LED function (the response holds a copy of the command data) Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message databyte 1 • Command (ID) 4002h 000Dh 0001h 0001h 0001h 0000h 0000h LED configuration LED Configuration byte value Value 01h 02h 03h Description Led configuration 1 Led configuration 2 Led configuration 3 Expected response (ID) 0002h 000Dh 0001h 0001h 0001h 0000h 0000h Fault information LED configuration Fieldbus Specific Message ALT_NS_LED_FUNCTION 1 data byte 10-105 Get DIP Switch (GET_DIP_SWITCH) Description This command returns the setting of the onboard switch. Initiated by Command no. Extended Header Message data Response data Application 0012h Switch value Command and response layout Command (ID) 4002h 0012h 0000h 0001h 0001h 0000h 0000h - Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 • Expected response (ID) 0002h 0012h 0001h 0001h 0001h 0000h 0000h Fault information Switch Value Fieldbus Specific Message GET_DIP_SWITCH 1 data byte Response databyte 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 A set bit indicates that the switch is in ON position. 10-106 DNS Request (DNS_REQUEST) Description This command sends a request to the configured DNS server for the IP address of a specified host. Initiated by Command no. Extended Header Message data Response data Application 0030h Host (string, null-terminated) IP address of host, or 0.0.0.0 if not found. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message data Command (ID) 4002h 0030h (size) 0001h 0001h 0000h 0000h Host (string, null-terminated) Expected response (ID) 0002h 0030h 0004h 0001h 0001h 0000h 0000h IP address (high) IP address (low) Fieldbus Specific Message DNS_REQUEST Response data word 1 Response data word 2 10-107 Send Email (SEND_EMAIL) 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 Command no. Extended Header Message data Response data Application 0070h Fault information Email message specification, fragmented. The response data is a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 0070h (fragment size) 0001h 0001h 0000h 0000h Fragment Type - Expected response (ID) 0002h 0070h (fragment size) 0001h 0001h 0000h 0000h SMTP Error Fault information Message data Fragment Data Fragment Data Fieldbus Specific Message SEND_EMAIL Max. 256 bytes / fragment (Last fragment only) 10-108 • Fragment Type This value must match the sequence of the fragments as follows: Value 0000h 0001h 0002h • Description This is the first fragment This is a subsequent fragment This is the last fragment SMTP Error If an SMTP error occurred, the ‘SMTP Error’ word contains the error code from the SMTP server, 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: Fragment no. 1st 2nd 3rd 4th ... ... ... ... (last fragment) Fragment Type 0000h 0001h 0002h Description Recipient(s), separated by semicolon (string, null-terminated) Sender address (string, null-terminated) Subject line (string, null-terminated) Message body 10-109 Request SSI Data (REQUEST_SSI_DATA) 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. See also 8-5 “printf”. Initiated by Command no. Extended Header Message data Response data Anybus 00A0h SSI Identifier SSI Data - Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Command (ID) 4002h 00A0h 0000h 0001h 0001h 0000h 0000h SSI Identifier - Expected response (ID) 0002h 00A0h (data size) 0001h 0001h 0000h 0000h SSI Identifier SSI Data • Fieldbus Specific Message REQUEST_SSI_DATA (size of 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-110 Write SSI Data (WRITE_SSI_DATA) 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. See also 8-7 “scanf”. Initiated by Command no. Extended Header Message data Response data Anybus 00A0h SSI Identifier SSI Data Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Data • Command (ID) 4002h 00A1h (data size) 0001h 0001h 0000h 0000h SSI Identifier - Expected response (ID) 0002h 00A1h 0000h 0001h 0001h 0000h 0000h SSI Identifier - Fieldbus Specific Message WRITE_SSI_DATA (size of 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-111 Write Output Area (WRITE_OUTPUT_AREA) Description This command writes data to the Output Area. Initiated by Command no. Extended Header Message data Response data Application 00C0h Offset, No. of bytes Data The response data field holds a copy of the command data. Command and response layout Message ID Message information Command Data size Frame count Frame number Offset high Offset low Extended word 1 Extended word 2 Extended word 3 Extended word 4 Extended word 5 Extended word 6 Extended word 7 Extended word 8 Message Data • Command (ID) 4002h 00C0h (data size) 0001h 0001h 0000h 0000h Offset No. of Bytes - Expected response (ID) 0002h 00C0h 0000h 0001h 0001h 0000h 0000h - Data Data Offset Destination in Output Area. • No. of Bytes Number of bytes to write. • Data Data that shall be written. Fieldbus Specific Message WRITE_OUTPUT_AREA (size of data) Chapter 11 Fieldbus Specific Area 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. Address Contents Access 640h - 64Bh Socket Status (Descriptor 0) RO 64Ch - 657h Socket Status (Descriptor 1) RO 658h - 663h Socket Status (Descriptor 2) RO 664h - 66Fh Socket Status (Descriptor 3) RO 670h - 67Bh Socket Status (Descriptor 4) RO 67Ch - 677h Socket Status (Descriptor 5) RO 688h - 693h Socket Status (Descriptor 6) RO 694h - 69Fh Socket Status (Descriptor 7) RO 6A0h - 6ABh Socket Status (Descriptor 8) RO 6ACh - 6B7h Socket Status (Descriptor 9) RO 6B8h - 6C3h Socket Status (Descriptor 10) RO 6C4h - 6CFh Socket Status (Descriptor 11) RO 6D0h - 6DBh Socket Status (Descriptor 12) RO 6DCh - 6E7h Socket Status (Descriptor 13) RO 6E8h - 6F3h Socket Status (Descriptor 14) RO 6F4h - 6FFh Socket Status (Descriptor 15) RO 700h - 701h Network Status RO 702h - 7AFh Reserved 7B0h - 7B1h EtherNet/IP Status 7B2h - 7BFh Reserved RO - Fieldbus Specific Area 11-2 Socket Status Structure Offset 000h 001h 002h - 003h 004h - 005h 006h - 007h 008h - 00Bh Register Socket Type Socket Status Socket Information Local Port Number Host Port Number Host IP Address Type Byte Byte Word Word Word Long Socket Type Value 00h 01h 02h 03h - FFh Description No active socket (free to use) TCP socket UDP socket (reserved) Socket Status Value 00h 01h 02h 03h 04h 05h 06h 07h - FFh Description Not active Listening Connecting Connected Connection refused Connection timed out Connection failed (reserved) Socket Information b15 Bit DA b14 b13 b12 b11 b10 b9 b8 b7 (reserved) b6 b5 b4 b3 Description 0: Data Not Available 1: Data Available Local Port Number This is the local port number that the socket is associated with. Host Port Number This is the host port number that the socket is associated with or connected to. Host IP-address This is the host IP-address that the socket is associated with or connected to. b2 b1 b0 DA Fieldbus Specific Area 11-3 Network Status b15 b14 b13 Bit LINK b12 b11 b10 b9 b8 (reserved) b7 b6 b5 b4 b3 b2 b1 b0 COLL USE LINK Description 0: Ethernet hardware link is not established 1: Ethernet hardware link is established 0: IP address collision probing has not yet been attempted 1: IP address collision probing has passed, the configured IP address is used by the module Note: This bit is only relevant when the ‘COLL’-bit is zero (below) 0: No IP address collision detected 1: IP address collision detected, another host uses the configured IP address USE COLL EtherNet/IP Status b15 b14 b13 b12 b11 b10 Connection Status 7B0h (MSB) Description No connection Connected Connection time out Run/Idle Status Value 00h 01h b8 b7 b6 b5 b4 b3 b2 Run/Idle Status b1 b0 7B1h (LSB) Connection Status Value 00h 01h 02h b9 Description Idle Run Appendix A Miscellaneous Control Register Area Fieldbus Type The fieldbus type value for this product is 0083h. Module Type The module type value for this product is 0101h (Anybus-S). Watchdog Counter Input (7D2h... 7D3h) If the application has enabled the Watchdog Counter Input and doesn’t update it properly, the module will seize all network participation (the MAC controller will be held in reset). Event Notification Cause/Source Registers • ON/OFF Line Indication (FBON/FBOF) By default, these bits are triggered by the Link Status. For other options, see... - 3-4 “On/Off Line Configuration” - 10-42 “Modbus ON/OFF Line Configuration (MB_ON_OFF_LINE_CONFIG)” • Network Reset Functionality (RST) The reset functionality is triggered by the reset service in the Identity Object. Additionally, the application can be notified of reset requests through the mailbox interface. See also... - 9-3 “Reset Service” - 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)” Miscellaneous A-2 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. Formatting the File System In case of major file system damage, it is possible to re-initialise the file system as follows: 1. Short jumper named ‘J2’ 2. Apply power 3. Wait until the watchdog LED turns red 4. Disconnect power 5. Remove jumper 6. Apply power 7. Wait approx. 1 minute while the filesystem is being formatted. IP-related implementation details In order to conserve memory the module has a limit on how many inbound TCP connections that can be open at a given time. In the present implementation this is set to 300 and the on-board servers as well as the application-accessible socket interface allocates their ‘listening’ TCP sockets from this pool. Appendix B Technical Specification Electrical Specification Protective Earth (PE) Requirements 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 described in the general Anybus-S Parallel Design Guide. HMS cannot guarantee proper EMC behaviour unless this requirement is fulfilled. Isolation Isolation between the application, the network, and protective earth (PE): Isolation Barrier Application to PE Application to Network Network to PE Creepage 200V 250V 100V Working Voltage Clearance 2500V 2500V 1500V External 2.0mm 2.5mm 1.4mm Distance Internal 0.4mm 0.4mm 0.4mm (Tests performed according to EN 60950-1) 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. Technical Specification B-2 Environmental Specification Temperature Test performed according to IEC-68-2-1 and IEC 68-2-2. Operating: Storage: 0... 70°C -25... +85°C (32... 158°F) (-13... 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. Regulatory Compliance EMC (CE) EMC pre-compliance testing has been conducted according to the following standards: • Emission: EN 50 081-2:1993 Tested per • EN 55022 Class A: 1997 EN 55022 Class A: 1997 Immunity: EN 61000-6-2: 1999 Tested per EN 61000-4-2:1995 EN 61000-4-3:1996 EN 61000-4-4:1995 EN 61000-4-5:1995 EN 61000-4-6:1996 Appendix C Connectors Application Connector (Consult the general Anybus-S Parallel Design Guide for more information) Ethernet RJ45 (Standard Connector) Pin 1 2 3 4 5 6 7 8 Signal TD+ TDRD+ RD- Notes Normally left unused; to ensure signal integrity, these pins are tied together and terminated to PE via a filter circuit in the module. Normally left unused; to ensure signal integrity, these pins are tied together and terminated to PE via a filter circuit in the module. 1 8 Board to Board Pin 1 2 3 4 5 6 7 8 9 10 Signal Connect to RJ45 pin... Shield Housing 4 5 TD+ 1 TD2 RD+ 3 7 RD6 8 Notes (See notes for pins 4 and 5 in RJ45 connector) (not used) (See notes for pins 7 and 8 in RJ45 connector) (See notes for pins 7 and 8 in RJ45 connector) 1 10 Appendix D Mechanical Specification Measurements, Connectors & LEDs MM
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement