Transcription of EtherNet/IP Socket Interface Application Technique, ENET ...
1 EtherNet/IP Socket InterfaceApplication TechniqueImportant User InformationRead this document and the documents listed in the additional resources section about installation, configuration, and operation of this equipment before you install, configure, operate, or maintain this product. Users are required to familiarize themselves with installation and wiring instructions in addition to requirements of all applicable codes, laws, and including installation, adjustments, putting into service, use, assembly, disassembly, and maintenance are required to be carried out by suitably trained personnel in accordance with applicable code of this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be no event will Rockwell Automation, Inc.
2 Be responsible or liable for indirect or consequential damages resulting from the use or Application of this examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc.
3 , is this manual, when necessary, we use notes to make you aware of safety may also be on or inside the equipment to provide specific , Rockwell Software, Rockwell Automation, CompactLogix, ControlLogix, Logix5000, MicroLogix, RSLogix 5000, and TechConnect are trademarks of Rockwell Automation, not belonging to Rockwell Automation are property of their respective : Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic : Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss.
4 Attentions help you identify a hazard, avoid a hazard, and recognize the information that is critical for successful Application and understanding of the HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous FLASH HAZARD: Labels may be on or inside the equipment, for example, a motor control center, to alert people to potential Arc Flash. Arc Flash will cause severe injury or death.
5 Wear proper Personal Protective Equipment (PPE). Follow ALL Regulatory requirements for safe work practices and for Personal Protective Equipment (PPE).Rockwell Automation Publication ENET-AT002C-EN-P - September 20143 Summary of ChangesThis manual contains new and updated information. Changes throughout this revision are marked by change bars, as shown to the right of this and Updated InformationThis table contains the changes made to this the Additional the list of supported Important message to the Socket Interface Architecture instance creation in instance creation in the list of Error Codes for Socket Automation Publication ENET-AT002C-EN-P - September 2014 Summary of ChangesNotes:Rockwell Automation Publication ENET-AT002C-EN-P - September 20145 Table of ContentsImportant User Information.
6 2 Summary of ChangesNew and Updated Information .. 3 PrefaceAdditional Resources .. 7 Chapter 1 Socket Interface ArchitectureSocket Interface Architecture .. 10 Number and Type of sockets .. 10 Typical Sequence of Transactions for a TCP Client .. 12 Typical Sequence of Transactions for a TCP Server .. 12 Typical Sequence of Transactions for UDP without OpenConnection .. 13 Typical Sequence of Transactions for UDP with OpenConnection.. 14 Communicate with the Socket Object via a MSG Instruction .. 16 Service Timeouts .. 18 MSG Instruction Timeouts .. 18 Socket Instance Timeouts.
7 18 Programming Considerations .. 19 TCP Connection Loss .. 19 ControlLogix Enhanced Redundancy .. 20 EtherNet/IP Module Reset.. 20 Change Controller Mode between Run and Program .. 21 Application Messages and TCP .. 21 Application Messages and Uninhibited Modules .. 21 Partial Reads .. 22 Partial Writes .. 22 Performance Considerations .. 23 Chapter 2 Socket Object ServicesSocket Create .. 26 MSG Source Element .. 26 MSG Source Length .. 27 MSG Destination Element .. 27 Considerations .. 27 OpenConnection .. 28 MSG Source Element .. 28 MSG Source Length.
8 29 MSG Destination Element .. 29 Considerations .. 29 AcceptConnection .. 30 MSG Source Element .. 30 MSG Source Length .. 30 MSG Destination Element .. 31 Considerations .. 316 Rockwell Automation Publication ENET-AT002C-EN-P - September 2014 Table of ContentsReadSocket .. 32 MSG Source Element .. 32 MSG Source Length .. 33 MSG Destination Element .. 33 WriteSocket .. 34 MSG Source Element .. 35 MSG Source Length .. 36 MSG Destination Element .. 36 DeleteSocket .. 37 MSG Source Element .. 37 MSG Source Length .. 37 MSG Destination Element .. 37 Considerations.
9 37 DeleteAllSockets .. 38 MSG Source Element .. 38 MSG Source Length .. 38 MSG Destination Element .. 38 Considerations .. 38 ClearLog .. 39 MSG Source Element .. 39 MSG Source Length .. 39 MSG Destination Element .. 39 JoinMulticastAddress .. 40 MSG Source Element .. 40 MSG Source Length .. 41 MSG Destination Element .. 41 DropMulticastAddress.. 41 MSG Source Element .. 42 MSG Source Length .. 42 MSG Destination Element .. 42 Chapter 3 Socket AttributesAccess Socket Attributes .. 43 Socket Class Attributes .. 44 Socket Instance Attributes .. 45 Chapter 4 Troubleshoot Socket ApplicationsDiagnostic Web Pages.
10 47 Debugging Tips .. 48 Error Codes for Socket Services .. 49 Knowledgebase Articles .. 51 IndexRockwell Automation Publication ENET-AT002C-EN-P - September 20147 PrefaceThis publication describes the Socket Interface that you can use to program MSG instructions to communicate between a Logix5000 controller via an EtherNet/IP module and Ethernet devices that do not support the EtherNet/IP Application protocol, such as bar code scanners, RFID readers, or other standard Ethernet ResourcesThese documents contain additional information concerning related products from Rockwell Automation.