CN106059812B - A kind of synchronous method Ethernet system control and communicated - Google Patents

A kind of synchronous method Ethernet system control and communicated Download PDF

Info

Publication number
CN106059812B
CN106059812B CN201610410572.6A CN201610410572A CN106059812B CN 106059812 B CN106059812 B CN 106059812B CN 201610410572 A CN201610410572 A CN 201610410572A CN 106059812 B CN106059812 B CN 106059812B
Authority
CN
China
Prior art keywords
task
period
message
aperiodic
equipment
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
CN201610410572.6A
Other languages
Chinese (zh)
Other versions
CN106059812A (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.)
Henan University of Technology
Original Assignee
Henan University of Technology
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 Henan University of Technology filed Critical Henan University of Technology
Priority to CN201610410572.6A priority Critical patent/CN106059812B/en
Publication of CN106059812A publication Critical patent/CN106059812A/en
Application granted granted Critical
Publication of CN106059812B publication Critical patent/CN106059812B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present invention provides a kind of synchronous method Ethernet system control and communicated, comprising: status indicator is arranged to control task;Round scanning current time in equipment operation, distinguishes transmission cycle message and aperiodic message in period message time piece and aperiodic message time piece;When transferring period message or aperiodic message, judge whether the status indicator of control task is 1: if so, indicating that control task has not carried out in the current macro period, then executing control task and its status indicator is set as 0;Otherwise it indicates that control task has executed in the current macro period, then abandons executing control task;The present invention can make the client layer functional block for realizing control function and realize that the link layer communications of communication function reach cycle synchronisation, avoid the failed transmission of the invalid execution and data of functional block, effectively improve the operational efficiency and real-time communication energy of system.It can be widely applied to industrial control field.

Description

