CN101604270B - ARINC 429 communication redundancy method based on vxworks operation system - Google Patents

ARINC 429 communication redundancy method based on vxworks operation system Download PDF

Info

Publication number
CN101604270B
CN101604270B CN2009100232648A CN200910023264A CN101604270B CN 101604270 B CN101604270 B CN 101604270B CN 2009100232648 A CN2009100232648 A CN 2009100232648A CN 200910023264 A CN200910023264 A CN 200910023264A CN 101604270 B CN101604270 B CN 101604270B
Authority
CN
China
Prior art keywords
channel
buffer circle
counter
function
communication
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
CN2009100232648A
Other languages
Chinese (zh)
Other versions
CN101604270A (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.)
Xidian University
Original Assignee
Xidian 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 Xidian University filed Critical Xidian University
Priority to CN2009100232648A priority Critical patent/CN101604270B/en
Publication of CN101604270A publication Critical patent/CN101604270A/en
Application granted granted Critical
Publication of CN101604270B publication Critical patent/CN101604270B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an ARINC 429 communication redundancy method based on a vxworks operation system, mainly solving the problems of unreliability, low instantaneity and complex design of the redundancy method in the existing instant communication system. The method of the invention has the follow realizing procedures: in an upper computer and a CPU communication system, the upper computer communicates with CPU via two independent ARINC 429 channels, namely a main channel A and a spare channel B; the working sequence and the transmitted data of the two channels are identical; CPU stores data received from the two channels via two different circular buffer zones; before receiving data each time, CPU calls a channel choice function; firstly, the channel choice function judges the number of bytes in the two buffer zones, and detects and chooses a channel according to different situations of the number of bytes in the two buffer zones. The method fully utilizes the circular buffer zone operation function in vxworks, and simplifies the process of anomaly detection and information synchronization to treat faults in time, so that the reliability and the instantaneity of the system can be ensured in software.

Description

