CIP通讯介绍(欧姆龙PLC)

本文详细介绍了CIP通信协议,一种面向对象的工业网络协议,它支持DeviceNet、ControlNet和EtherNet/IP等网络。文章重点讲解了CIP如何通过TCP和UDP协议实现显式和隐式报文传输,以及其在PLC通信中的应用,包括连接过程和数据帧格式示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

什么是CIP

  • CIP通信是Common Industrial Protocl(CIP)的简称,它是一个点到点的面向对象协议,
  • 能够实现工业器件(传感器,执行器)之间的连接,和高等级的控制器之间的连接。
  • 目前,有3种网络DeviceNet,ControlNet,EtherNet/IP使用CIP通信协议作为其上层网络协议,由ODVA组织统一管理,以确保其一致性和精确性。

CIP使用EtherNet时

首先建立起TCP连接,CIP通信端口默认为44818。TCP连接成功后,发送会话消息,获取四个字节的会话ID,就可以正常读写了。

连接PLC对应IP和这个端口(plc为TCP服务端)后上位机发送和收到的报文如下

# 发送的 
6f 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 
# 接收的 
6F 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

提供的功能参考SYSMAC Compolet help文件

通信数据类型

Connect服务

Transaction服务

Disconnect服务

Abort服务

Sequence服务

通道参数数据类型

ReadChannelData服务

Wri

Contents 3-1 Introduction........................................................................................................................................................ 3 3-2 Scope.................................................................................................................................................................. 3 3-3 CIP packets over TCP/IP ................................................................................................................................... 3 3-3.1 Unconnected messages .............................................................................................................................. 3 3-3.2 CIP transport class 0 and class 1 connections ............................................................................................ 5 3-3.2.1 CIP transport class 0 and class 1 packets ............................................................................................... 5 3-3.2.2 Behavior of class 0 and class 1 connections (informative) .................................................................... 5 3-3.3 CIP Transport class 2 and class 3 connections ........................................................................................... 6 3-3.4 CIP Transport classes 4 through 6 ............................................................................................................. 6 3-4 Connection Manager object ............................................................................................................................... 6 3-4.1 Connection parameters............................................................................................................................... 6 3-4.2 Connection type ......................................................................................................................................... 7 3-4.3 Priority ....................................................................................................................................................... 7 3-4.4 Trigger Type .............................................................................................................................................. 7 3-4.5 Connection size .......................................................................................................................................... 7 3-4.6 Connection request time-out ...................................................................................................................... 7 3-4.7 Connection path ......................................................................................................................................... 7 3-4.7.1 Network connection ID .......................................................................................................................... 8 3-4.8 Forward_open for CIP transport class 2 and class 3 connections ............................................................ 11 3-4.9 Forward_open for CIP transport class 0 and class 1 connections ............................................................ 11 3-4.9.1 General ................................................................................................................................................. 11 3-4.9.2 Mapping connections to IP multicast addresses ................................................................................... 11 3-4.9.3 Completing the multicast connection (informative) ............................................................................. 12 3-5 CIP transport class 0 and class 1 connected data ............................................................................................. 12 3-5.1 UDP datagrams ........................................................................................................................................ 12 3-5.2 CIP transport class 0 and class 1 packet ordering .................................................................................... 12 3-5.3 Screening incoming connected data ......................................................................................................... 13 3-6 IP multicast scoping and address allocation..................................................................................................... 13 3-6.1 Background (informative) ........................................................................................................................ 13 3-6.1.1 General ................................................................................................................................................. 13 3-6.1.2 Current scoping practices ..................................................................................................................... 14 3-6.1.3 Current address allocation practices..................................................................................................... 14 3-6.1.4 Evolving Internet standards.................................................................................................................. 14 3-6.2 Interim scoping strategy ........................................................................................................................... 15 3-6.3 Interim allocation strategy........................................................................................................................ 15
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值