CSDB Bus Data Testing Technology Based on LabVIEW

Publisher:psi33Latest update time:2010-11-05 Source: 电子发烧友Keywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This paper analyzes and studies the CSDB bus protocol, and introduces the two-way communication between computer and UUT based on LabVIEW7.1 software development platform through the computer's RS-232 serial port and the corresponding level conversion circuit. Among them, the software implementation that supports communication is the key.

Figure 1 CSDB bus structure

Introduction to CSDB Bus Protocol

The physical layer of the CSDB bus architecture specifies the mechanical and electrical characteristics of the bus; the data link layer defines the data frame and the timing requirements between data frames, and makes detailed provisions for the parameters of various aviation equipment connected to the bus.

Physical Layer

CSDB is a unidirectional broadcast asynchronous serial bus standard, which can form a single-source, multi-receiver transmission system. The bus data is NRZ-encoded and transmitted in full-duplex differential mode. The data format of the CSDB signal is exactly the same as the RS-232-C standard, both of which are asynchronous serial communication formats, namely: one start bit, eight data bits, one parity bit, and one stop bit. Its electrical standard is RS-422-A.

Data Link Layer

The CSDB bus is a byte-oriented transmission protocol. Bytes of a fixed length form message blocks, which are then combined into frames. Different data encapsulated in a data frame are distinguished by their respective address bytes, and different data frames are separated by synchronization message blocks. The CSDB bus data structure is shown in Figure 1.

In Figure 1, the first byte of the message block, Byte 0, is called the identifier (or address), and message blocks are distinguished by identifiers. The length of a message block is fixed at 6 bytes. CSDB uses asynchronous serial transmission, and the bit synchronization of bytes is completed through the start bit and stop bit. Therefore, clock information is not required in the encoding. Frame synchronization is achieved by identifying the hexadecimal "A5" of the 6 bytes of the synchronization message block, which identifies the starting position of each data frame.

Where: t1 = frame time = 1/maximum update rate

t2 = long message block interval (unlimited)

t3 = bus idle time (minimum 11 bits)

t4 = byte gap duration (unlimited)

CSDB bus signal test[page]

Test Principle

To test the CSDB bus signal, the CSDB signal level is first converted to the RS-232 level that is compatible with the computer, and then according to the rules of the CSDB bus, the control information is correctly sent and the real-time feedback information is correctly received. If necessary, the useful information is sent to the test system for processing to complete the automated test of the aviation airborne equipment. The specific steps are divided into signal electrical conversion, communication synchronization, and LabVIEW implementation.

Figure 2 CSDB bus signal communication principle block diagram

Communication Configuration

(1) Electrical conversion

The CSDB bus signal directly communicates with the computer through the serial port after passing through the electrical conversion chip. When converting the electrical standard from RS-422-A to RS-232, the MAX488 full-duplex level conversion chip is used.

(2) Communication synchronization

The CSDB bus is an asynchronous serial communication. According to the basic principle of serial data transmission, the basic condition for achieving correct communication is to keep the clocks of the receiving and sending parties consistent, so as to avoid the cumulative error of the data bit width of the sending and receiving parties, resulting in the failure to correctly detect the bus data. In serial communication, information is transmitted bit by bit, and the transmission rate is expressed in baud rate. The sending and receiving of data are controlled by their own clocks. Therefore, the baud rate of the sender and the receiver should be consistent. After testing specific components, the baud rate of the CSDB data bus is 12.5Kbit/s. In order to synchronize with this, the baud rate generated by the computer should also be 12.5Kbit/s.

As shown in Figure 2, the device responsible for serial communication in the computer is the 8250 asynchronous communication adapter (UART), or its compatible components. The program controls the communication mode by reading and writing the internal registers of the 8250. The 8250 uses the reference clock input signal with a frequency of 1.8432MHz as the main data clock, and the required baud rate is obtained by setting the internal registers of the 8250. In asynchronous serial communication, in order to prevent misreading of data due to signal distortion, asynchrony, etc., the communication adapter stipulates that at least 16 clock pulses must be used to control its baud rate for each 1 bit of data read or sent. In actual applications, the baud rate clock is 1/16 or 1/(16×N) of the main clock. For the required baud rate, the divisor factor is calculated using the following formula when writing the register:

Divisor factor = (master data clock frequency / 16) / baud rate = 115200 / baud rate

After calculating the divisor factor, write the corresponding data into the baud rate setting register inside 8250, and you can get the corresponding baud rate data in the serial port. After calculation, 115200 divided by 12500 is not an integer. Therefore, due to the limitation of the computer asynchronous communication adapter 8250, the baud rate setting cannot be completely the same as 12.5Kbit/s. After calculation, when the divisor factor is 9, the corresponding baud rate is 12.8Kbit/s, which is closest to the baud rate required by the CSDB bus. Each bit occupies 78?S, and the error relative to 80?S/bit (12.5Kbit/s) is 0.25%, which is less than the maximum allowable error of the serial communication baud rate of 5%. In theory, communication synchronization can be achieved, so the communication baud rate is set to 12.8Kbit/s in the program. [page]

Bus Communication Based on LabVIEW7.1