ARINC429 communication redundancy method based on vxworks operating system
Technical field
The present invention relates to the communication technical field of real-time system, be specifically related to a kind of ARINC429 communication redundancy method based on vxworks.
Background technology
Vxworks operating system is a kind of embedded real-time operating system that U.S. Winder River company designed and developed in nineteen eighty-three, system provides good retractility when high-efficiency real-time multi-task is provided, promptly the critical piece of system can increase according to the requirement of application or delete.
ARINC429 is the special-purpose serial communication bus protocols of a kind of Aero-Space.Because the high speed and the reliability of the transmission information of ARINC429 own, it is applied in the avionics system of nearly all aircraft as a kind of general serial transmission bus standard.But various environmental factors on the aircraft, as shake, high low temperature, humidity and from the electromagnetic interference (EMI) of other equipment, the capital reduces the reliability of ARINC429 transmission information, so the high efficient and reliable communication at ARINC429 becomes very important, and redundancy is one of effective method that improves reliability of communication system.
At present, the normal the most simple and effective a kind of redundancy that adopts is exactly the hardware redundancy technology in the communication system, " dual-bus structure " in " serial port communication technology under the dual bus mode " literary composition, mentioned for example, be to come detection failure by fault test set, thereby realization communication redundancy, there is following technical bottleneck in this method: when break down when hardware detecting circuit self (1), can not monitor the state of principal and subordinate's passage, also can't finish the automatic switching function of principal and subordinate's passage; (2) owing to need the design hardware circuit, design of communication system and realization are complicated, have introduced additional insecure factor.
And for example in " the remaining design of aviation ARINC429 bus communication " literary composition, mention " design of redundant of information and realization ", it is the ARINC429 communication redundancy of realizing by Cyclic Redundancy Check, though this method has overcome the shortcoming of hardware redundancy, but coding is comparatively complicated, has increased the load of link.
Real-time is an important requirement in the communication technical field of real-time system in addition, and the above-mentioned redundancy approach of mentioning has all increased the complexity of system and the difficulty of design to a certain extent, thereby will inevitably reduce the real-time of system.
Summary of the invention
The objective of the invention is to overcome the many disadvantages of above-mentioned existing redundancy, a kind of ARINC429 communication redundancy method based on vxworks operating system is provided,, improve system real time to reduce the complicacy of hardware and coding.
In order to achieve the above object, technical scheme of the present invention may further comprise the steps:
(1) set up the ARINC429 communication channel of two independent communications between host computer and CPU, the cycle of carrying out is the cycle communication of period; Optional communication channel is as main channel A, and the communication port for giving tacit consent to, and selects an other channel B as alternate channel;
(2) calling the cycle that built-in function taskSpawn () creates based on operating system vxworks under the programmed environment of operating system vxworks is the periodic duty PCDeal of periodT, sends and handle the host computer data to receive; Create the first buffer circle RingAId and the second buffer circle RingBId is used for depositing the data that receive main channel A and alternate channel B respectively;
(3) write a channel selecting function C hoose429 () as follows:
3a) under the programmed environment of operating system vxworks, call among the operating system vxworks, obtain the byte number among buffer circle RingAId and the RingBId respectively the handling function rngNBytes () of buffer circle;
3b) create global variable NA as first counter, to byte number among the simultaneous RingAId be 0 and RingBId in byte number be not the inferior counting number of 0 this situation; Creating global variable NB as second counter, all is the inferior counting number that 0 this situation takes place to byte number among RingAId and the RingBId; If byte number is for being not 0 among RingAId and the RingBId, judge that then whether byte number if just adopt alternate channel B, otherwise adopts main channel A greater than byte number among the RingAId among the RingAId; If byte number takes place among the RingAId simultaneously is not 0 and RingBId in byte number be 0 this situation, then adopt main channel A;
3c) select a thresholding N, carry out abnormality detection,, switch to alternate channel B if the value of the first counter NA judges then that greater than this thresholding main channel A is unusual, otherwise rebound step 3a), writing of function C hoose429 () finished; If the value of the second counter NB judges then that greater than this thresholding two passages are all unusual, CPU does not receive data, enters secure operating mode, otherwise rebound step 3a), finish writing of function C hoose429 ().
(4) carry out creating of task PCDeal as follows by in the step (2):
4a) channel selecting function C the hoose429 () selector channel in the first invocation step (3) before each reception data;
4b) among the vxworks of call operation system to the operation built-in function rngBufGet () of buffer circle, read the data of this passage buffer circle, to finish reception to data.
In step (1), the work schedule of main channel A and alternate channel B and transmission data are identical, and the B passage is in the Hot Spare state.
In step (2), be the periodic duty that receives the host computer data by the mode of inquiry based on the task PCDeal of operating system vxworks, can require to change the period p eriodT of this task according to real-time.
At step 3b) in, the first counter NA adds at 1 o'clock, the second counter NB zero clearing; The second counter NB adds at 1 o'clock, the first counter NA zero clearing; When the situation outside any both of these case takes place, the first counter NA and second all zero clearings of counter NB.
At step 3c) described selection thresholding N, be that the communication cycle period according to host computer and CPU decides, promptly the execution time of N function C hoose429 () doubly equals the communication cycle period of host computer and CPU at least.
At step 4b) in, if the selected passage of task PCDeal call function Choose429 () is main channel A, from the second buffer circle RingBId, take out corresponding number when then task PCDeal peeks in the first buffer circle RingAId, and abandoning these data, realization main channel A and alternate channel B's is synchronous.
Combining information simultaneous techniques of the present invention and abnormality detection technology have following advantage:
(1) the present invention is because its task of receiving data is periodic duties, and the cycle can require to determine according to real-time, make communication system guarantee by redundancy on the basis of reliability, further satisfied the real-time requirement of system.
(2) periodic duty among the present invention is because advanced row of channels selection before each reception data; not only guaranteed to make corresponding processing timely when appearance is unusual; be switching channel or enter safe mode; also guaranteed after the abnormal restoring, in time reverted to automatically and adopt main channel communication.
(3) the present invention has simplified the processing to data owing to made full use of among the operating system vxworks the handling function of loop buffer.
(4) the present invention has realized detecting unusually to the synchronous of two channel transfer information with by gate method is set from software, has reduced the complicacy of system, has reduced the unreliable factor of system on hardware.
Description of drawings
Fig. 1 is realization flow figure of the present invention;
Fig. 2 is a process flow diagram of writing function C hoose429 () among the present invention;
Fig. 3 is the present invention makes different disposal according to the different situations of byte number among RingAId and the RingBId a process flow diagram;
Fig. 4 is that the present invention selects thresholding N to carry out the process flow diagram of abnormality detection.
Embodiment
Below in conjunction with accompanying drawing and program pseudo-code the specific embodiment of the present invention is elaborated:
In embodiment, the pseudo-code of the pairing function pcdeal of using of task PCDeal () is:
void?pcdeal()
{
……
while(1)
{
taskDelay(T);
Choose429();
……
}
……
}
The pseudo-code of the function C hoose429 () of the selector channel that uses is:
void?Choose429()
{
……
if()
{
……
NA=0;NB=0;
……
}
else?if()
{
NA++;NB=0;
if(NA<=N)
{
Choose429();
……
}
else
{
……
NA=0;
}
}
else?if()
{
NB++;NA=0;
if(NB<=N)
{
Choose429();
……
}
else
{
……
NB=0;
}
}
else
{
……
NA=0;NB=0;
}
……
}
With reference to Fig. 1, realization flow of the present invention is as follows:
Step 1 is set up communication port.
1a) from hardware, between host computer and CPU, set up the ARINC429 communication channel of two independent communications, the cycle of carrying out is the cycle communication of period;
1b) choose a communication channel wantonly as main channel A, and the communication port for giving tacit consent to, select an other channel B as alternate channel, the work schedule of main channel A and alternate channel B and transmission data are identical, and the B passage is in the Hot Spare state.
Step 2, creation task and buffer circle.
2a) calling the cycle that built-in function taskSpawn () creates based on operating system vxworks under the programmed environment of operating system vxworks is the periodic duty PCDeal of periodT, send and processing host computer data to receive, the concrete method of calling of function taskSpawn () is as follows:
taskSpawn(″PCDeal″,Priority,0,STACK_SIZE,(FUNCPTR)pcdeal,0,0,0,0,0,0,0,0,0,0)
Wherein, PCDeal is a task name, and Priority is the priority of this task, and STACK_SIZE is the storehouse size of Task Distribution, and pcdeal is the entry address of mission function.
Task PCDeal is that the mode by inquiry receives the periodic duty of host computer data, and requires to change the period p eriodT of this task according to real-time, changes periodT by the mode of calling the time-delay of built-in function taskDelay () change task;
2b) call built-in function rngCreate () and create the first buffer circle RingAId and the second buffer circle RingBId respectively, deposit the data that receive main channel A and alternate channel B respectively, when this function rngCreate () calls, there is an expression to receive the parameters R AM_VOLUME of the byte number of the needed buffer circle of host computer data, i.e. rngCreate (RAM_VOLUME).
Step 3 is write channel selecting function C hoose429 ().
With reference to Fig. 2, function C hoose429 () specifically to write flow process as follows:
3a) under the programmed environment of operating system vxworks, call among the operating system vxworks, obtain byte number among buffer circle RingAId and the RingBId respectively the handling function rngNBytes () of buffer circle;
3b),, do different processing with reference to Fig. 3 according to the different situations of byte number among the first buffer circle RingAId and the second buffer circle RingBId:
1. be that byte number is not 0 situation among the 0 and second buffer circle RingBId for byte number among the simultaneous first buffer circle RingAId, create the inferior counting number of global variable NA as first its generation of counter;
2. all be 0 situation for byte number among the first buffer circle RingAId and the second buffer circle RingBId, create the inferior counting number of global variable NB as second its generation of counter; Since the inferior counting number that the first counter NA and the second counter NB only recur corresponding situation, so the first counter NA adds at 1 o'clock, the second counter NB zero clearing; The second counter NB adds at 1 o'clock, the first counter NA zero clearing; When the situation outside any both of these case takes place, the first counter NA and second all zero clearings of counter NB;
3. 0 situation for byte number among the first buffer circle RingAId and the second buffer circle RingBId, judge that then whether byte number is greater than byte number among the first buffer circle RingAId among the second buffer circle RingBId, if just adopt alternate channel B, otherwise adopt main channel A; If byte number is not 0 among the first buffer circle RingAId and the second buffer circle RingBId, and the byte number of the number among the second buffer circle RingBId is greater than the byte number among the first buffer circle RingAId, represent that then data have appearred having lost unusually in A channel before this, discontinuous for the reception that prevents data, should adopt the B tunneling traffic;
4. be not that byte number is 0 situation among the 0 and second buffer circle RingBId for byte number among the first buffer circle RingAId takes place simultaneously, then adopt main channel A;
5. select a thresholding N to carry out abnormality detection, wherein thresholding N is that communication cycle period according to host computer and CPU decides, be the communication cycle period that equals execution time of N function C hoose429 () doubly host computer and CPU at least, the reason of doing like this is if passage does not all have data transmission in the time greater than the communication cycle period of host computer and CPU, then represents channel abnormal.
With reference to Fig. 4, above-mentioned steps 5. in the concrete grammar of abnormality detection as follows:
If, switch to alternate channel B, otherwise continue rebound step 3a if the value of the first counter NA judges then that greater than this thresholding main channel A is unusual), finish writing of function C hoose429 (); If the value of the second counter NB judges then that greater than this thresholding two passages are all unusual, CPU does not receive data, enters secure operating mode, otherwise rebound step 3a), finish writing of function C hoose429 ().
Step 4, carry out creating of task PCDeal as follows by in the step (2):
4a) channel selecting function C the hoose429 () selector channel in the first invocation step (3) before each reception data, so not only guaranteed to make corresponding processing timely when appearance is unusual, be switching channel or enter safe mode, also guaranteed after the abnormal restoring, in time reverted to automatically and adopt main channel communication;
4b) among the vxworks of call operation system to the operation built-in function rngBufGet () of buffer circle, read the data of this passage buffer circle, to finish reception to data.If the selected passage of task PCDeal call function Choose429 () is main channel A, from the second buffer circle RingBId, take out corresponding number when then task PCDeal peeks in the first buffer circle RingAId, and abandoning these data, realization main channel A and alternate channel B's is synchronous.If the communication channel of selecting is alternate channel B and since only in the first buffer circle RingAId byte number be just can select alternate channel B under 0 the situation, so need not guarantee synchronously from first buffer circle RingAId peek again.

