首页 AB PLC EtherNet IP编程指导

AB PLC EtherNet IP编程指导

举报
开通vip

AB PLC EtherNet IP编程指导 ACR Motion Controllers 88-030031-01 A EtherNet/IP Programmer’s Guide Effective: October 2009 ENGINEERING YOUR SUCCESS. www.PLCworld.cn Parker Hannifin User Information Warning — ACR and Aries Controllers ...

AB PLC EtherNet IP编程指导
ACR Motion Controllers 88-030031-01 A EtherNet/IP Programmer’s Guide Effective: October 2009 ENGINEERING YOUR SUCCESS. www.PLCworld.cn Parker Hannifin User Information Warning — ACR and Aries Controllers are used to control electrical and mechanical components of motion control systems. Test all motion systems for safety under all potential conditions. Failure to do so can result in damage to equipment and/or serious injury to personnel. ACR and Aries Controller products and the information in this guide, including any apparatus, methods, techniques, and concepts described herein, are the proprietary property of Parker Hannifin Corporation or its licensers and may not be reproduced, disclosed, or used for any purpose not expressly authorized by the owner thereof. Since Parker Hannifin constantly strives to improve all of its products, we reserve the right to change this user guide, software, and hardware mentioned therein at any time without notice. In no event will the provider of the equipment be liable for any incidental, consequential, or special damages of any kind or nature whatsoever, including but not limited to lost profits arising from or in any way connected with the use of the equipment, firmware, or this user guide. © 2009 Parker Hannifin Corporation All Rights Reserved Technical Assistance Contact your local automation technology center (ATC) or distributor. North America and Asia Parker Hannifin Corporation 5500 Business Park Drive Rohnert Park, CA 94928 Telephone: (800) 358-9068 or (707) 584-7558 Fax: (707) 584-3793 Email: emn_support@parker.com Internet: http://www.parkermotion.com Germany, Austria, Switzerland Parker Hannifin GmbH&Co.KG Postfach: 77607-1720 Robert-Bosch-Str. 22 D-77656 Offenburg Telephone: +49 (0) 781 509-0 Fax: +49 (0) 781 509-98176 Email: sales.hauser@parker.com Internet: http://www.parker-emd.com Europe (non-German speaking) Parker Hannifin plc Electromechanical Automation, Europe Arena Business Centre Holy Rood Close Poole Dorset, UK BH17 7BA Telephone: +44 (0) 1202 606300 Fax: +44 (0) 1202 606301 Email: support.digiplan@parker.com Internet: http://www.parker-emd.com Italy Parker Hannifin 20092 Cinisello Balsamo Milan, Italy via Gounod, 1 Telephone: +39 02 66012478 Fax: +39 02 66012808 Email: sales.sbc@parker.com Internet: http://www.parker-emd.com Parker Hannifin Technical Support E-mail: emn_support@parker.com - ii - www.PLCworld.cn Parker Hannifin - iii - Table of Contents User Information......................................................ii What’s New ............................................................. iv Introduction .............................................................1 Compatible Parker Hannifin Products.......................1 Assumptions of Technical Experience.......................1 Overview of EtherNet/IP..........................................2 Adapter ....................................................................3 ACR Adapter Functions ..................................................................................... 3 ACR Commands............................................................................................... 4 ACR Parameters............................................................................................... 5 CLASS 1 I/O .............................................................6 Specifications .................................................................................................. 6 Creating CLASS 1 Connection ............................................................................ 7 Class 3 CIP Messages .............................................12 Creating Class 3 Connection ............................................................................ 12 Service Codes Using Tags ............................................................................... 14 Classes and Service Codes .............................................................................. 16 CIP Service Error Codes.................................................................................. 26 Legacy Service Codes ..................................................................................... 27 Glossary .................................................................28 Table of Tables Table 1: Product Compatibility Specifications....................................................... 1 Table 2: CIP Status Report Parameters............................................................... 5 Table 3: Connection Status Error Values and Meanings......................................... 6 Table 4: CLASS 1 I/O Limits .............................................................................. 6 Table 5: ACR Service Codes Using Tags ............................................................ 14 Table 6: Vendor-Specific Classes and Corresponding Service Codes...................... 18 Table 7: ACR Binary Commands ...................................................................... 25 Table 8: CIP General Status Error Codes........................................................... 26 Table 9: Legacy and Current Service Code Comparison....................................... 27 Table of Figures Figure 1: CIP Data Table Read Message Configuration ........................................ 15 Figure 2: CIP Data Table Write Message Configuration........................................ 16 Figure 3: Service Request Message Configuration .............................................. 17 Figure 4: WriteACRFloat Message Configuration Example .................................... 20 Figure 5: ControlLogix Tags for WriteACRFloat................................................... 21 Figure 6: ReadACRLong_AxisFlags Message Configuration Example...................... 21 Figure 7: ControlLogix Tags for ReadACRLong_AxisFlags..................................... 22 Figure 8: AND_OR_LONG Message Configuration Example .................................. 22 Figure 9: Specifying Masks in a DINT Array ....................................................... 23 Figure 10: : READ_GROUP Message Configuration Example................................. 24 www.PLCworld.cn Parker Hannifin What’s New For convenience, a “What’s New” note at the end of a section describes any changes from the previous firmware version. These changes are summarized as follows:  The existing CIP Status Report command now reflects that CLASS 1 connections no longer use an ACR stream and indicates which ACR parameters are being accessed if a CLASS 1 connection is active.  A new ACR Parameter Class (100) replaces certain legacy service codes. See the section Legacy Service Codes on page 27 for details.  A new ACR Group Class (101) replaces certain legacy service codes. See the section Legacy Service Codes on page 27 for details  The current version of the adapter removes the 20-byte binary data limitation on the legacy Vendor Move command (service code 0x34), and instead, passes the exact CIP Generic message function data directly to the binary command interpreter. This allows the 0x34 service code to be used for any binary command, including longer binary move commands. - iv - www.PLCworld.cn Parker Hannifin - 1 - Introduction This guide describes how to use a Parker-Hannifin ACR controller in an EtherNet/IPTM (Ethernet industrial protocol) network. It provides an overview of EtherNet/IP, a discussion of ACR adapter functions, and specifics of pertinent commands, parameters, and CLASS 1 and Class 3 connections. Compatible Parker Hannifin Products EtherNet/IP functionality is available on ACR9xxx and Aries Controller products. The minimum operating system (firmware version) of the products are listed in Table 1. Product Adapter Scanner ACR9000, 9030, 9040 1.26 TBD ACR9600, 9630, 9640 TBD TBD Aries Controller (AR-xxCE) 1.11 TBD Table 1: Product Compatibility Specifications Assumptions of Technical Experience Before setting up an EtherNet/IP network, it is essential to have a fundamental understanding of the following:  CIP (Control and Information Protocol) object models for devices  CIP object classes for connected and unconnected messaging  EtherNet/IP adaptation of CIP To install and troubleshoot an ACR controller, a fundamental knowledge of the following is necessary:  Electronic concepts such as voltage, current, and switches  Mechanical motion control concepts such as inertia, torque, velocity, distance, and force. www.PLCworld.cn Parker Hannifin Overview of EtherNet/IP EtherNet/IP is the TCP/IP encapsulation of CIP, which is also shared by ControlNetTM and DeviceNetTM. (For a detailed description of EtherNet/IP and CIP, refer to the ODVA publication The Specification for EtherNet/IP™.) The following exploration of EtherNet/IP provides context for the terms used in this guide. A device is a product that supports EtherNet/IP. Some devices conform to industry standard profiles, but there is no such profile for the ACR controllers. A connection is a logical link between two devices. Different types of connections are described below. Two devices may share more than one connection. A scanner is a device that initiates a connection or a request. It may be thought of as a master or a controlling device. An adapter is a device that receives a connection request or an individual service request. Typically one scanner on a network may be connected to several adapters. An assembly is a pre-defined collection of data residing in an adapter. Each assembly is identified by a unique instance number. The assemblies are further characterized by their size and type. Three types of assemblies are producing (data to be sent), consuming (data to be received), and configuration (a data area reserved for information about how consumed and produced data is to be interpreted). A Class 3 connection is used for individual request/response transactions. A request from a scanner always results in a response from the adapter indicating the success or failure of the request. The response may also include a data payload if it was part of the request. Class 3 connections are handled in EtherNet/IP via TCP. A request from a scanner is called a Service Request and the meaning of the request is identified by a one-byte service code inside the request packet. Most service codes have meanings pre-defined by the CIP specification, but codes 0x4B through 0x63 have meanings that are specific to the destination object of the service request. The destination of the service request is defined by a portion of the service request packet called the path. The path is either a literal ASCII character string or an object description. The adapter receiving the service request can distinguish between an ASCII character string path and an object description path by header bytes inside the path. A request to an object is identified inside the path by its class number, instance number, and attribute number. Class identifies which type of object is being referenced, and instance defines the particular object of that type. For example, a carton of eggs contains twelve objects. These objects are instances 1 through 12 of class Egg. And each object may have one or more attributes. In our egg example, attributes 1 and - 2 - www.PLCworld.cn Parker Hannifin 2 could be size and color. So, a service request might ask for the color of egg number 6. A CLASS 1 connection establishes a periodic exchange of data between the scanner and the adapter. The connection request from the scanner establishes the repetition interval, or RPI, in both directions. The acronym RPI stands for Requested Packet Interval and is generally expressed in milliseconds. This connection request also establishes the instance numbers of the producing, consuming, and configuration assemblies, and the size of each assembly. It also may contain data destined for the adapter’s configuration assembly, which allows the adapter to interpret subsequent data exchange. In EtherNet/IP, the CLASS 1 connection is established via TCP, but the subsequent data exchange uses UDP. A CLASS 1 connection request also indicates whether the adapter should send its data point-to-point or multicast. Point-to-point data is addressed only to the scanner. Multicast data is sent to a multicast address group that includes the scanner. This enables other devices on the network to receive that adapter’s data. If a CLASS 1 connection request indicates multicast, but the adapter does not support multicast, the connection request fails. Individual Class 3 messages may be sent as Connected Messages or Unconnected Messages. These messages are commands or data requests from the scanner to individual target nodes. Connected Messages establish a formal CIP connection between devices, allowing either device to detect and report the presence or loss of connection. Unconnected Messages result in no periodic Class 3 connection being established. They are managed by the internal stack’s Unconnected Message Manager (UCMM). Adapter ACR Adapter Functions The ACR adapter functions can be divided into two groups, i.e., Class 3 service requests and CLASS 1 connections. Both are intended to allow a scanner access to the ACR P parameters, but in different ways. The scanner is typically a PLC or HMI software such as Parker-Hannifin’s InteractX. PLCs will usually make both a Class 3 and a CLASS 1 connection. InteractX software makes only a Class 3 connection. The ACR controllers allow only one CLASS 1 connection at a time, but unlimited Class 3 connections. The ACR adapter plays a passive role in both CLASS 1 and Class 3 connections because it simply responds to connection requests and service requests from the scanner. No ACR commands or parameters are required to allow these connections, but certain ACR commands and parameters allow an ACR user or program to monitor the status and description of these connections. - 3 - www.PLCworld.cn Parker Hannifin A CLASS 1 connection simply sets up a periodic exchange of data between the ACR P parameters and data tags in the scanner memory. The exact configuration of which P parameters, how many, and in which direction is set up at the scanner. This is usually part of a PLC configuration step, separate from the PLC ladder programming. The Class 3 service requests may result from software driver implementation, such as Parker-Hannifin’s InteractX, or they may be part of a message box inside a ladder rung of a PLC program. All service requests contain a service code and a path. The service code specifies what is being requested and the path specifies the destination object of the request. For some of the service codes supported by ACR products, the path may take the form of an ASCII character string called a tag. Others require specification of class, an instance, and an attribute. The section Service Codes Using Tags on page 14 contains a discussion of ACR service codes that accept a tag and ACR object classes. ACR Commands The CIP status report command shows the ACR parameters being accessed if a CLASS 1 connection is active. Note: CLASS 1 connections do not use an ACR stream. In the following example, both a Class 3 and a CLASS 1 connection are present. The CLASS 1 connection is producing and consuming every 100 milliseconds, accessing four blocks of parameters. SYS>cip Class3 Message Stream = 3 Class1 Received = 362 Class3 Received = 64 Total number of connections = 2 Class1 connection instance 1, client IP "192.168.10.20" Producing every 100msec, consuming every 100msec. Configured for 4 parameter blocks: Sending 3 long(s) starting at P6916 Reading 8 long(s) starting at P4101 Reading 4 long(s) starting at P4156 Sending 1 long(s) starting at P4144 The CIP status report command also reports a CLASS 1 configuration error. There are seven possible configuration errors, listed in the next section. In the example that follows, a Class 3 connection is present, but a CLASS 1 connection has configuration error 7. Group 1 tries to access P10, but the ACR controller has not created P10 with the DIM statement, so it does not exist. Group numbering starts from zero; so in the following example, the four groups are groups 0, 1, 2, and 3. - 4 - www.PLCworld.cn Parker Hannifin SYS>cip Class3 Message Stream = 2 Class1 Received = 0 Class3 Received = 108 Total number of connections = 1 Class1 connection instance 2, client IP "192.168.10.20" Configuration error 7, parameter error Config entries 4, group # 1, parameter # 10, length 8 What’s New The existing CIP Status Report command now reflects that CLASS 1 connections no longer use an ACR stream and also which ACR parameters are being accessed if a CLASS 1 connection is active. ACR Parameters The data required by the CIP status report is available in the form of parameters, starting at P37424. These parameters are shown in Table 2 and Table 3. The terms stemming from produce and consume used in the tables are from the perspective of the ACR controller, as are the respective terms send and read in the CIP status report. That is, data coming to the controller is read and consumed, and data going to the scanner is produced and sent by the controller. CIP Status Parameters P Number Class 3 message stream P37424 Number of I/O messages sent P37425 Number of Class 3 messages sent P37426 Number of Class 3 messages queued P37427 Total connections P37428 Client IP address P37429 CLASS 1 connection instance P37430 CLASS 1 producing interval (ms) P37431 CLASS 1 consuming interval (ms) P37432 CLASS 1 connection status P37433 Number of CLASS 1 configuration entries P37434 Last configuration entry group number P37435 Last configuration entry parameter number P37436 Last configuration entry length P37437 Reserved P37438 Reserved P37439 Table 2: CIP Status Report Parameters - 5 - www.PLCworld.cn Parker Hannifin The values of P37433 (CLASS 1 connection status) range from 0 to 7. Values 1 and 2 indicate the basic state of the connection. Values 2 through 7 represent configuration errors. Each value is defined in Table 3. Value Connection Status Meaning 0 No connection attempted, or connection closed 1 Connection active 2 Parameter groups specified greater than 16 3 Parameters in a group greater than 8 4 Sum of long specified for production greater than 100 5 Sum of long specified for consumption greater than 100 6 Length of FSTAT group not 80 7 Invalid or non-existent parameter number Table 3: Connection Status Error Values and Meanings CLASS 1 I/O To establish a CLASS 1 connection, the scanner sends a ForwardOpen request to the adapter. The ForwardOpen request contains device- specific configuration information along with the type and number of parameters to access. The connection may be multicast or point-to- point. Note: The Aries CE controller does not support CLASS 1 connections, only Class 3. Specifications This CLASS 1 I/O is cyclic, and the update rate is user defined. Update interval limits and I/O size limits appear in Table 4. Value ACR 9xxx Controller Aries Controller Min RPI 1 ms n/a Max Total Parameters 100 (each direction) n/a Max Total I/O Bits 3200 (each direction) n/a Max Group 16 n/a Max Parameters per Group 8 n/a Note: The Aries CE controller does not support CLASS 1 connections, only Class 3. Table 4: CLASS 1 I/O Limits - 6 - www.PLCworld.cn Parker Hannifi
本文档为【AB PLC EtherNet IP编程指导】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_838019
暂无简介~
格式:pdf
大小:757KB
软件:PDF阅读器
页数:33
分类:互联网
上传时间:2012-08-13
浏览量:130