Study on the Implementation Method of Data Review for a Certain Weapon System in VxWorks

In the researching and using process of a certain large weapon system, the practical navigation data was the most important and effective way for the system analysis and the fault reoccurrence. Aiming at the characteristics of the weapon launching and control system such as multiple data types, complex data property, and complex data management, the embedded computer system based on VxWorks is used in this article to realize the review of multiple kinds of data by the timer interrupt mode, and through relative experiments, the result showed that the real-time review system of the large-capacity practical navigation data designed in this article was effective and reliable, completely fulfilling the design requirements.


Introduction
In the researching process of the underwater weapons, to check and evaluate the launching and control system and the self-navigation system, the corresponding practical navigation experiments must be implemented to test the functions and reliabilities of the weapon system and the self-navigation system.However, because of expensive practical experiment cost and the influences of many factors such as weather and sea state, the experiment times would be less, and for the weapon system, the laughing state, sea state, and exterior environment would be different, and the targets would be largely different too, so each state in each laughing process should be recorded real time for the data review and analysis in the future.For the researching processing, this systematic work is very important, and it could largely reduce the experiment times, save cost, reduce the research period, effectively analyze the experiment data, and find and analyze problems by reviewing the fault problem especially.

System components
The upper computer and the lower computer in the system are all military reinforced computers, with VxWorks operation system.The system components are seen in Figure 1.In Figure 1, the upper computer mainly deals with the operation inputs and displays the data real time, and the lower computer mainly deals with the interaction with various exterior devices, and the interfaces of exterior devices are seen in Table 1.The function components are seen in Figure 2.
(1) Main function indexes of the AD interface 12 high speed input channels; 16bits resolution, independent converter in each channel; 400 sampling rate highest, and adjustable program; 32K dynamic cache; Interrupt sources.There are 7 interrupt sources, and the No.2, the No.3, and the No.4 interrupt source respectively are the cache empty interrupt source, the full interrupt source with less 1/4 cache data, and the full interrupt source with less 3/4 cache data.When the data in the cache are less than the corresponding capacity, the D/A interface would send corresponding interrupt request to the computer, and set up the interrupt flag as "1".This interrupt flag could be used for the software inquiry.In the successive data review, to prevent data overflow or the cache empty and the data sampling clock samples the data in void, the data of the board card in the cache should be in 1/4 full to 3/4 full.

Review data source
For the real-time data review system, the data which need be reviewed have many types and complex structures, and large data belong to random data such as the network data, the series data, and the USB data.At the same time, the data acquired by the AD have many characteristics such as large data quantity, high requirements to the system, and more resource occupations.Therefore, the data sources should be processed respectively, and the random data should be time-stamped, and because of concrete data sampling rate and exact sampling time, the data acquired by AD needs not timestamp, but the sampling time should be sighed when the acquirement time starts, and the data format is the pure binary mode, and there are most 12 data channels.The types of the review data sources are seen in Table 2.

Software design
There are three data transmission modes to realize the signal output, i.e. the inquiry mode, the timer interrupt mode, and the hardware interrupt mode.The VxWorks embedded real-time operation system is adopted in this system and the frequency of data review could achieve most 50 KHz, and the review interval between each two pieces of data is 0.02ms.Because the inquiry mode could occupy vast CPU resources, and low speed could induce that the data review could not be aligned, only the timer interrupt mode is adopted in this system.

Confirmation of data frame
The dynamic cache of the D/A board adopted in this system is 32K, and the data flow modes of cache include the opening data flow mode and the double-cache data flow mode.In the storing and reviewing process of data, the AD data act the clock, and each 500 pieces of data are a frame structure, and the network data, the series data, CAN bus data, the digital IO data, and the USB data arrived randomly would be recorded at the same time.In the reviewing process, the data are stored and read according to the structure of frame.The frame structure is seen in Figure 3.The AD high speed data is stored according to the structure of double-cache, and in the storing and reviewing process, one data frame is a data block which is the reference to store the data and refresh the screen, and the random data arrived randomly would be stored in same one block data, and each piece of data would be time-stamped when it is stored, and it would be reviewed according to the timestamp, and the time precision is 0.04 second, which could not only ensure the continuity of vision, but fulfill the requirement of the system to the resources.

Software design
According to the frame time defined, the time interval of the timer interrupt is 40ms, so "tick=40ms" must be defined before the interrupt transfer of software, which is realized by the order of "sysClkRateSet(400)" in the program.The main function to realize the timer interrupt can be described as follows.STATUS sysClkConnect ( FUNCPTR routine, /* routine called at each system clock */ /* interrupt */ int arg /* argument with which to call routine */ ) void sysClkEnable (void) The software flow chart of timer interrupt is seen in Figure 4.

Result of data review
The system is tested based on the practical navigation experiment, and the experiment data quantities respectively include following aspects.
(1) AD data quantity: about 12 million bytes, and one exterior device which analog channel number is 4, and the sampling rate is 10K, and the data resolution rate is 8 bit, and the data review time is 20 minutes.(2) Network data quantity: 2.7 million bytes, and 8 exterior devices.
The processing method of data loss in the data review is to analyze the data acquired by AD, and if there is data loss, it indicates that the faults exist in the data review, because the data acquisition of AD is acquired and reviewed according to the sampling rate, so this channel should be the main observation channel, and the data reviewed acquired by AD is seen in Figure 5. From Figure 5, the review system designed in the system has not data loss, and the data clock is not distorted, and through the CPU analysis, the review system occupied less system resources, and the memory occupation was less than 30M, and the CPU occupation time was less than 50%, which were all fulfill the successive requirements of the system.

Conclusions
The design and implementation of the data review system of certain weapon system are introduced in this article, and this system includes about 20 exterior devices, and the data types are very complex, and the data quantity is large.Through effectively analyzing the characteristics of the data, the data frame structure is designed, and the review data flow control is completed by the timer interrupt mode.The practical navigation experiment showed that the data review system designed in this system was stable and reliable, and it could effectively record and review the data without errors.References Bradley K,Strosnider J K. ( 1998).An Application of Complex Task Modeling.Real-Time Technology and Applications Journal.No.43(4).P. 85-90.Wind River Inc. (1999) (2) Main function indexes of the network interface 10M/100M self-adaptive network interface; The communication is implemented by the UDP/IP protocol.(3) Main function indexes of the series communication controller 4 RS232 interfaces, with the work Baud rate of 9600bps; 2 RS485 interfaces, with the work Baud rate of 9600bps.(4) Main function indexes of the CAN bus controller The work Baud rate is 1Mbps.(5) Main function indexes of the DA interface 12bits resolution.

Figure
Figure 2. Function Components