Claims (6)

1. ARINC429 communication redundancy method based on vxworks operating system may further comprise the steps:
(1) set up the ARINC429 communication channel of two independent communications between host computer and CPU, the cycle of carrying out is the cycle communication of period; Optional communication channel is as main channel A, and the communication port for giving tacit consent to, and selects an other channel B as alternate channel;
(2) calling the cycle that built-in function taskSpawn () creates based on operating system vxworks under the programmed environment of operating system vxworks is the periodic duty PCDeal of periodT, sends and handle the host computer data to receive; Create the first buffer circle RingAId and the second buffer circle RingBId is used for depositing the data that receive main channel A and alternate channel B respectively;
(3) write a channel selecting function C hoose429 () as follows:
3a) under the programmed environment of operating system vxworks, call among the operating system vxworks, obtain the byte number among buffer circle RingAId and the RingBId respectively the handling function rngNBytes () of buffer circle;
3b) creating global variable NA as first counter, is that byte number is not the inferior counting number of 0 this situation among the 0 and second buffer circle RingBId to byte number among the simultaneous first buffer circle RingAId; Creating global variable NB as second counter, all is the inferior counting number that 0 this situation takes place to byte number among the first buffer circle RingAId and the second buffer circle RingBId; If byte number is not 0 among the first buffer circle RingAId and the second buffer circle RingBId, judge that then whether byte number is greater than byte number among the first buffer circle RingAId among the second buffer circle RingBId, if just adopt alternate channel B, otherwise adopt main channel A; Byte number is not that byte number is 0 this situation among the 0 and second buffer circle RingBId among the first buffer circle RingAId if take place simultaneously, then adopts main channel A;
3c) select a thresholding N, carry out abnormality detection, this thresholding N is that the communication cycle period according to host computer and CPU decides, if the value of the first counter NA is greater than this thresholding, judge that then main channel A is unusual, switch to alternate channel B, otherwise rebound step 3a), writing of function C hoose429 () finished; If the value of the second counter NB judges then that greater than this thresholding two passages are all unusual, CPU does not receive data, enters secure operating mode, otherwise rebound step 3a), finish writing of function C hoose429 ().
(4) carry out creating of task PCDeal as follows by in the step (2):
4a) channel selecting function C the hoose429 () selector channel in the first invocation step (3) before each reception data;
4b) among the vxworks of call operation system to the operation built-in function rngBufGet () of buffer circle, read the data of this passage buffer circle, to finish reception to data.
2. ARINC429 communication redundancy method as claimed in claim 1, in step (1), the work schedule of main channel A and alternate channel B and transmission data are identical, and the B passage is in the Hot Spare state.
3. ARINC429 communication redundancy method as claimed in claim 1, in step (2), task PCDeal based on operating system vxworks is the periodic duty that receives the host computer data by the mode of inquiry, can require to change the period p eriodT of this task according to real-time.
4. ARINC429 communication redundancy method as claimed in claim 1 is at step 3b) in, the first counter NA adds at 1 o'clock, the second counter NB zero clearing; The second counter NB adds at 1 o'clock, the first counter NA zero clearing; When the situation outside any both of these case takes place, the first counter NA and second all zero clearings of counter NB.
5. ARINC429 communication redundancy method as claimed in claim 1, at step 3c) described thresholding N is that communication cycle period according to host computer and CPU decides, promptly the execution time of N function C hoose429 () doubly is more than or equal to the communication cycle period of host computer and CPU.
6. ARINC429 communication redundancy method as claimed in claim 1, at step 4b) in, if the selected passage of task PCDeal call function Choose429 () is an A channel, from the second buffer circle RingBId, take out corresponding number when then task PCDeal peeks in the first buffer circle RingAId, and abandoning these data, realization main channel A and alternate channel B's is synchronous.
CN2009100232648A 2009-07-10 2009-07-10 ARINC 429 communication redundancy method based on vxworks operation system Expired - Fee Related CN101604270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100232648A CN101604270B (en) 2009-07-10 2009-07-10 ARINC 429 communication redundancy method based on vxworks operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100232648A CN101604270B (en) 2009-07-10 2009-07-10 ARINC 429 communication redundancy method based on vxworks operation system

