logo资料库

AB PLC的EtherNet/IP Socket.doc

第1页 / 共107页
第2页 / 共107页
第3页 / 共107页
第4页 / 共107页
第5页 / 共107页
第6页 / 共107页
第7页 / 共107页
第8页 / 共107页
资料共107页,剩余部分请下载后查看
Application Technique EtherNet/IP Socket Interface
Important User Information Read 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 standards. Activities 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 practice. If this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be impaired. In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment. The 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 diagrams. No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this manual. Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited. Throughout this manual, when necessary, we use notes to make you aware of safety considerations. WARNING:Identifiesinformationaboutpracticesorcircumstancesthatcancauseanexplosionina hazardousenvironment,whichmayleadtopersonalinjuryordeath,propertydamage,oreconomicloss. ATTENTION: Identifiesinformationaboutpracticesor circumstancesthatcanleadtopersonalinjury or death, propertydamage,oreconomicloss.Attentionshelpyouidentifyahazard,avoidahazard,and recognizetheconsequence. IMPORTANT Identifies information that iscritical for successfulapplication andunderstanding of theproduct. Labels may also be on or inside the equipment to provide specific precautions. SHOCKHAZARD:Labelsmaybeonorinsidetheequipment,forexample,adriveormotor,toalert peoplethatdangerousvoltagemaybepresent. BURNHAZARD:Labelsmaybeonorinsidetheequipment,forexample,adriveormotor,toalertpeople thatsurfacesmayreachdangeroustemperatures.
ARCFLASHHAZARD:Labelsmaybeonorinsidetheequipment,forexample,amotorcontrolcenter, toalertpeopleto potentialArcFlash.ArcFlashwillcausesevereinjuryordeath.WearproperPersonalProtectiveEquipment (PPE).FollowALLRegulatoryrequirementsforsafeworkpracticesandforPersonalProtectiveEquipment (PPE). Allen-Bradley, Rockwell Software, Rockwell Automation, CompactLogix, ControlLogix, Logix5000, MicroLogix, RSLogix 5000, and TechConnect are trademarks of Rockwell Automation, Inc. Trademarks not belonging to Rockwell Automation are property of their respective companies.
Newand Updated Informatio n Changes Summaryof This manual contains new and updated information. Changes throughout this revision are marked by change bars, as shown to the right of this paragraph. This table contains the changes made to this revision. Topic UpdatedtheAdditional Resources. Updatedthelistof supported modules. AddedImportant messagetotheSocketInterface Architecturesection.Updatedinstancecreationin ReadSocket.UpdatedinstancecreationinWriteSocket. UpdatedthelistofErrorCodesforSocket Services. Page 79 16 32 34 49
RockwellAutomationPublicationENET-AT002C-EN-P-September2014 3
SummaryofChanges Notes: 4 September2014 RockwellAutomationPublicationENET-AT002C-EN-P-
Summaryof Changes Preface SocketInterface Architecture SocketObject Services Tableof Contents Important User Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 New and Updated Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Chapter1 Socket Interface Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Number and Type of Sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typical Sequence of Transactions for a TCP Client . . . . . . . . . . . . . Typical Sequence of Transactions for a TCP Server . . . . . . . . . . . . . Typical Sequence of Transactions for UDP without OpenConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typical Sequence of Transactions for UDP with OpenConnection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Communicate with the Socket Object via a MSG Instruction . . . . . . . . Service Timeouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Instruction Timeouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Socket Instance Timeouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TCP Connection Loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ControlLogix Enhanced Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . EtherNet/IP Module Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Change Controller Mode between Run and Program. . . . . . . . . . . . Application Messages and T C P . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . Application Messages and Uninhibited Modules . . . . . . . . . . . . . . . . Partial Reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partial Writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C h a p t e r 2 Socket Create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Destination Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Destination Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AcceptConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Source Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSG Destination Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RockwellAutomationPublicationENET-AT002C-EN-P- September2014 1 0 1 0 1 2 1 2 1 3 1 4 1 6 1 8 1 8 1 8 1 9 1 9 2 0 2 0 2 1 2 1 2 1 2 2 2 2 2 3 2 6 2 6 2 7 2 7
分享到:
收藏