A kind of synchronous method Ethernet system control and communicated
Technical field
The present invention relates to industrial control fields, more particularly to the synchronous method a kind of Ethernet system control and communicated.
Background technique
EPA (Ethernet for Plant Automation) factory automation Ethernet is that one kind is independently ground by China The real-time ethernet technology of the Control-oriented system of hair, by fieldbus international standard IEC61158 and real-time ethernet state Border standard IEC 61784 is included.Currently, EPA has been widely used for the multiple fields such as electric power, chemical industry, machinery, mining, petroleum.
As a kind of network control system, EPA is realized by transferring to control function in the functional block of field device Distributed measurement and control under network environment.In EPA system, the multiple functional blocks for forming a control loop are distributed in not With in EPA equipment, each functional block is connected with each other by EPA communication to complete control function.The execution order of each functional block exists Logical relation, preamble functional block are exported through EPA message transmissions to postorder functional block as inputting, and postorder functional block receives After EPA message, the data of message carrying are handled.But in EPA system, it is responsible for the period message of data communication and non- Period message must could all transmit in respective timeslice in communicating the macro period, so the execution period of communication is EPA net The communication of the network macro period;And the execution period of functional block is then program cycle period in practical application.It is past due to communicating the macro period Toward manyfold bigger than program cycle period, so functional block can execute repeatedly in communicating the macro period, leading to multiple carryings, its is defeated Out data and be sent to same purpose functional block message generate.When period message time piece and aperiodic message time piece do not arrive When, these messages cannot transmit in the queue of link layer;And when period message time piece and the arrival of aperiodic message time piece, These messages are successively transmitted to same purpose functional block again, and legacy data is caused to be covered and cannot be handled by new data.
It can be seen that in the prior art, the execution in vain for resulting in functional block asynchronous with what is communicate and data are controlled Failed transmission increases the calculated load and communication load of system, seriously reduces system performance.
Summary of the invention
In view of this, the main purpose of the present invention is to provide a kind of ether for reducing system-computed load and communication load Synchronous method net system control and communicated.
In order to achieve the above object, technical solution proposed by the present invention are as follows:
A kind of synchronous method Ethernet system control and communicated, includes the following steps:
Step 1, equipment starting;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n is true: if it is, D is seti+1=B executes step 2 later;If it is not, then directly executing step 2;Wherein, i is EPA equipment serial number, n EPA EPA equipment sum in network, B is the aperiodic message bias of EPA network, Di+1It is reported for the period of i+1 EPA equipment Literary bias.
Step 2 obtains local current time G.
Step 3 judges Di≤ MOD (G, T) < Di+1It is whether true: if so, indicating that the current time is located at period report In literary timeslice, 4 are thened follow the steps;If it is not, indicating that the current time is not located in period message time piece, then execute Step 6;Wherein, DiFor the period message bias of i-th of EPA equipment;MOD (G, T)=MOD (G/T), MOD () are complementation Function;T is to communicate the macro period.
Step 4 judges whether P=1 is true: if so, indicating period message transmissions task in this communication macro period still It is not carried out, then after executing period message transmissions task and P=0, Q=1 being set, executes step 5;If it is not, indicating period report Literary transformation task has executed in this communication macro period, then directly executes step 5.
Step 5 judges whether mark R=1 is true: if so, thening follow the steps 8;If it is not, then return step 2.
Step 6 judges whether B≤MOD (G, T) < T is true: if so, indicating current time in aperiodic message time In piece, then aperiodic message transmissions task is executed, setting later identifies P=1 and executes step 7;If it is not, when indicating current Between not in aperiodic message time piece, then do not execute aperiodic message transmissions task, directly execution step 7.
Step 7 judges whether mark R=1 is true: if it is, return step 2;If it is not, then executing step 8.
Step 8 judges whether Q=1 is true: if so, indicating that control task has not carried out in the present communications macro period, then It executes control task and Q=0 is set, obtain local current time F later and execute step 9;If it is not, indicating control task It has been executed in the present communications macro period, then direct return step 2.
Step 9 judges whether mark R=1 is true: if so, thening follow the steps 10;If it is not, then executing step 11.
Step 10 judges whether B≤MOD (F, T) < T is true: if it is, setting mark R=0 and return step 2;Such as Fruit is not that R=1 and return step 2 is then arranged.
Step 11 judges Di≤ MOD (F, T) < Di+1It is whether true: if so, indicating that the execution of control task affects The starting of period message transmissions task, timeslice setting is unreasonable, then sends task abnormity alarm and return step 2;If no It is that expression timeslice setting is reasonable, then direct return step 2.
In conclusion triggering executive mode of the present invention by setting communication task and control task, makes to realize control function The client layer functional block of energy is communicated with the EPA for realizing communication function reaches cycle synchronisation, avoids the invalid execution sum number of functional block According to failed transmission, effectively improve the operational efficiency and real-time communication energy of system.
Detailed description of the invention
Fig. 1 is the execution schematic diagram of communication task and control task in the present invention.
Fig. 2 is the flow diagram of Ethernet system of the present invention control and communication synchronization method.
Fig. 3 is the structure chart that aperiodic message transmissions statement improves front and back in the present invention.
Fig. 4 is the composed structure schematic diagram of EPA real-time ethernet system in embodiment.
Fig. 5 is the composed structure schematic diagram of the control loop of functional block composition in each equipment in embodiment.
Fig. 6 is that embodiment is respectively adopted the method for the present invention and period message time piece after the prior art and communicates macro period tune Whole comparative result figure.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, right below in conjunction with the accompanying drawings and the specific embodiments The present invention is described in further detail.
Fig. 1 is the execution schematic diagram of communication task and control task in the present invention.D in figure1、D2、D3、D4Respectively the 1st, 2, the period message bias of 3,4 EPA equipment, B are the aperiodic message bias of EPA network.I-th of EPA in EPA network The period message bias D of equipmenti, aperiodic message bias B with to communicate macro cycle T all be the reality being arranged in system configuration When scheduling parameter.As shown in Figure 1, communication task includes period message transmissions task and aperiodic message transmissions task, period report Literary transformation task executes in period message time piece, and aperiodic message transmissions task executes in aperiodic message time piece; Message transmissions multiplexed transport period in period message and the statement of aperiodic message transmissions, aperiodic message transmissions multiplexed transport are aperiodic Message and aperiodic message transmissions terminate to state;Period message transmissions task and control task communicate in the macro period only each Can once execute, control task otherwise after period message transmissions task execution triggering execute or in aperiodic report Literary transformation task is triggered after executing and is executed.
Fig. 2 is the flow diagram of Ethernet system of the present invention control and communication synchronization method.As shown in Figure 1, this The Ethernet system control is invented to include the following steps: with communication synchronization method
Step 1, equipment starting;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n is true: if it is, D is seti+1=B executes step 2 later;If it is not, then directly executing step 2;Wherein, i is EPA equipment serial number, n EPA EPA equipment sum in network, B is the aperiodic message bias of EPA network, Di+1It is reported for the period of i+1 EPA equipment Literary bias.
In step 1 of the present invention, the status indicator P be indicate period message transmissions task in this communication macro period whether The status indicator executed, P=1 indicate that communication task is currently executable state, and P=0 indicates that communication task is currently not Executable state;Q is to indicate the status indicator whether executed in the macro period communicated at this for control task, and Q=1 indicates control Task is currently executable state, and Q=0 indicates that control task is currently not executable state;R is to indicate control task Ying Zhou The status indicator that executes or should be executed at the end of aperiodic message transmissions task at the end of phase message transmissions task, R=1 table Show that control task should execute at the end of period message transmissions task, R=0 indicates that control task should appoint in aperiodic message transmissions It is executed at the end of business.P, Q, R are logical variables, and the initial value in equipment starting is both configured to 1.
Step 2 obtains local current time G;
Step 3 judges Di≤ MOD (G, T) < Di+1It is whether true: if so, indicating that the current time is located at period report In literary timeslice, 4 are thened follow the steps;If it is not, indicating that the current time is not located in period message time piece, then execute Step 6;Wherein, DiFor the period message bias of i-th of EPA equipment;MOD (G, T)=MOD (G/T), MOD () are complementation Function;T is to communicate the macro period.
In step 1 and step 3 of the present invention, as i < n, i.e., when equipment i is not the equipment of the last one sending cycle message, Judgment basis is MOD (G, T)=D at the beginning of its period message time piecei, deadline is the period message of equipment i+1 At the beginning of timeslice, judgment basis is MOD (G, T)=Di+1, therefore judgement of the current time in period message time piece Foundation are as follows: Di≤ MOD (G, T) < Di+1;Work as i=n, i.e., when equipment i is the equipment of the last one sending cycle message, the period Judgment basis is MOD (G, T)=D at the beginning of message time piecei, deadline is the aperiodic message time piece of EPA network At the beginning of, judgment basis is MOD (G, T)=B, therefore judgment basis of the current time in period message time piece are as follows: Di≤ MOD (G, T) < B;Due in step 1, when equipment n detects i=n, being set Dn+1=B, therefore set in step 3 Standby n judges foundation of the current time in its period message time piece are as follows: Di≤ MOD (G, T) < Di+1
In step 3 of the present invention, if equipment detects that current time in period message time piece, enters step 4 and holds Otherwise whether row period message transmissions task enters step 6 and further judges current time in aperiodic message time piece.
Step 4 judges whether P=1 is true: if so, indicating period message transmissions task in this communication macro period still It is not carried out, then after executing period message transmissions task and P=0, Q=1 being set, executes step 5;If it is not, indicating period report Literary transformation task has executed in this communication macro period, then directly executes step 5.
In step 4 of the present invention, equipment is arranged its status indicator P=0, then exists after having executed period message transmissions task In the present communications macro period, when equipment scans mark P again, since its value is 0, period message transmissions would not be repeated and appointed Business, after aperiodic message transmissions task execution, just resets P=1, starts in this way in the next communication macro period When, communication task is still executable state, thereby guarantees that period message transmissions task in communication macro period only once It executes;Equipment is arranged Q=1, control task is made to become executable state when having executed period message transmissions task, until control After task processed is performed, Q=0 is just set, so that it becomes not executable state.
Step 5 judges whether mark R=1 is true: if so, thening follow the steps 8;If it is not, then return step 2.
In step 5 of the present invention, if R=1, indicate that control task should execute at the end of period message transmissions task, then 8 execution control tasks are entered step at the end of period message transmissions task;Otherwise indicate that control task should be passed in aperiodic message It is executed at the end of defeated task, then return step 2 at the end of period message transmissions task.
Step 6 judges whether B≤MOD (G, T) < T is true: if so, indicating current time in aperiodic message time In piece, then aperiodic message transmissions task is executed, setting later identifies P=1 and executes step 7;If it is not, when indicating current Between not in aperiodic message time piece, then do not execute aperiodic message transmissions task, directly execution step 7.
In step 6 of the present invention, judgment basis at the beginning of the aperiodic message time piece of the EPA network are as follows: MOD (G, T)=B, and deadline is the deadline in present communications macro period, therefore current time is in aperiodic message time piece Interior judgment basis are as follows: B≤MOD (G, T) < T;Equipment is held if detecting current time in aperiodic message time piece The aperiodic message transmissions task of row, is arranged P=1 after execution, opens period message transmissions task in the next communication macro period It is executable state when the beginning;After step 6 executes, enters step 7 and judge whether to execute control task.
Step 7 judges whether mark R=1 is true: if it is, return step 2;If it is not, then executing step 8.
In step 7 of the present invention, if R=1 is set up, indicate that control task should be held at the end of period message transmissions task Row, without that should be executed at the end of aperiodic message transmissions task, so after equipment executes aperiodic message transmissions task Return step 2 restarts to recycle;If invalid, indicate that control task should be held at the end of aperiodic message transmissions task Row, then equipment enters step 10 and judges whether to execute control task after executing aperiodic message transmissions task.
Step 8 judges whether Q=1 is true: if so, indicating that control task has not carried out in the present communications macro period, then It executes control task and Q=0 is set, obtain local current time F later and execute step 9;If it is not, indicating control task It has been executed in the present communications macro period, then direct return step 2.
In step 8 of the present invention, after having executed control task its status indicator Q=0 is arranged, then in present communications in equipment In the macro period, when equipment scans mark Q again, since its value is 0, control task would not be repeated, until next It communicates after having executed period message transmissions task in the macro period, can just reset Q=1, thereby guarantee that control task one It is only once executed in a communication macro period.
Step 9 judges whether mark R=1 is true: if so, thening follow the steps 10;If it is not, then executing step 11.
In step 9 of the present invention, if R=1 is set up, indicate that control task is executed at the end of period message transmissions task , then it enters step 10 and judges whether the execution of control task delays the starting of aperiodic message transmissions task;If not at It is vertical, then it represents that control task is executed at the end of aperiodic message transmissions task, then enters step 11 judgement control tasks Whether the starting of period message transmissions task is delayed.
Step 10 judges whether B≤MOD (F, T) < T is true: if it is, setting mark R=0 and return step 2;Such as Fruit is not that R=1 and return step 2 is then arranged.
In step 10 of the present invention, control task executes at the end of period message transmissions task, obtains this at the end of execution Ground current time F, and judge whether B≤MOD (F, T) < T is true: if so, indicating that the execution of control task has delayed The starting of aperiodic message transmissions task, when this section since period message transmissions task terminates to aperiodic message time piece Between the not enough execution demand of control task so control task should not execute at the end of period message transmissions task, R is then set =0, execute control task in the later communication macro period all again at the end of aperiodic message transmissions task;If it is not, Indicate that the execution of control task without the starting of the aperiodic message transmissions task of delay, terminates from period message transmissions task to non- Period message time piece start this period enough control tasks execution demand, so control task should be in period message It is executed at the end of transformation task, then R=1 is set, make in next communication macro period control task still in period message transmissions It is executed at the end of task.
In the present invention, the initial value of setting R is 1 when due to equipment starting, and control task is necessarily in period message First time execution is carried out at the end of transformation task, is only postponed aperiodic message transmissions task in the execution that control task occurs and is opened When dynamic, R=0 is just set, is changed to control task in the later communication macro period all in aperiodic message transmissions task knot Beam Shi Zhihang.
Step 11 judges Di≤ MOD (F, T) < Di+1It is whether true: if so, indicating that the execution of control task affects The starting of period message transmissions task, timeslice setting is unreasonable, then sends task abnormity alarm and return step 2;If no It is that expression timeslice setting is reasonable, then direct return step 2.
In step 11 of the present invention, control task is executed at the end of aperiodic message transmissions task, is obtained at the end of execution Local current time F is taken, and judges Di≤ MOD (F, T) < Di+1It is whether true: if so, indicating control task in period message The starting that can postpone aperiodic message transmissions task is executed at the end of transformation task, and at the end of aperiodic message transmissions task It is different then to send task so the setting of timeslice is unreasonable in system for the starting for executing meeting delay period message transmissions task again Often alarm and return step 2;If it is not, indicating timeslice setting rationally, then direct return step 2 restarts to recycle.
In the present invention, execution period message transmissions task described in step 4 includes the following steps:
Step a, inspection cycle message transmissions queue transmits non-week after the period message in the queue successively end of transmission The statement of phase message transmissions.
Step b, when aperiodic message transmissions state the end of transmission, the local current time H of acquisition.
Step c, judge MOD (H, T)-Di< SiIt is whether true: if so, indicating that the period message time piece of equipment i is enough The execution demand of period message transmissions task, later end period message transmissions task;If it is not, indicating the period of equipment i The execution demand of the inadequate period message transmissions task of message time piece then sends task abnormity alarm, later end period message Transformation task;Wherein SiFor the period message time piece of equipment i.
In the present invention, the aperiodic message transmissions task of execution described in step 6 includes the following steps:
Step a, it checks aperiodic message receiving queue, has searched whether aperiodic message transmissions statement and aperiodic message End of transmission statement: if so, then successively taking out these messages from queue, and extracting precedence information from message, updates The aperiodic message transmissions list of this equipment executes step b later;If it is not, being directly entered step b.
Step b, it checks aperiodic message transmissions list, judges in priority that all devices are stated, if be originally to set The standby highest priority stated: it is weighed if it is, obtaining aperiodic message transmissions by this equipment, executes step c later;If It is not that then this equipment cannot obtain aperiodic message transmissions power, terminates aperiodic message transmissions task later.
Step c, the aperiodic message of the stated priority of this equipment is successively transferred on network, then by aperiodic message The highest priority of remaining message is put into aperiodic message transmissions and terminates to be transferred on network in statement in transmission queue, Zhi Houjie The aperiodic message transmissions task of beam.
In the present invention, the control task is the functional block that EPA in need in equipment is communicated;The execution control task Specifically: equipment inspection cycle message receiving queue takes out period message from queue and extracts data and update corresponding functional block Parameter, then successively scan and execute in equipment EPA communication in need functional block, finishing control task later.
In practical application, required data are executed in period message containing functional block, therefore inspection cycle message is needed to receive Queue and the parameter that corresponding functional block is updated with data extracted in message.This partial content is the prior art, herein no longer It repeats.
In the present invention, the communication macro periodWherein, SiFor i-th of EPA equipment period message when Between piece, NTFor the aperiodic message time piece of EPA network.Communicating the macro period moves in circles arrival, therefore period message transmissions Task, aperiodic message transmissions task and control task move in circles execution.
In the present invention, period message transmissions task and control task pass through the control of status indicator in each communication macro period In can only once execute;And aperiodic message transmissions task can be performed a plurality of times in each communication macro period, execute secondary Number depends on the round scanning number of equipment.
In the present invention, the task abnormity alarm is to add communication task exception field in the statement of aperiodic message transmissions With control task exception field, with aperiodic message transmissions state to the whole network broadcast.
Fig. 3 is the structure chart that aperiodic message transmissions statement improves front and back in the present invention.The statement of aperiodic message transmissions and It is all the broadcasting packet in EPA system that aperiodic message transmissions, which terminate statement,.Equipment by its aperiodic message transmissions queue to The highest priority for passing aperiodic message, which is put into these messages to the whole network, broadcasts, in this, as in aperiodic message time piece Fight for the foundation of transmission right.As shown in figure 3, in the application layer data unit of aperiodic message transmissions statement, NPMA_TAG field For the mark of aperiodic message transmissions statement, field length is 1 byte, is worth for 0x21;PRI field indicates to be transmitted in queue The highest priority of aperiodic message, 0xFF indicate that no aperiodic message transmissions, field length are 1 byte.The present invention exists Communication task exception field WARN1 and control task exception field WARN2 are added on the basis of original field.WARN1 field Length is 1 byte, and it is normal to indicate that communication task executes by value 0x01, and timeslice setting is reasonable;Its value is 0x00, is indicated Communication task executes exception, and timeslice setting is unreasonable.WARN2 field length is 1 byte, and value 0x01 indicates control Task execution is normal, and rationally, value 0x00 indicates that control task executes exception, and timeslice setting is unreasonable for timeslice setting. PAD field is to fill character, and raw footage is 44 bytes, since WARN1 and WARN2 occupies 2 bytes, PAD word after improving Segment length becomes 42 bytes, and value is all 0x20.After host computer receives the statement of aperiodic message transmissions, check WARN1 and WARN2 field, as long as sending out field existing is 0x00, alarmed by man-machine interface and request to reset warning device when Between piece.
Embodiment
Fig. 4 is the composed structure schematic diagram of EPA Ethernet system in embodiment.As shown in figure 4, EPA described in the embodiment Ethernet system includes 1 PC, 1 EPA bridge, 1 Ethernet switch and 4 EPA equipment, is briefly referred to as equipment 1, sets Standby 2, equipment 3, equipment 4.
In the present embodiment, this 4 EPA equipment are to support the embedded controller of EPA agreement, use AT91RM9200 Processor, 8M FLASH, 32M SDRAM and 10/100Base-T type Ethernet, run the ARM linux kernel of crop configuration Operating system, apply the technical scheme of the present invention in the client layer and link layer of its communication protocol stack realize control with communicate Synchronous method.
Fig. 5 is the composed structure schematic diagram of the control loop of functional block composition in each equipment in embodiment.As shown in figure 5, There are 6 functional block FB1~FB6 in equipment 1~4, amounts to 24 functional blocks.This 24 functional blocks are belonging respectively to 3 and control back Road is separated by dotted line frame between each control loop;Wherein, solid box is for separating 4 EPA equipment.
In the present embodiment, the message of each equipment transmission are as follows: equipment 1 sends 2, and equipment 2 sends 1, and equipment 3 sends 3 A, equipment 4 sends 1;These messages are all the information distribution services messages for sending floating number, and length is 70 bytes.
In practical application, the scheduling parameter and its adjusting range in EPA network are as shown in table 1.
1 scheduling parameter of table and adjusting range
In table 1, D, B, T are respectively the period message bias of each equipment, the aperiodic message bias of EPA network and lead to Believe the initial value in macro period;PAWith PBThe respectively adjustment minimum value and maximum value of period message time piece;NAWith NBIt is respectively non- The adjustment minimum value and maximum value of period message time piece.
Fig. 6 is that embodiment is respectively adopted the method for the invention and period message time piece after the prior art and communicates macro week The adjustment comparative result figure of phase.
In the present embodiment, the data in 200 communication macro periods are averaged to obtain period message when taking system stable operation It is that timeslice adaptively adjusts as a result, system using conventional method and the method for the present invention operation after, period message time piece, macro week The variation of the parameters such as phase T is as shown in Figure 5.
As can be seen from FIG. 6, when using the method for the present invention, the period message time piece of 4 equipment is averagely had dropped about 50%-65%, the fall for communicating macro cycle T is about 52%.The reduction of period message time piece reflects communication load It reduces, shows that functional block executes number reduction in equipment, generates message number and reduce.This is because each equipment exists in conventional method The circulation that message actual transmissions number in the macro period depends on its program executes number, and actual transmissions number is logical transport number Purpose multiple;And in this method, the actual transmissions number of each equipment message is then consistent with logical transport number.The embodiment explanation The method of the present invention effectively prevents the invalid failed transmission executed with data of functional block, reduces the calculated load of system and leads to Believe load, the reduction of communication load can effectively improve the real-time communication energy and control performance of system.
In conclusion the above is merely preferred embodiments of the present invention, being not intended to limit the scope of the present invention. All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in of the invention Within protection scope.