Publications (2)

Publication Number Publication Date
CN101604270A CN101604270A (en) 2009-12-16
CN101604270B true CN101604270B (en) 2011-04-06

Family

ID=41470011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100232648A Expired - Fee Related CN101604270B (en) 2009-07-10 2009-07-10 ARINC 429 communication redundancy method based on vxworks operation system

Country Status (1)

Country Link
CN (1) CN101604270B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770411B (en) * 2009-12-31 2012-07-04 北京和利时系统工程有限公司 Method for automatically selecting redundant data, analyzer and method for realizing non-interference switch
CN102137028B (en) * 2011-05-06 2013-09-11 杭州华三通信技术有限公司 Method and device for realizing 1+1 redundancy on synchronous serial port
JP5969689B2 (en) * 2012-04-18 2016-08-17 アクメ パケット インコーポレイテッドAcme Packet, Inc. Redundancy for real-time communication
CN104378796A (en) * 2014-04-30 2015-02-25 许继电气股份有限公司 Redundant network seamless switching method and device
CN106200527A (en) * 2016-08-12 2016-12-07 中国航空工业集团公司西安飞行自动控制研究所 A kind of airborne air data system data capture method based on double remainings

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0413873A1 (en) * 1989-08-24 1991-02-27 International Business Machines Corporation Fast scheduler allowing transient computing overloads
US5261099A (en) * 1989-08-24 1993-11-09 International Business Machines Corp. Synchronous communications scheduler allowing transient computing overloads using a request buffer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0413873A1 (en) * 1989-08-24 1991-02-27 International Business Machines Corporation Fast scheduler allowing transient computing overloads
US5261099A (en) * 1989-08-24 1993-11-09 International Business Machines Corp. Synchronous communications scheduler allowing transient computing overloads using a request buffer

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
万风琴.智能化飞机燃油管理系统中的ARINC429通讯技术的研究.《航空精密制造技术》.2009,第45卷(第2期),39-42. *
刘宗玉,王玮,陈明,田洪波.综合导航系统中的实时多任务软件设计.《计算机工程与应用》.2004,185-187. *

