[go: up one dir, main page]

CN100417122C - A Scheduling Method for Realizing Ethernet Deterministic Communication - Google Patents

A Scheduling Method for Realizing Ethernet Deterministic Communication Download PDF

Info

Publication number
CN100417122C
CN100417122C CNB2004100886767A CN200410088676A CN100417122C CN 100417122 C CN100417122 C CN 100417122C CN B2004100886767 A CNB2004100886767 A CN B2004100886767A CN 200410088676 A CN200410088676 A CN 200410088676A CN 100417122 C CN100417122 C CN 100417122C
Authority
CN
China
Prior art keywords
communication
data message
aperiodic
message
aperiodic data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CNB2004100886767A
Other languages
Chinese (zh)
Other versions
CN1604554A (en
Inventor
金建祥
冯冬芹
褚健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongkong Technology Co ltd
Zhejiang University ZJU
Original Assignee
Zhejiang Supcon Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CNB2004100886767A priority Critical patent/CN100417122C/en
Publication of CN1604554A publication Critical patent/CN1604554A/en
Application granted granted Critical
Publication of CN100417122C publication Critical patent/CN100417122C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明公开了一种实现以太网确定性通信调度方法,通过为每个设备在以太网的数据链路层上增设一确定性通信调度管理实体,建立数据链路层与数据链路层用户之间的连接,用以对本设备的所有周期数据报文和非周期数据报文的发送进行控制。本发明所有网络设备的角色是相等的,由此体现了以太网通信的公平性原则,并且,在传输非周期数据报文阶段避免采用基于令牌的集中调度方式,无需在信道上传递大量令牌,不仅提高了非周期数据传输的效率,而且也提高了整个以太网络带宽的利用率;本发明的周期数据报文发送阶段,同一设备可以根据自身发送周期数据的大小及多少,在同一通信宏周期内设置多个发送周期数据报文时段,由此提供了一种更为灵活的调度方法。

Figure 200410088676

The invention discloses a method for realizing Ethernet deterministic communication scheduling. By adding a deterministic communication scheduling management entity on the data link layer of Ethernet for each device, the relationship between the data link layer and the data link layer users is established. It is used to control the sending of all periodic data packets and non-periodic data packets of the device. The roles of all network devices in the present invention are equal, thereby embodying the fairness principle of Ethernet communication, and avoiding the use of token-based centralized scheduling in the stage of transmitting aperiodic data messages, without transmitting a large number of tokens on the channel. card, which not only improves the efficiency of aperiodic data transmission, but also improves the utilization rate of the entire Ethernet bandwidth; in the periodic data message sending stage of the present invention, the same device can send periodic data according to the size and number of periodic data sent by itself, in the same communication Multiple periods for sending periodic data packets are set in the macrocycle, thereby providing a more flexible scheduling method.

Figure 200410088676

Description

实现以太网确定性通信的调度方法 A Scheduling Method for Realizing Ethernet Deterministic Communication

技术领域 technical field

本发明涉及以太网通信领域,尤其涉及一种以太网+UDP(User DatagramProtocol,用户数据报协议)/IP为基础的工业控制网络中多个网络节点之间进行确定性通信的调度方法。The present invention relates to the field of Ethernet communication, in particular to a scheduling method for deterministic communication between a plurality of network nodes in an industrial control network based on Ethernet+UDP (User Datagram Protocol)/IP.

背景技术 Background technique

以太网作为一种成熟的网络技术,具有成本低、稳定和可靠等诸多优点,在办公自动化和工业控制领域得到了广泛应用,成为当前最受欢迎的通信网络之一。目前使用的以太网标准,在MAC(介质访问控制)层大多采用带冲突检测的载波监听多路访问的CSMA/CD(Carrier Sense Multiple Access/Collision Detect)协议,其工作流程是:当一个网络上的某一个节点需要发送数据时,它首先监听信道,若信道忙就持续等待,直到它一旦监听到信道空闲时,就将数据发送出去。如果两个或多个节点都在监听和等待发送数据,当监听到信道空闲时,各节点就立即(几乎同时)开始发送数据,这时就发生冲突。如果一个节点在传输期间检测出冲突,则立即停止传输,并向信道发出一个“拥挤”信号,以确保网络上的所有其它节点也发现该冲突。在基于以太网的通信系统中,为避免冲突,各个节点采用二进制指数退避(BEB,Binary Exponential Back-Off)算法处理冲突,但该方法具有冲突时延不确定的缺陷,无法在工业控制网络等实时网络中得到有效应用。As a mature network technology, Ethernet has many advantages such as low cost, stability and reliability, etc. It has been widely used in the field of office automation and industrial control, and has become one of the most popular communication networks. The currently used Ethernet standards mostly use the CSMA/CD (Carrier Sense Multiple Access/Collision Detect) protocol with collision detection at the MAC (Media Access Control) layer. When a certain node needs to send data, it first monitors the channel, and if the channel is busy, it will continue to wait until it detects that the channel is free, and then sends the data. If two or more nodes are listening and waiting to send data, when the channel is detected to be idle, each node immediately (almost at the same time) starts sending data, and a conflict occurs at this time. If a node detects a collision during transmission, it immediately stops transmission and sends a "congestion" signal to the channel to ensure that all other nodes on the network also see the collision. In an Ethernet-based communication system, in order to avoid conflicts, each node adopts Binary Exponential Back-Off (BEB, Binary Exponential Back-Off) algorithm to deal with conflicts, but this method has the defect of uncertain conflict delay and cannot be used in industrial control networks It can be effectively applied in real-time network.

工业控制网络是一种典型的实时应用系统,其中的任务(如功能块的执行)通常按照一定的时间间隔触发,并且对任务的执行时间具有截止期要求,这种任务称为周期性任务。实时应用系统中还有一种任务,这种任务只有在特定的事件触发下才出现,例如设备配置、故障诊断、程序的上载/下载、运行记录、报警处理等,这类任务称为非周期性任务,非周期性任务是随机触发的。这两种任务反映在工业控制网络的通信上,就是两类通信信息:周期性通信信息和非周期性通信信息。周期性信息是实时信息,非周期信息是非实时信息,周期性通信信息和非周期性通信信息具有不同的时间特性。而且,非周期信息通常具有较高的优先级。一旦系统组态完成,周期性通信信息的发送就具有时间确定性。而非周期性通信信息往往是突发信息,在时间上是不确定的。The industrial control network is a typical real-time application system, in which the tasks (such as the execution of function blocks) are usually triggered according to a certain time interval, and there is a deadline requirement for the execution time of the tasks. This task is called a periodic task. There is also a task in the real-time application system, which only occurs when a specific event is triggered, such as device configuration, fault diagnosis, program upload/download, running record, alarm processing, etc. Such tasks are called aperiodic Tasks, non-periodic tasks are triggered randomly. These two tasks are reflected in the communication of the industrial control network, which are two types of communication information: periodic communication information and non-periodic communication information. Periodic information is real-time information, non-periodic information is non-real-time information, and periodic communication information and non-periodic communication information have different time characteristics. Also, aperiodic information usually has a higher priority. Once the system configuration is complete, the periodic communication messages are sent with time determinism. Non-periodic communication information is often burst information, which is uncertain in time.

为了提高以太网通信的实时性和确定性,本申请人向国家知识产权局提出一种发明名称为“一种实现以太网确定性通信的调度方法”(申请号为03142040.0)的专利申请。该技术方案包括以下步骤:In order to improve the real-time and deterministic nature of Ethernet communication, the applicant submitted to the State Intellectual Property Office a patent application titled "A Scheduling Method for Realizing Ethernet Deterministic Communication" (application number 03142040.0). The technical solution includes the following steps:

首先,在以太网上定义至少一个主设备和若干个从设备,并且,还设置一个用以进行时钟同步的时钟服务器;First, define at least one master device and several slave devices on the Ethernet, and also set up a clock server for clock synchronization;

然后,将以太网中的信息分为周期信息和非周期信息,对周期信息采用时隙访问的控制方式,在固定的时间片中进行周期性的数据交换;对非周期信息采用基于令牌的集中调度方式,在周期信息通信的间隙即非周期信息通信阶段进行数据交换。Then, the information in the Ethernet is divided into periodic information and non-periodic information, the control method of time slot access is adopted for periodic information, and periodic data exchange is performed in a fixed time slice; token-based information is used for non-periodic information Centralized scheduling mode, data exchange is carried out in the interval of periodic information communication, that is, in the period of non-periodic information communication.

虽然上述方法能合理调度工业控制网络中的周期和非周期信息,进而实现工业控制网络的实时和确定性通信,但是,它还是存在以下问题:Although the above method can reasonably schedule the periodic and non-periodic information in the industrial control network, and then realize the real-time and deterministic communication of the industrial control network, it still has the following problems:

第一:在现有的网络中设置一个主设备,破坏了以太网通信的公平性原则,尤其是传输非周期数据时所采用的基于令牌的集中调度方式,使得在信道上要传递大量的令牌,不仅增加了非周期数据传输的时间,而且也降低了整个以太网络带宽的利用率;First: Setting up a master device in the existing network destroys the fairness principle of Ethernet communication, especially the token-based centralized scheduling method adopted when transmitting aperiodic data, which makes it necessary to transmit a large number of Tokens not only increase the time of aperiodic data transmission, but also reduce the utilization rate of the entire Ethernet bandwidth;

第二:在同一个周期内,每个设备只能发送一次周期数据,由此带来设备传输数据的不方便性。Second: In the same cycle, each device can only send cycle data once, which brings inconvenience to the device to transmit data.

发明内容 Contents of the invention

本发明的目的在于提供一中实现以太网确定性通信的调度方法,以解决现有技术中在网络中设置主设备,破坏以太网通信的公平性原则以及在传输非周期数据时所采用的基于令牌的集中调度方式,增加传输时间及降低带宽利用率的技术问题。The purpose of the present invention is to provide a scheduling method for realizing Ethernet deterministic communication, so as to solve the problem of setting up a master device in the network in the prior art, destroying the fairness principle of Ethernet communication and adopting a method based on The centralized scheduling method of tokens increases the transmission time and reduces the technical problems of bandwidth utilization.

为解决上述问题,本发明公开了一种实现以太网确定性通信的调度方法,所述以太网包括若干设备及用以设备之间进行时钟同步的时钟服务器,所述以太网中的信息分为周期数据和非周期数据,所述以太网上所有设备在预先设定的通信宏周期进行通信,每个通信宏周期分为周期数据报文传输阶段和非周期数据报文传输阶段,In order to solve the above problems, the present invention discloses a scheduling method for realizing deterministic communication of Ethernet. The Ethernet includes several devices and a clock server for clock synchronization between the devices. The information in the Ethernet is divided into Periodic data and aperiodic data, all devices on the Ethernet communicate in a preset communication macrocycle, and each communication macrocycle is divided into a periodic data message transmission phase and an aperiodic data message transmission phase,

(1)为每个设备在以太网的数据链路层上增设一确定性通信调度管理实体,其建立数据链路层与数据链路层用户之间的连接,用以对本设备的所有周期数据报文和非周期数据报文的发送时间进行控制;(1) Add a deterministic communication scheduling management entity on the data link layer of the Ethernet for each device, which establishes a connection between the data link layer and the data link layer user, and is used for all periodic data of the device Control the sending time of messages and aperiodic data messages;

(2)系统在启动之前,进行组态步骤,至少包括:每个设备设置并保存本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量Tn,设置并保存所述非周期数据报文传输阶段相对于通信宏周期起始时刻的偏离量;(2) Before the system is started, a configuration step is performed, at least including: each device sets and saves the deviation of the start time of the device transmitting periodic data messages in the communication macrocycle relative to the start time of the communication macrocycle Amount Tn, setting and saving the deviation of the aperiodic data message transmission phase relative to the initial moment of the communication macrocycle;

(3)所有设备周期进行与所述时钟服务器时钟同步;(3) all devices periodically synchronize with the clock server clock;

(4)在每个通信宏周期的周期数据报文传输阶段,每当设备检测到系统到达本设备发送周期数据报文时刻时,若有周期数据需发送,则先发送周期数据;然后发送非周期数据报文声明报文,反之,直接发送非周期数据报文声明报文,所述非周期数据报文声明报文包含有无非周期数据报文需要发送,发送的非周期数据报文的优先级、发送方设备的IP地址以及需要的发送完成时间;(4) In the period data packet transmission stage of each communication macrocycle, whenever the device detects that the system has reached the moment when the device sends periodic data packets, if there is periodic data to be sent, it will first send the periodic data; Periodic data message declaration message, on the contrary, directly send aperiodic data message declaration message, the aperiodic data message declaration message includes whether aperiodic data message needs to be sent, and the priority of the sent aperiodic data message level, the IP address of the sending device, and the required sending completion time;

(5)所有设备将接收到的非周期数据报文声明报文保存到本设备的确定性通信调度管理实体预先建立的非周期数据报文发送管理列表中,并按照报文优先级以及发送方设备的IP地址进行排队;(5) All devices save the received aperiodic data message declaration message in the aperiodic data message sending management list pre-established by the deterministic communication scheduling management entity of the device, and according to the priority of the message and the sender The IP address of the device is queued;

(6)在每个通信宏周期的非周期数据传输阶段,每当系统到达非周期数据报文发送时刻或者本设备接收到前一设备发送的非周期数据报文发送结束声明报文的时刻、且本次通信宏周期内剩余时间能够发送本设备的非周期数据报文时,本设备发送非周期数据报文,并在发送完后向其他设备发送非周期数据报文发送结束声明报文,所述前一设备为非周期数据报文发送管理列表中比本设备非周期数据报文早一个发送非周期数据报文的设备。(6) In the aperiodic data transmission phase of each communication macrocycle, whenever the system reaches the time when the aperiodic data message is sent or when the device receives the aperiodic data message sending end declaration message sent by the previous device, And when the remaining time in this communication macro cycle can send the aperiodic data message of the device, the device sends the aperiodic data message, and sends the aperiodic data message to other devices after sending the end statement message, The preceding device is a device that sends the aperiodic data message earlier than the aperiodic data message of the current device in the aperiodic data message sending management list.

步骤(4)中设备是通过判断T1 MOD T2=Tn是否成立来检测到系统是否到达本设备发送周期数据报文时间,其中T1为本设备的当前时间,T2为通信宏周期的时间周期。In step (4), the device detects whether the system has reached the time when the device sends periodic data packets by judging whether T1 MOD T2 = Tn is established, wherein T1 is the current time of the device, and T2 is the time period of the communication macro cycle.

在同一个周期数据传输阶段一个设备可以设置一个及其以上的所述Tn。In the data transmission phase of the same cycle, a device can set one or more Tn.

所述确定性通信调度管理实体设置备用状态、准备状态、周期数据发送状态及非周期数据发送状态,其中,系统进行组态后,所述确定性通信调度管理实体从所述备用状态转为准备状态,当本设备发送周期数据报文的时间来到时,所述确定性通信调度管理实体的状态改变为周期数据发送状态,周期数据报文发送完成后,所述确定性通信调度管理实体发送非周期数据报文声明报文,并将所述确定性通信调度管理实体换为准备状态,若需要发送本设备非周期数据报文,则所述确定性通信调度管理实体的状态改变为非周期数据发送状态,本设备非周期数据报文发送完成后,所述确定性通信调度管理实体回到准备状态。The deterministic communication scheduling management entity sets the standby state, the ready state, the periodic data transmission state and the non-periodic data transmission state, wherein, after the system is configured, the deterministic communication scheduling management entity changes from the standby state to the ready state state, when the time for the device to send the periodic data message arrives, the state of the deterministic communication scheduling management entity changes to the periodic data sending state, and after the periodic data message is sent, the deterministic communication scheduling management entity sends Aperiodic data message declaration message, and change the deterministic communication scheduling management entity to the ready state, if it is necessary to send the aperiodic data message of the device, then the state of the deterministic communication scheduling management entity is changed to aperiodic In the data sending state, after the device sends the aperiodic data message, the deterministic communication scheduling management entity returns to the ready state.

步骤(5)中按照优先级以及IP地址进行排队具体包括:Queuing according to priority and IP address in step (5) specifically includes:

非周期数据报文按照优先级从高到低进行排序,当优先级相同时,按照预先设定进行排序:若预先设定IP地址高者先发送则优先级相同且IP地址高者排前,反之,预先设定IP地址低者先发送则优先级相同且IP地址低者排前。Aperiodic data packets are sorted according to the priority from high to low. When the priorities are the same, they are sorted according to the preset settings: if the preset IP address is sent first, the priority is the same and the IP address is the first. Conversely, if it is preset that the one with the lower IP address is sent first, the priority will be the same and the one with the lower IP address will be sent first.

其中,步骤(6)具体包括:Wherein, step (6) specifically includes:

(6-1)在每个通信宏周期的非周期数据传输阶段,每一设备判断本设备是否有非周期数据报文发送,若有,进行步骤(6-2),否则,将所述确定性通信调度管理实体状态设置为准备状态;(6-1) In the aperiodic data transmission stage of each communication macrocycle, each device judges whether the device has aperiodic data message transmission, if so, proceed to step (6-2), otherwise, determine the The status of the sexual communication scheduling management entity is set to the ready state;

(6-2)所述确定性通信调度管理实体判断本设备的非周期数据报文的优先级是否最高,若是,则等待到非周期数据报文发送时间,然后进行步骤(6-4),否则进行步骤(6-3);(6-2) The deterministic communication scheduling management entity judges whether the priority of the aperiodic data message of the device is the highest, if so, wait until the sending time of the aperiodic data message, and then perform step (6-4), Otherwise, proceed to step (6-3);

(6-3)所述确定性通信调度管理实体判断是否已收到前一设备发送的非周期数据报文发送结束声明报文,若是,进行步骤(6-4),否则进行步骤(6-2),所述前一设备为非周期数据报文发送管理列表中比本设备非周期数据报文早一个发送非周期数据报文的设备;(6-3) The deterministic communication scheduling management entity judges whether the aperiodic data message sending end statement message sent by the previous device has been received, if so, proceed to step (6-4), otherwise proceed to step (6- 2), the previous device is a device that sends an aperiodic data message earlier than the aperiodic data message of this device in the aperiodic data message sending management list;

(6-4)判断本次通信宏周期内剩余时间是否能够发送本设备的非周期数据报文,若是,发送非周期数据报文,并在之后向其他设备发送非周期数据报文发送结束声明,否则将所述确定性通信调度管理实体状态设置为准备状态。(6-4) Determine whether the remaining time in the communication macrocycle can send the aperiodic data message of this device, if so, send the aperiodic data message, and then send the aperiodic data message to other devices to send the end statement , otherwise set the state of the deterministic communication scheduling management entity to the ready state.

其中,步骤(3)中时钟同步包括由每一设备与所述时钟服务器之间通信简单网络时间协议SNTP或IEEE1588精确时间同步协议实现。Wherein, the clock synchronization in the step (3) includes implementing simple network time protocol SNTP or IEEE1588 precise time synchronization protocol between each device and the clock server.

若检测到一设备在三个通信宏周期内没有发送非周期数据报文声明报文,所述设备为失效设备。If it is detected that a device does not send an aperiodic data message declaration message within three communication macrocycles, the device is an invalid device.

与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:

第一:所有的网络设备的角色是相等的,没有主从设备之分,从而体现了以太网通信的公平性原则,并且,在传输非周期数据报文阶段避免采用基于令牌的集中调度方式,无需在信道上传递大量令牌,由此不仅提高了非周期数据传输的效率,而且也提高了整个以太网络带宽的利用率;First: The roles of all network devices are equal, and there is no distinction between master and slave devices, thus reflecting the fairness principle of Ethernet communication, and avoiding token-based centralized scheduling during the transmission of aperiodic data packets , there is no need to transmit a large number of tokens on the channel, which not only improves the efficiency of aperiodic data transmission, but also improves the utilization rate of the entire Ethernet bandwidth;

第二:本发明的周期数据报文发送阶段,同一设备可以根据自身发送周期数据的大小及多少,在同一通信宏周期内设置多个发送周期数据报文时段,由此提供了一种更为灵活的调度方法。Second: in the periodic data message sending stage of the present invention, the same device can set a plurality of periods for sending periodic data messages in the same communication macrocycle according to the size and number of its own sending periodic data messages, thereby providing a more Flexible scheduling method.

附图说明 Description of drawings

图1是本发明的调度方法的数据链路层模型;Fig. 1 is the data link layer model of scheduling method of the present invention;

图2是本发明的调度方法的使用的确定性通信调度管理实体状态一种实例转换图;Fig. 2 is an example conversion diagram of the deterministic communication scheduling management entity state used in the scheduling method of the present invention;

图3是本发明的调度方法的网络传输时间的通信通信宏周期的划分示意图;3 is a schematic diagram of the division of the communication macrocycle of the network transmission time of the scheduling method of the present invention;

图4是本发明的调度方法一个六设备通信实例的一个传输通信宏周期中信息通信过程的示意图;Fig. 4 is a schematic diagram of an information communication process in a transmission communication macrocycle of a six-device communication instance of the scheduling method of the present invention;

图5是本发明调度方法实施中根据SNTP实现时钟同步的示意图;Fig. 5 is the schematic diagram that realizes clock synchronization according to SNTP in the scheduling method implementation of the present invention;

图6是周期数据报文发送过程的流程图;Fig. 6 is a flow chart of the sending process of periodic data message;

图7是本发明的调度方法的非周期数据报文发送过程的流程图。FIG. 7 is a flow chart of the aperiodic data packet sending process of the scheduling method of the present invention.

具体实施方式 Detailed ways

以下结合附图,具体说明本发明。The present invention will be described in detail below in conjunction with the accompanying drawings.

本发明公开了一种实现以太网确定性通信的调度方法,用于控制以太网中各个设备的发送报文的时间,以保证同一时刻只有一个设备向网络上发送报文,进而达到工业控制网络中实时和确定性通信的目的。The invention discloses a scheduling method for realizing Ethernet deterministic communication, which is used to control the time of sending messages of each device in the Ethernet, so as to ensure that only one device sends messages to the network at the same time, and then reaches the industrial control network The purpose of real-time and deterministic communication in .

在本发明中,以太网中除了发送报文的设备(或称之为节点)外,还包括用以设备之间进行时钟同步的时钟服务器。以太网中的信息分为周期数据和非周期数据,同理,每个设备要发送的报文也包括周期数据报文和非周期数据报文。顾名思义,周期数据报文包含周期数据,而非周期数据报文包含非周期数据。In the present invention, besides the device (or node) that sends the message, the Ethernet also includes a clock server for clock synchronization between devices. The information in the Ethernet is divided into periodic data and aperiodic data. Similarly, the messages to be sent by each device also include periodic data messages and aperiodic data messages. As the name implies, a cyclic data telegram contains cyclic data and an acyclic data telegram contains acyclic data.

整个网络传输时间被划分为无限个等长的通信宏周期,每个所述通信宏周期包括周期数据报文传输阶段和非周期数据报文传输阶段,所有设备在每个通信宏周期内发送和接收周期数据报文和非周期数据报文。The entire network transmission time is divided into an infinite number of equal-length communication macrocycles, each of which includes a periodical data packet transmission phase and an aperiodic data packet transmission phase, and all devices send and receive messages in each communication macrocycle Receive cyclic data telegrams and acyclic data telegrams.

请参阅图1,其为本发明的调度方法所使用的数据链路层模型,即,以太网的数据链路层中设置了确定性通信调度管理实体,它设置在在逻辑链路控制层中,建立逻辑链路控制层和数据链路层用户之间的连接,主要用于对本设备的所有周期数据和非周期数据报文的发送时间进行控制,以保证同一时刻只有一个设备向网络上发送报文,进而彻底避免报文碰撞。本发明的以太网络上所有设备没有主设备和从设备之分,也就是所有设备的角色均是平等的,由此以太网络上的调度是由每个设备的确定性通信调度管理实体来实现的。Please refer to Fig. 1, it is the used data link layer model of the dispatching method of the present invention, that is, the deterministic communication scheduling management entity is set in the data link layer of Ethernet, and it is set in the logical link control layer , to establish a connection between the logical link control layer and the data link layer user, which is mainly used to control the sending time of all periodic data and aperiodic data packets of this device, so as to ensure that only one device sends to the network at the same time packets, thereby completely avoiding packet collisions. All devices on the Ethernet network of the present invention are not divided into master devices and slave devices, that is, the roles of all devices are equal, so the scheduling on the Ethernet network is realized by the deterministic communication scheduling management entity of each device .

为了能更方便实现实时和确定性通信,本申请人提出了确定性通信调度管理实体的一种控制过程实施例。请参阅图2,其为一种确定性通信调度管理实体的状态转换图。每个确定性通信调度管理实体由四个状态以及它们之间的转换来描述的。四个状态分别是“备用”状态(Standby)、“准备”状态(Ready)、“周期数据发送”状态(PeriodicData Sending)、“非周期数据发送”状态(NonPeriodicData Sending)。In order to realize real-time and deterministic communication more conveniently, the applicant proposes a control process embodiment of a deterministic communication scheduling management entity. Please refer to FIG. 2 , which is a state transition diagram of a deterministic communication scheduling management entity. Each deterministic communication scheduling management entity is described by four states and transitions between them. The four states are "Standby", "Ready", "Periodic Data Sending" and "NonPeriodic Data Sending".

其中,系统进行组态后,所述确定性通信调度管理实体从所述备用状态转为准备状态,当本设备发送周期数据报文的时间来到时,所述确定性通信调度管理实体的状态改变为周期数据发送状态,周期数据报文发送完成后,所述确定性通信调度管理实体发送非周期数据报文声明报文,并将所述确定性通信调度管理实体换为准备状态,若需要发送本设备非周期数据报文,则所述确定性通信调度管理实体的状态改变为非周期数据发送状态,本设备非周期数据报文发送完成后,所述确定性通信调度管理实体回到准备状态。Wherein, after the system is configured, the deterministic communication scheduling management entity changes from the standby state to the ready state. Change to the periodic data sending state. After sending the periodic data message, the deterministic communication scheduling management entity sends an aperiodic data message declaration message, and changes the deterministic communication scheduling management entity to the ready state. If necessary Send the aperiodic data message of the device, the state of the deterministic communication scheduling management entity changes to the aperiodic data sending state, after the aperiodic data message of the device is sent, the deterministic communication scheduling management entity returns to the preparation state.

在报文传输过程中,确定性通信调度管理实体对本设备的所有周期数据和非周期数据报文的发送进行控制,保证在任意时刻,网络上均只有一个设备发送报文,而且在通信宏周期中,优先级高的报文优先发送,优先级相同时,根据本设备IP地址判断哪一报文优先发送,从而保证了以太网通信的确定性和实时性。During the message transmission process, the deterministic communication scheduling management entity controls the sending of all periodic data and aperiodic data messages of the device to ensure that at any time, only one device on the network sends messages, and in the communication macro cycle Among them, the message with higher priority is sent first. When the priority is the same, it is judged which message is sent first according to the IP address of the device, thus ensuring the certainty and real-time performance of Ethernet communication.

在系统启动之前,首先对整个系统进行组态,至少包括:设备通信宏周期的大小;设备各个设备在一个通信宏周期中发送周期数据的时间长度;设置每个设备在通信宏周期中传输周期数据的起始时刻相对于传输通信宏周期起始时刻的偏离量;并将这些信息保存到每个设备中;每个设备设置并保存本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量;以及设置并保存所述非周期数据报文传输阶段相对于通信宏周期起始时刻的偏离量。Before the system starts, configure the entire system first, including at least: the size of the device communication macrocycle; the time length for each device to send periodic data in a communication macrocycle; set the transmission cycle of each device in the communication macrocycle The offset of the starting moment of the data relative to the starting moment of the transmission communication macrocycle; and save this information in each device; each device sets and saves the transmission period data message of the device in the communication macrocycle The deviation of the starting time relative to the starting time of the communication macrocycle; and setting and saving the deviation of the aperiodic data packet transmission phase relative to the starting time of the communication macrocycle.

请参阅图3,其为网络传输时间的通信宏周期的一种划分示意图,在该图中,网络传输时间被划分为无限个等长的通信宏周期。每个通信宏周期由周期数据报文发送阶段和非周期数据报文发送阶段构成。Please refer to FIG. 3 , which is a schematic diagram of division of communication macrocycles of network transmission time. In this figure, network transmission time is divided into infinite communication macrocycles of equal length. Each communication macrocycle consists of a periodic data message sending phase and an aperiodic data message sending phase.

图4是一个通信宏周期中信息通信过程的一个实施示意图,在图4中,示例网络中有6个设备进行通信。从图4可以看出,每个设备发送周期数据的时间在系统组态时确定;所示各个设备发送周期数据的起始时间相对于传输周期的起始时间的偏离量是不同的,从而避免了多个设备同时访问网络资源时发生冲突的可能。同时,每个设备发送周期数据在时间上具有确定性,即一旦设备在某个时刻发送了一个周期数据,那么该设备下次发送同一种周期数据的时间可以通过以下方式计算而得到:Fig. 4 is a schematic diagram of an implementation of an information communication process in a communication macrocycle. In Fig. 4, there are 6 devices communicating in the example network. It can be seen from Figure 4 that the time for each device to send periodic data is determined during system configuration; the deviations of the start time of each device sending periodic data relative to the start time of the transmission cycle are different, so as to avoid It eliminates the possibility of conflicts when multiple devices access network resources at the same time. At the same time, each device sends periodic data with certainty in time, that is, once a device sends a periodic data at a certain moment, the next time the device sends the same periodic data can be calculated by the following method:

NextSendTime=CurrentTime+传输周期NextSendTime=CurrentTime+transmission period

其中,NextSendTime为设备下次传输相同周期数据的时间,CurrentTime为当前传输周期数据的时刻。Among them, NextSendTime is the time when the device transmits the data of the same period next time, and CurrentTime is the moment when the data of the current transmission period is transmitted.

在本发明,在一个周期内允许同一设备多次发送周期数据,比如,在同一个设备内设置两个发送周期数据的时刻,比如设置S1和S2,S1为本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的第一偏离量,S2为本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的第二偏离量。因此,上述设备可以在同一周期内检测到两次发送本设备的周期数据报文的发送时刻。In the present invention, the same device is allowed to send periodic data multiple times in one cycle, for example, two moments of sending periodic data are set in the same device, such as setting S1 and S2, and S1 is the communication macro cycle of this device The first deviation of the starting moment of the transmission period data message relative to the starting moment of the communication macrocycle, S2 is the starting moment of the transmission period data message of the device in the communication macrocycle relative to the beginning of the communication macrocycle The second offset of the moment. Therefore, the above-mentioned device can detect the sending time of sending the periodic data message of the device twice in the same cycle.

在本发明中,还可以通过判断T1 MOD T2=Tn是否成立来检测到系统是否到达本设备发送周期数据报文时间,其中T1为本设备的当前时间,T2为通信宏周期的时间周期,Tn为本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量,同样,在同一个周期数据传输阶段一个设备可以设置一个及其以上的Tn,所述Tn为设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量。In the present invention, it is also possible to detect whether the system arrives at the time when the device sends periodic data messages by judging whether T1 MOD T2=Tn is established, wherein T1 is the current time of the device, T2 is the time period of the communication macrocycle, and Tn It is the deviation of the starting moment of the periodic data message transmission of the device in the communication macrocycle relative to the starting moment of the communication macrocycle. Similarly, a device can set one or more Tn in the same period of data transmission. , the Tn is the deviation from the start time of the device transmitting periodic data packets in the communication macrocycle relative to the start time of the communication macrocycle.

由于每个通信宏周期,以太网确定性通信的调度方法类似,因此,以下就以一个通信宏周期为例,具体说明本发明的以太网确定性通信的调度方法。Since the scheduling method of the Ethernet deterministic communication is similar in each communication macrocycle, the scheduling method of the Ethernet deterministic communication of the present invention will be described in detail below by taking one communication macrocycle as an example.

在一个通信宏周期的以太网确定性通信的调度方法主要包括三个过程:各个设备建立与时钟服务器的时钟同步过程;发送周期数据报文过程以及发送非周期数据报文过程。The scheduling method of the Ethernet deterministic communication in a communication macrocycle mainly includes three processes: the process of establishing clock synchronization between each device and the clock server; the process of sending periodic data messages and the process of sending aperiodic data messages.

(一)时钟同步过程(1) Clock synchronization process

图5是用SNTP(SNTP,Simple Network Time Protocol)实现时钟同步的示意图。本发明所述的保持各个设备之间严格的时钟同步是通过基于UDP的SNTP协议来实现,如图5所示。利用SNTP实现设备之间的时钟同步,实际上就是让每个设备定期与时钟服务器通过交换SNTP报文,计算出设备同时钟服务器之间的时间差,从而调整本地时钟,使设备本地时钟与时钟服务器之间的时间差保持在可以允许的范围内。在计算设备与时钟服务器之间的时间差时要用到四个时间戳:U1,U2,U3和U4,其意义如下:FIG. 5 is a schematic diagram of implementing clock synchronization with SNTP (Simple Network Time Protocol). Keeping the strict clock synchronization among the various devices in the present invention is realized through the UDP-based SNTP protocol, as shown in FIG. 5 . Using SNTP to achieve clock synchronization between devices is actually to allow each device to periodically exchange SNTP messages with the clock server to calculate the time difference between the device and the clock server, thereby adjusting the local clock so that the local clock of the device is consistent with the clock server The time difference between them is kept within the allowable range. Four timestamps are used when calculating the time difference between the device and the clock server: U 1 , U 2 , U 3 and U 4 , and their meanings are as follows:

U1:设备发送时钟同步请求时的本地时间戳;U 1 : the local time stamp when the device sends the clock synchronization request;

U2:时钟服务器接收到时钟同步请求时的时间戳(标准时间);U 2 : the time stamp (standard time) when the clock server receives the clock synchronization request;

U3:时钟服务器发送时钟同步应答时的时间戳(标准时间);U 3 : the time stamp (standard time) when the clock server sends the clock synchronization response;

U4:设备接收到时钟同步应答时的本地时间戳。U 4 : The local time stamp when the device receives the clock synchronization reply.

简单网络时间协议实现时钟同步基于一个假定,就是设备到时钟服务器和时钟服务器到现场设备之间的传输延时是相等的。基于这个假设,我们通过以下算法计算现场设备与时钟服务器之间的时间偏差TdSimple Network Time Protocol implements clock synchronization based on an assumption that the transmission delay between the device to the clock server and the clock server to the field device is equal. Based on this assumption, we calculate the time deviation T d between the field device and the clock server through the following algorithm.

U2-(U1+Ud)=(U4+Ud)-U3 U 2 −(U 1 +U d )=(U 4 +U d )−U 3

根据上式就可以计算出设备与时钟服务器之间的时间偏差UdAccording to the above formula, the time deviation U d between the device and the clock server can be calculated:

Ud=((U2-U1)+(U3-U4))/2U d =((U 2 -U 1 )+(U 3 -U 4 ))/2

设备可以根据时间偏差Ud调整本地时钟,从而与时钟服务器实现同步。网络上的所有设备通过相同的方式与时钟服务器实现同步之后,意味着网络上所有设备之间在时间上也是同步的。The device can adjust the local clock according to the time deviation U d , so as to achieve synchronization with the clock server. After all devices on the network are synchronized with the clock server in the same way, it means that all devices on the network are also synchronized in time.

(二)周期数据发送过程(2) Periodic data sending process

请参阅图6,其为一个通信宏周期中设备的周期数据发送过程示意图。Please refer to FIG. 6 , which is a schematic diagram of a periodic data sending process of a device in a communication macrocycle.

首先进行步骤S110,在通信宏周期的周期报文传输阶段,每个设备的确定性通信调度管理实体若检测到本设备发送周期报文的时间,则本设备的确定性通信调度管理实体改变为“周期数据发送”状态,若本设备有周期性报文,则发送周期报文,反之,直接进行步骤S120;First, step S110 is performed. In the periodical message transmission phase of the communication macrocycle, if the deterministic communication scheduling management entity of each device detects the time when the device sends the periodic message, the deterministic communication scheduling management entity of the device is changed to In the state of "periodic data transmission", if the device has periodic messages, then send periodic messages, otherwise, directly proceed to step S120;

然后进行步骤S120:该设备的确定性通信调度管理实体判断在本通信宏周期内是否还有其他时间发送周期数据,若是,进行步骤S110,否则进行步骤S130;确定性通信调度管理实体通过检测Tn的个数即可获知本设备在同一通信宏周期内需要发送周期数据报文的个数,而Tn为设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量;Then proceed to step S120: the deterministic communication scheduling management entity of the device judges whether there is other time to send periodic data in the current communication macrocycle, if so, proceed to step S110, otherwise proceed to step S130; the deterministic communication dispatching management entity detects Tn The number of periodic data packets that the device needs to send in the same communication macrocycle can be known, and Tn is the starting time of the device transmitting periodic data packets in the communication macrocycle relative to the start of the communication macrocycle The amount of deviation from the initial moment;

随后进行步骤S130:将本周期非周期数据报文声明报文传送给数据链路层,由数据链路层向其他每一设备发送该周期数据报文声明,并且确定性通信调度管理实体改变为准备状态;非周期数据报文声明报文包括是否有非周期数据需要发送,发送方的IP地址、非周期数据报文的发送优先级以及需要发送时间等参数。Then proceed to step S130: transmit the periodic aperiodic data message declaration message to the data link layer, and the data link layer sends the periodic data message declaration to each other device, and the deterministic communication scheduling management entity is changed to Ready state; the aperiodic data message declaration message includes whether there is aperiodic data to be sent, the IP address of the sender, the sending priority of the aperiodic data message, and the required sending time and other parameters.

最后进行步骤S140:每一设备将非周期数据报文声明报文存放在预先建立的非周期数据报文发送管理列表中,并按照优先级以及IP地址进行排队。非周期数据报文按照优先级从高到低进行排序,当优先级相同时,按照预先设定进行排序:若预先设定IP地址高者先发送则优先级相同且IP地址高者排前,反之,预先设定IP地址低者先发送则优先级相同且IP地址低者排前,或者Finally, step S140 is performed: each device stores the aperiodic data message declaration message in the pre-established aperiodic data message sending management list, and queues it according to priority and IP address. Aperiodic data packets are sorted according to the priority from high to low. When the priorities are the same, they are sorted according to the preset settings: if the preset IP address is sent first, the priority is the same and the IP address is the first. Conversely, if it is preset that the one with the lower IP address is sent first, the priority will be the same and the one with the lower IP address will be sent first, or

非周期数据报文按照优先级从低到高进行排序,当优先级相同时,按照预先设定进行排序:若预先设定IP地址高者先发送则优先级相同且IP地址高者排后,反之,预先设定IP地址低者先发送则优先级相同且IP地址低者排后。Aperiodic data packets are sorted according to priority from low to high. When the priority is the same, they are sorted according to the preset settings: if the preset IP address is sent first, the priority is the same and the IP address is ranked last. Conversely, if it is preset that the one with the lower IP address will be sent first, the priority will be the same and the one with the lower IP address will be ranked last.

在本发明在非周期数据报文发送管理列表中还是以优先级从高到低进行排序,并且,优先级相同且IP地址高者先发送,即优先级相同IP地址高者在非周期数据报文发送管理列表中排在前。In the present invention, the aperiodic data message transmission management list is still sorted from high to low in priority, and the one with the same priority and the higher IP address is sent first, that is, the one with the higher IP address in the same priority is sent in the aperiodic data message. top in the file sending management list.

在步骤S140中,设备的确定性通信调度管理实体接收到一个非周期数据报文发送声明报文,就将此非周期数据报文发送声明报文插入非周期数据报文发送管理列表中。当然,为了提高效率,也可以在周期数据报文发送结束后,非周期数据报文发送管理列表中所有的非周期数据报文发送声明报文一起进行排序。In step S140, the deterministic communication scheduling management entity of the device receives an aperiodic data message sending declaration message, and inserts the aperiodic data message sending declaration message into the aperiodic data message sending management list. Certainly, in order to improve the efficiency, all the non-periodic data message sending declaration messages in the aperiodic data message sending management list may also be sorted together after the periodic data message sending ends.

(三)非周期数据报文发送(3) Aperiodic data message transmission

请参阅图7,其为本发明中一个通信宏周期设备发送非周期数据报文的发送流程,包括以下步骤:Please refer to Fig. 7, which is a sending process of a communication macrocycle device sending aperiodic data message in the present invention, including the following steps:

S210:在每个通信宏周期的非周期数据传输阶段,每一设备判断本设备是否有非周期数据报文发送,若有,进行步骤S220;否则,将所述确定性通信调度管理实体状态设置为准备状态;S210: In the aperiodic data transmission phase of each communication macrocycle, each device judges whether the device has aperiodic data message transmission, if so, proceed to step S220; otherwise, set the status of the deterministic communication scheduling management entity in a state of readiness;

S220:判断本设备的非周期数据报文的优先级是否最高,若是,则本设备的确定性通信调度管理实体等待到非周期数据报文发送时间,然后,进行步骤S240,反之,进行步骤S230;S220: Determine whether the priority of the aperiodic data message of the device is the highest, if so, the deterministic communication scheduling management entity of the device waits until the sending time of the aperiodic data message, and then proceed to step S240, otherwise, proceed to step S230 ;

S230:所述确定性通信调度管理实体判断是否已收到前一设备发送的非周期数据报文发送结束声明报文,若是,进行步骤S240,否则进行步骤S220,所述前一设备为非周期数据报文发送管理列表中比本设备非周期数据报文早一个发送非周期数据报文的设备;S230: The deterministic communication scheduling management entity judges whether it has received the aperiodic data message sending end declaration message sent by the previous device, if yes, go to step S240, otherwise go to step S220, the previous device is aperiodic A device that sends aperiodic data packets earlier than the aperiodic data packets of this device in the data packet sending management list;

S240:判断本次通信宏周期内剩余时间是否能够发送本设备的非周期数据报文,若是,发送非周期数据报文,并在之后向其他设备发送非周期数据报文发送结束声明,否则将所述确定性通信调度管理实体状态设置为准备状态。S240: Determine whether the remaining time in this communication macrocycle can send the aperiodic data message of this device, if so, send the aperiodic data message, and then send the aperiodic data message sending end statement to other devices, otherwise it will The state of the deterministic communication scheduling management entity is set to the ready state.

由于采用了上述技术方案,本发明在位于UDP之上的用户层提供一种确定性通信的调度方法,以合理调度工业控制网络中的周期和非周期数据,在以以太网+UDP/IP为基础的工业控制网络上实现实时和确定性的通信,以满足基于传统以太网标准的工业控制网络对通信的实时性和确定性的要求。Due to the adoption of the above technical solution, the present invention provides a scheduling method for deterministic communication at the user layer above UDP, to reasonably schedule periodic and non-periodic data in the industrial control network, using Ethernet+UDP/IP as the The real-time and deterministic communication is realized on the basic industrial control network to meet the real-time and deterministic requirements of the industrial control network based on the traditional Ethernet standard.

以上公开的仅为本发明的几个具体实施例,但本发明并非局限于此,任何本领域的人员能思之的变化都应落入在本发明的保护范围内,本发明的保护范围以权利要求书为准。The above disclosures are only several specific embodiments of the present invention, but the present invention is not limited thereto, and any changes conceivable by those skilled in the art should fall within the protection scope of the present invention, and the protection scope of the present invention begins with The claims shall prevail.

Claims (8)

1. 一种实现以太网确定性通信的调度方法,所述以太网包括若干设备及用以设备之间进行时钟同步的时钟服务器,所述以太网中的信息分为周期数据和非周期数据,所述以太网上所有设备在预先设定的通信宏周期进行通信,每个通信宏周期分为周期数据报文传输阶段和非周期数据报文传输阶段,其特征在于,1. A scheduling method for realizing Ethernet deterministic communication, the Ethernet includes a number of devices and a clock server for clock synchronization between devices, the information in the Ethernet is divided into periodic data and non-periodic data, All devices on the Ethernet communicate in a preset communication macrocycle, and each communication macrocycle is divided into a periodic data message transmission phase and an aperiodic data message transmission phase, characterized in that, (1)为每个设备在以太网的数据链路层上增设一确定性通信调度管理实体,其建立数据链路层与数据链路层用户之间的连接,用以对本设备的所有周期数据报文和非周期数据报文的发送时间进行控制;(1) Add a deterministic communication scheduling management entity on the data link layer of the Ethernet for each device, which establishes a connection between the data link layer and the data link layer user, and is used for all periodic data of the device Control the sending time of messages and aperiodic data messages; (2)系统在启动之前,进行组态步骤,至少包括:每个设备设置并保存本设备在所述通信宏周期中传输周期数据报文的起始时刻相对于通信宏周期起始时刻的偏离量Tn,设置并保存所述非周期数据报文传输阶段相对于通信宏周期起始时刻的偏离量;(2) Before the system is started, a configuration step is performed, at least including: each device sets and saves the deviation of the start time of the device transmitting periodic data messages in the communication macrocycle relative to the start time of the communication macrocycle Amount Tn, setting and saving the deviation of the aperiodic data message transmission phase relative to the initial moment of the communication macrocycle; (3)所有设备周期进行与所述时钟服务器时钟同步;(3) all devices periodically synchronize with the clock server clock; (4)在每个通信宏周期的周期数据报文传输阶段,每当设备检测到系统到达本设备发送周期数据报文时刻时,若有周期数据需发送,则先发送周期数据;然后发送非周期数据报文声明报文,反之,直接发送非周期数据报文声明报文,所述非周期数据报文声明报文包含有无非周期数据报文需要发送,发送的非周期数据报文的优先级、发送方设备的IP地址以及需要的发送完成时间;(4) In the period data packet transmission stage of each communication macrocycle, whenever the device detects that the system has reached the moment when the device sends periodic data packets, if there is periodic data to be sent, it will first send the periodic data; Periodic data message declaration message, on the contrary, directly send aperiodic data message declaration message, the aperiodic data message declaration message includes whether aperiodic data message needs to be sent, and the priority of the sent aperiodic data message level, the IP address of the sending device, and the required sending completion time; (5)所有设备将接收到的非周期数据报文声明报文保存到本设备的确定性通信调度管理实体预先建立的非周期数据报文发送管理列表中,并按照报文优先级以及发送方设备的IP地址进行排队;(5) All devices save the received aperiodic data message declaration message in the aperiodic data message sending management list pre-established by the deterministic communication scheduling management entity of the device, and according to the priority of the message and the sender The IP address of the device is queued; (6)在每个通信宏周期的非周期数据传输阶段,每当系统到达非周期数据报文发送时刻或者本设备接收到前一设备发送的非周期数据报文发送结束声明报文的时刻、且本次通信宏周期内剩余时间能够发送本设备的非周期数据报文时,本设备发送非周期数据报文,并在发送完后向其他设备发送非周期数据报文发送结束声明报文,所述前一设备为非周期数据报文发送管理列表中比本设备非周期数据报文早一个发送非周期数据报文的设备。(6) In the aperiodic data transmission phase of each communication macrocycle, whenever the system reaches the time when the aperiodic data message is sent or when the device receives the aperiodic data message sending end declaration message sent by the previous device, And when the remaining time in this communication macro cycle can send the aperiodic data message of the device, the device sends the aperiodic data message, and sends the aperiodic data message to other devices after sending the end statement message, The preceding device is a device that sends the aperiodic data message earlier than the aperiodic data message of the current device in the aperiodic data message sending management list. 2. 如权利要求1所述的实现以太网确定性通信的调度方法,其特征在于,步骤(4)中设备是通过判断T1 MOD T2=Tn是否成立来检测到系统是否到达本设备发送周期数据报文时间,其中T1为本设备的当前时间,T2为通信宏周期的时间周期。2. The scheduling method for realizing Ethernet deterministic communication as claimed in claim 1, wherein the equipment in step (4) detects whether the system arrives at the equipment to send periodic data by judging whether T1 MOD T2=Tn is set up Message time, where T1 is the current time of the device, and T2 is the time period of the communication macrocycle. 3. 如权利要求1或2所述的实现以太网确定性通信的调度方法,其特征在于,在同一个周期数据传输阶段一个设备可以设置一个及其以上的所述Tn。3. The scheduling method for realizing Ethernet deterministic communication as claimed in claim 1 or 2, wherein a device can set one or more Tn in the same cycle data transmission phase. 4. 如权利要求1或2所述的实现以太网确定性通信的调度方法,其特征在于,所述确定性通信调度管理实体设置备用状态、准备状态、周期数据发送状态及非周期数据发送状态,其中,系统进行组态后,所述确定性通信调度管理实体从所述备用状态转为准备状态,当本设备发送周期数据报文的时间来到时,所述确定性通信调度管理实体的状态改变为周期数据发送状态,周期数据报文发送完成后,所述确定性通信调度管理实体发送非周期数据报文声明报文,并将所述确定性通信调度管理实体换为准备状态,若需要发送本设备非周期数据报文,则所述确定性通信调度管理实体的状态改变为非周期数据发送状态,本设备非周期数据报文发送完成后,所述确定性通信调度管理实体回到准备状态。4. the scheduling method that realizes Ethernet deterministic communication as claimed in claim 1 or 2, it is characterized in that, described deterministic communication scheduling management entity sets standby state, ready state, periodic data sending state and aperiodic data sending state , wherein, after the system is configured, the deterministic communication scheduling management entity changes from the standby state to the ready state, and when the time for the device to send periodic data packets arrives, the deterministic communication scheduling management entity The state changes to the periodic data sending state. After sending the periodic data message, the deterministic communication scheduling management entity sends an aperiodic data message declaration message, and changes the deterministic communication scheduling management entity to the ready state. If If it is necessary to send the aperiodic data message of the device, the state of the deterministic communication scheduling management entity changes to the aperiodic data sending state. After the aperiodic data message of the device is sent, the deterministic communication scheduling management entity returns to the Ready state. 5. 如权利要求1所述的实现以太网确定性通信的调度方法,其特征在于,步骤(5)中按照优先级以及IP地址进行排队具体包括:5. the scheduling method that realizes Ethernet deterministic communication as claimed in claim 1, it is characterized in that, in step (5), according to priority and IP address, queue up specifically comprises: 非周期数据报文按照优先级从高到低进行排序,当优先级相同时,按照预先设定进行排序:若预先设定IP地址高者先发送则优先级相同且IP地址高者排前,反之,预先设定IP地址低者先发送则优先级相同且IP地址低者排前。Aperiodic data packets are sorted according to the priority from high to low. When the priorities are the same, they are sorted according to the preset settings: if the preset IP address is sent first, the priority is the same and the IP address is the first. Conversely, if it is preset that the one with the lower IP address is sent first, the priority will be the same and the one with the lower IP address will be sent first. 6. 如权利要求4所述的实现以太网确定性通信的调度方法,其特征在于,步骤(6)具体包括:6. the scheduling method that realizes Ethernet deterministic communication as claimed in claim 4, is characterized in that, step (6) specifically comprises: (6-1)在每个通信宏周期的非周期数据传输阶段,每一设备判断本设备是否有非周期数据报文发送,若有,进行步骤(6-2),否则,将所述确定性通信调度管理实体状态设置为准备状态;(6-1) In the aperiodic data transmission stage of each communication macrocycle, each device judges whether the device has aperiodic data message transmission, if so, proceed to step (6-2), otherwise, determine the The status of the sexual communication scheduling management entity is set to the ready state; (6-2)所述确定性通信调度管理实体判断本设备的非周期数据报文的优先级是否最高,若是,则等待到非周期数据报文发送时间,然后进行步骤(6-4),否则进行步骤(6-3);(6-2) The deterministic communication scheduling management entity judges whether the priority of the aperiodic data message of the device is the highest, if so, wait until the sending time of the aperiodic data message, and then perform step (6-4), Otherwise, proceed to step (6-3); (6-3)所述确定性通信调度管理实体判断是否已收到前一设备发送的非周期数据报文发送结束声明报文,若是,进行步骤(6-4),否则进行步骤(6-2),所述前一设备为非周期数据报文发送管理列表中比本设备非周期数据报文早一个发送非周期数据报文的设备;(6-3) The deterministic communication scheduling management entity judges whether the aperiodic data message sending end statement message sent by the previous device has been received, if so, proceed to step (6-4), otherwise proceed to step (6- 2), the previous device is a device that sends an aperiodic data message earlier than the aperiodic data message of this device in the aperiodic data message sending management list; (6-4)判断本次通信宏周期内剩余时间是否能够发送本设备的非周期数据报文,若是,发送非周期数据报文,并在之后向其他设备发送非周期数据报文发送结束声明,否则将所述确定性通信调度管理实体状态设置为准备状态。(6-4) Determine whether the remaining time in the communication macrocycle can send the aperiodic data message of this device, if so, send the aperiodic data message, and then send the aperiodic data message to other devices to send the end statement , otherwise set the state of the deterministic communication scheduling management entity to the ready state. 7. 如权利要求1所述的以太网确定性通信调度方法,其特征在于,步骤(3)中时钟同步包括由每一设备与所述时钟服务器之间通信简单网络时间协议SNTP或IEEE1588精确时间同步协议实现。7. Ethernet deterministic communication scheduling method as claimed in claim 1, is characterized in that, in step (3), clock synchronization comprises simple network time protocol SNTP or IEEE1588 precise time by communication between each equipment and described clock server Synchronous protocol implementation. 8. 如权利要求1所述的以太网确定性通信调度方法,其特征在于,若检测到一设备在三个通信宏周期内没有发送非周期数据报文声明报文,所述设备为失效设备。8. The Ethernet deterministic communication scheduling method according to claim 1, wherein if it is detected that a device does not send an aperiodic data message declaration message within three communication macrocycles, the device is a failure device .
CNB2004100886767A 2004-11-15 2004-11-15 A Scheduling Method for Realizing Ethernet Deterministic Communication Expired - Lifetime CN100417122C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100886767A CN100417122C (en) 2004-11-15 2004-11-15 A Scheduling Method for Realizing Ethernet Deterministic Communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100886767A CN100417122C (en) 2004-11-15 2004-11-15 A Scheduling Method for Realizing Ethernet Deterministic Communication

Publications (2)

Publication Number Publication Date
CN1604554A CN1604554A (en) 2005-04-06
CN100417122C true CN100417122C (en) 2008-09-03

Family

ID=34667163

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100886767A Expired - Lifetime CN100417122C (en) 2004-11-15 2004-11-15 A Scheduling Method for Realizing Ethernet Deterministic Communication

Country Status (1)

Country Link
CN (1) CN100417122C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010118669A1 (en) * 2009-04-15 2010-10-21 中控科技集团有限公司 Ethernet-based data transmission method, ethernet nodes and control system

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005053103B4 (en) * 2005-11-04 2008-04-24 Phoenix Contact Gmbh & Co. Kg Method and system for transmitting cyclic and acyclic data
CN101075945B (en) * 2006-05-19 2011-06-08 中国科学院沈阳自动化研究所 Method for determining realtime Ethernet telecommunication
CN101321127B (en) * 2008-07-21 2010-12-22 重庆邮电大学 Determined communication scheduling method of industrial wireless network
CN101369942B (en) * 2008-09-17 2011-12-14 中国科学院上海微系统与信息技术研究所 Method for guaranteeing communication time slot expansion of short distance wireless sensing network
CN101404618B (en) * 2008-11-04 2011-04-20 中兴通讯股份有限公司 System, apparatus and method for implementing transparent transmission clock in accurate clock synchronization protocol
CN101964744B (en) * 2010-04-01 2013-01-30 展讯通信(上海)有限公司 Processing method of IP (Internet Protocol) messages before transmission and transmitting terminal
CN106059812B (en) * 2016-05-31 2019-05-24 河南理工大学 A kind of synchronous method Ethernet system control and communicated
CN110658832B (en) * 2019-09-17 2021-04-20 华中科技大学 An underwater unmanned boat communication system suitable for complex working conditions
CN111327476B (en) * 2020-02-27 2022-07-12 浙江中控研究院有限公司 A system and method for dynamic bandwidth adjustment based on frame reservation
CN112764407B (en) * 2021-04-09 2021-07-02 浙江国利信安科技有限公司 An Aperiodic Communication Method for Distributed Control
CN113285844B (en) * 2021-07-23 2021-10-15 浙江国利信安科技有限公司 Method, computing device and medium for adjusting bandwidth
CN115174694B (en) * 2022-07-07 2023-08-29 浙江中控研究院有限公司 Data common network transmission method based on deterministic communication
CN115426070B (en) * 2022-11-02 2023-03-10 浙江国利信安科技有限公司 Method, device and storage medium for clock resynchronization
CN117376424B (en) * 2023-12-08 2024-02-23 浙江国利信安科技有限公司 Methods, electronic devices and storage media for transmitting data
CN119342574B (en) * 2024-12-20 2025-05-09 北京傲星科技有限公司 Time synchronization method in SRB network and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000072156A2 (en) * 1999-05-20 2000-11-30 Honeywell Inc. Method and system for transmitting periodic and aperiodic data over a critical avionics databus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000072156A2 (en) * 1999-05-20 2000-11-30 Honeywell Inc. Method and system for transmitting periodic and aperiodic data over a critical avionics databus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010118669A1 (en) * 2009-04-15 2010-10-21 中控科技集团有限公司 Ethernet-based data transmission method, ethernet nodes and control system
US8850058B2 (en) 2009-04-15 2014-09-30 Supcon Group Co., Ltd. Ethernet-based data transmission method, ethernet nodes and control system

Also Published As

Publication number Publication date
CN1604554A (en) 2005-04-06

Similar Documents

Publication Publication Date Title
CN100417122C (en) A Scheduling Method for Realizing Ethernet Deterministic Communication
JP5185879B2 (en) Method and apparatus for reducing power consumption in a passive optical network while maintaining service continuity
CN103823780B (en) A kind of Real-time Fieldbus controls dispatching method
CN101534230B (en) Method for sending data based on Ethernet, Ethernet node and control system
CN112764407B (en) An Aperiodic Communication Method for Distributed Control
EP2340623B1 (en) Power management of a network device
CN100382522C (en) A Scheduling Method for Realizing Ethernet Deterministic Communication
Alves et al. Real-time communications over hybrid wired/wireless PROFIBUS-based networks
EP2337252B1 (en) Method and system for energy efficient synchronization in packet based networks
WO2008101394A1 (en) Real-time synchronous method and synchronous network based on the standard ethernet
CN101018115A (en) Real time synchronization network based on the standard Ethernet and its operating method
EP4030646A1 (en) Packet forwarding method, device and system
CN113940038B (en) Subscriber station for a serial bus system and method for communication in a serial bus system
CN113315668B (en) Method, node device and storage medium for adaptively adjusting network configuration
TW200830792A (en) Adaptive polling for bursty wireless data traffic
CN113347048B (en) Method, node device and storage medium for adaptively adjusting network configuration
US20230090803A1 (en) Network Infrastructure Device, Communication Terminal and Method for Synchronizing Control Applications via a Communication Network for Transferring Time-Critical Data
Tramarin et al. Strategies and services for energy efficiency in real-time Ethernet networks
CN102624620B (en) A kind of transmission system of the Ethernet transmission method based on token frame
CN116208547A (en) A message transmission method and device
JP4624464B2 (en) System and method for transmitting data
Crenshaw et al. Robust implicit edf: A wireless mac protocol for collaborative real-time systems
CN201066852Y (en) Real time synchronization network based on standard Ethernet
CN117220810A (en) Asynchronous data transmission method and system based on POWERLINK protocol
CN111478838B (en) A high-efficiency and high-bandwidth communication method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190515

Address after: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Co-patentee after: ZHEJIANG University

Patentee after: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

Address before: 310053 Zhejiang Binjiang District Hangzhou six Road 309 central control science and Technology Park (high tech Zone)

Patentee before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: No. 309, Liuhe Road, Binjiang District, Hangzhou, Zhejiang 310053 (High tech Zone)

Patentee after: Zhongkong Technology Co.,Ltd.

Country or region after: China

Patentee after: ZHEJIANG University

Address before: No. six, No. 309, Binjiang District Road, Hangzhou, Zhejiang

Patentee before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

Country or region before: China

Patentee before: ZHEJIANG University

CP03 Change of name, title or address
CX01 Expiry of patent term

Granted publication date: 20080903

CX01 Expiry of patent term