CN106059812A - Method for synchronizing control and communication of Ethernet system - Google Patents
Method for synchronizing control and communication of Ethernet system Download PDFInfo
- Publication number
- CN106059812A CN106059812A CN201610410572.6A CN201610410572A CN106059812A CN 106059812 A CN106059812 A CN 106059812A CN 201610410572 A CN201610410572 A CN 201610410572A CN 106059812 A CN106059812 A CN 106059812A
- Authority
- CN
- China
- Prior art keywords
- message
- task
- cycle
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
Abstract
The invention provides a method for synchronizing control and communication of an Ethernet system. The method comprises the steps of setting a state identification for a control task; itinerantly scanning a current time during the operation of a device, and respectively transmitting a periodic message and an aperiodic message within a periodic message time slice and an aperiodic message time slice; when the transmission of the periodic message and the aperiodic message is completed, judging whether the state identification of the control task is 1; if yes, namely meaning that the control task is not executed within a current macro period, executing the control task, and setting the state identification of the control task to be 0; and otherwise, namely meaning that the control task is executed within the current macro period, abandoning the execution of the control task. According to the method, the period synchronization of a user layer function block achieving a control function and link layer communication achieving a communication function can be achieved, the invalid execution of the function block and the invalid transmission of data can be avoided, and the operation efficiency and communication real-time performance of the system can be effectively improved. The method can be widely applied to the field of the industrial control.
Description
Technical field
The present invention relates to industrial control field, particularly relate to a kind of Ethernet system and control and the synchronous method communicated.
Background technology
EPA (Ethernet for Plant Automation) factory automation Ethernet is that one is independently ground by China
The real-time ethernet technology of the Control-oriented system sent out, by fieldbus international standard IEC61158 and real-time ethernet state
Border standard IEC 61784 is included.At present, EPA has been widely used for multiple fields such as electric power, chemical industry, machinery, mining, oil.
As a kind of network control system, EPA is by realizing controlling function and transferring in the functional device of field apparatus
Distributed measurement under network environment and control.In EPA system, form the multiple functional devices controlling loop and be distributed in not
With in EPA equipment, each functional device has been connected with each other to control function by EPA communication.The execution order of each functional device exists
Logical relation, the output of preamble functional device is received as input, postorder functional device to postorder functional device by EPA message transmissions
After EPA message, the data of message carrying are processed.But in EPA system, it is responsible for the cycle message of data communication and non-
Cycle message all could must transmit in respective timeslice in the grand cycle that communicates, so the execution cycle of communication is EPA net
The communication grand cycle of network;In actual application, the execution cycle of functional device is then program cycle period.Owing to communicating, the grand cycle is past
Toward bigger manyfold than program cycle period, so functional device can perform repeatedly in the grand cycle that communicates, cause that multiple to carry it defeated
Go out data and mail to the message generation of same purpose functional device.When cycle message time sheet and message time sheet aperiodic do not arrive
Time, these messages can not transmit in the queue of link layer;And when cycle message time sheet and aperiodic, message time sheet arrived,
These messages by the extremely same purpose functional device of transmission successively, cause legacy data to be covered by new data and can not get processing again.
As can be seen here, in prior art, control and the asynchronous invalid execution that result in functional device communicated and data
Failed transmission, adds calculated load and the communication load of system, seriously reduces systematic function.
Summary of the invention
In view of this, a kind of ether reducing system-computed load and communication load of offer is provided
Net system controls and the synchronous method communicated.
In order to achieve the above object, the technical scheme that the present invention proposes is:
A kind of Ethernet system controls and the synchronous method communicated, and comprises the steps:
Step 1, equipment start;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n sets up: if it is,
D is seti+1=B, performs step 2 afterwards;If it is not, then directly perform step 2;Wherein, i is EPA equipment serial number, and n is EPA
EPA equipment sum in network, B is message bias aperiodic of EPA network, Di+1Cycle for i+1 EPA equipment is reported
Literary composition bias.
Step 2, local current time G of acquisition.
Step 3, judge Di≤ MOD (G, T) < Di+1Whether set up: if it is, represent that described current time is positioned at cycle report
In literary composition timeslice, then perform step 4;If it is not, represent that described current time is not positioned at cycle message time sheet, then perform
Step 6;Wherein, DiCycle message bias for i-th EPA equipment;MOD (G, T)=MOD (G/T), MOD () are complementation
Function;T is the grand cycle that communicates.
Step 4, judge whether P=1 sets up: if it is, represent cycle message transmissions task in this communication grand cycle still
It is not carried out, then, after performing cycle message transmissions task and P=0, Q=1 being set, performs step 5;If it is not, represent cycle report
Literary composition transformation task performed in this communication grand cycle, the most directly performed step 5.
Step 5, judge identify R=1 whether set up: if it is, perform step 8;If it is not, then return step 2.
Step 6, judge whether B≤MOD (G, T) < T sets up: if it is, represent that current time is at message time aperiodic
In sheet, then perform message transmissions task aperiodic, mark P=1 is set afterwards and performs step 7;During if it is not, represent current
Between not in aperiodic message time sheet, the most do not perform message transmissions task aperiodic, directly perform step 7.
Step 7, judge identify R=1 whether set up: if it is, return step 2;If it is not, then perform step 8.
Step 8, judge whether Q=1 sets up: if it is, represent that control task had not carried out, then in the present communications grand cycle
Perform control task and Q=0 is set, obtain local current time F afterwards and perform step 9;If it is not, expression control task
Perform in the present communications grand cycle, the most directly returned step 2.
Step 9, judge identify R=1 whether set up: if it is, perform step 10;If it is not, then perform step 11.
Step 10, judge whether B≤MOD (F, T) < T sets up: if it is, arrange mark R=0 and return step 2;As
Fruit not, then arranges R=1 and returns step 2.
Step 11, judge Di≤ MOD (F, T) < Di+1Whether set up: if it is, represent that the execution of control task have impact on
The startup of cycle message transmissions task, timeslice arranges unreasonable, then send task abnormity and report to the police and return step 2;If no
It is that express time sheet arranges rationally, the most directly returns step 2.
In sum, the present invention, by setting communication task and the triggering executive mode of control task, makes realization control merit
The client layer functional device of energy communicates with the EPA realizing communication function and reaches cycle synchronisation, it is to avoid the invalid execution sum of functional device
According to failed transmission, be effectively improved operational efficiency and the real-time communication energy of system.
Accompanying drawing explanation
Fig. 1 is the execution schematic diagram of communication task and control task in the present invention.
Fig. 2 is the schematic flow sheet that Ethernet system of the present invention controls with communication synchronization method.
Fig. 3 is the structure chart in the present invention before and after message transmissions statement improvement aperiodic.
Fig. 4 is the composition structural representation of EPA real-time ethernet system in embodiment.
Fig. 5 is the composition structural representation in the control loop of functional device composition in each equipment in embodiment.
Fig. 6 is that embodiment is respectively adopted the inventive method and cycle message time sheet after prior art and the tune of grand cycle that communicates
Whole Comparative result figure.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, the most right
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 cycle message bias of 3,4 EPA equipment, B is message bias aperiodic of EPA network.I-th EPA in EPA network
The cycle message bias D of equipmenti, message bias aperiodic B and the grand cycle T that communicates be all the reality arranged when system configuration
Time scheduling parameter.As it is shown in figure 1, communication task includes cycle message transmissions task and message transmissions task aperiodic, the cycle is reported
Literary composition transformation task performs in cycle message time sheet, and aperiodic, message transmissions task performed in message time sheet in aperiodic;
Cycle message transmissions multiplexed transport cycle message and message transmissions statement aperiodic, message transmissions multiplexed transport aperiodic aperiodic
Message and message transmissions aperiodic terminate statement;Cycle message transmissions task and control task in each grand cycle that communicates only
Can once perform, control task or trigger after message transmissions tasks carrying terminates in the cycle performs, or reports in aperiodic
Literary composition transformation task triggers after performing to terminate and performs.
Fig. 2 is the schematic flow sheet that Ethernet system of the present invention controls with communication synchronization method.As it is shown in figure 1, this
Invent described Ethernet system to control to comprise the steps: with communication synchronization method
Step 1, equipment start;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n sets up: if it is,
D is seti+1=B, performs step 2 afterwards;If it is not, then directly perform step 2;Wherein, i is EPA equipment serial number, and n is EPA
EPA equipment sum in network, B is message bias aperiodic of EPA network, Di+1Cycle for i+1 EPA equipment is reported
Literary composition bias.
In step 1 of the present invention, described status indicator P be expression cycle message transmissions task in this communication grand cycle whether
The status indicator performed, P=1 represents that communication task is currently executable state, and P=0 represents that communication task is not currently for
Executable state;Q is to represent the status indicator that control task performed in this communication grand cycle, and Q=1 represents control
Task is currently executable state, and Q=0 represents that control task is currently for not executable state;R is for representing control task Ying Zhou
The status indicator performed at the end of phase message transmissions task or should perform at the end of message transmissions task in aperiodic, R=1 table
Showing that control task should perform at the end of cycle message transmissions task, R=0 represents that control task should be appointed in message transmissions aperiodic
Perform at the end of business.P, Q, R are logical variables, and the initial value when equipment starts is both configured to 1.
Step 2, local current time G of acquisition;
Step 3, judge Di≤ MOD (G, T) < Di+1Whether set up: if it is, represent that described current time is positioned at cycle report
In literary composition timeslice, then perform step 4;If it is not, represent that described current time is not positioned at cycle message time sheet, then perform
Step 6;Wherein, DiCycle message bias for i-th EPA equipment;MOD (G, T)=MOD (G/T), MOD () are complementation
Function;T is the grand cycle that communicates.
In step 1 of the present invention and step 3, when i < n, i.e. equipment i are not last equipment sending cycle message,
The time started basis for estimation of its cycle message time sheet is MOD (G, T)=Di, deadline is the cycle message of equipment i+1
The time started of timeslice, it is judged that foundation is MOD (G, T)=Di+1, therefore current time judgement in cycle message time sheet
According to being: Di≤ MOD (G, T) < Di+1;Work as i=n, i.e. when equipment i is last equipment sending cycle message, its cycle
The time started basis for estimation of message time sheet is MOD (G, T)=Di, deadline is EPA network message time aperiodic sheet
Time started, it is judged that according to be MOD (G, T)=B, therefore current time basis for estimation in cycle message time sheet is:
Di≤ MOD (G, T) < B;Owing in step 1, when equipment n detects i=n, having arranged Dn+1=B, therefore sets in step 3
Standby n judges that current time foundation in its cycle message time sheet is also: Di≤ MOD (G, T) < Di+1。
In step 3 of the present invention, equipment if be detected that current time is in cycle message time sheet, then enters step 4 and holds
Line period message transmissions task, otherwise enters step 6 and determines whether that current time is whether in aperiodic message time sheet.
Step 4, judge whether P=1 sets up: if it is, represent cycle message transmissions task in this communication grand cycle still
It is not carried out, then, after performing cycle message transmissions task and P=0, Q=1 being set, performs step 5;If it is not, represent cycle report
Literary composition transformation task performed in this communication grand cycle, the most directly performed step 5.
In step 4 of the present invention, equipment, after having performed cycle message transmissions task, arranges its status indicator P=0, then exists
In the present communications grand cycle, when equipment scans mark P again, owing to its value is 0, cycle message transmissions would not be repeated and appoint
Business, until after message transmissions tasks carrying aperiodic terminates, just resetting P=1, so starting in the next communication grand cycle
Time, communication task is still executable state, thereby guarantees that cycle message transmissions task communicates in the grand cycle for once at one
Perform;Equipment, when having performed cycle message transmissions task, arranges Q=1, makes control task become executable state, until control
After task processed is performed, Q=0 is just set so that it is become not executable state.
Step 5, judge identify R=1 whether set up: if it is, perform step 8;If it is not, then return step 2.
In step 5 of the present invention, if R=1, represent that control task should perform, then at the end of cycle message transmissions task
Enter step 8 at the end of cycle message transmissions task and perform control task;Otherwise represent that control task should pass at message aperiodic
Perform at the end of defeated task, then return step 2 at the end of cycle message transmissions task.
Step 6, judge whether B≤MOD (G, T) < T sets up: if it is, represent that current time is at message time aperiodic
In sheet, then perform message transmissions task aperiodic, mark P=1 is set afterwards and performs step 7;During if it is not, represent current
Between not in aperiodic message time sheet, the most do not perform message transmissions task aperiodic, directly perform step 7.
In step 6 of the present invention, described EPA network aperiodic message time sheet time started basis for estimation be: MOD
(G, T)=B, and the deadline that deadline is the present communications grand cycle, therefore current time is at message time sheet aperiodic
Interior basis for estimation is: B≤MOD (G, T) < T;Equipment is if be detected that current time was then held in message time sheet in aperiodic
Row message transmissions aperiodic task, arranges P=1 after performing to terminate, makes cycle message transmissions task open in the next communication grand cycle
It it is executable state during the beginning;After step 6 performs to terminate, enter step 7 and judge whether to perform control task.
Step 7, judge identify R=1 whether set up: if it is, return step 2;If it is not, then perform step 8.
In step 7 of the present invention, if R=1 sets up, represent that control task should be held at the end of cycle message transmissions task
OK, and should not perform at the end of message transmissions task in aperiodic, so after equipment execution message transmissions task aperiodic terminates
Return step 2 and restart circulation;If be false, represent that control task should be held at the end of message transmissions task in aperiodic
OK, then after equipment execution message transmissions task aperiodic terminates, entrance step 10 judges whether to perform control task.
Step 8, judge whether Q=1 sets up: if it is, represent that control task had not carried out, then in the present communications grand cycle
Perform control task and Q=0 is set, obtain local current time F afterwards and perform step 9;If it is not, expression control task
Perform in the present communications grand cycle, the most directly returned step 2.
In step 8 of the present invention, equipment, after having performed control task, arranges its status indicator Q=0, then at present communications
In the grand cycle, when equipment scans mark Q again, owing to its value is 0, control task would not be repeated, until next
Communicate after the grand cycle has performed cycle message transmissions task, just can reset Q=1, thereby guarantee that control task is one
Individual communication for once performed in the grand cycle.
Step 9, judge identify R=1 whether set up: if it is, perform step 10;If it is not, then perform step 11.
In step 9 of the present invention, if R=1 sets up, represent that control task is to perform at the end of cycle message transmissions task
, then enter step 10 and judge whether the execution of control task is delayed the startup of message transmissions task aperiodic;If do not become
Vertical, then it represents that control task performed at the end of message transmissions task in aperiodic, then enter step 11 and judge control task
Whether it is delayed the startup of cycle message transmissions task.
Step 10, judge whether B≤MOD (F, T) < T sets up: if it is, arrange mark R=0 and return step 2;As
Fruit not, then arranges R=1 and returns step 2.
In step 10 of the present invention, control task performs at the end of cycle message transmissions task, obtains this at the end of execution
Ground current time F, and judge whether B≤MOD (F, T) < T sets up: if it is, represent that the execution of control task has been delayed
Aperiodic message transmissions task startup, from cycle message transmissions task terminate to message time sheet starts aperiodic this section time
Between the execution demand of inadequate control task, so control task should not perform at the end of cycle message transmissions task, then R is set
=0, make control task in the later communication grand cycle all perform again at the end of message transmissions task in aperiodic;If it is not,
Represent that the execution of control task does not postpone the startup of message transmissions task aperiodic, terminate to non-from cycle message transmissions task
The execution demand of enough during this period of time control tasks that cycle message time sheet starts, so control task should be at cycle message
Perform at the end of transformation task, then R=1 is set, make in the next grand cycle that communicates control task still in cycle message transmissions
Perform at the end of task.
In the present invention, being 1 owing to arranging the initial value of R when equipment starts, therefore control task is necessarily at cycle message
Carry out at the end of transformation task performing for the first time, only postpone message transmissions task aperiodic in the execution that control task occurs and open
The when of dynamic, R=0 is just set, makes control task in the later communication grand cycle all change at message transmissions task knot aperiodic
Perform during bundle.
Step 11, judge Di≤ MOD (F, T) < Di+1Whether set up: if it is, represent that the execution of control task have impact on
The startup of cycle message transmissions task, timeslice arranges unreasonable, then send task abnormity and report to the police and return step 2;If no
It is that express time sheet arranges rationally, the most directly returns step 2.
In step 11 of the present invention, control task is to perform at the end of message transmissions task in aperiodic, obtains at the end of execution
Take local current time F, and judge Di≤ MOD (F, T) < Di+1Whether set up: if it is, represent that control task is at cycle message
At the end of transformation task, execution can postpone the startup of message transmissions task aperiodic, and at the end of aperiodic message transmissions task
Perform again can the startup of delay period message transmissions task, so in system timeslice arrange unreasonable, then send task different
Often report to the police and return step 2;If it is not, express time sheet arranges rationally, the most directly return step 2 and restart circulation.
In the present invention, perform cycle message transmissions task described in step 4 and comprise the steps:
Step a, proof cycle message transmissions queue, after the cycle message end of transmission successively in queue, transmit non-week
Phase message transmissions is stated.
Step b, when the message transmissions statement aperiodic end of transmission, obtain local current time H.
Step c, judge MOD (H, T)-Di< SiWhether set up: if it is, represent that the cycle message time sheet of equipment i is enough
The execution demand of cycle message transmissions task, afterwards end period message transmissions task;If it is not, represent the cycle of equipment i
The execution demand of message time sheet inadequate cycle message transmissions task, then send task abnormity and report to the police, end period message afterwards
Transformation task;Wherein SiCycle message time sheet for equipment i.
In the present invention, perform message transmissions task aperiodic described in step 6 and comprise the steps:
Step a, inspection message receiving queue aperiodic, searched whether message transmissions statement aperiodic and message aperiodic
The end of transmission is stated: if it has, take out these messages the most successively from queue, and extracts precedence information from message, updates
Message transmissions list aperiodic of this equipment, performs step b afterwards;If it is not, be directly entered step b.
Step b, inspection message transmissions list aperiodic, it is judged that in the priority that all devices is stated, if be originally to set
The standby priority stated is the highest: if it is, obtained message transmissions power aperiodic by this equipment, perform step c afterwards;If
Not, then this equipment can not obtain message transmissions power aperiodic, terminates message transmissions task aperiodic afterwards.
Step c, message aperiodic of stated for this equipment priority is transferred on network successively, then by message aperiodic
In transmission queue, the limit priority of remaining message is put into during message transmissions aperiodic terminates to state and is transferred on network, ties afterwards
Bundle message transmissions task aperiodic.
In the present invention, described control task is the functional device of there is a need to EPA communication in equipment;Described execution control task
Particularly as follows: equipment proof cycle message receiving queue, from queue, take out cycle message extract data and update corresponding functional block
Parameter, scans and performs the functional device of there is a need to EPA communication, finishing control task afterwards in equipment the most successively.
In actual application, the data needed for performing containing functional device in cycle message, therefore need proof cycle message to receive
Queue the parameter by the data renewal corresponding functional block extracted in message.This partial content is prior art, the most no longer
Repeat.
In the present invention, the described communication grand cycleWherein, SiDuring for the cycle message of i-th EPA equipment
Between sheet, NTMessage time sheet aperiodic for EPA network.Grand cycle that communicates moves in circles arrival, therefore cycle message transmissions
Task, message transmissions task aperiodic and control task move in circles execution.
In the present invention, cycle message transmissions task is communicated the grand cycle each by the control of status indicator with control task
In can only once perform;And message transmissions task aperiodic can be performed a plurality of times in each communication grand cycle, perform secondary
Number depends on the round scanning number of times of equipment.
In the present invention, it is to add communication task exception field in aperiodic in message transmissions statement that described task abnormity is reported to the police
With control task exception field, along with aperiodic message transmissions statement to the whole network broadcast.
Fig. 3 is the structure chart in the present invention before and after message transmissions statement improvement aperiodic.Aperiodic message transmissions statement and
Message transmissions terminates to state aperiodic be all the broadcasting packet in EPA system.Its aperiodic is treated in message transmissions queue by equipment
Pass the limit priority of message aperiodic to put in these messages and broadcast to the whole network, in this, as in aperiodic message time sheet
The foundation of contention transmission right.As it is shown on figure 3, in the application layer data unit of message transmissions statement aperiodic, NPMA_TAG field
For the mark of message transmissions statement aperiodic, field length is 1 byte, is worth for 0x21;PRI field represents to be transmitted in queue
Aperiodic message limit priority, 0xFF represents does not has message transmissions aperiodic, and field length is 1 byte.The present invention exists
Communication task exception field WARN1 and control task exception field WARN2 is with the addition of on the basis of original field.WARN1 field
A length of 1 byte, its value is 0x01, represents that communication task performs normal, and timeslice is arranged rationally;Its value is 0x00, represents
Communication task performs exception, and timeslice arranges unreasonable.WARN2 field length is 1 byte, and its value is 0x01, represents and controls
Tasks carrying is normal, and timeslice arranges rationally, and its value is 0x00, represents that control task performs exception, and timeslice arranges unreasonable.
PAD field is to fill character, and raw footage is 44 bytes, owing to after improving, WARN1 and WARN2 occupies 2 bytes, PAD word
Segment length becomes 42 bytes, and value is all 0x20.Host computer receive aperiodic message transmissions statement after, check WARN1 and
WARN2 field, as long as the field being found to have is 0x00, just reported to the police by man machine interface and ask to reset warning device time
Between sheet.
Embodiment
Fig. 4 is the composition structural representation of EPA Ethernet system in embodiment.As shown in Figure 4, EPA described in this 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, these 4 EPA equipment are the embedded controller supporting EPA agreement, and it uses AT91RM9200
Processor, SDRAM and the 10/100Base-T type Ethernet of FLASH, 32M of 8M, run the ARM linux kernel of crop configuration
Operating system, the client layer at its communication protocol stack applies technical scheme to achieve control and communicate in link layer
Synchronous method.
Fig. 5 is the composition structural representation in the control loop of functional device composition in each equipment in embodiment.As it is shown in figure 5,
Equipment 1~4 all has 6 functional devices FB1~FB6, altogether 24 functional devices.These 24 functional devices are belonging respectively to 3 and control back
Road, each control is separated by dotted line frame between loop;Wherein, solid box is for separating 4 EPA equipment.
In the present embodiment, the message that each equipment sends is: equipment 1 sends 2, and equipment 2 sends 1, and equipment 3 sends 3
Individual, equipment 4 sends 1;These messages are all the information distribution services messages sending floating number, and length is 70 bytes.
In actual application, the scheduling parameter in EPA network is as shown in table 1 with its adjusting range.
Table 1 scheduling parameter and adjusting range
In table 1, D, B, T are respectively the cycle message bias of each equipment, message bias aperiodic of EPA network and lead to
Believe the initial value in grand cycle;PAWith PBIt is respectively adjustment minima and the maximum of cycle message time sheet;NAWith NBThe most non-
The adjustment minima of cycle message time sheet and maximum.
Fig. 6 is that embodiment is respectively adopted the method for the invention and cycle message time sheet after prior art and communicates grand week
The adjustment Comparative result figure of phase.
In the present embodiment, when taking system stable operation, the data in 200 grand cycles that communicate are averaged and are obtained cycle message
The result of timeslice self-adaptative adjustment, after system uses traditional method to run with the inventive method, cycle message time sheet, grand week
The isoparametric change of phase T is as shown in Figure 5.
According to Fig. 6, when using the inventive method, the cycle message time sheet of 4 equipment averagely have dropped about
50%-65%, the fall of the grand cycle T that communicates is about 52%.The cycle reduction of message time sheet reflects communication load
Reduce, show that in equipment, functional device performs number of times reduction, generates the minimizing of message number.This is owing to equipment each in traditional method exists
Message actual transmissions number in the grand cycle depends on that the circulation of its program performs number of times, 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.This embodiment explanation
The inventive method effectively prevent invalid execution and the failed transmission of data of functional device, reduces the calculated load of system and leads to
Letter load, the reduction of communication load can be effectively improved real-time communication energy and the control performance of system.
In sum, these are only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.
All within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included in the present invention's
Within protection domain.
Claims (6)
1. an Ethernet system controls and the synchronous method communicated, it is characterised in that described method comprises the steps:
Step 1, equipment start;Status indicator P=1, Q=1, R=1 are set;Judge whether i=n sets up: if it is, arrange
Di+1=B, performs step 2 afterwards;If it is not, then directly perform step 2;Wherein, i is EPA equipment serial number, and n is EPA network
In EPA equipment sum, B is message bias aperiodic of EPA network, Di+1Cycle message for i+1 EPA equipment is inclined
From amount;
Step 2, local current time G of acquisition;
Step 3, judge Di≤ MOD (G, T) < Di+1Whether set up: if it is, represent when described current time is positioned at cycle message
Between in sheet, then perform step 4;If it is not, represent that described current time is not positioned at cycle message time sheet, then perform step
6;Wherein, DiCycle message bias for i-th EPA equipment;MOD (G, T)=MOD (G/T), MOD () are MOD function;
T is the grand cycle that communicates;
Step 4, judge whether P=1 sets up: if it is, represent that cycle message transmissions task was not yet held in this communication grand cycle
OK, then after performing cycle message transmissions task and P=0, Q=1 being set, step 5 is performed;If it is not, represent that cycle message passes
Defeated task performed in this communication grand cycle, the most directly performed step 5;
Step 5, judge identify R=1 whether set up: if it is, perform step 8;If it is not, then return step 2;
Step 6, judge whether B≤MOD (G, T) < T sets up: if it is, represent current time in aperiodic message time sheet,
Then perform message transmissions task aperiodic, mark P=1 is set afterwards and performs step 7;If it is not, represent current time not
In aperiodic message time sheet, the most do not perform message transmissions task aperiodic, directly perform step 7;
Step 7, judge identify R=1 whether set up: if it is, return step 2;If it is not, then perform step 8;
Step 8, judge whether Q=1 sets up: if it is, represent that control task had not carried out in the present communications grand cycle, then perform
Control task also arranges Q=0, obtains local current time F afterwards and performs step 9;If it is not, represent that control task is being worked as
The front communication grand cycle has performed, and the most directly returns step 2;
Step 9, judge identify R=1 whether set up: if it is, perform step 10;If it is not, then perform step 11;
Step 10, judge whether B≤MOD (F, T) < T sets up: if it is, arrange mark R=0 and return step 2;If no
It is R=1 to be then set and returns step 2;
Step 11, judge Di≤ MOD (F, T) < Di+1Whether set up: if it is, represent that the execution of control task have impact on cycle report
The startup of literary composition transformation task, timeslice arranges unreasonable, then send task abnormity and report to the police and return step 2;If it is not, represent
Timeslice arranges rationally, the most directly returns step 2.
Control the most according to claim 1 and communication synchronization method, it is characterised in that in step 4, report of described execution cycle
Literary composition transformation task comprises the steps:
Step a, proof cycle message transmissions queue, after the cycle message end of transmission successively in queue, transmission report aperiodic
Literary composition transmission statement;
Step b, when the message transmissions statement aperiodic end of transmission, obtain local current time H;
Step c, judge MOD (H, T)-Di< SiWhether set up: if it is, represent message time sheet enough cycles in cycle of equipment i
The execution demand of message transmissions task, afterwards end period message transmissions task;If it is not, represent the cycle message of equipment i
The execution demand of timeslice inadequate cycle message transmissions task, then send task abnormity and report to the police, end period message transmissions afterwards
Task;Wherein SiCycle message time sheet for equipment i.
Control the most according to claim 1 and communication synchronization method, it is characterised in that described in step 6, perform aperiodic
Message transmissions task comprises the steps:
Step a, inspection message receiving queue aperiodic, searched whether message transmissions statement aperiodic and message transmissions aperiodic
Terminate statement: if it has, take out these messages the most successively from queue, and from message, extract precedence information, update and originally set
Standby message transmissions list aperiodic, performs step b afterwards;If it is not, be directly entered step b;
Step b, inspection message transmissions list aperiodic, it is judged that in the priority that all devices is stated, if be this equipment institute
The priority of statement is the highest: if it is, obtained message transmissions power aperiodic by this equipment, perform step c afterwards;If no
It is that then this equipment can not obtain message transmissions power aperiodic, terminates message transmissions task aperiodic afterwards;
Step c, message aperiodic of stated for this equipment priority is transferred on network successively, then by message transmissions aperiodic
In queue, the limit priority of remaining message is put into during message transmissions aperiodic terminates to state and is transferred on network, terminates non-afterwards
Cycle message transmissions task.
Control the most according to claim 1 and communication synchronization method, it is characterised in that described control task is institute in equipment
There is a need to the functional device of EPA communication;Described execution control task is particularly as follows: equipment elder generation proof cycle message receiving queue, from team
Row take out cycle message extract data and update functional device parameter, there is a need to EPA communication in execution equipment the most successively
Functional device, afterwards finishing control task.
Control the most according to claim 1 and communication synchronization method, it is characterised in that described communication grand cycleWherein, SiFor the cycle message time sheet of i-th EPA equipment, NTFor message time sheet aperiodic.
6. according to the control described in claim 1 and 2 and communication synchronization method, it is characterised in that described task abnormity is reported to the police
It is, in aperiodic, message transmissions statement adds communication task exception field and control task exception field, along with message aperiodic
Transmission statement is broadcasted to the whole network.
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 true CN106059812A (en) | 2016-10-26 |
CN106059812B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112764407A (en) * | 2021-04-09 | 2021-05-07 | 浙江国利信安科技有限公司 | Distributed control non-periodic communication method |
CN113612674A (en) * | 2021-09-30 | 2021-11-05 | 浙江国利信安科技有限公司 | Time division multiplexing communication method for EPA system, EPA device and medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1604554A (en) * | 2004-11-15 | 2005-04-06 | 浙江中控技术股份有限公司 | Scheduling method for implementing Ethernet determinacy communication |
-
2016
- 2016-05-31 CN CN201610410572.6A patent/CN106059812B/en not_active Expired - Fee Related
Patent Citations (1)
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)
Title |
---|
刘宁: ""提高EPA系统网络时延性能的方法"", 《通信学报》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112764407A (en) * | 2021-04-09 | 2021-05-07 | 浙江国利信安科技有限公司 | Distributed control non-periodic communication method |
CN113612674A (en) * | 2021-09-30 | 2021-11-05 | 浙江国利信安科技有限公司 | Time division multiplexing communication method for EPA system, EPA device and medium |
CN113612674B (en) * | 2021-09-30 | 2022-01-04 | 浙江国利信安科技有限公司 | Time division multiplexing communication method for EPA system, EPA device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN106059812B (en) | 2019-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106101021A (en) | A kind of Ethernet system functional device perform dispatching method in real time | |
CN106708617B (en) | A kind of application process keep-alive system and keepalive method based on Service | |
CN100477602C (en) | A method for realizing the multi-task polling in the network management monitoring system | |
DE102006027378B4 (en) | communication system | |
CN101576742B (en) | Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same | |
CN109995675B (en) | Self-adaptive industrial Ethernet gateway system and method based on software definition | |
CN106059812A (en) | Method for synchronizing control and communication of Ethernet system | |
CN107171892B (en) | Cross-platform data communication method and system based on QT | |
CN102223378B (en) | File synchronization method and system | |
CN103746959A (en) | Java and C communication mechanism implementation method in OSGi environment | |
CN107819611A (en) | Client method of testing based on the more service end emulation of IEC61850 | |
CN105007221A (en) | Loop detection method and system | |
CN106549967A (en) | A kind of IEC104 stipulations analysis system and methods based on event-driven mechanism | |
Kim et al. | Enhanced industrial message protocol for real-time IoT platform | |
CN108206864A (en) | Information of vehicles based on wechat synchronizes real time inquiry system and information synchronization method | |
EP1884851B1 (en) | Method, node and network for cyclical transmission of ethernet telegrams | |
CN110377411B (en) | Distributed cloud-oriented workflow task scheduling method and system | |
CN110069566A (en) | Heterogeneous database synchronization method in a kind of one-way import system | |
CN111327476A (en) | Bandwidth dynamic adjustment system and method based on frame reservation | |
CN107918299B (en) | Arithmetic device and control device | |
Kapus-Kolar | Deriving protocol specifications from service specifications with heterogeneous timing requirements | |
CN109673016A (en) | Running gear and its upstream data transfer approach | |
CN108197370A (en) | A kind of flexible distributed power grid and communication network union simulation platform and emulation mode | |
CN104168313B (en) | One kind remote control underwater work system communication network and its dispatching method | |
CN113918640A (en) | ETL flow execution method based on asynchronous mode |
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 |
Granted publication date: 20190524 |
|
CF01 | Termination of patent right due to non-payment of annual fee |