Also Published As

Publication number Publication date
CN101604270A (en) 2009-12-16

Similar Documents

Publication Publication Date Title
CN105991384B (en) The space flight ethernet communication method of compatible time trigger Ethernet and 1553B
US8321612B2 (en) Method and device for synchronizing two bus systems by transmission of a time associated trigger signal from one system to another
CN101604270B (en) ARINC 429 communication redundancy method based on vxworks operation system
CN101188599B (en) Implementation method for load balance design of electric monitoring front system of power plant
CN110109872B (en) Unified storage management device for remote sensing satellite heterogeneous data
CN102907058B (en) The apparatus and method that sync-lock unit transmission is provided in the network for not having central authorities' control
US20100095090A1 (en) Barrier synchronization method, device, and multi-core processor
CN103516571A (en) System architecture and method for ensuring data communication reliability by means of double CAN buses
CN104025534A (en) Real-time distributed network slave device, real-time distributed network and method therefor
CN104054265A (en) Fault - tolerant power semiconductor switching device control system
CN103918238A (en) Real-time distributed network module, real-time distributed network and method therefor
US8094731B2 (en) System and method for transferring telemetry data between a ground station and a control center
CN103001843B (en) Based on the OPC protocol converter of embedded VxWorks
JP5772911B2 (en) Fault tolerant system
CN101251816A (en) Redundant system for programmable device and redundant implementing method
CN102724092A (en) Profibus-DP communication protocol redundancy master station
CN103618762A (en) System and method for enterprise service bus state pretreatment based on AOP
CN103731328B (en) System and method based on Linux Sharing Memory Realization home gateway data communication
CN104852939A (en) Capability interface deploying method and system
CN103246585A (en) Storage controller fault detecting method
CN105335146A (en) Software data traffic management method and portable electronic apparatus
CN101309184B (en) Method and apparatus detecting failure of micro-engine
CN102736594A (en) Modular design method of unified platform of intelligent power distribution terminal
CN1555513A (en) Method and device for determining time in a bus system and corresponding bus system
CN107153526A (en) A kind of parallel data reflow method under streaming 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
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110406

Termination date: 20180710

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