没有合适的资源?快使用搜索试试~ 我知道了~
首页AB PLC 与 PC 通过 socket 通讯文档
资源详情
资源评论
资源推荐
EtherNet/IP Socket Interface
Application Technique
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.
Labels may also be on or inside the equipment to provide specific precautions.
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.
WARNING: 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 loss.
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence.
IMPORTANT
Identifies information that is critical for successful application and understanding of the product.
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous
voltage may be present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may
reach dangerous temperatures.
ARC 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. 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 2014 3
Summary of Changes
This manual contains new and updated information. Changes throughout this
revision are marked by change bars, as shown to the right of this paragraph.
New and Updated
Information
This table contains the changes made to this revision.
Topic Page
Updated the Additional Resources. 7
Updated the list of supported modules. 9
Added Important message to the Socket Interface Architecture section. 16
Updated instance creation in ReadSocket. 32
Updated instance creation in WriteSocket. 34
Updated the list of Error Codes for Socket Services. 49
4 Rockwell Automation Publication ENET-AT002C-EN-P - September 2014
Summary of Changes
Notes:
Rockwell Automation Publication ENET-AT002C-EN-P - September 2014 5
Table of Contents
Important User Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Summary of Changes
New and Updated Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Preface
Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 1
Socket Interface Architecture
Socket 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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 Services
Socket 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
MSG Destination Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
AcceptConnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
MSG Source Element. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
MSG Source Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
MSG Destination Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
剩余55页未读,继续阅读
zhongyaxiong
- 粉丝: 3
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5