Claims (6)

1. a kind of synchronous method Ethernet system control and communicated, which is characterized in that described method includes following steps:
Step 1, equipment starting;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n is true: if it is, setting Di+1=B executes step 2 later;If it is not, then directly executing step 2;Wherein, i be factory automation Ethernet (EPA, Ethernet for Plant Automation) equipment serial number, n is the EPA equipment sum in EPA network, and B is EPA network Aperiodic message bias, Di+1For the period message bias of i+1 EPA equipment;
Step 2 obtains local current time G;
Step 3 judges Di≤ MOD (G, T) < Di+1It is whether true: if so, when indicating that the current time is located at period message Between in piece, then follow the steps 4;If it is not, indicating that the current time is not located in period message time piece, then follow the steps 6;Wherein, DiFor the period message bias of i-th of EPA equipment;MOD (G, T)=MOD (G/T), MOD () are MOD function; T is to communicate the macro period;
Step 4 judges whether P=1 is true: if so, indicating that period message transmissions task is not yet held in this communication macro period Row after then executing period message transmissions task and P=0, Q=1 being arranged, executes step 5;If it is not, indicating that period message passes Defeated task has executed in this communication macro period, then directly executes step 5;
Step 5 judges whether mark R=1 is true: if so, thening follow the steps 8;If it is not, then return step 2;
Step 6 judges whether B≤MOD (G, T) < T true: if so, indicate current time in aperiodic message time piece, Aperiodic message transmissions task is then executed, setting later identifies P=1 and executes step 7;If it is not, indicating current time not In aperiodic message time piece, then aperiodic message transmissions task is not executed, directly execution step 7;
Step 7 judges whether mark R=1 is true: if it is, return step 2;If it is not, then executing step 8;
Step 8 judges whether Q=1 is true: if so, indicating that control task has not carried out in the present communications macro period, then executing Simultaneously Q=0 is arranged in control task, obtains local current time F later and executes step 9;If it is not, indicating that control task is being worked as The preceding communication macro period has executed, then direct return step 2;
Step 9 judges whether mark R=1 is true: if so, thening follow the steps 10;If it is not, then executing step 11;
Step 10 judges whether B≤MOD (F, T) < T is true: if it is, setting mark R=0 and return step 2;If no It is that R=1 and return step 2 are then set;
Step 11 judges Di≤ MOD (F, T) < Di+1It is whether true: if so, indicating that the execution of control task affects period report The starting of literary transformation task, timeslice setting is unreasonable, then sends task abnormity alarm and return step 2;If it is not, indicating Timeslice setting is reasonable, then direct return step 2.
2. a kind of synchronous method Ethernet system control and communicated according to claim 1, which is characterized in that step 4 In, the execution period message transmissions task includes the following steps:
Step a, inspection cycle message transmissions queue transmits aperiodic report after the period message in the queue successively end of transmission Text transmission statement;
Step b, when aperiodic message transmissions state the end of transmission, the local current time H of acquisition;
Step c, judge MOD (H, T)-Di< SiIt is whether true: if so, indicating message time piece enough periods in period of equipment i The execution demand of message transmissions task, later end period message transmissions task;If it is not, indicating the period message of equipment i The execution demand of the inadequate period message transmissions task of timeslice then sends task abnormity alarm, later end period message transmissions Task;Wherein SiFor the period message time piece of equipment i.
3. a kind of synchronous method Ethernet system control and communicated according to claim 1, which is characterized in that step 6 Described in execute aperiodic message transmissions task and include the following steps:
Step a, it checks aperiodic message receiving queue, has searched whether aperiodic message transmissions statement and aperiodic message transmissions Terminate statement: if so, then successively taking out these messages from queue, and extracting precedence information from message, update is originally set Standby aperiodic message transmissions list executes step b later;If it is not, being directly entered step b;
Step b, it checks aperiodic message transmissions list, judges in priority that all devices are stated, if be this equipment institute The highest priority of statement: it is weighed if it is, obtaining aperiodic message transmissions by this equipment, executes step c later;If no It is that then this equipment cannot obtain aperiodic message transmissions power, terminates aperiodic message transmissions task later;
Step c, the aperiodic message of the stated priority of this equipment is successively transferred on network, then by aperiodic message transmissions The highest priority of remaining message is put into aperiodic message transmissions and terminates to be transferred on network in statement in queue, terminates later non- Period message transmissions task.
4. a kind of synchronous method Ethernet system control and communicated according to claim 1, which is characterized in that the control Task processed is the functional block that EPA in need in equipment is communicated;The execution control task specifically: equipment elder generation inspection cycle report Literary receiving queue takes out period message from queue and extracts data and update functional block parameter, then successively executes institute in equipment The functional block of EPA in need communication, later finishing control task.
5. a kind of synchronous method Ethernet system control and communicated according to claim 1, which is characterized in that described logical Believe the macro periodWherein, SiFor the period message time piece of i-th of EPA equipment, NTFor aperiodic message time Piece.
6. a kind of synchronous method Ethernet system control and communicated according to claim 1 or described in 2, which is characterized in that The task abnormity alarm is to add communication task exception field and control task exception word in the statement of aperiodic message transmissions Section, as aperiodic message transmissions are stated to broadcast to the whole network.
CN201610410572.6A 2016-05-31 2016-05-31 A kind of synchronous method Ethernet system control and communicated Expired - Fee Related CN106059812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610410572.6A CN106059812B (en) 2016-05-31 2016-05-31 A kind of synchronous method Ethernet system control and communicated

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610410572.6A CN106059812B (en) 2016-05-31 2016-05-31 A kind of synchronous method Ethernet system control and communicated