When using LabVIEW7.1 programming to implement bus communication, users do not need to have a special understanding of GPIB, RS-232, VXI and other hardware. LabVIEW provides users with a standard I/O interface function library. In LabVIEW's Functions→All Functions→Instrument I/O, various function modules such as GPIB and serial communication are provided, providing a convenient implementation method for serial communication. The software flow is shown in Figure 3.

Figure 3 Serial communication software flow chart

Key issues and solutions in software design

(1) Diversified solutions for sending data frame structures

Through actual testing of different components in the system, it is found that due to different interconnection conditions, the frame structure of the control code of the corresponding components is also different. The synchronization word is followed by 1 to 4 control message blocks. In the automated test system, this communication software is required to be universal. For this reason, the control message block interface in the sending program is set to the maximum (4). When the program detects that a certain interface has data input, the data is sent. If not, it is replaced by a delay of equal length. In this way, while ensuring that all data frame cycles are the same, the different requirements of the control code of different components are met.

(2) Multiple verification of received data

In the data receiving program, LabVIEW requires setting the length of the receiving data buffer. The program can only perform subsequent processing after receiving data of this length. After the actual program is run, it is found that if the buffer length is only one frame (24×8bit), the received data may be received incorrectly. To avoid this situation, the buffer length is set to 4 to 6 times the word length of a frame. After receiving the data, it is verified according to the multiple matching principles such as synchronization words and labels, and then the data is taken out. Then the 4 to 6 groups of data are compared. If they are the same, the data is considered to be credible. If they are different, the data is considered to be unreliable.

Conclusion

When testing the CSDB bus data, the data to be sent can be easily changed through the interface, and the received data can also be displayed in real time, which is convenient for test analysis. This program is encapsulated into a sub-function module and can be applied to an aviation radio automatic test system. Based on the transceiver control of the CSDB bus, the automatic test of related products such as VIR-32 navigation receivers and VHF-22 very high frequency radios has been successfully realized.

Keywords:LabVIEW Reference address:CSDB Bus Data Testing Technology Based on LabVIEW

Previous article:A fast method to realize self-made portable virtual instrument
Next article:Design of a fiber optic current sensing system based on virtual instrument

Recommended ReadingLatest update time:2024-11-16 21:28

Developing a Part Finishing and Inspection System Using NI Smart Cameras and LabVIEW
Industry: Aerospace, Manufacturing, Imaging Products: LabVIEW, NI 1722 Challenge: Automated deburring and final inspection of turbine wings for aircraft engines. Solution: Built a robotic cell based on NI LabVIEW to precisely deburr and perform quality inspection of turbine wings using the NI 1722 smart camera. “U
[Test Measurement]
LabView Learning Notes (3) Temperature Monitoring
Use the random number generator to generate temperature values, set the upper limit of the temperature alarm, and use the Boolean switch to switch the temperature alarm function. When the current temperature value exceeds the set upper limit, the Boolean indicator lights up. The program flowchart is as follows:    
[Test Measurement]
Serial communication between PC and inverter using LabVIEW
In view of the characteristics of tribological experimental research, this paper adopts the widely used LabVIEW programming language to develop a serial communication program for controlling the operating frequency of the TECO 7200MA inverter. Due to the particularity of tribological testing machines and tribol
[Microcontroller]
The whole process of implementing PCI-1714 acquisition card based on LabVIEW language
1 Overview Laboratory Virtual Instrument Engineering Platform (LabVIEW) is a graphical software specifically used for data acquisition, analysis and instrument control. The virtual instruments it develops combine the powerful data processing capabilities of computers with the hardware test control capabilities
[Test Measurement]
The whole process of implementing PCI-1714 acquisition card based on LabVIEW language
Analysis of the method of naming files by time in LabVIEW
    I spent a long time this morning naming the collected data files using the system time, so I am going to organize them now, both for future use and to provide a reference for colleagues who have the same problem!     The screenshot of the program is as follows:    In the figure, "Basic Path" is used to
[Test Measurement]
Analysis of the method of naming files by time in LabVIEW
LabVIEW Robotics Module - Special Algorithms and APIs in the Robotics Palette
Overview This tutorial introduces the robotics algorithms that come with the LabVIEW Robotics Module software. From sensors to path planning, you can use this product to design the next generation of complex automation systems. The LabVIEW Robotics Module comes with a new, fully functional Robotics palette that co
[Test Measurement]
LabVIEW Robotics Module - Special Algorithms and APIs in the Robotics Palette
How to generate executable files/setup files in LabVIEW
How to create EXE and SETUP files Conditions: Labview Professional Edition Below, taking the Chinese version of Labview8.2 and a simple test system as an example, the specific steps for creating EXE files and SETUP files (installation files) are introduced. How to create an EXE file: 1. Place all the required files
[Test Measurement]
Test of the volt-ampere characteristics of a single junction transistor based on LabVIEW
The unijunction transistor is a new type of electronic device developed in recent years. It has an important electrical property, namely the negative resistance characteristic, which can greatly simplify the structure of various pulse generating unit circuits such as self-excited multivibrator, step wave generator a
[Test Measurement]
Test of the volt-ampere characteristics of a single junction transistor based on LabVIEW
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号