【正文】
軟件按模塊化設(shè)計,易進行功能擴充,可根據(jù)不同數(shù)據(jù)分析算法的要求進行升級,而硬件可保持不變。而與軟件采集和分析算法無關(guān)。圖5 8路數(shù)據(jù)采集與分析系統(tǒng)5 結(jié)束語 多路數(shù)據(jù)采集與分析系統(tǒng)對硬件的要求簡單,容易組建,可應(yīng)用在各種測試場合,它可同時測試多個產(chǎn)品,從而降低測試成本,提高工作效率。4 系統(tǒng)測試結(jié)果圖5為8路數(shù)據(jù)采集于分析系統(tǒng),同時進行2個三軸陀螺和1個單軸陀螺共7路數(shù)據(jù)的測試情況。在該模塊中還可對其算法功能進行任意的擴充,形成一個算法程序庫以適應(yīng)不同的數(shù)據(jù)分析。分析模塊的程序框圖如圖4所示。 數(shù)據(jù)分析模塊在數(shù)據(jù)分析模塊中可以加如算法分析、圖表顯示和打印輸出等有用的功能,如陀螺零位穩(wěn)定性標準差算法功能就可在測試過程中實時計算零位穩(wěn)定性,并通過圖表顯示。另外,還可在軟件中加入一些濾波算法(如限幅濾波法等)過濾掉人為或其他干擾因素所造成的突變數(shù)據(jù)。這時若進行數(shù)據(jù)采集,將采集到錯誤的數(shù)據(jù),故需在軟件中加入一些算法來避免這種情況發(fā)生。圖2數(shù)據(jù)采集程序流程圖程序開始時,控制同代選擇器和存儲數(shù)據(jù)的緩沖器同時切換到相同的通道號,循環(huán)采集8路數(shù)據(jù)和進行指令判斷,在沒有接受到結(jié)束指令時,一直做循環(huán)采集。 數(shù)據(jù)采集模塊數(shù)據(jù)采集模塊把8個通道的數(shù)據(jù)在一個周期內(nèi)全部采集到計算機中,并保存在和通道號相應(yīng)的數(shù)據(jù)緩沖器中。該程序中采用一個單獨的線程進行數(shù)據(jù)采集,如此能量最大限度的保證采集的實時性;采用另一個線程同時進行數(shù)據(jù)處理,這樣避免了單線程程序同一時間只能執(zhí)行一個功能的缺點。軟件系統(tǒng)從下至上可分為通信協(xié)議層、功能模塊和用戶界面三層。系統(tǒng)工作過程中,通道控制好模塊和數(shù)據(jù)采集模塊的同步顯得特別重要,因為不同通道的數(shù)據(jù)需要存儲在對應(yīng)的數(shù)據(jù)緩沖池中,這由軟件進行控制。在傳輸距離較短、傳輸?shù)臄?shù)據(jù)量較大的情況下,可采用并行端口(如GPIB、LPT等)進行通信。另外,串行通信一次只傳1個位,處理的數(shù)據(jù)電壓只有一個標準電位,因此較不易發(fā)生數(shù)據(jù)錯誤。8路通道選擇器利用一個8選1的模擬開關(guān)和相關(guān)電路組成,它的控制信號由計算機的并行端口提供,并滿足表1所示。圖1 系統(tǒng)工作原理框圖在整個測試過程中,所有的控制操作都有軟件自動完成,不需人為干預(yù)。系統(tǒng)的工作原理如圖1所示。1 系統(tǒng)原理該系統(tǒng)有硬件系統(tǒng)和軟件系統(tǒng)組成。若要同時測試多個產(chǎn)品,就需多個系統(tǒng),在測試產(chǎn)品量較大時,工作效率低,如組成多套測試系統(tǒng),增加了成本。關(guān)鍵詞:通信端口;數(shù)據(jù)采集;陀螺;測試隨著計算機技術(shù)的發(fā)展和測量儀表的數(shù)字化,通常利用計算機和測量儀表相互通信進行數(shù)據(jù)的實時采集,并利用計算機強大的運算能力進行數(shù)據(jù)的分析處理。該系統(tǒng)可并行測多個產(chǎn)品,從而降低測試成本,提高工作效率。 using another thread at the same time data processing, such procedures to avoid a singlethreaded the same time only the implementation of a functional deficiencies. Especially when the amount of data collection, data processing task, using multithreaded technology will greatly improve the efficiency of the system as a whole. Data Acquisition ModuleData acquisition modules to eight channels of data in a cycle of all the acquisition to the puter, and save the channel, and the corresponding data in the buffer. Its procedures diagram shown in Figure 2.Fig 2 Flow diagram of data acquisitionAt the beginning of procedures, with the choice of control and store data buffer at the same time to switch to the same channel, 8way data collection cycle and mand judgement, in the end not received orders, has recycling collection to do.Multichannel data acquisition process the data vulnerable to interference, especially in the fastchannel switching, the data vulnerable to fluctuations, as shown in Figure 3. At this time if the data collection, will be collecting the wrong data, the need to add some software algorithms to prevent this from happening. If we develop the automated data tracking algorithm to automatically track each channel data to determine whether the channel in a stable state, and only the stability of data acquisition, the volatility of other data. In addition, the software can also add some filtering algorithm (such as limiting filter, etc.) to filter out manmade interference or other factors caused by the mutation data. Limiting filter for(1)Figure 3 channel switching, the data volatilityWhen the new collected data and the data before a difference to the absolute value of more than one set of values that the data is invalid, and the previous data from the current data. Data Analysis ModuleIn the data analysis module can be added if the algorithm analysis, graphics display and print output, and other useful features, such as gyroscopes and stability in the standard deviation algorithm can function in the course of testing realtime calculation of zero stability, and through chart shows. Zero stability calculation formula as follows:(2)According to first(2) to prepare an algorithm function, and then call in the analysis module. Analysis module diagram of the procedure shown in Figure 4.Figure 4 data analysis process flow chartBecause the system uses multithreaded technology, in the cycle of operation and will not affect the acquisition module39。 testWith the development of puter technology and the digital measuring instrument, usually by puter and measuring instruments to municate with each other in realtime data collection and use of puter powerful puting capability to conduct the analysis of the data processing. Particularly in the large volume of data, measuring the length of time occasions, such as the Gyrotilt test, using puter for automatic control of measuring instruments, automatic data acquisition and analysis it is particularly important, can save a lot of manpower and material resources to improve work efficiency, reduce costs , The conventional method of testing is usually a measuring instrument at the same time can only test a product, namely a puter and a measuring instrument test system can only be posed of serial testing. To test multiple products at the same time, they need multiple systems, testing products in large volume, low efficiency, such as the position of several sets of test system, an increase of cost. First on a machine with a PC and a measuring instrument consisting of 8way data collection and analysis system, which can carry out multiple sets of product testing, at no additional cost on the basis of a puter give full play to the advantages of automatic test, Improve work efficiency. 1 PrincipleThe system hardware and software system. A PC through a RS232 port and a measuring instrument connected, PCparallel port (LPT) and an 8way channel selector attached to a 8way connector will channel selector were connected with a number of test products.The working principle as shown in Figure 1. The course of testing, puter through the parallel port 8way control channel selection, were open different channels, each channel for data transmission by choosing to measuring instruments, measuring instruments through the RS232 port to the puter data sent to save, A plete cycle of all channels of data collection, and this has also tested a number of product features.Figure 1 system block diagram of workThroughout the course of testing, all the control operations have pleted the software a