[go: up one dir, main page]

CN100561904C - Device and method for realizing synchronization between nodes of Ethernet chain network - Google Patents

Device and method for realizing synchronization between nodes of Ethernet chain network Download PDF

Info

Publication number
CN100561904C
CN100561904C CNB2007100144192A CN200710014419A CN100561904C CN 100561904 C CN100561904 C CN 100561904C CN B2007100144192 A CNB2007100144192 A CN B2007100144192A CN 200710014419 A CN200710014419 A CN 200710014419A CN 100561904 C CN100561904 C CN 100561904C
Authority
CN
China
Prior art keywords
network node
message
node
network
timer
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 - Fee Related
Application number
CNB2007100144192A
Other languages
Chinese (zh)
Other versions
CN101039173A (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.)
Shandong Ezcode Intelligent Technology Co ltd
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CNB2007100144192A priority Critical patent/CN100561904C/en
Publication of CN101039173A publication Critical patent/CN101039173A/en
Priority to PCT/CN2008/000268 priority patent/WO2008101394A1/en
Application granted granted Critical
Publication of CN100561904C publication Critical patent/CN100561904C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种实现以太网链状网络节点间同步的装置和方法。它解决了目前以太网链状网络结构中实现各网络节点间精确同步动作时成本较高,不能兼容不同厂家产品,增加使用成本等问题,它具有结构简单,使用方便,兼容性好等优点。其结构为:它包括至少一个控制器和若干个网络节点,控制器能枚举和配置各网络节点,控制器分配给各网络节点一个单独的节点号,所述控制器具有至少一个通信接口,各节点具有至少两个通信接口,控制器的通信接口通过数据线连接到某节点的一个通信接口上,然后该节点的另一个通信接口通过数据线连接到下一个节点的一个通信接口上,这样彼此连接下去,形成一个链状网络结构;在各节点上还设有定时器。

The invention discloses a device and a method for realizing synchronization among nodes of an Ethernet chain network. It solves the problems of high cost in realizing precise synchronous actions between network nodes in the current Ethernet chain network structure, incompatibility with products from different manufacturers, and increased use costs. It has the advantages of simple structure, convenient use, and good compatibility. Its structure is: it includes at least one controller and several network nodes, the controller can enumerate and configure each network node, the controller assigns a separate node number to each network node, the controller has at least one communication interface, Each node has at least two communication interfaces, the communication interface of the controller is connected to a communication interface of a certain node through a data line, and then another communication interface of the node is connected to a communication interface of the next node through a data line, thus Connect each other to form a chain network structure; there is also a timer on each node.

Description

