Fieldbus Appendix ® Anybus -S Drive Profile EtherNet/IP Doc.Id. SCM-1200-141 Rev. 2.00 Connecting DevicesTM +$/067$'&+,&$*2.$5/658+(72.<2%(,-,1*0,/$1208/+286(&29(175<381(&23(1+$*(1 HMS Industrial Networks Mailing address: Box 4126, 300 04 Halmstad, Sweden Visiting address: Stationsgatan 37, Halmstad, Sweden E-mail: [email protected] Web: www.anybus.com Important User Information This document provides an overview of the Anybus-S Drive Profile EtherNet/IP, and should be used in conjunction with the Anybus-S Parallel Design Guide and the Anybus-S Drive Profile Design Guide. The reader of this document is expected to be familiar with hardware and software design and to have basic knowledge in the EtherNet/IP fieldbus system, and communication systems in general. For general information about the Anybus-S platform, consult the general Anybus-S Parallel Design Guide. Liability Every care has been taken in the preparation of this manual. Please inform HMS Industrial Networks AB of any inaccuracies or omissions. The data and illustrations found in this document are not binding. We, HMS Industrial Networks AB, reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be considered as a commitment by HMS Industrial Networks AB. HMS Industrial Networks AB assumes no responsibility for any errors that may appear in this document. There are many applications of this product. Those responsible for the use of this device must ensure that all the necessary steps have been taken to verify that the applications meet all performance and safety requirements including any applicable laws, regulations, codes, and standards. HMS Industrial Networks AB will under no circumstances assume liability or responsibility for any problems that may arise as a result from the use of undocumented features, timing, or functional side effects found outside the documented scope of this product. The effects caused by any direct or indirect use of such aspects of the product are undefined, and may include e.g. compatibility issues and stability issues. The examples and illustrations in this document are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular implementation, HMS Industrial Networks AB cannot assume responsibility for actual use based on these examples and illustrations. Intellectual Property Rights HMS Industrial Networks AB has intellectual property rights relating to technology embodied in the product described in this document. These intellectual property rights may include patents and pending patent applications in the US and other countries. Trademark Acknowledgements Anybus ® is a registered trademark of HMS Industrial Networks AB. All other trademarks are the property of their respective holders. Warning: This is a class A product. in a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures. ESD Note: This product contains ESD (Electrostatic Discharge) sensitive parts that may be damaged if ESD control procedures are not followed. Static control precautions are required when handling the product. Failure to observe this may cause damage to the product. Anybus-S Drive Profile EtherNet/IP User Manual Rev 2.00 Copyright© HMS Industrial Networks AB Feb 2012 Doc Id SCM-1200-141 Table of Contents Table of Contents Preface About This Document Related documents ................................................................................................................................... 1 Document history..................................................................................................................................... 1 Revision list ............................................................................................................................................... 1 Conventions .............................................................................................................................................. 2 Terminology & abbreviations................................................................................................................. 2 Support....................................................................................................................................................... 3 Chapter 1 Anybus-S Drive Profile EtherNet/IP Features ...................................................................................................................................................... 4 Fieldbus conformance notes................................................................................................................... 4 Front view.................................................................................................................................................. 5 Network Status LEDs.................................................................................................................... 6 Chapter 2 Filesystem Introduction .............................................................................................................................................. 7 Filesystem overview ................................................................................................................................. 8 System files ................................................................................................................................................ 8 Chapter 3 Network Configuration TCP/IP settings........................................................................................................................................ 9 Domain & host settings......................................................................................................................... 10 IP access control..................................................................................................................................... 10 Gleaning (ARP)....................................................................................................................................... 11 DHCP/BootP......................................................................................................................................... 11 HICP (Anybus IPconfig)....................................................................................................................... 12 Industrial protocol modes..................................................................................................................... 12 Chapter 4 FTP Server General..................................................................................................................................................... 13 User accounts .......................................................................................................................................... 13 Connection example (Windows Explorer) ......................................................................................... 13 Anybus-S Drive Profile EtherNet/IP to PROFIBUS Doc.Rev. 2.00 Doc.Id. SCM-1200-141 2 Chapter 5 Web Server General..................................................................................................................................................... 14 Protected files.................................................................................................................................. 14 Authorization .......................................................................................................................................... 14 Content types .......................................................................................................................................... 15 Chapter 6 SMTP Client General..................................................................................................................................................... 16 Client configuration................................................................................................................................ 16 Operation................................................................................................................................................. 16 Email definitions..................................................................................................................................... 17 Chapter 7 Server Side Include (SSI) General..................................................................................................................................................... 18 Functions ................................................................................................................................................. 19 Changing the SSI output strings........................................................................................................... 29 Chapter 8 Bus Config Parameters General..................................................................................................................................................... 30 Parameters ............................................................................................................................................... 30 Chapter 9 Modbus/TCP Implementation details .......................................................................................................................... 31 Modbus register map ............................................................................................................................. 32 Default register mapping................................................................................................................. 32 Vendor specific mapping ................................................................................................................. 32 Formula mapping........................................................................................................................... 33 Modbus message time out..................................................................................................................... 33 Chapter 10 Modbus/UDP Implementation details .......................................................................................................................... 34 Anybus-S Drive Profile EtherNet/IP to PROFIBUS Doc.Rev. 2.00 Doc.Id. SCM-1200-141 3 Chapter 11 EtherNet/IP Implementation details .......................................................................................................................... 35 Identity Object (01h).............................................................................................................................. 36 Message Router, (02h) ........................................................................................................................... 38 Assembly Object (04h) .......................................................................................................................... 39 Connection Manager (06h) ................................................................................................................... 42 Motor Data Object (28h) ...................................................................................................................... 43 Control Supervisor Object (29h).......................................................................................................... 45 Reset service.................................................................................................................................... 46 State machine................................................................................................................................. 47 Run/Stop Event Matrix ............................................................................................................... 48 AC/DC-Drive Object (2Ah) ................................................................................................................ 49 DLR Object (47h) .................................................................................................................................. 51 Drive Parameter Object (90h) .............................................................................................................. 52 Drive IO Map Object (91h).................................................................................................................. 53 Reset service.................................................................................................................................... 53 ABSDP Configuration Object (92h) ................................................................................................... 54 TCP/IP Interface Object (F5h) ........................................................................................................... 55 Ethernet Link Object (F6h) .................................................................................................................. 56 Appendix A Mechanical Specification Appendix B Environmental Specification Temperature ............................................................................................................................................ 58 Relative humidity .................................................................................................................................... 58 EMC compliance .................................................................................................................................... 58 Appendix C Connectors Application connector ........................................................................................................................... 59 Ethernet connector ................................................................................................................................ 59 Appendix D Electrical Characteristics Protective Earth (PE) requirements .................................................................................................... 60 Power supply ........................................................................................................................................... 60 Anybus-S Drive Profile EtherNet/IP to PROFIBUS Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Preface P. About This Document For more information, documentation etc., please visit the HMS website, ‘www.anybus.com’. P.1 Related documents Document name Anybus-S Drive Profile Design Guide Anybus-S Drive Profile EtherNet/IP Fieldbus Appendix Open Modbus/TCP Specification RFC 821 RFC 1918 The CIP Networks Library Volume 1 Common Industrial Protocol The CIP Networks Library Volume 2 EtherNet/IP Adaptation of CIP Author HMS Schneider Automation Network Working Group ODVA P.2 Document history Summary of Recent Changes ( 1.00 ... 2.00) Change New template Corrected typos in SSI chapter Added ABSDPConfiguration object Updated reset service and network idle mode Updated Control timeout parameter Updated info on Class 1 connections Added Modbus/UDP functionaility Added note 2 in section on Gleaning Updated Assembly Object with new instances Page(s) 54 46 30 42 11 35, 40, 41 P.3 Revision list Revision 1.00 2.00 Date Author 2006-03-02 PeP 2012-02-14 KeL Chapter(s) Description First version All New template Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 About This Document 2 P.4 Conventions The following conventions are used throughout this document: • Numbered lists provide sequential steps • Bulleted lists provide information, not procedural steps • 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, where NNNN is the hexadecimal value. • Binary values are written in the format NNNNb, where NNNN is the binary value. • All pictures in this document 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 • All measurements expressed in this document have a tolerance of ±0.25mm unless otherwise stated. • The expression ‘A»B’ means ‘a transition from A to B’. P.5 Terminology & abbreviations The following terminology and abbreviations are used throughout this document. Term Bus Config Parameters Module Anybus Specific Fieldbus Configuration Meaning End-user configurable settings Anybus-S DP EtherNet/IP Fieldbus specific settings available in Anybus-S Drive Profile Development Tool Anybus-S Drive Profile Development Tool Freeware development tool for the Anybus-S Drive Profile platform, supplied by HMS CPI Common Profile Interface (see Anybus Drive Profile Design Guide) FTP File Transfer Protocol. In case of this product, a protocol used to upload/ download files to/from the built-in file system. HTTP HyperText Transfer Protocol SSI Server Side Include. A system used to provide dynamic content in email messages and web pages. GW Gateway IP Internet Protocol DNS Domain Name System DHCP Dynamic Host Configuration Protocol ARP Address Resolution Protocol. Translates protocol addresses to MAC addresses. MAC Media Access Control MAC address Physical network address CIP Common Industrial Protocol DLR Device Level Ring Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 About This Document 3 P.6 Support Sales Support HMS Sweden (Head Office) E-mail: [email protected] E-mail: [email protected] Phone: +46 (0) 35 - 17 29 56 Phone: +46 (0) 35 - 17 29 20 Fax: +46 (0) 35 - 17 29 09 Fax: +46 (0) 35 - 17 29 09 Online: www.anybus.com Online: www.anybus.com HMS North America E-mail: [email protected] E-mail: [email protected] Phone: +1-312 - 829 - 0601 Phone: +1-312-829-0601 Toll Free: +1-888-8-Anybus Toll Free: +1-888-8-Anybus Fax: +1-312-629-2869 Fax: +1-312-629-2869 Online: www.anybus.com Online: www.anybus.com HMS Germany E-mail: [email protected] E-mail: [email protected] Phone: +49 (0) 721-989777-000 Phone: +49 (0) 721-989777-000 Fax: +49 (0) 721-989777-010 Fax: +49 (0) 721-989777-010 Online: www.anybus.de Online: www.anybus.de HMS Japan E-mail: [email protected] E-mail: [email protected] Phone: +81 (0) 45-478-5340 Phone: +81 (0) 45-478-5340 Fax: +81 (0) 45-476-0315 Fax: +81 (0) 45-476-0315 Online: www.anybus.jp Online: www.anybus.jp E-mail: [email protected] E-mail: [email protected] Phone: +86 (0) 10-8532-3183 Phone: +86 (0) 10-8532-3023 Fax: +86 (0) 10-8532-3209 Fax: +86 (0) 10-8532-3209 Online: www.anybus.cn Online: www.anybus.cn E-mail: [email protected] E-mail: [email protected] Phone: +39 039 59662 27 Phone: +39 039 59662 27 Fax: +39 039 59662 31 Fax: +39 039 59662 31 Online: www.anybus.it Online: www.anybus.it HMS China HMS Italy HMS France E-mail: [email protected] E-mail: [email protected] Phone: +33 (0) 3 68 368 034 Phone: +33 (0) 3 68 368 033 Fax: +33 (0) 3 68 368 031 Fax: +33 (0) 3 68 368 031 Online: www.anybus.fr Online: www.anybus.fr HMS UK & Eire E-mail: [email protected] E-mail: [email protected] Phone: +44 (0) 1926 405599 Phone: +46 (0) 35 - 17 29 20 Fax: +44 (0) 1926 405522 Fax: +46 (0) 35 - 17 29 09 Online: www.anybus.co.uk Online: www.anybus.com HMS Denmark E-mail: [email protected] E-mail: [email protected] Phone: +45 (0) 35 38 29 00 Phone: +46 (0) 35 - 17 29 20 Fax: +46 (0) 35 17 29 09 Fax: +46 (0) 35 - 17 29 09 Online: www.anybus.com Online: www.anybus.com HMS India E-mail: [email protected] E-mail: [email protected] Phone: +91 (0) 20 40111201 Phone: +91 (0) 20 40111201 Fax: +91 (0) 20 40111105 Fax: +91 (0) 20 40111105 Online: www.anybus.com Online: www.anybus.com Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 1 1. Anybus-S Drive Profile EtherNet/IP This product conforms to all aspects of the application interface defined in the Anybus-S Drive Profile Design Guide, making it fully interchangeable with any other device following that specification. The Anybus-S Drive Profile EtherNet/IP communication module provides instant Ethernet connectivity via the patented Anybus-S application interface. The module uses the Common Profile Interface (CPI), which means that no network specific support code needs to be implemented in the application firmware to support this product and take advantage of it’s features. For in-depth information regarding the Anybus-S Drive Profile software interface, consult the general Anybus-S Drive Profile Design Guide. Anybus-S Drive Profile Development Tool The Anybus-S Drive Profile Development Tool is a Windows application, used to configure the Profile Server in the module. It enables customer specific settings, vendor name, device name and parameter configuration. The tool will also generate the necessary EDS-file for EtherNet/IP configuration. 1.1 Features General • Common Profile Interface (CPI) • Galvanically isolated network interface • 100/10Mbit, Full or Half Duplex • ARP, DHCP & HICP support • On-board IP configuration switches • AC Drive Profile (device type 02h) • DC Drive Profile (device type 13h) • Built in filesystem • Web server • SMTP client (event triggered) • Server Side Include (SSI) functionality • FTP Server Industrial Protocols • EtherNet/IP • Modbus/TCP • Modbus/UDP 1.2 Fieldbus conformance notes Note: The following information is preliminary/pending: • This product is pre-certified for network compliance. While this is done to ensure that the final product can be certified, it does not necessarily mean that the final product doesn’t need recertification. Contact HMS for further information. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Anybus-S Drive Profile EtherNet/IP 5 1.3 Front view 1 4 Link/Activity 3 # 1 2 3 4 5 Description Application Connector Ethernet Connector Configuration Switches Anybus Watchdog Status Indicators 2 Module Status 3 Network Status 5 (not used) 2 1 Comment Consult the general Anybus-S Drive Profile Design Guide for further information. See “Ethernet connector” on page 59 See “TCP/IP settings” on page 10 Consult the general Anybus-S Drive Profile Design Guide for further information These LEDs indicate run time status and errors to the user, see below. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Anybus-S Drive Profile EtherNet/IP 6 1.3.1 Network Status LEDs 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 # 1 Indication Link/Activity 2 Module Statusa 3 Network Status State Off Green Green, flashing Off Green Red, flashing Red Off Green, flashing Green Red, flashing Red 4 1 2 4 3 Description No link or power off Link established Receiving/Transmitting data Normal operation Minor fault Major fault No power or no IP address Waiting for connections EtherNet/IP: At least one connection has been opened towards the module. Modbus/TCP: At least one connection has been opened towards the module. EtherNet/IP: One or more connections has timed out Modbus/TCP: A Modbus Message Timeout has occurred, see “Modbus message time out” on page 33 Duplicate IP address (npt used) a. This LED is required for EtherNet/IP conformance and must be labelled with one of the fol- lowing: “MS”, “Mod”, “Mod Status” or “Module Status” Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 2 2. Filesystem 2.1 Introduction General The module features a built in filesystem, which is used to store information such as web files, network communication settings, email messages etc. Storage areas The filesystem consists of the different storage locations, a.k.a.’Discs’: • Disc 0 (1151kByte, Non Volatile) This section is intended for static files such as web files etc. Once the product is released, this section can be locked so that it cannot be altered by the end user. • Disc 1 (128kByte, Non Volatile) This section is intended for files which can be altered by the end user. • Disc 2 (1024kByte, Volatile) This section is intended for temporary storage. This section is volatile, i.e. any data placed here will be lost in case of power loss or reset. 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 Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Filesystem 8 2.2 Filesystem overview Disc 0 Disc 1 Disc 2 cfg ssi_str.cfg http.cfg ip_accs.cfg smtp.cfg ip.cfg hicp.cfg email email_1.cfg email_2.cfg email_3.cfg email_4.cfg email_5.cfg pswd pswd sys_pswd.cfg temp 2.3 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 module itself, e.g. when using SSI (see chapter 7, ‘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 format of each system file is described in detail later in this document. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 3 3. Network Configuration 3.1 TCP/IP settings To be able to participate on the network, the module needs a valid TCP/IP configuration. The module can either retrieve these settings from Bus Config Parameters #2...#14 (see “Parameters” on page 31), or use the on-board switches. • Bus Config Parameters (Switches = zero) If the on-board switches are set to 0 (zero), the module will use the settings stored in Bus Config Parameters #2...#14 (see “Parameters” on page 31). Bus Config Parameters #2...#14 may also be affected by... - Gleaning/ARP (See “Gleaning (ARP)” on page 11) - EtherNet/IP (See “TCP/IP Interface Object (F5h)” on page 55) - DHCP/BootP (See “DHCP/BootP” on page 11) - HICP (See “HICP (Anybus IPconfig)” on page 12) - SSI (See “StoreEtnConfig” on page 21) • Switches (Switches <> zero) If the on-board switches are set to a value other than 0 (zero), the module will use the settings in the table below. The switches are read by the module during startup, i.e. any changes require a reset in order to have effect. SW1 OFF OFF OFF OFF OFF ... SW2 OFF OFF OFF OFF OFF ... SW3 OFF OFF OFF OFF OFF ... SW4 OFF OFF OFF OFF OFF ... SW5 OFF OFF OFF OFF OFF ... SW6 OFF OFF OFF OFF ON ... SW7 OFF OFF ON ON OFF ... SW8 OFF ON OFF ON OFF ... Subnet Gateway IP (Determined by bus config parameters #2...#14) 255.255.255.0 192.168.0.255 192.168.0.1 255.255.255.0 192.168.0.255 192.168.0.2 255.255.255.0 192.168.0.255 192.168.0.3 255.255.255.0 192.168.0.255 192.168.0.4 ... ... ... ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON OFF ON 255.255.255.0 ON OFF 255.255.255.0 ON ON (invalid setting) 192.168.0.255 192.168.0.255 192.168.0.253 192.168.0.254 Note: The Bus Config Parameters remains unaffected by the switch settings. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Network Configuration 10 3.2 Domain & host settings The domain- and host settings are stored in the system file ‘/cfg/ip.cfg’. Note that the contents of this file may be affected by SSI, DHCP, HICP and EtherNet/IP. File format: [DNS1 address] xxx.xxx.xxx.xxx [DNS2 address] xxx.xxx.xxx.xxx [Domain name] domain • Primary and Secondary DNS (Currently not used) • Default domain name for not fully qualified host names. • Host name of the module [Host name] anybus 3.3 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 ‘/cfg/ip_accs.cfg’. File Format: [Web] xxx.xxx.xxx.xxx [FTP] xxx.xxx.xxx.xxx [Modbus/TCP] xxx.xxx.xxx.xxx • Nodes listed here may access the web server. • Nodes listed here may access the FTP server. • Nodes listed here may connect to the module via Modbus/TCP. • Nodes listed here may connect to the module via Modbus/UDP. [Modbus/UDP] xxx.xxx.xxx.xxx • Nodes listed here may connect to the module via EtherNet/IP. [Ethernet/IP] xxx.xxx.xxx.xxx • Fallback setting, used by the module when one or several of the keys above are omitted. [All] xxx.xxx.xxx.xxx Note: ‘*’ may be used as a wildcard to select IP series. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Network Configuration 11 3.4 Gleaning (ARP) The IP address may be changed during runtime using the ARP command from a PC. Please note that since ARP automatically sets the subnet mask to 255.255.255.0, the first three bytes of the new IP address must be the same as for the PC executing the command, or the PC will not be able to address the module. Note: In order to use this functionality, the MAC address of the module must be known (the MAC address is printed on a label on the bottom side of the module). In the following example, the IP address is set via the Microsoft Windows™ command prompt. 1. Make an entry into the host's ARP table defining the module's IP- and MAC address: arp -s <IP address> <MAC address> 2. Execute the ping command from the host: ping <IP address> If successful, the module detects that it was addressed with the correct MAC address and adopts it’s new IP settings from the Ping-command. The new settings will be stored in Bus Config Parameters #3...14 (See “Parameters” on page 31). 3. Remove the entry in the ARP table as follows (optional): arp -d <IP address> Note 1: Gleaning can be disabled in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration). Note 2: As many DHCP servers will ping an IP address before handing it out, Gleaning is always disabled if DHCP is enabled. 3.5 DHCP/BootP If enabled, the module can retrieve its 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 Bus Config Parameters #3...14). If no current settings are available (i.e. set to 0), the module will halt and indicate an error on the on-board status LEDs (the network configuration can however still be set using HICP or ARP, see “HICP (Anybus IPconfig)” on page 12 and “Gleaning (ARP)” on page 11). Note: DHCP support can be disabled in Bus Config Parameter #2, see “Parameters” on page 31. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Network Configuration 12 3.6 HICP (Anybus IPconfig) 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. 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 ‘ABSDP-EIP2PORT’. To alter its network settings, double-click on its entry in the list. A window will appear, containing the settings for the module. Validate the new settings by clicking ‘Set’. The new IP configuration will be stored in Bus Config Parameters #2...#14, see “Parameters” on page 31. Optionally, the configuration can be protected from unauthorized access by a password. To enter a password, click on the ‘Change password’ checkbox, and enter the password under ‘New password’. The password is stored in the system file ‘/cfg/hicp.cfg’. File Format: [Password] <password> Note: HICP can be disabled in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration). 3.7 Industrial protocol modes The module supports 3 industrial protocol modes: • Modbus/TCP (See chapter 9, (“Modbus/TCP”)) • EtherNet/IP ‘Profile’ (See chapter 11, (“EtherNet/IP”)) • EtherNet/IP ‘Transparent’ (See chapter 11, (“EtherNet/IP”)) • Modbus/UDP (See chapter 10, (“Modbus/UDP”)) The protocol mode is determined by Bus Config Parameter #15, see “Parameters” on page 31. Note that the module needs to be restarted in order for any changes to have effect. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 4 4. FTP Server 4.1 General The module features a built in FTP server, which can be used to upload/download files to the filesystem using any standard FTP client. The FTP root directory can be set to either the system root or to ‘/cfg’ in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration). The FTP server can be disabled in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration). 4.2 User accounts The file ‘/cfg/pswd/sys_pswd.cfg’ contains a list of users allowed to connect to the FTP server. File Format: Username1:Password1 Username2:Password2 Username3:Password3 Note: If this file is missing, the server accepts anonymous FTP. 4.3 Connection example (Windows Explorer) The built in FTP client in Windows Explorer can easily be used to access the file system. 1. Open a Windows Explorer by right-clicking on the ‘Start’ button and selecting ‘Explore’. 2. In the address field, type FTP://<user>:<password>@xxx.xxx.xxx.xxx - Substitute xxx.xxx.xxx.xxx with the IP address of the module - Substitute <user> with the username to use - Substitute <password> with the password to use 3. Press enter. The Explorer will now attempt to connect to the module using the specified settings. If successful, the filesystem of the module is displayed in the Explorer window. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 5 5. Web Server 5.1 General The module features a built-in web server with SSI capabilities. The web content can be fully customized to fit a particular application and allow access to drive parameters, configuration settings etc. For more information about SSI, see chapter 7, ‘Server Side Include (SSI)’. The web server can be disabled in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration). 5.1.1 Protected files For security reasons, the following files are protected from web access: • Files named ‘web_accs.cfg’ • Files located in ‘/cfg/pswd’ • Files located in ‘/pswd’ 5.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 Username3:Password3 ... UsernameN:PasswordN [AuthName] (message goes here) Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 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. Doc.Id. SCM-1200-141 Web Server 15 5.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 FileType3:ContentType3 ... FileTypeN:ContentTypeN [SSIFileTypes] FileType1 FileType2 FileType3 ... FileTypeN Note: Up to 50 content types and 50 SSI file types may be specified in this file. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 6 6. SMTP Client 6.1 General The built in email client is capable of sending predefined email messages on parameter data events configured by the user. The SMTP client supports SSI, however note that some SSI functions cannot be used in email messages (this is specified separately for each SSI command). For more information about SSI, see chapter 7, ‘Server Side Include (SSI)’. 6.2 Client configuration 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 ‘/cfg/smtp.cfg’. This file is read once during startup, i.e. any changes requires that the module is restarted in order to have effect. File format [SMTP address] xxx.xxx.xxx.xxx [SMTP username] user Outgoing email server address SMTP server login. Optional. [SMTP password] password 6.3 Operation As mentioned previously, the email client sends predefined message based on parameter data events. In operation, the client works as follows: 1. Trigger source 2. A logical AND is performed between the trigger source and a mask value 3. The result is compared to a reference value 4. If the result of the compared values are true, the email is sent to the specified recipient(s). Which events, and which parameters, that shall cause a particular message to be sent, is specified separately for each message. For more information, see “Email definitions” on page 17. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 SMTP Client 17 6.4 Email definitions The messages are stored in the ‘/cfg/email’ directory. It is possible to define up to 5 messages, each triggered by separate events. Note that in order to be properly recognized by the module, the files must be named ‘email_1.cfg’, ‘email_2.cfg’ ... ‘email_5.cfg’. File format [Parameter] parameter number [Mask] mask value [Operand] operand [Value] reference value [To] recipient [From] sender [Subject] subject line [Headers] optional extra headers [Message] message body Key Parameter Mask Operand Value To From Subject Headers Message Value Vendor specific drive parameter to use as a trigger source Mask value, applied on the ‘Parameter’ prior to comparison (logical AND). Possible values are ‘<‘, ‘=’ or ‘>’. Specifies how ‘Parameter’ shall be compared with ‘Value’. Used as a reference value for comparison. Recipient; destination email address Sender email address Email subject. One line only. Optional; may be used to provide additional headers. The actual message. Scanned for SSI No Yes Note: Hexadecimal values must be written with the prefix ‘0x’ in order to be recognized by the module. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 7 7. Server Side Include (SSI) 7.1 General SSI are special commands embedded in the source document. When the module encounters an SSI command, it executes the it, and replaces it with the result of the command. 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: Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 19 7.2 Functions DisplayIP() This function returns the IP address. Syntax: <?--#exec cmd_argument='DisplayIP( Mode )'--> Mode: 0: Return the configured IP address 1: Return the actual IP address Output: The IP address is returned as an ASCII string. DisplaySubnet() This function returns the subnet mask. Syntax: <?--#exec cmd_argument='DisplaySubnet( Mode )'--> Mode: 0: Return the configured Subnet Mask 1: Return the actual Subnet Mask Output: The Subnet Mask is returned as an ASCII string. DisplayGateway() This function returns the default gateway. Syntax: <?--#exec cmd_argument='DisplayGateway( Mode )'--> Mode: 0: Return the configured Gateway address. 1: Return the actual Gateway address. Output: The default gateway address is returned as an ASCII string. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 20 DisplayDHCPState() This function returns the current DHCP state. Syntax: <?--#exec cmd_argument='DisplayDHCPState( “String 1”, “String 2” )'--> String 1: String to return if DHCP is enabled, e.g. “DHCP on”. String 2: String to return if DHCP is disabled, e.g. “DHCP off”. Output: The output will be one of the two strings specified in the command, depending on the current DHCP state. StoreEtnConfig1 This function stores a passed IP configuration in Bus Config Parameters #2...#14. Note that the passed settings will not have effect until the module has been restarted. To use this function, include it in a form containing one or several of following objects: • SetIp • SetSubnet • SetGateway • SetDHCPState (value must be “on” or “off”) Syntax: <?--#exec cmd_argument='StoreEtnConfig'--> Output: “Invalid IP address!” “Invalid Subnet mask!” “Invalid Gateway address!” “Invalid IP address or Subnet mask!” “Invalid DHCP state!” “Configuration stored successfully.” “Failed to store configuration!” DisplaySMTPServer This function returns the SMTP server address. Syntax: <?--#exec cmd_argument='DisplaySMTPServer'--> Output: The IP address of the SMTP server is returned as an ASCII string. 1. This SSI function cannot be used in email messages. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 21 DisplaySMTPUser This function returns the user name used for SMTP authentication. Syntax: <?--#exec cmd_argument='DisplaySMTPUser'--> Output: Username. DisplaySMTPPswd This function returns the password used for SMTP authentication. Syntax: <?--#exec cmd_argument='DisplaySMTPPswd'--> Output: Password. StoreSMTPConfig1 This function stores a passed SMTP configuration to the system file ‘/cfg/smtp.cfg’. Note that the new settings will not have effect until the module has been restarted. To use this function, include it in a form containing one or several of following objects: • SetSMTPServer • SetSMTPUser • SetSMTPPswd Syntax: <?--#exec cmd_argument='StoreSMTPConfig'--> Output: “Invalid SMTP server address!” “Configuration stored successfully.” “Failed to store configuration!” DisplayFWVersion This function returns the firmware revision of the module. Syntax: <?--#exec cmd_argument='DisplayFWVersion'--> Output: Revision number as ASCII string. 1. This SSI function cannot be used in email messages. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 22 DisplayBLVersion This function returns the boot loader revision of the module. Syntax: <?--#exec cmd_argument='DisplayBLVersion'--> Output: Revision number as ASCII string. DisplayCPIVersion This function returns the Common Profile Interface (CPI) revision of the module. Syntax: <?--#exec cmd_argument='DisplayCPIVersion'--> Output: Revision number as ASCII string. DisplaySerial This function returns the production serial number of the module. Syntax: <?--#exec cmd_argument='DisplayCPIVersion'--> Output: Serial number as ASCII string. DisplayMacId This function returns the Ethernet Mac ID in the module. Syntax: <?--#exec cmd_argument='DisplayMacId'--> Output: Ethernet Mac ID as ASCII string. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 23 GetConfigItem() This function reads a specified ‘key’ from a configuration file and returns its value. The module expects the configuration file to have the following format: [key1] Value of Key1 [Key2] Value of Key2 ... [KeyN] Value of KeyN Syntax: <?--#exec cmd_argument='GetConfigItem ( “Filename”, “Key”, “Separator” ) '--> Filename: Configuration file to read from. Key: Key to read value from. Separator: Optional line separator. If not given, new lines are separated by CRLF. Output (if successful): Value of Key. Output (error): “Could not get value for [Key]” Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 24 SetConfigItem()1 This function stores configuration passed from an HTML form to a configuration file. All objects in the passed form, except fields with names starting with underscore (‘_’) will be stored. The object name will be stored as the [Key], and the value will be stored as a value associated with that key. If the file is not found, it is created by the module. If the [Key] isn’t found in the file, the module adds it automatically. Example A form containing the following fields... name=”Speed”, value=”48” name=”Temp”, value=”20” name=”_B1”, value=”submit”2 ... will generate the following configuration file: [Speed] 48 [Temp] 20 Syntax: <?--#exec cmd_argument='SetConfigItem ( “Filename” ) '--> Filename: Destination file. Output (if successful): “Configuration stored to “filename”” Output (error): “Could not store configuration to “filename”” IncludeFile() This function returns the contents of a file. Syntax: <?--#exec cmd_argument='IncludeFile( “Filename” )'--> Filename: File to include. Output (if successful): The contents of the file is returned. Output (error): “Failed to open “filename”” 1. 2. This SSI function cannot be used in email messages. Button used to send the form. To avoid storage, the name begins with underscore (‘_’). Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 25 SaveDataToFile()1 This function saves the data of a passed HTML form to a file. The value of a single object, or, the value of all objects, will be stored in the specified file. Syntax: <?--#exec cmd_argument='SaveDataToFile ( “Filename”, “Object Name”, Mode )'--> Filename: Destination file. Object Name: Optional; if given, only the value of the specified object is stored. If not, the values of all objects are stored. Mode: Append:The information will be appended to the end of the destination file. Overwrite:The destination file will be replaced. Output (if successful): “Data saved to file” Output (error): “Could not store data in “filename”” printf() This function returns a formatted string which may contain drive parameter data. The formatting parameters are similar to that of the standard C-language function ‘printf()’. Syntax: <?--#exec cmd_argument='printf( “String”, Arg1, Arg2, ... , ArgN )'--> String Similar to the C-language function ‘printf()’, the ‘String’ parameter contains two types of objects; ordinary characters which are copied to the output stream, and conversion specifications, each which causes a conversion and printing of the next successive argument (Arg). Conversion specifications are specified with the ‘%’ prefix and ends with a conversion character. Between the prefix and the conversion character there may be, in order: - Flags (in any order): Flag + (space) 0 (zero) # 1. Meaning Specifies left adjustment of the converted argument. Default is right adjustment. Specifies that the number will always be printed with a sign (‘+’ or ‘-’) If the first character is not a sign, a space will be prefixed Specifies padding with leading zeroes. 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 zeroes will not be removed. This SSI function cannot be used in email messages. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 26 - A number specifying the 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 specified field width, it will be padded with spaces (or zeroes if using the 0-flag). - 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 zeroes will be added to make up the necessary width). - A length modifier: Modifier h l (letter ell) L Meaning Indicates that the corresponding argument is to be printed as a short or unsigned short Indicates that the argument is a long or unsigned long - A conversion character: Character d i o x X u c f e E g G % Argument type, converted to byte, short; signed decimal notation. byte, short; unsigned octal notation (without a leading zero). byte, short; unsigned hexadecimal notation (without a leading 0x), using abcdef byte, short; unsigned hexadecimal notation (without a leading 0X), using ABCDEF byte, short; unsigned decimal notation. byte, short; single character, after conversion to unsigned char. long; 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 (zero) suppresses the decimal point. long; decimal notation of the form [-]m.dddddd e±xx, where the number of d’s is specified by the precision. The default precision is 6; a precision of 0 (zero) suppresses the decimal point. long; decimal notation of the form [-]m.dddddd E±xx, where the number of d’s is specified by the precision. The default precision is 6; a precision of 0 (zero) suppresses the decimal point. long; %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 zeroes and trailing decimal point are not printed. No argument is converted, i.e. a ‘%’ is printed. Arg1....N Each argument shall be written in the following format: ReadVendPara( Num ) ... where ‘Num’ is a vendor specific drive parameter. Output (if successful): The formatted string. Output (error): If the specified parameter does not exist, the following string is returned: “Unknown parameter #Num” Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 27 scanf()1 This function reads a string passed from an object in an HTML form, interprets it according the supplied format specification, and stores the result in the drive parameters according to the passed arguments. The formatting parameters are similar to that of the standard C-language function ‘scanf()’. Syntax: <?--#exec cmd_argument='scanf( “Object”, “Format”, Arg1, Arg2, ... , ArgN ), ErrVal1, Errval2, ... Errval3'--> Object: The name of the object with the passed data string. Format: Specifies how the passed object string is formatted. Character d i o x X u c f e E g G % Argument type, converted to byte, short; signed decimal notation. byte, short; unsigned octal notation (without a leading zero). byte, short; unsigned hexadecimal notation (without a leading 0x), using abcdef byte, short; unsigned hexadecimal notation (without a leading 0X), using ABCDEF byte, short; unsigned decimal notation. byte, short; single character, after conversion to unsigned char. long; 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 (zero) suppresses the decimal point. long; decimal notation of the form [-]m.dddddd e±xx, where the number of d’s is specified by the precision. The default precision is 6; a precision of 0 (zero) suppresses the decimal point. long; decimal notation of the form [-]m.dddddd E±xx, where the number of d’s is specified by the precision. The default precision is 6; a precision of 0 (zero) suppresses the decimal point. long; %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 zeroes and trailing decimal point are not printed. No argument is converted, i.e. a ‘%’ is printed. Arg1...N Specifies the destination drive parameters. Each argument must be written in the format ‘WriteVendPara ( Parameter No. )’ ErrVal1...N Optional; specifies the output string in case of an error. Output (if successful): “Write succeeded” Output (error): “Write failed” 1. This SSI function cannot be used in email messages. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 28 SsiOutput() This function instructs the module to temporarily change the output of the next SSI function. Syntax: <?--#exec cmd_argument='SsiOutput( “Success”, “Error” )'--> - Success: - String to use on success. - Error: - String to use in case of a failure. Example: In this example, the output of the scanf() call has been altered temporarily using SsiOutput(). <?--#exec cmd_argument='SsiOutput( “Parameter #8 updated”, “Error!” )'--> <?--#exec cmd_argument='scanf( “Parameter1”, “%d”, WriteVendPara( 8 ) )'--> Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Server Side Include (SSI) 29 7.3 Changing the SSI output strings It is possible to change the default output of SSI functions, either temporarily using SsiOutput() (See “SsiOutput()” on page 28), or permanently by altering the SSI Output String file (see below). SSI output string file If the file ‘/ssi_str.cfg’ is found in the filesystem and is formatted correctly, the some SSI functions will use the output strings specified in this file instead of the default ones. File 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 DHCP state: "String to use when the DHCP state is invalid" Invalid IP or Subnet: "String to use when the IP & Subnet mask does not match" Save Error: "String to use when storage fails" [StoreSMTPConfig] Success: "String to use on success" Invalid SMTP server: "String to use when the SMTP address is invalid" Save Error: "String to use when storage fails" [GetConfigItem] Failure: "String to use on failure"1 [SetConfigItem] Success: "String to use on success"2 Failure: "String to use on failure"2 [IncludeFile] Failure: "String to use on failure"2 [SaveDataToFile] Success: "String to use on success"2 Failure: "String to use on failure"2 [scanf] Success: "String to use on success" Failure: "String to use on failure" 1. 2. To include the key name, %s can be included once To include the filename, %s can be included once Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 8 8. Bus Config Parameters 8.1 General The Bus Config Parameters are used for end-user accessible fieldbus specific configuration. These parameters are read once during startup, i.e. the module has to be restarted in order for any changes to have effect. 8.2 Parameters Comm rate Default Value 0 Min. Value 0 Max. Value 4 2 DHCP enable 1 0 1 3 4 5 6 7 8 9 10 11 12 13 14 IP address 1 IP address 2 IP address 3 IP address 4 Subnet mask 1 Subnet mask 2 Subnet mask 3 Subnet mask 4 GW address 1 GW address 2 GW address 3 GW address 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 0 0 2 16 Control timeout 0 0 32767 17 Stop function 0 0 1 18 19 20 21 22 23 24 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 65535 65535 65535 65535 65535 65535 # Name 1 15 Protocol Output 1 Output 2 Output 3 Output 4 Input 1 Input 2 Input 3 Input 4 Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Description Notes 0: Auto negotiate 1: 100Mbps, full duplex 2: 100Mbps, half duplex 3: 10Mbps, full duplex 4: 10Mbps, half duplex 0: DHCP disabled 1: DHCP enabled IP address, first octet IP address, second octet IP address, third octet IP address, fourth octet Subnet mask, first octet Subnet mask, second octet Subnet mask, third octet Subnet mask, fourth octet Gateway address, first octet Gateway address, second octet Gateway address, third octet Gateway address, fourth octet - 0: Modbus/TCP 1: EtherNet/IP (Profile) 2: EtherNet/IP (Transparent) 2: Modbus/UDP Control timeout in tenths of a second. 0: Disabled 0: Ramp stop 1: Coast stop 1st parameter mapped to instance 102 2nd parameter mapped to instance 102 3rd parameter mapped to instance 102 4th parameter mapped to instance 102 1st parameter mapped to instance 103 2nd parameter mapped to instance 103 3rd parameter mapped to instance 103 4th parameter mapped to instance 103 These settings may also be affected by... • Gleaning/ARP (See “Gleaning (ARP)” on page 11) • EtherNet/IP (See “TCP/IP Interface Object (F5h)” on page 55) • DHCP/BootP (See “DHCP/BootP” on page 11) • HICP (See “HICP (Anybus IPconfig)” on page 12) • SSI (See “StoreEtnConfig” on page 20) See “Industrial protocol modes” on page 12 See “Modbus message time out” on page 33 - Doc.Id. SCM-1200-141 Chapter 9 9. Modbus/TCP 9.1 Implementation details The Modbus/TCP protocol is an implementation of the standard Modbus protocol running on top of TCP/IP. It uses the same function codes and addressing model, with the added benefits associated with Ethernet. The drive parameters etc. are mapped directly to Modbus/TCP registers as described in “Modbus register map” on page 32. The module supports up to 8 simultaneous Modbus/TCP connections. If a previously opened connection has been inactive for 1 minute, the module closes that connection. All Modbus/TCP messages are received/transmitted on TCP port no. 502. For detailed information regarding the Modbus/TCP protocol, consult the Open Modbus Specification. Function codes The following Modbus/TCP function codes are implemented in the module: Function code 3 6 16 23 Function Read Multiple Registers Write Single Register Force Multiple Registers Read/Write Registers Exception codes CPI parameter error codes are translated to Modbus/TCP exception codes as follows: CPI error code Command not supported (08h) Parameter not settable (0Eh) State operation failure (19h) Invalid parameter data error (09h) Parameter not supported (14h) Device state conflict (10h) Not enough data (13h) Too much data (15h) Too high parameter value (D0h) Too low parameter value (D1h) Vendor specific error (1Fh) Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Modbus/TCP exception code Illegal function (01h) Illegal data address (02h) Illegal data value (03h) Doc.Id. SCM-1200-141 Modbus/TCP 32 9.2 Modbus register map All drive registers are mapped to Modbus ‘4xxxx’-registers. Note that if a fault is detected while writing multiple registers (applies to function codes 16 & 23), all registers processed before the one generating the error will be written. Depending on how the module is configured in Anybus-S Drive Profile Development Tool, data is represented in three different ways on the network: • Default Register Mapping (See “Default register mapping” on page 32) • Vendor Specific Mapping (See “Vendor specific mapping” on page 32) • Formula Mapping (See “Formula mapping” on page 33) 9.2.1 Default register mapping If no mapping of vendor specific parameters has been downloaded to the module, and formula mapping isn’t selected, the Default Register Mapping will be used. In this mode, each parameter occupies two Modbus registers. If the parameter is 1 or 2 bytes long, it will be placed in the higher of the two Modbus registers. The lower register will be set to 0 (zero). Register # 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 40011 40012 ... 4nnnn 4nnnn+1 Mapped to... Vendor Specific Control Word (1...4 bytes) Vendor Specific Reference Value (1...4 bytes) Vendor Specific Status Word (1...4 bytes) Vendor Specific Actual Value (1...4 bytes) 1st Vendor specific Parameter 2nd Vendor specific Parameter Last vendor specific Parameter. nnnn = (Number of vendor parameters *2) + 7 9.2.2 Vendor specific mapping Vendor specific mapping between Modbus addresses and drive parameters are made with the AnybusS Drive Profile Development Tool. The configuration is then downloaded into the module prior to execution. Parameters which are 3 or 4 bytes in length will require 2 Modbus registers. Also note that Modbus/ TCP is big endian, i.e. the most significant word is stored at the lowest Modbus address. Vendor specific Control Word, Status Word, Reference Value & Actual Value, are set up as fieldbus specific configuration in the Anybus-S Drive Profile Development Tool. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Modbus/TCP 33 9.2.3 Formula mapping In this mode, drive parameters, vendor specific Control/Status Words, and Vendor Specific Reference/ Actual values must be one or two bytes long. If greater, data may be overwritten. Formula Mapping is selected in the Anybus-S Drive Profile Development Tool, and mapping in this mode is as follows: Register # 40001 40002 40003 40004 40005 40006 4XXXX Mapped to... Vendor Specific Control Word (1...2 bytes) Vendor Specific Reference Value (1...2 bytes) (reserved) Vendor Specific Status Word (1...2 bytes) Vendor Specific Actual Value (1...2 bytes) (reserved) Drive Parameter XXXX, where XXXX is a value between 7 and 9999. 9.3 Modbus message time out The Modbus protocol itself has no support for time outs etc. on the application layer. Since this may be required when controlling a drive, a simple method of supervision has been implemented in the module. This functionality works by monitoring incoming Modbus/TCP messages; if no supported Modbus/ TCP command has been received within a specified time out period, the module clears the FB_RUNNING-bit to indicate that the network is no longer controlling the drive. Once communication has been re-established (i.e. a valid Modbus/TCP command is received), the module sets the FB_RUNNING-bit to 1. The time out value is specified in Bus Config parameter #16 (see “Parameters” on page 30). The value is specified in tenths of a second, i.e a value of 42 equals 4.2 seconds. A value of zero disables the time out functionality. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Chapter 10 10. Modbus/UDP 10.1 Implementation details The implementation of the Modbus/UDP protocol in the Anybus-S Drive Profile EtherNet/IP module is very similar to the implementation of Modbus/TCP, see “Modbus/TCP” on page 31. Instead of Modbus/TCP frames, Modbus/UDP frames are sent and received. All Modbus/UDP messages are received/transmitted on UDP port no. 502. The UDP checksum will be used, as there is no checksum in the Modbus/UDP protocol. Invocation Identification Protocol Identifier Unit Identifier Function Code Lenght Field Modbus Subframe Data Modbus/UDP frame (UDP frame payload) Name Invocation Identification Protocol Identifier Length Field Modbus Unit Identifier Subframe Function Code Data Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Description Used for transaction pairing (2 bytes) Modbus (value: 0000h) Number of bytes (LL) in Modbus Subframe (value = 00LLh) Used to identify a remote unit located on a non-TCP/IP network (1 byte) Modbus function code (1 byte) - Doc.Id. SCM-1200-141 Chapter 11 11. EtherNet/IP 11.1 Implementation details EtherNet/IP is based on the Common Industrial Protocol (CIP), which is also the framework for both DeviceNet and ControlNet, to carry and exchange data between nodes. EtherNet/IP uses port 44818 (TCP/UDP) for encapsulation messages, and port 2222 for I/O Data. The EtherNet/IP implementation in the module supports up to 48 concurrent TCP connections. EtherNet/IP ‘Profile’ vs. EtherNet/IP ‘Transparent’ As mentioned previously, the EtherNet/IP implementation in the module offers two modes of operation, a.k.a EtherNet/IP ‘Profile’ and EtherNet/IP ‘Transparent’. In ‘Profile’-mode, the module follows the drive profile specification, whereas in ‘Transparent’-mode, vendor specific Control/Status/Reference/Actual words are used. Functionality Assembly Object AC/DC Object Control Supervisor Object EtherNet/IP ‘Profile’ Instance 20/70, 21/71, 102/103 & 121/171 exists. Implemented according to the EtherNet/IP specification. EtherNet/IP ‘Transparent’ Instance no. 100/101 & 102/103 exists. Not implemented; object reports ‘Device State Conflict’. Electronic Data Sheet (.EDS) Each device on EtherNet/IP is associated with an Electronic Data Sheet (a.k.a. EDS-file), which holds a description of the device and its functions. The Anybus-S Drive Profile Development Tool generates a suitable .EDS-file automatically based on the actual configuration. Implemented objects The following objects are implemented in the module: • Identity Object (01h) • Message Router, (02h) • Assembly Object (04h) • Connection Manager (06h) • Motor Data Object (28h) • Control Supervisor Object (29h) • AC/DC-Drive Object (2Ah) • DLR Object (47h) • Drive Parameter Object (90h)1 • Drive IO Map Object (91h)1 • ABSDP Configuration Object (92h)1 • ABSDP Configuration Object (92h) • Ethernet Link Object (F6h) 1. The class number of this object can be altered. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 36 11.2 Identity Object (01h) Services Class services: Get Attribute All Get Attribute Single Instance services: Get Attribute All Get Attribute Single Reset (See “Reset service” on page 37) Class attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Type UINT Value Default: 005Ah Description HMS Industrial Networks AB UINT Default: 0002h Default: 0021h AC Drivea Anybus-S Drive Profile EtherNet/IP Module serial number AnyBus-S EtherNet/IP Major fieldbus version Minor fieldbus version Device status, see table below Serial number of the module Name of product Instance attributes # 1 Access Get Name Vendor ID 2 Get Device Typea 3 Get 4 Get 5 6 7 Get Get Get Product Codea UINT Struct of: Revisionab USINT USINT Status WORD Serial Number UDINT Product Namea SHORT_STRING a a. Can be customized in the Anybus-S Drive Profile Development Tool (specific fieldbus configuration) b. If set to 00.00 in the Anybus-S Drive Profile Development Tool, the module reports its firmware revision number. Status attribute bit(s) 0 1 2 3 4-7 8 9 10 11 12 - 15 Name Module Owned (reserved) Configured (reserved) Extended Device Status Minor recoverable fault Minor recoverable fault Major recoverable fault Major unrecoverable fault (reserved) Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 37 Extended device status Value 0000b 0010b 0011b 0100b 0110b 0111b Meaning Unknown Faulted I/O Connection No I/O connection established Non volatile configuration bad Connection in Run mode Connection in Idle mode Reset service The Identity object provides a reset service. There are two different types of reset requests: • Type 0: ‘Power Cycling Reset’ Upon receiving this request, the module calls ‘CPI_CallEmulatePowerCycle (P48)’. • Type 1: ‘Out of box reset’ Upon receiving this request, the module formats the filesystem in disc 1, thus resetting all internal configuration parameters. It then calls ‘CPI_CallFactoryReset (P49), followed by ‘CPI_CallEmulatePowerCycle (P48)’. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 38 11.3 Message Router, (02h) Services Class services: Instance services: - Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 39 11.4 Assembly Object (04h) The Assembly Object binds attributes of multiple objects, which allows data to or from each object to be sent or received over a single connection. The Assembly Object in this implementation uses static assemblies. As mentioned previously, the module can operate either in ‘Profile’-mode, or ‘Transparent’-mode (determined by Bus Config Parameter #15, see “Parameters” on page 30.). This affects the available instances and their usage in this object. Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Class attributes # 1 Access Get Name Revision Type UINT Value 0002h Description Revision 2 Instance attributes Instances/Connection points implements the following attributes. # 3 Access Get Name Data Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Type Array of BYTE Value - Description Data produced/consumed by the Anybus module, see “Consuming instances (output)” on page 40 and “Producing instances (input)” on page 41. Doc.Id. SCM-1200-141 EtherNet/IP 40 Consuming instances (output) Write requests are rejected if the assembly is linked to an active I/O connection in run mode. Only one instance can be active at a time; if a second connection is requested, a state conflict error is reported. Mode - Instance no. - Byte no. - Profile 20 0 b7 b6 b5 b4 b3 (no data; used as a heartbeat instance) b2 b1 Fault Reset b0 Run Fwd 1 21 2 Speed Reference (Low byte) 3 Speed Reference (High byte) 0 NetRef NetCtrl Fault Reset Run Rev Run Fwd 1 Transparent Transparent/ Profile Profile 100 102 121a (21) 2 Speed Reference (Low byte) 3 Speed Reference (High byte) 0...X Vendor Specific Control Word (little endian format) ... ... Y...Z Vendor Specific Reference Value (little endian format) 0...X User mapped output parameter 1 (little endian format) ... ... Y...Z User mapped output parameter N (little endian format) 0 NetRef NetCtrl Fault Reset Run Rev Run Fwd 1 (102) 2 Speed Reference (Low byte) 3 Speed Reference (High byte) 4...X User mapped output parameter 1 (little endian format) ... ... Y...Z User mapped output parameter N (little endian format) a. This instance is a combination of instances 21 and 102, only available in profile mode. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 41 Producing instances (input) Mode Profile Instance no. 70 Byte no. 0 b7 b6 b5 b4 b3 b2 b1 Running 1 b0 Faulted 1 71 Transparent Transparent/ Profile Profile 101 103a 171b (71) (103) 2 Speed Actual (Low byte) 3 Speed Actual (High byte) 0 At Reference Ref from Net Ctrl from Net Ready Running 2 (Rev) Running 1 (Fwd) 1 Drive State 2 Speed Actual (Low byte) 3 Speed Actual (High byte) 0...X Vendor Specific Status Word (little endian format) ... ... Y...Z Vendor Specific Actual Value (little endian format) 0...X User mapped input parameter 1 (little endian format) ... ... Y...Z User mapped input parameter N (little endian format) 0 At Reference Ref from Net Ctrl from Net Ready Running 2 (Rev) Running 1 (Fwd) Warning Faulted Warning Faulted 1 Drive State 2 Speed Actual (Low byte) 3 Speed Actual (High byte) 4...X User mapped output parameter 1 (little endian format) ... ... Y...Z User mapped output parameter N (little endian format) a. The size of this instance depends on the number of mapped parameters, see “Drive IO Map Object (91h)” on page 53. When a connection to this instance is opened, a data size check is performed to ensure that the size of the mapped parameters are equal or less than the requested size. When done, the drive parameters are mapped as I/O to the drive. b. This instance is a combination of instances 71 and 103, only available in profile mode. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 42 11.5 Connection Manager (06h) Services Class services: Forward Open Instance services: Forward Close Class 1 connections Class 1 connections are used to transfer I/O data, and can be established to the Assembly Object instances. Each Class 1 connection provides two data transports; one consuming, and one producing. The module supports up to 31 simultaneous Class 1 connections. Producing Instances No. of Supported Class 1 Connections: Supported Transports: Supported Transport Types: Supported Packet Rate (API): Supported Trigger Types: 20 per instance (sharing same transport). Listen only. 1 Point-to-point/Unicast, Multicast 10...3200ms Cyclic Consuming Instances No. of Supported Class 1 Connections: Supported Transports: Supported Transport Types: Supported Packet Rate (API): 20 per instance, exclusive owner 1 Point-to-point/Unicast Unlimited The module supports input only and listen only connections. A listen only connection can only be assigned to an already established exclusive owner connection. An input only connection can be used to host a listen only connection. If the specific exclusive owner connection is closed, the listen only connections associated with that connection will be closed. Input Only and Listen Only Connections Input only assembly instance Listen only assembly instance 198 199 Note: The first four bytes consumed by the device are defined as status information (32-bit run/idle header). This header is not required by the EtherNet/IP specification, however since most master use this header, the module strips off the first four bytes of data consumed by the device and interprets the Run/Idle bits. Class 3 connections Class 3 connections are used to establish connections to the Message Router, and for explicit messaging. The module supports up to 16 simultaneous Class 3 connections. The module supports a packet rate (API) of 10...10000ms for producing connections and an unlimited packet rate for consuming connections. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 43 11.6 Motor Data Object (28h) Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Class attributes # 1 Access Get Name Revision Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Type UINT Value 0001h Description Revision 1 Doc.Id. SCM-1200-141 EtherNet/IP 44 Instance attributes Instances/Connection points implements the following attributes. # 3 Access Get/Set Name MotorType 6 Get/Set RatedCurrent Type Description USINT 1: PM DC 2: FC DC 3: PM Synchronous 4: FC Synchronous 5: Switched Reluctance 6: Wound Rotor Induction 7: Squirrel Cage Induction 8: Stepper 9: Sinusoidal PM BL 10 Trapezoidal PM BL UINT Rated Stator/Armature Current. 7 Get/Set RatedVoltage UINT 8 Get/Set RatedPower UDINT 9 Get/Set RatedFreqb UINT 10 Get/Set RatedTemp UINT 11 Get/Set MaxSpeed UINT 12 Get/Set Polecountb UINT 13 Get/Set TorqConstant UDINT 14 Get/Set Inertia UDINT 15 Get/Set BaseSpeed UINT 19 Get/Set ServiceFactorb USINT Related CPI Function Calls P22 CPI_GetMotorTypea CPI_SetMotorTypea P15 CPI_GetMotorRatedCurrent (Unit: 100mA) CPI_SetMotorRatedCurrent Rated Base/Armature Voltage. P14 CPI_GetMotorRatedVoltage (Unit: V) CPI_SetMotorRatedVoltage Rated Power at Rated Freq/MaxSpeed. P16 CPI_GetMotorRatedPower (Units: W) CPI_SetMotorRatedPower Rated Electrical Frequency P18 CPI_GetMotorRatedFrequency (Unit: Hz) CPI_SetMotorRatedFrequency Rated Winding Temperature P19 CPI_GetMotorRatedTemperature (Units: Degrees C) CPI_SetMotorRatedTemperature Maximum allowed motor speed. P35 CPI_GetMaximumMotorSpeed (Unit: RPM) CPI_SetMaximumMotorSpeed Number of poles in the motor P25 CPI_GetPoleNumber CPI_SetPoleNumber Motor torque constant P20 CPI_GetMotorTorqueConstant (Unit: 0.001 x Nm/A) CPI_SetMotorTorqueConstant Rotor inertia P23 CPI_GetMotorInertia (Unit: 10-6 x kg.m2) CPI_SetMotorInertia Nominal speed at rated frequency/voltage P17 CPI_GetMotorBaseSpeed Units: RPM CPI_SetMotorBaseSpeed Range 0...255 P21 CPI_GetMotorServiceFactor (Unit: %) CPI_SetMotorServiceFactor a. If unsupported, the module reports the motor as a ‘Squirrel Cage Induction’-motor; this will in such case also be the only accepted setting for the ‘set’ service. b. Only applies to AC motors. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 45 11.7 Control Supervisor Object (29h) This object models all the management functions for devices within the ‘Hierarchy of Motor Control Devices’. The behaviour of motor control devices is described by the State Machine (see “State machine” on page 47) and the Run/Stop Event Matrix (see “Run/Stop Event Matrix” on page 48). Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Reset (See “Reset service” on page 46) Class attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Type Bool Bool Bool Value See “Run/Stop Event Matrix” on page 48 Source/Destination for attribute value (internal) Instance 1 attributes # 3 4 5 Access Get/Set Get/Set Get/Set Name Run1 Run2 NetCtrl 6 Get State 7 Get Running1 8 Get Running2 9 Get Ready 10 Get Faulted 11 Get Warning Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Request Run/Stop control to be local or from network. 1: Network control 0: Local control USING 0: Vendor Specific 1: Startup 2: Not Ready 3: Ready 4: Enabled 5: Stopping 6: FaultStop 7: Faulted Bool 1: Enabled and Run1 ..or Stopping and Running1 ..or FaultStop and Running1 0: Other state Bool 1: Enabled and Run2 ..or Stopping and Running2 ..or FaultStop and Running2 0: Other state Bool 1: In state READY, ENABLED or STOPPING 0: Other state Bool 1: Fault Occurred (latched) 0: No faults present Bool 1: Warning (not latched) 0: No warnings present Requests to this attribute causes the module to call CPI_SetNetControl. Drive state machine, see “State machine” on page 47. Equals the FWD bit in the Drive Control Word Equals the REV bit in the Drive Control Word Drive state machine, see “State machine” on page 47. Drive is in FAULTED or FAULT_STOP state. Equals the ALARM bit in the Drive Control Word Doc.Id. SCM-1200-141 EtherNet/IP 46 # Access 12 Get/Set 17 Get/Set Value 0»1:Fault reset 0: No action FaultCode UINT If in Faulted state, this attribute indicates the fault that caused the transition to Faulted state. If not in Faulted state, this attribute indicates the fault that caused the last transition to Faulted state. WarnCode UINT Code word, indicating a warning. If multiple warnings are present, the lowest code value is available here. CtrlFromNet Bool Status of Run/Stop control source: 1: Network control 0: Local control NetFaultMode USINT Action on loss of CIP network 0: Fault + Stop 1: Ignore 2: Vendor specific ForceFault/Trip Bool 0»1: Force 18 Get ForceStatus Bool 20 Get/Set NetIdle Mode USINT 0: Stop 1: Ignore 2: Clear Fieldbus flag 13 Get 14 Get 15 Get 16 Get/Set Name FaultRst Type Bool 0: Not Forced >0:Forced Source/Destination for attribute value (internal) Requests to this attribute causes the module to call CPI_GetAlarmCode (P77) Equals the NETCTRL bit in the Drive Status Word. Requests to this attribute causes the module to call... - CPI_GetNetworkFaultMode (P44) - CPI_SetNetworkFaultMode (P44) When this attribute changes from 0 to 1, the module calls CPI_CallForceFault, causing the TRIP-bit in the Drive Control word to be set. When the drive enters FAULT_STOP or FAULTED, the TRIP-bit is cleared again. Set when ForceFault is requested (see above), and the drive is in state FAULT_STOP or FAULTED. Defines the operation mode when the module receives communication that the network is idle. 11.7.1 Reset service Upon receiving a reset request from the network, the module will stop the motor (CPI_CallCoastStop (P00) or CPI_CallNormalStop (P34), depending on mode) and then call CPI_CallFaultReset (P18). Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 47 11.7.2 State machine The state transition diagram is specified by the drive profile. When the Vendor Specific Control Word is used, the state is represented as ‘Vendor Specific’. Switch off Non-Existant Vendor specific Switch On Fault detected Reset Startup Faulted Initialization complete Fault Stop Complete Fault Reset Not_Ready Main Power On Fault_Stop Fault Detected Main Power Off Fault Detected Fault Detected Ready Stopping Stop Complete Run Run Enabled Stop Fault Detected Main Power Off Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 48 11.7.3 Run/Stop Event Matrix The Run/Stop Event Matrix is defined by the CIP Drive Profile. Event State Nonexist Startup Notready Ready Enabled Stopping Faultstop Faulted Switch Off - Transition to Non_Exist Transition to Non_Exist Transition to Non_Exist Transition to Non_Exist Transition to Non_Exist Transition to Non_Exist Transition to Non_Exist Switch On Transition to Startup - - - - - - - Initialisation Complete - Transition to Not_Ready - - - - - - Main power on - - Transition to Ready - - - - - Transition to Enabled - Run - - - Transition to Enabled Stop - - - - Transition to Stopping - - Stop Complete - - - - - Transition to Ready - - Transition to Startup Transition to Startup Transition to Startup Transition to Startup Transition to Startup Reset - - Transition to Startup Main power off - - - Transition to Not_Ready Transition to Faulted Transition to Faulted Transition to Faulted - Fault detected - Transition to Faulted Transition to Faulted Transition to Faulted Transition to Faulted Transition to Faulted - - Fault_Stop Complete - - - - - - Transition to Faulted - Fault Reset - - - - - - - Transition to Not_Ready Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 49 11.8 AC/DC-Drive Object (2Ah) This object models the functions specific to an AC or DC drive, e.g. speed ramp, torque control etc. Note: If operating in Transparent mode, any access to this object will result in a ‘Device State Conflict’ error. Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Class attributes # 1 Access Get Name Revision Type UINT Value 0001h Type Bool Value 1: DRive actual at reference INT Sped reference Description Revision 1 Instance 1 attributes # 3 Access Get Name AtReference 4 Get/Set NetRef 6 Get/Set DriveMode 7 Get SpeedActual 8 Get/Set SpeedRef Related Parameter & CPI Function Call P1 CPI_GetAtReference Bool Requests torque or speed refer- P1, P46 ence to be local or from the net- CPI_GetReferenceFromNet work. CPI_SetNetReference 1: Network control 0: Local control Note: the actual status is reflected in attribute 29 (RefFromNet) USINT 0: Vendor Specific Mode P43 1: OpenLoop Speed CPI_GetDriveMode 2: ClosedLoop Speed Control CPI_SetDriveMode 3: Torque Control 4: Process Control Note: If not implemented in the applica5: Position Control tion, the module handles OpenLoop only. P5, P6 INT Actual drive speed CPI_GetActualSpeed (Value needs to be scaled) (Unit: RPM/2SpeedScale) (Unit: RPM/2SpeedScale) 9 Get 10 Get/Set CurrentActual CurrentLimit INT Actual motor phase current INT (Unit: 100mA/2CurrentScale) Motor phase current limit (Unit: 100mA/2CurrentScale) 11 Get TorqueActual INT Actual torque (Unit: Nm/2TorqueScale) Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 P2, P3 CPI_GetSpeedSetpoint CPI_SetSpeedSetpoint (Value needs to be scaled) P10 CPI_GetActualOutputCurrent (Value needs to be scaled) P24 CPI_GetMotorPhaseCurrentLimit CPI_SetMotorPhaseCurrentLimit (Value needs to be scaled) P7 CPI_GetActualTorque (Value needs to be scaled) Doc.Id. SCM-1200-141 EtherNet/IP 50 # Access 12 Get/Set Name TorqueRef Type INT Value Actual reference (Unit: Nm/2TorqueScale) 15 Get PowerActual INT Actual output power 16 Get InputVoltage INT (Unit: W/2PowerScale) Input Voltage (Unit: V/2VoltageScale) 17 Get OutputVoltage INT Output Voltage 18 Get/Set AccelTime UINT 19 Get/Set DecelTime UINT 20 Get/Set LowSpeedLimit UINT 21 Get/Set HighSpdLimit UINT 22 23 24 26 27 28 29 SpeedScale CurrentScale TorqueScale PowerScale VoltageScale TimeScale RefFromNet SINT SINT SINT SINT SINT SINT Bool Field I or V Bool Get/Set Get/Set Get/Set Get/Set Get/Set Get/Set Get 31 Get/Set Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Related Parameter & CPI Function Call P4 CPI_GetTorqueSetpoint CPI_SetTorqueSetpoint (Value needs to be scaled) P13 CPI_GetActualPowerOutput (Value needs to be scaled) P12 CPI_GetInputVoltage (Value needs to be scaled) P11 CPI_GetOutputVoltage (Value needs to be scaled) (Unit: V/2VoltageScale) Acceleration Time ; time from 0 to P26 CPI_GetAccelerationTime HighSpeedLimit. CPI_SetAccelerationTime (Unit: ms/2TimeScale) (Value needs to be scaled) Deceleration Time; time from 0 to P29 CPI_GetDecelerationTime HighSpeedLimit. TimeScale) CPI_SetDecelerationTime (Unit: ms/2 (Value needs to be scaled) P41 Minimum speed limit SpeedScale) CPI_GetMinimumSpeed (Unit: RPM/2 CPI_SetMinimumSpeed (Value needs to be scaled) Maximum speed limit P39 CPI_GetMaximumSpeed (Unit: RPM/2SpeedScale) CPI_SetMaximumSpeed (Value needs to be scaled) Speed scaling factor (internal) Current scaling factor Torque scaling factor Power scaling factor Voltage scaling factor Time scaling factor Status or torque/speed reference P1 1: Network control CPI_GetReferenceFromNet 0: Local control Selects field voltage or field cur- (no message is sent to the application) rent control for DC drives. 0: Voltage Control 1: Current Control (Only voltage control is supported) Doc.Id. SCM-1200-141 EtherNet/IP 51 11.9 DLR Object (47h) The Anybus-S Drive Profile EtherNet/IP will act as an announce based DLR participant. For further information on DLR functionality, please consult the CIP and EtherNet/IP specifications. . Services Class services: Get Attributes All Get Attribute Single Instance services: Get Attributes All Get Attribute Single Class attributes # 1 Access Get Name Revision Type UINT Value 0002h Description Revision 2 Instance attributes # 1 Access Get 2 Get 10 Get 12 Get Name Type Network Topol- USINT ogy Network Status USINT Value 0: Linear 1: Ring 0: Normal 1: Ring Fault Active Supervi- Struct of: sor address UDINT Array of 6 bytes Capability Flags DWORD 00000001h Description - Supervisor IP address Supervisor MAC address Describes the DLR capabilities of the device, see below. Capability flags Bits 0 2-4 5 Name Announce-based Ring Node Beacon-based Ring Node (reserved) Supervisor capable 6 - 31 (reserved) 1 Description Set if Announce frames are useda Set if Beacon frames are used.a Set to 0 Set if device is supervisor capable. This device is not supervisor capable, so this bit will be set to 0. Set to 0 a. Please note that in the Anybus-S Drive Profile EtherNet/IP module, capability flag 0 is set to 1 and capailty flag 1 is set to 0. These values can not be changed and the module will always function as an Announce-based Ring Node. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 52 11.10 Drive Parameter Object (90h) This is a vendor specific object where drive parameters can be accessed over EtherNet/IP. The mapping is done using the Anybus-S Drive Profile Development Tool, or a default mapping method is used. It is possible to map a drive parameter to any instance number between 1 and 65535 and to any attribute number between 1 and 255. The class number for this object can be changed in the development tool. Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Class attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Instance attributes Vendor specific mapping The mapping is specified in Anybus-S Drive Profile Development Tool, and downloaded into the module prior to execution. Data types and access rights equals that of the mapped parameters, instance and attribute numbers are specified manually. EtherNet/IP formula mapping The mapping is fixed as follows: Drive parameter #1 = Instance #1, Attribute #1 Drive parameter #2 = Instance #2, Attribute #1 Drive parameter #3 = Instance #3, Attribute #1 ... Drive parameter #XXXX = Instance #XXXX, Attribute #1 Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 53 11.11 Drive IO Map Object (91h) This vendor specific object is used to map data to vendor specific assembly instances #102 and #103. The class number for this object can be changed using the Anybus-S Drive Profile Development Tool. Services Class services: Get Attribute Single Reset (See “Reset service” on page 53) Instance services: Get Attribute Single Set Attribute Single Reset (See “Reset service” on page 53) Class attributes # 1 7 Access Get Get Name Revision Max. no. of Instances Type UINT UINT Value 0001h 32 Description Revision 1 Maximum number of drive parameters that can be mapped to each assembly instance. Instance attributes Instance 1 maps drive parameters to Assembly instance #102 (parameters consumed by the module). Attributes 1...4 can also be accessed by Bus Config parameters 18...21. Instance 2 maps drive parameters to Assembly instance #103 (parameters produced by the module). Attributes 1....4 can also be accessed by Bus Config parameters 22...25. Two and four byte values are represented in little endian format. Any attempt to map a parameter while the assembly is active will result in a ‘State Conflict’ error. # 1 2 ... 32 Access Get/Set Get/Set ... Get/Set Name 1st mapped parameter 2nd mapped parameter ... 32nd mapped parameter Type UINT UINT ... UINT Value ... - Description No. of first parameter to map (0 = no mapping). No. of second parameter to map (0 = no mapping). ... No. of last mapped parameter (0 = no mapping). Note: The mappings created in this object are stored in non-volatile memory. 11.11.1 Reset service A reset command towards the class will clear mappings in all instances. A reset command towards a specific instance will clear all mappings within that instance. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 54 11.12 ABSDP Configuration Object (92h) This object is used to set configuration paramters in the Anybus Drive Profile module. The class number for this object can be changed using the Anybus-S Drive Profile Development Tool. Services Class services: Get Attribute Single Instance services: Get Attribute Single Set Attribute Single Class attributes # 1 Access Get Name Revision Type UINT Value 0001h Description Revision 1 Type UINT8 Value Description 0: Clear Fieldbus Running flag (Default) 1: Freeze data Instance 1 attributes # 3 Access Get/Set Name Idle Action Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 55 11.13 TCP/IP Interface Object (F5h) 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 Description Interface configuration attribute is valid Interface configuration attribute is settable, and the device is capable of obtaining its network configuration via DHCP. Instance 1 attributes # 1 Access Get Name Status Type Dword Value 0000 0001h 2 Get Configuration Capability Dword 0000 0014h 3 Get/Set Configuration Control 4 Get Physical Link Object Path Size Path 5 Get/Set Interface Configuration IP Address 0: Bus Config Param. #3...#14 DHCP enable/disablea 1: Configuration via DHCP Struct of: UINT 0002h 2 words Padded EPATH 20 F6 24 03h Ethernet Link Object, instance 3 Struct of: UDINT IP address of modulea Network Mask UDINT - Network maska Gateway Address UDINT - Default gatewaya Name Server UDINT - Primary DNS (not used)b Name Server 2 UDINT - Secondary DNS (not used)b Domain Name STRING - Default domain nameb Host Name STRING - Host name of the moduleb 6 Get/Set Dword a. Stored in Bus Config Parameters #2...#14 b. Stored in ‘/cfg/ip.cfg’ Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 EtherNet/IP 56 11.14 Ethernet Link Object (F6h) Services Class services: Get Attribute All Get Attribute Single Instance services: Get Attribute All Get Attribute Single Set Attribute Single Get and Clear Class attributes # 1 Access Get Name Revision Type UINT Value 0003h Description Revision 1 Instance 1 attributes # 1 2 3 Access Get Get Get Name Interface Speed Interface Flags Physical Address 6 Get/Set Interface Control Control Bits Forces Speed Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Type UDINT DWORD ARRAY of 6 USINTs Struct Of: Word UINT Value 10 or 100 MAC Address Description Actual speed of the network interface (Assigned at production) - Auto-negotiation, duplex & speed. Doc.Id. SCM-1200-141 Appendix A A. Mechanical Specification Note: All measurements expressed in this chapter have a tolerance of ±0.25mm unless otherwise stated MM Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Appendix B B. Environmental Specification B.1 Temperature Operating +0 to +70 degrees Celsius Test performed according to IEC-68-2-1 and IEC 68-2-2. Non Operating -25 to +85 degrees Celsius Test performed according to IEC-68-2-1 and IEC 68-2-2. B.2 Relative humidity The product is designed for a relative humidity of 5 to 95% non-condensing. Test performed according to IEC-68-30. B.3 EMC compliance EMC pre-compliance testing has been conducted according to the Electromagnetic Compatibility Directive 2004/108/EC. For more information please consult the EMC pre-compliance document, see product/support pages for Anybus-S Drive Profile EtherNet/IP at www.anybus.com. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141 Appendix C C. Connectors C.1 Application connector (Consult the general Anybus-S Drive Profile Design Guide for more information) C.2 Ethernet connector RJ45 (Standard) Pin 1 2 3 4 5 6 7 8 Signal TD+ TDRD+ Termination Termination RDTermination Termination Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 1 8 Doc.Id. SCM-1200-141 Appendix D D. Electrical Characteristics D.1 Protective Earth (PE) requirements In order to ensure proper EMC behaviour, the module must be properly connected to protective earth as described in the general Anybus-S Drive Profile Design Guide. D.2 Power supply Supply voltage The module requires regulated a +5V DC power source as specified in the general Anybus-S Drive Profile Design Guide. Power consumption The maximum total power consumption is 450 mA. Anybus-S Drive Profile EtherNet/IP Doc.Rev. 2.00 Doc.Id. SCM-1200-141
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement