Serial communication of the linear motor test bench for maglev trains
2026-04-06 07:38:47··#1
Abstract : This paper addresses the serial communication problem of a linear motor experimental platform for maglev trains. The system hardware structure and software design are introduced, and two schemes based on Visual C++ 6.0 programming and a method for implementation using assembly language on a microcontroller are presented. Keywords : Serial communication, Visual C++ 6.0, Assembly language 1 Introduction The construction of the Qingcheng Mountain Maglev Train Experimental Demonstration Line at Southwest Jiaotong University has been basically completed. To date, the linear motors and levitation electromagnets of the two maglev trains have not undergone high-speed testing. The completion of the linear motor experimental platform provides experimental basis for the design of electromagnetic components of the maglev train. In on-site control, a microcontroller is generally used for data acquisition and real-time control, while a PC is responsible for data analysis and processing. This raises the question of how to achieve serial communication between the PC and the microcontroller. This paper presents a method for serial communication between the PC and the microcontroller using the MSComm control and Windows API functions under Visual C++ 6.0, as well as the microcontroller's assembly language implementation. 2. Serial Communication Serial communication typically uses three transmission methods: simplex, which allows data to be transmitted in only one direction; half-duplex, which allows data to be transmitted in either direction, but only one transmission can occur at a time; and full-duplex, which allows simultaneous bidirectional data transmission. According to the communication protocol, before sending and receiving data, the PC and microcontroller must first successfully handshake. After the PC sends an address code to the microcontroller, the PC receives a pre-defined signal from the microcontroller. If the returned signal is correct, the handshake is successful, and data transmission can begin. [b][align=center]For more details, please click: Serial Communication of the Linear Motor Experimental Platform for Maglev Train[/align][/b]