A kind ofly realize apparatus and method synchronous between the Ethernet chain-like network nodes
Technical field
The present invention relates to a kind of method and apparatus of in Ethernet chain-shaped network structure, realizing precise synchronization action between each network node, relate in particular to a kind of in the centralized Control Network of high-performance system, controller adopts the standard network interface card, can realize apparatus and method synchronous between the Ethernet chain-like network nodes.
Background technology
In the level communication, there is strict requirement in the system that has to the synchronism between communication node at the scene, and such as in motion control, the synchronism of each is exactly an important factors.At a time, each must latch current state simultaneously, and controller is made planning, interpolation operation according to current each state, and each is made Synchronization Control according to layout data and moves when next cycle, and the motion of each is a strict synchronism.
Existing solution is that all websites on the network must be by accurate clock synchronization to realize synchronous ethernet.For example: Internet NTP (Network Time Protocol) NTP (Network Time Protocal), simple time network agreement SNTP (SimpleNetwork Time Protocal), IEEE1588 standard Precision Time Protocol PTP (Precision Time Protocal), periodically the synchronization packets that has a timestamp agreement by transmission realize communication cycles synchronously.Internet NTP (Network Time Protocol) NTP, simple time network agreement SNTP precision are lower, can only reach the required precision of tens ms.
IEEE1588 is divided into ordinary clock OC and boundary clock BC with the clock in the whole network, and having only a clock on the PTP communication port is ordinary clock, and each PTP port provides independently PTP communication.Wherein boundary clock is used on the relatively poor network equipment of certainty such as switch and the router usually.Again clock is divided into master clock from the correspondence and from clock, any in theory clock can both be realized master clock and from the function of clock, but in a PTP communication subnet master clock can only be arranged.Optimum clock in the whole system is highest clock GMC, and best stability, accuracy, certainty etc. are arranged.According to the precision of clock on each node and the characteristics such as trackability of rank and UTC (universal coordinated time), select master clock in each subnet automatically by the best master clock algorithm.In the system that has only a subnet, master clock is exactly GMC.Each system has only a GMC, and has only a master clock in each subnet, keeps synchronously from clock and master clock.Message in the PTP communication comprises sync message, follows message, postpones request message, delayed response message and administrative message etc.The most accurate match time when the PTP agreement is propagated and received based on synchronization packets, each from clock by reaching synchronous with master clock.This synchronizing process is divided into two stages: offset measurement stage and delay measurements stage.Phase I is revised master clock and from the time deviation between the clock, is called offset measurement.In revising the process of side-play amount, master clock according to blanking time of definition periodically to sending unique sync message from clock accordingly.This sync message comprises that this message leaves the time estimated value of master clock, and master clock is measured the precise time TM1 that transmits, and measures the correct time TS1 that receives from clock.Master clock sends second message one and follows message (Follow_Up Message) afterwards, and this message is associated with sync message, and comprise sync message be put on the PTP communication path more accurate estimated value.Like this, can separate the propagation of transmission and measurement that receives and standard time stamp.Calculate side-play amount from clock according to the sync message and the information of following the message, revise time from clock according to side-play amount then, if do not postpone in transmission path, two clocks will be synchronous so.In order to improve the correction precision, can take into account master clock to postpone the stand-by period from the message transmissions of clock, it is delay measurements, this is the second stage of synchronizing process, from the time clockwise master clock send " postponing a request " packet, this message transmissions correct time of decision TS3 in this process.Master clock is stamped a time stamp T M3 to the reception packet and is sent back to from clock.The time of reception that stabs TS3 and master clock and provide according to passing time stabs TM3, from the time of delay between clock calculation and the master clock.Different with offset measurement, delay measurements is irregular carrying out, and its interval time of measurement (random values between default 4 to 60 seconds) ratio deviation value interval time of measurement is big.Especially the load of device end is not too large to make network like this.Adopt this synchronizing process, subdue time fluctuation in the PTP protocol stack and the stand-by period between principal and subordinate's clock.Requiring synchronization accuracy is the occasion of microsecond level, goes for so high synchronization timing, can't realize by software merely, must rely on the support of hardware in the network second layer (data link layer), real-time asic chip when promptly waiting.This mode will seriously increase the burden of transmission in the periodicity real time communication, rely on real-time asic chip when waiting, and has increased system cost again.
United States Patent (USP) " Reduced pin-count 10Base-T MAC to transceiver interface ", the patent No. is 5953345, the technology that realizes clock synchronization in a kind of Ethernet is provided, this technology is utilized a common clock signal and lock-out pulse, utilizes independent line to be connected in the PHY transceiver and mac controller of network node.In actual applications, this method is inapplicable, because adopt independent line to increase system cost.
United States Patent (USP) ' CLOCK SYNCHRONIZING METHOD OVER FAULT-TOLERANT ETHERNET ', publication number is: US 2003/235216A1, disclose a kind of in control system the synchronous method of each network node, each network node comprises a master computer and a transceiver.Method is for monitoring a main time data bag that comprises timestamp information.Under holotype, master computer provides the data transceiver of reporting for work, under listen mode, transceiver is preserved the packet of a band timestamp and is notified master computer, when main temporal mode, with the value of the alternative timestamp that monitors of the value in the local timer, master computer sends to receiver to the packet of replacing timestamp.This scheme provides the circuit that increases a processing time stamp between PHY transceiver and mac layer, to realize the synchronism of clock.
In SERCOS iii, a kind of mode that realizes clock synchronization between node in the loop network structure is provided, controller sends a specific sync message, first node is received the timer of revising oneself behind this message, and transmit this sync message to next node, each node is all received the sync message of forwarding like this, and revises the timer of oneself.The whole process of clock synchronization is received this sync message and revised timer with last node is end, like this, because the time-delay in message transmission procedure makes that the timer of each node is not accurate enough.
United States Patent (USP) " System for motion control; method of using the system for motion control; and computer readable instructions for use with the system for motion control ", the patent No. is 7024257, provide on each network node memory has been arranged, be used for disposing corresponding transmission delay between preservation controller and node, master controller sends a temporal information to each node, each node utilization postpones correction circuit, realizes receiving the synchronism of data and action.This method requires controller to have strict timing function, but the standard network interface card of only depending on do not accomplish, must be by special equipment, and this has just caused the closure of controller, product that can not compatible other producer, and improved cost.
Summary of the invention
It is higher in order to solve when realizing between each network node the precise synchronization action at present in Ethernet chain-shaped network structure cost that purpose of the present invention is exactly, can not compatible different manufacturers product, increase problems such as use cost, a kind of apparatus and method synchronous between the Ethernet chain-like network nodes that realize are provided, it has simple in structure, advantage such as easy to use, solved in the present Ethernet chain-shaped network structure and to have relied on master controller between network node synchronously, caused each producer's control system sealing, incompatible problem.
For achieving the above object, the present invention adopts following technical scheme:
A kind ofly realize device synchronous between the Ethernet chain-like network nodes, it comprises at least one controller and plurality of network node, each network node can be enumerated and dispose to controller, controller is distributed to independent node number of each network node, described controller has at least one communication interface, each node has at least two communication interfaces, the communication interface of controller is connected on the communication interface of certain node by data wire, another communication interface of this node is connected on the communication interface of next node by data wire then, be connected to each other down like this, form a chain-shaped network structure; On each node, also be provided with timer.
Described controller is the standard network interface card, and the control message of its transmission is the message structure of IEEE802.3 protocol specification; Each node adopts the FPGA of dual PHY and band MAC IP kernel as network communication interface; Be equipped with a PLL circuit in each network node, each crystal oscillator signal is through clocking again behind this PLL circuit, to eliminate the influence of the clock signal shake between each network node.
A kind ofly realize method synchronous between the Ethernet chain-like network nodes, its method is,
(1) after system powered on, controller carried out self check to each network node, and controller sends a query message, first network node at first receives this query message, transmit this query message then, and send the response message of oneself, oneself device number is initialized as 0; Each network node is transmitted this query message successively after receiving query message, and sends the response message of oneself and oneself device number is initialized as 0, to the last a network node; Last network node can be determined by toggle switch or other device, after this last network node is received this query message, send the response message of oneself, be included as the information of last network node, and oneself device number is initialized as 0, after controller was received the response message of last network node, illustrative system connected reliable and each equipment operate as normal; If controller after sending query message, can not receive the response message of last network node in setting-up time,, fault has been described with reporting errors;
(2) after self check was passed through, controller was enumerated and is disposed each network node;
(3) then, controller sends each network node of control message notifying of a Measurement Network time delay, first network node sends a specific message, this special packet of each target node, and the network time of measuring between own and last network node postpones;
(4) enter the network cycle sex work stage, first network node periodically sends a sync message, each network node will be transmitted this sync message to next network node after receiving this sync message, after each network node is received this sync message, postpone the regular hour with the compensating network time delay, action then realizes moving between network node synchronism;
(5) timer of other each network node is also set initial parameter value, and to be network time records in postponing between the Measurement Network node this network node postpone with respect to network time of last network node this initial parameter; Each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, pick up counting, after the parameter of setting at the beginning, produce an interrupt signal, network node latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller with the form of message; After controller is received the state information of each network node, do data planning then, and the data of planning are sent to each network node with the form of data message in this cycle; Each network node moves in the same way in following one-period after receiving data message; Cycle back and forth goes down like this, normal cycle data exchange of realization system and synchronization action.
The control message structure of Measurement Network time delay is the IEEE802.3 protocol specification in the described step 3), its composition comprises leading character 7bytes, decollator 1byte, destination address 6bytes, source address 6bytes, length/type field 2bytes, data segment 46-1500bytes, Frame Check Sequence territory 4bytes, wherein data segment is divided into the controller message flag of two bytes again, followed by a byte be used for distinguishing the control types sign of the different control informations of control message, all the other are the data message of control message.
In the described step 3) between the Measurement Network node network time related method thereof be that after each node was received the control message, with the timer zero clearing, first network node sent a specific message to next network node, and the timer that triggers oneself picks up counting; Second network node receive behind this special packet to this message of next target node, and the timer that triggers oneself picks up counting; So downward forwarding is gone down, to the last a network node; Last network node is received this special packet of target node that will make progress behind this special packet, a last network node is upwards transmitted this special packet after receiving this special packet again, and the timer that triggers oneself stops timing, the timer of so upwards transmitting and trigger oneself stops timing, up to first network node; First network node receives that the timer that will trigger oneself behind this special packet stops timing, and no longer transmits this special packet; Like this, the network time that each network node can obtain between own and last network node postpones, be half of timer timing, the timing of this timer will be kept at the form of register parameters on each network node, and this parameter of last network node is made as 0.
The periodic duty of described step 4) is in the stage, each network node latchs the current state of current network node in action, and the command message of the controller of receiving according to last one-period moves simultaneously, the state information of this node is sent to controller with the form of message, controller is analyzed the state information of each node, and the action of unified planning each node of following one-period, and the form of this action message with command message be sent on each network node in this cycle, realize the synchronism of each network node action.
In the described step 4), after sync message of periodic transmission is meant that the timer of first node is set initial parameter, this initial parameter is exactly the communication cycle of periodical communication, timer is under the driving of first network node clock signal, pick up counting, when clocking value arrives the initial parameter of setting, this timer produces an interrupt signal and the timer zero clearing is also picked up counting again, first network node is received this interrupt signal, a specific sync message will be sent downwards, like this cycle reciprocal, realized periodically sending the method for sync message.
Network node postpones the regular hour in the described step 4), Dong Zuo method all comprises a timer in each network node then, each timer can be set initial parameter value, this network node of this initial parameter postponed with respect to the network time of last network node, each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, beginning regularly, after the initial parameter of setting, produce an interrupt signal, network node latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller with the form of message.
In the described step 4), sync message transmits between each network node, represents with two byte 0XAA55.
The present invention has realized a kind of method that realizes precise synchronization action between each network node in Ethernet chain-shaped network structure in conjunction with FPGA (field programmable gate array) technology, especially in high performance centralized Control Network system, controller does not adopt special equipment, realizes the method and apparatus of each network node precise synchronization action.This method has solved in the present Ethernet chain-shaped network structure and to have relied on master controller between network node synchronously, causes each producer's control system sealing, incompatible problem.
Beneficial effect of the present invention:
(1) the present invention proposes a kind of method and apparatus synchronous between the Ethernet chain-like network nodes of realizing, be particularly useful in the integrated form Control Network system, controller adopts the common standard network interface card, compatible fully with Ethernet, realized the consistency of factory's Control Network, realized a net on earth, incompatible limitation when having avoided controller to adopt special equipment.
(2) the present invention proposes a kind of method and apparatus synchronous between the Ethernet chain-like network nodes of realizing, compare Internet NTP (Network Time Protocol) NTP (Network Time Protocal), simple time network agreement SNTP (SimpleNetwork Time Protocal), IEEE1588 standard Precision Time Protocol agreement PTP methods such as (Precision TimeProtocal), alleviated network burden.When realizing high-precise synchronization, avoid each slave unit website must carry precision clock chip (real-time ASIC when promptly waiting), saved cost.
Description of drawings:
Fig. 1 is the cut-away view of the system of embodiment 1;
Fig. 2 is the control message structure of controller;
Fig. 3 is the workflow diagram of system.
Wherein, 1, controller, 2, network node, 3, the standard network interface card, 4, transformer, 5, dual PHY, 6, the FPGA of band MAC IP kernel, 7, timer.
Embodiment
The invention will be further described below in conjunction with accompanying drawing and embodiment.
The present invention has adopted the Ethernet chain-shaped network, and it comprises controller 1 and plurality of network node 2, and each network node 2 can be enumerated and dispose to controller 1, and controller 1 is distributed to 2 one independent node numbers of each network node.After controller 1 sent the control message of time delay between a Measurement Network node, the network time that each network node 2 measurement oneself and last network node are 2 postponed.In the network cycle sex work stage, first network node 2 periodically sends a sync message, each network node 2 will be transmitted this sync message to next network node 2 after receiving this sync message, after each network node 2 is received this sync message, postpone the regular hour with the compensating network time delay, action has then realized 2 actions of network node synchronism like this.
Controller 1 selection standard network interface card 3 is as network communication interface, each node adopts the FPGA6 of dual PHY5 and band MAC IP kernel as network communication interface, like this, controller 1 has a communication interface, and each node has two communication interfaces, the communication interface of controller 1 is connected on the communication interface of node by data wire, another communication interface of node is connected on the communication interface of next node by data wire, be connected to each other down like this, form a chain-shaped network structure.
The control message structure that controller 1 sends meets IEEE802.3 message structure protocol specification, for message formats such as the TCP/IP difference of being sent out with controller 1, preceding two bytes are expressed as the form of control message with 0X55AA in IEEE802.3 message structure data area, followed by a byte be used for distinguishing the different control informations of control message, for example 0X11 represents the control message of time delay between the Measurement Network node, the remaining data area for the control message.Whole message is formed and is comprised leading character 7bytes, decollator 1byte, destination address 6bytes, source address 6bytes, length/type field 2bytes, data segment 46-1500bytes, Frame Check Sequence territory 4bytes, wherein data segment is divided into the controller message flag of two bytes again, followed by a byte be used for distinguishing the control types sign of the different control informations of control message, all the other are the data message of control message.
The sync message that first network node 2 periodically sends, this sync message is in 2 transmission of each network node, its infrastructure protocol needn't meet the message structure protocol specification of this length of IEEE802.3, because sync message is related to synchronous precision, so this sync message should be lacked as far as possible.Two byte 0XAA55 of the usefulness of this sync message represent.
Because each crystal oscillator all has certain deviation during fabrication, this also allows, in order to eliminate the clock signal shake between each network node, all be provided with a PLL circuit in each network node, each crystal oscillator signal is through clocking again behind this PLL circuit, and this phase locked loop circuit has been eliminated the influence of the clock signal shake between each network node.
A kind ofly realize method synchronous between the Ethernet chain-like network nodes, its method of work is:
(1) after system powers on, controller carries out self check to each network node, controller sends a query message, first network node at first receives this query message, first network node is transmitted this query message, and send the response message of oneself and oneself device number is initialized as 0, each network node is transmitted this query message successively after receiving query message, and send the response message of oneself and oneself device number is initialized as 0, network node to the last, last network node can be determined by toggle switch or other device, after this last network node is received this query message, send the response message of oneself, be included as the information of last network node, and oneself device number is initialized as 0, after controller was received the response message of last network node, illustrative system connected reliable and each equipment operate as normal; If controller is after sending query message, to wait for a period of time, this time is 2 times of maximum duration of enumerating maximum network node number under the normal condition, still can not receive the response message of last network node, with reporting errors, fault has been described;
(2) after self check is passed through, controller is enumerated and is disposed each network node, be after slave controller is received the response message of last network node, begin to send configuration message, first network node that to-controller links to each other, this moment, device number was 0, configuration message will be received earlier, after receiving this configuration message, to not transmit this configuration message to next network node, the device number of first network node oneself is set to 1, send a response message simultaneously, the device number that comprises oneself, the function of this network node, effect etc., controller is after having disposed first network node, to send out a next configuration message again, first network node (this moment, device number was 0) will be transmitted this configuration message to the second network node, second network node will do not transmitted this configuration message to next network node after receiving this configuration message, the device number of second network node oneself is set to 2, send a response message simultaneously, comprise the device number of oneself, the function of this slave unit, effect etc.; Like this and the like, up to being configured to last network node; Each network node all has own unique equipment identity like this, and controller is also set up an equipment list, comprises the function of device number, each network node of each network node and effect etc.;
(3) then, controller sends the control message of a Measurement Network time delay, comprise a timer on each network node, first network node is after receiving the control message of Measurement Network time delay, with the timer zero clearing of oneself, and transmit the control message of this Measurement Network time delay, after each network node is received this control message, with the timer zero clearing.First network node sends a specific control message to second network node, and the timer that triggers oneself picks up counting, second network node received behind this special packet to the 3rd this message of target node, and the timer that triggers oneself picks up counting, so downward forwarding is gone down, network node to the last, last network node is received this special packet of target node that will make progress behind this special packet, a last network node receive will go up behind this special packet transmit this special packet after, and the timer that triggers oneself stops timing, each network node is upwards transmitted the timer that goes down and triggers oneself and is stopped timing like this, up to first network node, first network node receives that the timer that will trigger oneself behind this special packet stops regularly, and no longer transmits this special packet.Like this, each network node just can know that oneself postponed with the network time between last network node, be half of timer timing, the timing of this timer will be kept at the form of register parameters on each network node, and this parameter of last network node is made as 0.
(4) system enters the periodical communication stage, first network node periodically sends a sync message, comprise a timer in first node, this timer can be set initial parameter, this initial parameter is exactly the communication cycle of periodical communication, timer is under the driving of first network node clock signal, begin counting, when count value arrives the initial parameter of setting, this timer produces an interrupt signal and with the timer zero clearing, first network node is received this interrupt signal, will send a specific sync message downwards.Timer begins counting under the driving of clock signal, arrive initial parameter value after, produce an interrupt signal and with the timer zero clearing.Like this cycle reciprocal, realized periodically sending the method for sync message.
(5) all comprise a timer in other each network node, this timer can be set initial parameter value, and to be network time records in postponing between the Measurement Network node this network node postpone with respect to network time of last network node this initial parameter.Each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, begin counting, after the parameter of setting at the beginning, produce an interrupt signal, network node latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller with the form of message.After controller is received the state information of each network node, do data planning then, and the data of planning are sent to each network node with the form of data message in this cycle.Each network node moves in the same way in following one-period after receiving data message.Cycle back and forth goes down like this, normal cycle data exchange of realization system and synchronization action.
In the step 4), the network cycle stage of communication is meant, sync message of the periodic transmission of first network node, after each network node is received this sync message, postponing certain hour postponed with the network time in the compensation message transmission procedure, action simultaneously, latch the current state of current network node upper sensor, and the command message of the controller of receiving according to last one-period moves simultaneously, the state information of this node is sent to controller with the form of message, controller is analyzed the state information of each node, and the action of unified planning each node of following one-period, and the form of this action message with command message be sent on each network node in this cycle, realized the synchronism of each network node action.
Each network node postpones the regular hour, and Dong Zuo method is then, and the timer in each network node can be set initial parameter value, and this initial parameter is the network time delay of this network node with respect to last network node.Each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, pick up counting, after the parameter of setting at the beginning, produce an interrupt signal, network node latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller with the form of message.
Chain-shaped network structure with a controller 1 and 3 network node 2 compositions illustrates below.Its middle controller 1 comprises standard network interface card 3, and 2 of network nodes comprise the FPGA6 and the timer 7 of transformer 4, dual PHY5, band MAC IP kernel.
Its course of work is:
(1) after system powers on, 1 pair of each network node 2 of controller carries out self check, controller 1 sends a query message, first network node 2 at first receives this query message, first network node 2 will be transmitted this query message, and send the response message of oneself and oneself device number is initialized as 0, second network node 2 receives that this query message will transmit this query message, and send the response message of oneself and oneself device number is initialized as 0, network node 2 to the last, last network node 2 can be determined by toggle switch or other device, after this last network node 2 is received this query message, send the response message of oneself, be included as the information of last network node, and oneself device number is initialized as 0, after controller 1 was received the response message of last network node 2, illustrative system connected reliable and each equipment operate as normal; If controller 1 is after sending query message, to wait for a period of time, this time is 2 times of maximum duration of enumerating maximum network node number under the normal condition, still can not receive the response message of last network node 2, with reporting errors, fault has been described;
(2) after self check is passed through, 1 pair of each network node 2 of controller is enumerated and is disposed, be after controller 1 is received the response message of last network node 2, begin to send configuration message, first network node 2 that to-controller 1 links to each other, this moment, device number was 0, configuration message will be received earlier, after receiving this configuration message, to not transmit this configuration message to next network node 2, the device number of first network node 2 oneself is set to 1, send a response message simultaneously, the device number that comprises oneself, the function of this network node, effect etc., controller 1 is after having disposed first network node, to send out a next configuration message again, first network node 2 (this moment, device number was not 0) will be transmitted this configuration message to the second network node 2, second network node 2 will do not transmitted this configuration message to next network node 2 after receiving this configuration message, the device number of second network node 2 oneself is set to 2, send a response message simultaneously, comprise the device number of oneself, the function of this network node, effect etc.; Like this and the like, up to being configured to last network node 2; Each network node 2 all has own unique equipment identity like this, and controller 1 is also set up an equipment list, comprises the function of device number, each network node of each network node and effect etc.;
(3) controller 1 sends the control message of a Measurement Network time delay then, 2 comprise a timer 7 on each network node, first network node 2 is after receiving the control message of Measurement Network time delay, with timer 7 zero clearings of oneself, and transmit the control message of this Measurement Network time delay, after each network node is received this control message, also with oneself timer 7 zero clearings.
(4) first network node 2 sends a specific control message to second network node 2, and the timer 7 that triggers oneself picks up counting, second network node 2 transmitted this message to the 3rd network node 2 after receiving this special packet, and the timer 7 that triggers oneself picks up counting, last network node 2 receives that the network node 2 that will make progress behind this special packet transmits these special packets, a last network node 2 receive will go up behind this special packet transmit this special packet after, and the timer 7 that triggers oneself stops timing, up to first network node, first network node 2 receives that the timer 7 that will trigger oneself behind this special packet stops regularly, and no longer transmits this special packet.Like this, each network node 2 just can know that oneself postponed with the network time of 2 of last network nodes, be half of timer 7 timing, the timing of this timer will be kept at the form of register parameters on each network node, and this register parameters of last network node is made as 0.
(5) system enters the periodical communication stage, first network node 2 periodically sends a sync message, comprise a timer 7 in first node 2, this timer can be set initial parameter, this initial parameter is exactly the communication cycle of periodical communication, timer 7 is under the driving of first network node 2 clock signals, begin counting, when the value of timing phase arrives the initial parameter of setting, this timer 7 produces an interrupt signal and with timer 7 zero clearings, and begins regularly again, and first network node 2 is received this interrupt signal, to send a specific sync message downwards, each network node is transmitted this sync message.Like this cycle reciprocal, realized periodically sending the method for sync message.
(6) all comprise a timer 7 in each network node 2, this timer 7 can be set initial parameter value, and to be network time records in postponing between the Measurement Network node this network node postpone with respect to network time of last network node this initial parameter.Network node 2 sends these sync messages, network node 3 transmitted sync message and network node 4 and received sync message after, trigger timer 7, this timer 7 is under the driving of clock signal, beginning regularly, after the parameter of setting at the beginning, produce an interrupt signal, network node 2 latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller 1 with the form of message.After controller 1 is received the state information of each network node, do data planning then, and the data of planning are sent to each network node 2 with the form of data message in this cycle.Cycle back and forth goes down like this, normal cycle data exchange of realization system and synchronization action.
Each node 2 comprises FPGA6, two timers 7 of transformer 4, DUAL PHY5 and band MAC IP kernel.