Publications (2)

Publication Number Publication Date
CN106059812A CN106059812A (en) 2016-10-26
CN106059812B true CN106059812B (en) 2019-05-24

Family

ID=57170225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610410572.6A Expired - Fee Related CN106059812B (en) 2016-05-31 2016-05-31 A kind of synchronous method Ethernet system control and communicated

Country Status (1)

Country Link
CN (1) CN106059812B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764407B (en) * 2021-04-09 2021-07-02 浙江国利信安科技有限公司 Distributed control non-periodic communication method
CN113612674B (en) * 2021-09-30 2022-01-04 浙江国利信安科技有限公司 Time division multiplexing communication method for EPA system, EPA device and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604554A (en) * 2004-11-15 2005-04-06 浙江中控技术股份有限公司 Scheduling method for implementing Ethernet determinacy communication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604554A (en) * 2004-11-15 2005-04-06 浙江中控技术股份有限公司 Scheduling method for implementing Ethernet determinacy communication

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"提高EPA系统网络时延性能的方法";刘宁;《通信学报》;20140831;147-153

Also Published As

Publication number Publication date
CN106059812A (en) 2016-10-26

Similar Documents

Publication Publication Date Title
CN106101021B (en) A kind of real-time execution dispatching method of Ethernet system functional block
CN101464811B (en) Multitask monitoring management system
CN106059812B (en) A kind of synchronous method Ethernet system control and communicated
CN107171892B (en) Cross-platform data communication method and system based on QT
CN102739491B (en) Ethernet communication master station implementation method
CN102546839B (en) Efficient and reliable software distribution method for large scale network
CN109302646A (en) A kind of implementation method of the water meter long-distance meter-reading system based on GPRS and system
CN102595578A (en) Self-adaptive deterministic scheduling method for WIA-PA network
CN102609307A (en) Multi-core multi-thread dual-operating system network equipment and control method thereof
CN105049162A (en) Public network information high-efficiency transmission method based on Epoll model
CN103699450A (en) Linux adaptive component communication method
US20240012699A1 (en) Method and Apparatus for Improving Message Processing Efficiency of Flash Channel Controller
CN102360473A (en) Data sharing method for land-saving power dispatching automation systems
CN104635506A (en) Equipment simulation method of semiconductor production line conveying system
CN110377411B (en) Distributed cloud-oriented workflow task scheduling method and system
CN104486188B (en) A kind of method to set up and device for receiving and dispatching separate threads
CN205377930U (en) Be transformed into MODBUS stipulations from TCPIP link serial link&#39;s equipment
CN105577310B (en) The synchronous method of task partition and communication scheduling in a kind of time triggered Ethernet
CN103353750A (en) Multi-bus microwave metallurgical control system and method
CN107918299B (en) Arithmetic device and control device
CN109673016A (en) Running gear and its upstream data transfer approach
CN113918640A (en) ETL flow execution method based on asynchronous mode
CN110442442B (en) Nuclear power plant DCS platform engineer station software maintenance network communication method
CN110519277B (en) Method for realizing control of other systems based on single-point execution contract
CN105763640A (en) Virtual machine management and control system under cloud computing environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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: 20190524