The ARINC 429 bus is an aviation digital bus transmission standard developed by Aeronautical Radio Corporation (ARINC), defining a specification for communication between avionics equipment and systems. With the development of the domestic aviation industry, the application of the ARINC 429 bus has become increasingly widespread, and it has been extended to many aviation equipment. At the same time, there is a significant demand for 429 signal testing in the inspection and maintenance of many airborne equipment. This makes the simulation and testing of 429 signals crucial. This paper uses a commercially available, mature PCI-based 429 transceiver board, with LabWindows/CVI as the software development environment, to design and implement the simulation and testing of 429 signals, achieving the goal of completing 429 signal testing tasks using a personal computer. ARINC 429 Bus Introduction : The ARINC 429 protocol specifies the use of twisted-pair shielded wire to transmit digital data information serially. Information is transmitted unidirectionally, meaning only one transmitting device is allowed on the bus, and multiple (≤20) receiving devices are permitted. The bus data transmission rate is 12.5–100 kbps, and the transmission word is 32 bits. The code pattern on the line is bipolar return-to-zero code. The signal voltage range on each line is between +5V and -5V. One line is called A (or +), and the other is called B (or -). There are three logical relationships between the differential signals on the two lines: when the differential voltage between A and B is 7.25V to 11V, it represents logic 1, i.e., HI; when the differential voltage between A and B is -0.5V to 0.5V, it represents NULL; and when the differential voltage between A and B is -11V to -7.25V, it represents logic 0, i.e., LO. The specific encoding method is shown in Figure 1.
[align=center]Figure 1. ARINC429 Bipolar Return-to-Zero Encoding Diagram[/align] According to the specification, the 32 data bits of an ARINC429 word are divided into five basic regions: Parity, SSM, DATA, SDI, and LABEL, as shown in Figure 2. Bits 1-8 are label bits (LABEL), marking the type of information included in this transmitted word. Through these data labels, the receiving device can easily determine the purpose of the received word. Bits 9-10 are Source Terminal Identifier (SDI), indicating the source or terminal of the information. Bits 11-28 or 29 are data bits (Data Field), which are the information used for transmission. Bits 29 to 30 or 31 are Symbol State Matrix (SSM), indicating the characteristics of the data or word type, and can also represent the status information of the transmitting device. Bit 32 is the parity bit (P), implementing a simple data verification function.
[align=center]Figure 2 429 Signal 32-bit Word Format[/align] Basic Design Concept The simulation and testing of the aviation 429 bus signal adopted the design concept of a virtual instrument. Simply put, a virtual instrument is a general-purpose computer plus software and hardware. The hardware is used to solve the input and output problems of the signal, and the software is used to implement functions such as signal processing and display. It utilizes the powerful support of computers, allowing users to easily maintain, expand, and upgrade it. Compared with traditional instruments, virtual instruments have high flexibility, and their functions can be defined by programming software. Currently, widely used software in this field includes NI's LabVIEW and LabWindows/CVI, HP's VEE, etc. In the design, the hardware uses a 429 signal transceiver board based on a PCI slot. Inserting it into a general-purpose computer's PCI slot meets the hardware requirements for testing, realizing the transmission and reception of 429 signals; the software uses NI's LabWindows/CVI as the development platform, mainly used to complete data preparation before transmission, processing and display of received data, etc. Design and Implementation Methodology The hardware used is the EXC_M4K429RTx module board, distributed by Xi'an Fangyuanming Company. The basic structure of this board is shown in Figure 3.
[align=center]Figure 3 M4K429RTx Board Structure Schematic[/align][align=left] Its main performance parameters include: support for 5 to 10 channels, each channel supporting customizable transmission and reception; signal transmission rate adjustable from 12.5 to 100Kbps; 4K×8 dual-port RAM as data transmission and reception buffer; support for parity check and programmable output hardware triggering, interrupt, and selection modes; the transmission channel supports three transmission modes: single transmission, one-time transmission, and cyclic transmission; the reception channel supports polling reception, single-channel continuous reception, and multi-channel continuous reception modes; programmable transmission word interval; support for adding time stamps; and error correction function. Software support: Provides a C driver running under Windows; supports development using software such as VC, LabVIEW, Delphi, and LabWindows/CVI.[/align][align=left] Software Design The software design mainly includes two aspects: one is designing and implementing the transmission of 29 signals, i.e., signal simulation; the other is implementing the reception of 429 signals and processing them appropriately, including how to display them, i.e., signal detection. The design flow of the sending section is shown in Figure 4, and the working interface is shown in Figure 5.
Figure 4 Data Sending Flowchart Figure 5 Sending InterfaceFirst, enter the device number, module number, and select the transmission channel. Initialize the board by calling the board function `Init_Module_RTx` to obtain a handle for operating the board. Clicking the "Open Board" button completes this step. Then, call the board's attribute setting function `Setup_Transmit_Channel_RTx` to set the transmission channel's attributes, including transmission mode, data rate, transmission time interval, and parity. These attribute values are obtained through the panel controls. For example, the transmission mode can be selected from single, single, and cyclic transmission. The transmission rate is selectable from 12.5 to 100 Kbps. The key to this design is obtaining the standard 32-bit 429 code and placing it into the transmission register according to the board's hardware specifications. As shown in Figure 5, input the data information to be transmitted in the transmission data area. Since the padding method of the 429 signal data bits is divided into two types depending on the data type, one is padding according to BCD code and the other is padding according to BNR code, when writing the software, it is necessary to first determine the label type, determine the padding method of the data, and then merge them into 32-bit 429 code information that conforms to its data type. Then, according to the transmission format shown in Figure 6, it is divided into two groups of codes, the high 16 bits and the low 16 bits, and placed into the high and low bits of the transmission register respectively, so that it can be sent out correctly.
Figure 6 Code format in the transmit registerThe following is a partial code snippet showing how to fill the data area using the BNR (Browser Noise Reduction) method. It primarily employs bit operations to generate and split the 32-bit code. int generate32 (int tr_data, int lab, int ssm, int sdi) // Generate 32-bit code { int data, i, j = 0; tr_data = tr_data << 10; ssm = ssm << 29; sdi = sdi << 8; data = tr_data | lab | ssm | sdi; return data32; } Lo = (data32 & 0x00ffff00) >> 8; // Generate the lower 16 bits for (i = 0; i < 8; i++) // Reverse the label bits { real_lab = (lab >> i) % 2; temp_lab = temp_lab | (real_lab << (7 - i)); real_lab = 0; } Hi = ((data32 & 0xff00000 0) >> 24) | (temp_lab << 8); //Generate the high 16-bit code for debugging proof. With the above data preparation, a compliant 429 code can be sent. • Receiving Section: The front-end design of the receiving section is the same as the transmitting section. Figure 7 shows the designed receiving interface. Initialization of the board and setting of receiving attributes must also be performed at the beginning, completed by calling the Setup_Receive_Channel_RTx function.
Figure 7 Receiving InterfaceWhen receiving data begins, the receive register receives two sets of codes: the high 16 bits and the low 16 bits (the data format is exactly the same as the sending part, see Figure 6). In the standard mode of the board, it also receives a time label represented by two 16-bit codes and a board status return value represented by one 16-bit code. To correctly identify the information in each code segment, the key is the processing of the data bits. Different codes need to be written according to different data filling methods. Taking BNR code filling as an example, the code for reading each segment of the 32-bit code is given. Following the same logic, the identification program for the BCD code-filled data area and the identification of the time label can be obtained. data = ((hi&0x0000001f)<<14)|(lo>>2); //Merge the data codes at both ends and read the data lab = (hi&0xff00)>>8; //Read the label for (i=0;i<8;i++) l {real_lab=(lab>>i)%2; temp_lab=temp_lab|(real_lab<<(7-i)); real_lab=0;} lab=temp_lab; ssm=(hi&0x00000060)>>5; //Read ssm sdi=lo&0x00000003; //Read sdi The above program can read the segment information of the 429 code. For this information, CVI programming supports display methods including table cycle display, dial display, etc. · Trigger and interrupt handling For the trigger and interrupt problems in signal transmission and reception, the board itself supports hardware trigger and interrupt. At the same time, it can also be implemented using the Timer control provided by CVI. The trigger time can be controlled by setting the timer interval through the panel control, and the interrupt can be implemented by setting the Timer to be off. Conclusion This design adopts the virtual instrument design concept and has successfully completed the simulation and detection tasks of various 429 bus signals in the automatic detection system developed for a certain type of aircraft. In addition, this method can also select multiple channels to work simultaneously as needed, and take advantage of the flexibility of virtual instruments to perform various processing and display of 429 signals. References: 1. Zhang Yi, Zhou Shaolei, et al., Analysis and Design of Virtual Instrument Technology [M], Machinery Industry Press, 2004. 2. 429RTx & Discrete Software Tools Programmer's Reference [M]. Excalibur System Inc., 2003. 3. M4K429RTx User's Manual [M]. Excalibur System Inc., 2006. 4. Wang Jianxin, Yang Shifeng, et al., LabWindows/CVI Testing Technology and Engineering Applications [M], Chemical Industry Press, 2006. Editor: He Shiping