Claims (8)

1, a kind ofly realize device synchronous between the Ethernet chain-like network nodes, it comprises at least one controller and plurality of network node, each network node can be enumerated and dispose to controller, controller is distributed to independent node number of each network node, it is characterized in that: described controller has at least one communication interface, each node has at least two communication interfaces, the communication interface of controller is connected on the communication interface of certain node by data wire, another communication interface of this node is connected on the communication interface of next node by data wire then, be connected to each other down like this, form a chain-shaped network structure; On each node, also be provided with timer; Described controller is the standard network interface card, and the control message of its transmission is the message structure of IEEE802.3 protocol specification; Each node adopts the FPGA of dual PHY and band MAC IP kernel as network communication interface; Be equipped with a PLL circuit in each network node, each crystal oscillator signal is through clocking again behind this PLL circuit, to eliminate the influence of the clock signal shake between each network node; Described each timer is after each node is received the control message, and with the timer zero clearing, first network node sends a specific message to next network node, and the timer of triggering oneself picks up counting; Second network node receive behind this special packet to this message of next target node, and the timer that triggers oneself picks up counting; So downward forwarding is gone down, to the last a network node; Last network node is received this special packet of target node that will make progress behind this special packet, a last network node is upwards transmitted this special packet after receiving this special packet again, and the timer that triggers oneself stops timing, the timer of so upwards transmitting and trigger oneself stops timing, up to first network node; First network node receives that the timer that will trigger oneself behind this special packet stops timing, and no longer transmits this special packet; Like this, the network time that each network node can obtain between own and last network node postpones, be half of timer timing, the timing of this timer will be kept at the form of register parameters on each network node, and this parameter of last network node is made as 0; In the network cycle sex work stage, timer is under the driving of first network node clock signal, pick up counting, when clocking value arrives the initial parameter of setting, this timer produces an interrupt signal and the timer zero clearing is also picked up counting again, and first network node is received this interrupt signal, will send a specific sync message downwards, like this cycle reciprocal, realized periodically sending the method for sync message.
2, a kind of described device of claim 1 that adopts is realized synchronous method between the Ethernet chain-like network nodes, it is characterized in that: its method is,
(1) after system powered on, controller carried out self check to each network node, and controller sends a query message, first network node at first receives this query message, transmit this query message then, and send the response message of oneself, oneself device number is initialized as 0; Each network node is transmitted this query message successively after receiving query message, and sends the response message of oneself and oneself device number is initialized as 0, to the last a network node; Last network node can be determined by toggle switch or other device, after this last network node is received this query message, send the response message of oneself, be included as the information of last network node, and oneself device number is initialized as 0, after controller was received the response message of last network node, illustrative system connected reliable and each equipment operate as normal; If controller after sending query message, can not receive the response message of last network node in setting-up time,, fault has been described with reporting errors;
(2) after self check was passed through, controller was enumerated and is disposed each network node;
(3) then, controller sends each network node of control message notifying of a Measurement Network time delay, first network node sends a specific message, this special packet of each target node, and the network time of measuring between own and last network node postpones;
(4) enter the network cycle sex work stage, first network node periodically sends a sync message, each network node will be transmitted this sync message to next network node after receiving this sync message, after each network node is received this sync message, postpone the regular hour with the compensating network time delay, action then realizes moving between network node synchronism;
(5) timer of other each network node is also set initial parameter value, and to be network time records in postponing between the Measurement Network node this network node postpone with respect to network time of last network node this initial parameter; Each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, pick up counting, after the initial parameter of setting, produce an interrupt signal, network node latchs current state according to this interrupt signal and according to the command action of control message, and current state information is sent to controller with the form of message; After controller is received the state information of each network node, do data planning then, and the data of planning are sent to each network node with the form of data message in this cycle; Each network node moves in the same way in following one-period after receiving data message; Cycle back and forth goes down like this, normal cycle data exchange of realization system and synchronization action.
3, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: the control message structure of Measurement Network time delay is the IEEE802.3 protocol specification in the described step (3), its composition comprises leading character 7bytes, decollator 1byte, destination address 6bytes, source address 6bytes, length/type field 2bytes, data segment 46-1500bytes, Frame Check Sequence territory 4bytes, wherein data segment is divided into the controller message flag of two bytes again, followed by a byte be used for distinguishing the control types sign of the different control informations of control message, all the other are the data message of control message.
4, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: in the described step (3) between the Measurement Network node network time related method thereof be, after each node is received the control message, with the timer zero clearing, first network node sends a specific message to next network node, and the timer of triggering oneself picks up counting; Second network node receive behind this special packet to this message of next target node, and the timer that triggers oneself picks up counting; So downward forwarding is gone down, to the last a network node; Last network node is received this special packet of target node that will make progress behind this special packet, a last network node is upwards transmitted this special packet after receiving this special packet again, and the timer that triggers oneself stops timing, the timer of so upwards transmitting and trigger oneself stops timing, up to first network node; First network node receives that the timer that will trigger oneself behind this special packet stops timing, and no longer transmits this special packet; Like this, the network time that each network node can obtain between own and last network node postpones, be half of timer timing, the timing of this timer will be kept at the form of register parameters on each network node, and this parameter of last network node is made as 0.
5, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: the periodic duty of described step (4) is in the stage, each network node latchs the current state of current network node in action, and the command message of the controller of receiving according to last one-period moves simultaneously, the state information of this node is sent to controller with the form of message, controller is analyzed the state information of each node, and the action of unified planning each node of following one-period, and the form of this action message with command message be sent on each network node in this cycle, realize the synchronism of each network node action.
6, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: in the described step (4), after sync message of periodic transmission is meant that the timer of first node is set initial parameter, this initial parameter is exactly the communication cycle of periodical communication, timer is under the driving of first network node clock signal, pick up counting, when clocking value arrives the initial parameter of setting, this timer produces an interrupt signal and the timer zero clearing is also picked up counting again, first network node is received this interrupt signal, a specific sync message will be sent downwards, like this cycle reciprocal, realized periodically sending the method for sync message.
7, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: network node postpones the regular hour in the described step (4), Dong Zuo method all comprises a timer in each network node then, each timer can be set initial parameter value, this initial parameter is the network time delay of this network node with respect to last network node, each network node is after receiving sync message, trigger timer, this timer is under the driving of clock signal, beginning regularly, after the initial parameter of setting, produce an interrupt signal, network node latchs current state and according to the command action of control message, current state information is sent to controller with the form of message according to this interrupt signal.
8, synchronous method between realization Ethernet chain-like network nodes according to claim 2, it is characterized in that: in the described step (4), sync message transmits between each network node, represents to control the form of message with two hexadecimal byte OXAA55.
CNB2007100144192A 2007-02-13 2007-04-29 Device and method for realizing synchronization between nodes of Ethernet chain network Expired - Fee Related CN100561904C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB2007100144192A CN100561904C (en) 2007-04-29 2007-04-29 Device and method for realizing synchronization between nodes of Ethernet chain network
PCT/CN2008/000268 WO2008101394A1 (en) 2007-02-13 2008-02-02 Real-time synchronous method and synchronous network based on the standard ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100144192A CN100561904C (en) 2007-04-29 2007-04-29 Device and method for realizing synchronization between nodes of Ethernet chain network

