Share this

Development of a Vehicle CAN Bus Monitoring System Based on Virtual Instruments

2026-04-06 02:23:06 · · #1
To meet the requirements of data acquisition for road tests of fuel cell vehicles, an on-board CAN bus monitoring system was developed. The system hardware was designed based on a portable industrial control computer and a communication interface card, and the system software was developed using a virtual instrument development platform. The system realizes data acquisition, status monitoring and data storage of the vehicle CAN network. Practical application shows that the system works reliably. Due to energy and pollution issues, electric vehicles are becoming a hot topic in automotive technology research and development. Electric vehicles are divided into pure electric vehicles, hybrid electric vehicles and fuel cell vehicles, etc., and are an environmentally friendly advanced means of transportation [1-2]. At present, electric vehicles generally adopt a vehicle communication control system based on CAN (Control Area Network) bus. CAN bus is a serial communication network that effectively supports distributed control or real-time control. It has the characteristics of strong real-time performance, long transmission distance, strong anti-interference ability and low cost, and has been widely used in automotive communication networks [3]. During the development of automobiles, it is necessary to collect and monitor the vehicle's operating parameters in order to analyze the operating status of each component and optimize and improve the vehicle control strategy. In the durability test of the vehicle, it is also necessary to collect and record the operating data throughout the process in order to analyze the performance changes of the vehicle and its components. Therefore, the vehicle-mounted CAN bus monitoring system is an important tool for the research and development of electric vehicles. This paper focuses on the development of the vehicle-mounted CAN bus monitoring system and its application in road testing of fuel cell vehicles. 1. Vehicle CAN Network Structure and Communication Protocol In electric vehicles, the vehicle controller communicates with components such as the motor and battery via the CAN bus, reading the status information of each component and sending control information to them. Figure 1 shows a CAN network structure for a fuel cell vehicle. The vehicle controller collects status parameters of components such as the fuel cell, DC/DC converter, battery, and motor through the CAN network, and sends control commands to the DC/DC converter and motor according to a certain control strategy, enabling the components of the power system to work in coordination and achieving the vehicle's power and economic performance indicators. The monitoring system is connected to the CAN bus, reads the data frames of the bus, and realizes data acquisition and storage. In the CAN network, data is transmitted in units of messages, and nodes access the bus using bit arbitration. The beginning part of the message is an identifier, which uses a 29-bit format in CAN 2.0B, as shown in Figure 2. The priority is 3 bits, with a total of 8 priority levels; the 8-bit PS is the source address sending the message, the 8-bit SA is the destination address, and the 8-bit PF is the message code. The monitoring system is connected to the vehicle's CAN network and can receive all data frames on the bus. A CAN data frame includes an identifier and 8 bytes of data. The identifier determines which component sent the data frame, and the actual parameter values ​​can be obtained by parsing the 8 bytes of data according to the component's communication protocol. Figure 3 shows the format of a data frame sent from the fuel cell controller to the vehicle controller in a fuel cell vehicle. The identifier ID is 29 bits of data. According to the identifier format definition, the fuel cell address is 11, the vehicle controller address is 10, and the data frame priority is 3. The data section includes information such as fuel cell output voltage, fuel cell output current, stack temperature, fault codes, status bits, and the controller LIFE signal. 2. Monitoring System Hardware Design The hardware structure of the vehicle-mounted CAN bus monitoring system is shown in Figure 4, and it adopts a hardware design based on a PC bus industrial control computer (IPC). The portable industrial PC Apollo150 features anti-interference and shock-absorbing design, making it suitable for vehicle use. It integrates an LCD screen and keyboard/mouse for easy human-machine interface design. A USB 2.0 interface allows for reliable storage of large amounts of data in a vehicle environment. Data acquisition and communication interfaces can be expanded via PCI and ISA expansion slots. Fuel cell vehicles provide 24V DC power, which is converted to 220V AC by an inverter and then powered by a UPS. The IPC-based hardware architecture offers high reliability and easy expansion, while leveraging the powerful hardware and software resources of a PC to improve development efficiency. The CAN communication interface card uses a PCI7841 dual-port isolated CAN interface card, which plugs into the Apollo150's PCI expansion slot. It employs an SJA1000 CAN controller and an 82C250 CAN receiver chip, providing bus arbitration and error detection functions to ensure reliable data communication. The PCI7841 has two independent CAN interfaces with a maximum communication rate of 1Mbps. 3 Monitoring System Software Design 3.1 Software Functional Requirements Analysis The main functions of the CAN bus monitoring system software include data acquisition, fault diagnosis, interface display and data storage. The data acquisition function collects data frames on the CAN network of the whole vehicle, parses the data according to the communication protocol, and extracts the corresponding data; the fault diagnosis function analyzes the fault codes in the data frames sent by the components and judges the fault information of the current system; the interface display function displays the collected data on the LCD screen in various forms; the data storage function stores the collected data continuously on the USB flash drive in the form of files. 3.2 Software Design Based on Virtual Instruments Virtual instrument technology has become the mainstream technology in the testing field. A virtual instrument system mainly consists of instrument hardware, computer hardware and application software. The application software includes three parts: development environment, application program and instrument driver [4]. LabVIEW is a virtual instrument development platform launched by NI. It adopts a graphical programming language, has powerful human-machine interface design and data analysis and processing functions, and provides rich instrument drivers, which facilitates the rapid creation of flexible and reliable application systems. The virtual instrument architecture based on the LabVIEW environment is shown in Figure 5. The CAN bus monitoring system software is developed using the virtual instrument development platform LabVIEW. The instrument hardware part includes a portable industrial computer and a PCI bus CAN communication interface card. The PCI-7841 CAN interface card provides Windows 2000/XP drivers in the form of dynamic link libraries (DLLs), which are used in LabVIEW to implement instrument drivers for third-party hardware. The main driver functions provided by the PCI-7841 are shown in Table 1. The vehicle-mounted CAN bus monitoring system adopts a PC architecture and a high-performance data communication interface card. Utilizing the instrument drivers, interface controls, and application development and debugging environment of the virtual instrument software development platform, the system's reliability and development efficiency are improved. 3.3 Monitoring Software Flow Design The CAN bus monitoring program flow is shown in Figure 6. First, hardware initialization is performed, and a file directory is created. After reading the CAN information frame, it is parsed according to the protocol. First, the data frame is separated into an ID part and a data part. The ID determines which component's information it belongs to. Then, the data is extracted according to the parameters defined in the protocol: the starting byte and the total number of bytes. The actual value of the parameter is obtained after calculation using the offset and scaling factor. Since the CAN network includes the vehicle controller and the controller nodes of each component, there are multiple data frames in the buffer at the current moment. When the monitoring program enters the data reading loop, it continuously reads the CAN data in the buffer until the buffer data is completely read, thus ensuring the real-time performance of the data reading. The read data is continuously stored on a USB flash drive at a frequency of 10Hz. Due to the large amount of data, to avoid excessively large data files, the monitoring system recreates the file every hour, generating a filename based on the current time. The monitoring program terminates when the user presses the end button. 4. Application Examples In the road test of fuel cell vehicles, an on-board CAN bus monitoring system is used to collect and record vehicle CAN network data. Figure 7 shows the collected vehicle speed curve, and Figure 8 shows the fuel cell voltage and current curves. The vehicle speed data comes from the vehicle controller, while the voltage and current data come from the fuel cell engine controller. References 1 Szumanowski A. Fundamentals of Hybrid Electric Vehicles. Beijing: Beijing Institute of Technology Press, 2001 2 Ouyang Minggao. Development Strategy and Countermeasures for Energy-Saving and New Energy Vehicle Technology in China. China Science and Technology Industry, 2006; (2) 3 Huang Xiangdong, Wang Shengyong, Zhao Kegang, et al. Communication of HEV Distributed Control System Based on CAN Bus. Journal of South China University of Technology, 2004; (5) 4 Yang Leping, Li Haitao, Xiao Kai. Introduction to Virtual Instrument Technology. Beijing: Electronic Industry Press, 2002
Read next

CATDOLL 108CM Coco (TPE Body with Hard Silicone Head) (Dark Tan Tone)

Height: 108cm Weight: 14.5kg Shoulder Width: 26cm Bust/Waist/Hip: 51/47/59cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22
CATDOLL Momoko Soft Silicone Head

CATDOLL Momoko Soft Silicone Head

Articles
2026-02-22
CATDOLL Bebe Hard Silicone Head

CATDOLL Bebe Hard Silicone Head

Articles
2026-02-22
CATDOLL 102CM Li Anime Doll

CATDOLL 102CM Li Anime Doll

Articles
2026-02-22