Publications (2)

Publication Number Publication Date
CN101039173A CN101039173A (en) 2007-09-19
CN100561904C true CN100561904C (en) 2009-11-18

Family

ID=38889837

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100144192A Expired - Fee Related CN100561904C (en) 2007-02-13 2007-04-29 Device and method for realizing synchronization between nodes of Ethernet chain network

Country Status (1)

Country Link
CN (1) CN100561904C (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008101394A1 (en) * 2007-02-13 2008-08-28 Shan Dong University Real-time synchronous method and synchronous network based on the standard ethernet
CN101232457B (en) * 2008-02-22 2011-04-27 浙江大学 A high-precision real-time synchronization method based on IEEE1588 protocol
CN102447553A (en) * 2010-10-12 2012-05-09 研祥智能科技股份有限公司 Realizing device of accurate time synchronization protocol
CN102638845A (en) * 2011-02-12 2012-08-15 苏州达联信息科技有限公司 Railway track monitoring sensing network controller communication protocol and implementation device thereof
CN102237997B (en) * 2011-07-08 2014-05-28 山东大学 Method for real-time synchronization and dynamic compensation between chain Ethernet nodes
CN102332973B (en) * 2011-09-07 2014-07-09 上海交通大学 Real-time communication and clock synchronization method of chain network
EP2774291B1 (en) * 2011-11-02 2019-07-17 Marvell World Trade Ltd. Services, systems and methods for precisely estimating a delay within a network
US8995473B2 (en) * 2012-04-20 2015-03-31 Telefonaktiebolaget L M Ericsson (Publ) Ring based precise time data network clock phase adjustments
CN102710484B (en) * 2012-05-26 2015-03-04 济南凌康数控技术有限公司 Ring redundant real-time Ethernet communication method
CN103441810B (en) * 2013-07-11 2016-03-16 盛科网络(苏州)有限公司 The Ethernet frequency synchronization method of many time-domains and device
CN103607270B (en) * 2013-11-28 2017-01-11 上海新时达电气股份有限公司 Method for improving synchronous performance of Powerlink Ethernet
CN104850526A (en) * 2015-06-10 2015-08-19 首都师范大学 Method for time synchronization in dynamically reconfigurable high-speed serial bus
CN105763278B (en) * 2016-01-06 2018-02-09 新华三技术有限公司 A kind of method and apparatus of time backtracking
CN105704150A (en) * 2016-03-25 2016-06-22 山东超越数控电子有限公司 Industrial process data transmission method
CN110324213B (en) * 2018-03-31 2021-04-09 神盾网络安全信息化中心股份有限公司 Data transmission method for smart home
CN110009206B (en) * 2019-03-21 2023-06-20 五邑大学 A timing voice scoring method, device, equipment and storage medium
CN112381348A (en) * 2020-10-13 2021-02-19 广州赛意信息科技股份有限公司 Production data real-time clock synchronization method and system based on API gateway
CN112968822A (en) * 2021-03-15 2021-06-15 广州铁路职业技术学院(广州铁路机械学校) One-master multi-slave real-time communication system and method based on Ethernet PHY
CN114362874B (en) * 2022-03-21 2022-08-12 北京国科天迅科技有限公司 Master clock equipment determining method and device, electronic equipment and storage medium
CN116719758B (en) * 2023-06-14 2025-01-17 欧瑞传动电气股份有限公司 PROFINET distributed IO synchronization method
CN117221041B (en) * 2023-09-26 2024-08-27 浙江国利信安科技有限公司 EPA network-based multi-target synchronous control system, method and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1675864A (en) * 2002-06-24 2005-09-28 霍尼韦尔国际公司 Clock synchronizing method over fault-tolerant Ethernet
US7024257B2 (en) * 2001-02-09 2006-04-04 Motion Engineering, Inc. System for motion control, method of using the system for motion control, and computer-readable instructions for use with the system for motion control
CN1866803A (en) * 2005-09-13 2006-11-22 华为技术有限公司 Ethernet apparatus and method for solving clock synchronization in total Ethernet
CN201054597Y (en) * 2007-04-29 2008-04-30 山东大学 A device for realizing the Ethernet link network node synchronization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7024257B2 (en) * 2001-02-09 2006-04-04 Motion Engineering, Inc. System for motion control, method of using the system for motion control, and computer-readable instructions for use with the system for motion control
CN1675864A (en) * 2002-06-24 2005-09-28 霍尼韦尔国际公司 Clock synchronizing method over fault-tolerant Ethernet
CN1866803A (en) * 2005-09-13 2006-11-22 华为技术有限公司 Ethernet apparatus and method for solving clock synchronization in total Ethernet
CN201054597Y (en) * 2007-04-29 2008-04-30 山东大学 A device for realizing the Ethernet link network node synchronization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Enhancements to Time SynchronizationStandardIEEE-1588for a System of Cascaded Bridges. Jurgen Jasperneite, Khaled Shehab, Karl Weber.IEEE. 2004
Enhancements to Time SynchronizationStandardIEEE-1588for a System of Cascaded Bridges. Jurgen Jasperneite, Khaled Shehab, Karl Weber.IEEE. 2004 *

Also Published As

Publication number Publication date
CN101039173A (en) 2007-09-19

Similar Documents

Publication Publication Date Title
CN100561904C (en) Device and method for realizing synchronization between nodes of Ethernet chain network
CN106992830B (en) A kind of clock synchronizing method in FC-AE-1553 networks
US10056999B2 (en) Time synchronization error compensation method for multi-hop wireless backhaul network based on PTP
CN102332973B (en) Real-time communication and clock synchronization method of chain network
CN102098155B (en) Method for realizing sub-microsecond synchronization accuracy based on PTP (Precision Time Protocol)
CN104507156B (en) For the time synchronization improved method based on IEEE 1588PTP mechanism of wireless network
CN102833062B (en) Intelligent substation IEEE1588 master-salve clock synchronization message setting means and system
JP5811794B2 (en) Communication device
CN102104475B (en) IEEE 1588-based synchronization system and synchronization method thereof
KR101426325B1 (en) Network element for a packet-switched network
Moreira et al. White rabbit: Sub-nanosecond timing distribution over ethernet
EP3270531B1 (en) System and method of synchronizing a distributed clock in a packet-compatible network
CN107579793A (en) The optimization method of time synchronized, device and equipment between a kind of communication network device
CN101425865B (en) Method and system for synchronizing clock of transmission network as well as subordinate clock side entity
CN101645869B (en) Switch with submicrosecond clock and switching processing method thereof
CN105680975A (en) Time synchronization method of master-slave structure multi-node network
CN106357362B (en) A kind of method for synchronizing time, device and PTP system
CN104754722B (en) A kind of method for synchronizing time towards stratification heterogeneous network
WO2021004005A1 (en) Timestamp jitter compensation method and system
CN105577349A (en) Airborne network IEEE1588 protocol master-slave clock port synchronization method
CN103117829A (en) Method or device for time synchronization and compensation between asymmetrical networks
CN102480331A (en) Arrangement and method for interchanging time markers
CN106688207A (en) Method for determining the propagation time of a telegram in a communication network and corresponding network components
CN103647614A (en) Method for reliably improving time synchronization precision based on IEEE1588 protocol
CN105978652B (en) Equipment, system and method at synchronous pair of Redundant Ethernet

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
EE01 Entry into force of recordation of patent licensing contract

Assignee: JINAN LINKON CNC TECHNOLOGY Co.,Ltd.

Assignor: Shandong University

Contract record no.: 2010370000229

Denomination of invention: Apparatus and method for realizing synchronization between Ethernet chain-like network nodes

Granted publication date: 20091118

License type: Exclusive License

Open date: 20070919

Record date: 20100512

TR01 Transfer of patent right

Effective date of registration: 20170720

Address after: Xinluo Avenue high tech Zone of Ji'nan City, Shandong province 250101 No. 786 room 507

Patentee after: SHANDONG EZCODE INTELLIGENT TECHNOLOGY CO.,LTD.

Address before: 250061, No. ten, No. 73, Ji'nan, Shandong

Patentee before: Shandong University

TR01 Transfer of patent right
EC01 Cancellation of recordation of patent licensing contract
EC01 Cancellation of recordation of patent licensing contract

Assignee: JINAN LINKON CNC TECHNOLOGY Co.,Ltd.

Assignor: SHANDONG University

Contract record no.: 2010370000229

Date of cancellation: 20200509

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20070919

Assignee: SHANDONG RIFA TEXTILE MACHINERY Co.,Ltd.

Assignor: SHANDONG EZCODE INTELLIGENT TECHNOLOGY Co.,Ltd.

Contract record no.: X2020980002489

Denomination of invention: Apparatus and method for realizing synchronization between Ethernet chain-like network nodes

Granted publication date: 20091118

License type: Exclusive License

Record date: 20200526

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091118