| The flight simulator is a large ground simulation device to simulate the motion of the aircraft. The cockpit instrument is an important sub-system of the flight simulator. The course deviation indicator (CDI) is an important instrument of the cockpit instrument system. This paper researches the hardware and software realization of CDI, the serial communication between CDI and the instrument monitor and control computer of flight simulator based on RS-485 and develops the monitor and control software of CDI based on OPC (OLE for Process Control) interface.Firstly, the control system of CDI based on two-phase hybrid stepping motor and multi-turn absolute optical encoder was developed. The control system uses the multi-turn absolute optical encoder as the position sensor and realizes the accurate position closed-loop control.Secondly, the serial communication between the CDI and the monitor and control software of CDI based on RS-485 was researched, and also the whole communication protocol was given. The protocol includes three sub-protocols: the protocol of course angle data, the protocol of relative course angle data of radio station and the protocol of deviating course and alarming data.Thirdly, the monitor and control software of CDI was developed. The software was designed with configuration software and has a friendly user interface. Both the database about CDI variables and the simulated dial plate of CDI were created in the software. As a result, the operation of the CDI can be monitored and controlled under the computer by the software.Finally, the driver of simulated flight data based on OPC interface was developed. The driver can change the real-time database in monitor and control software to drive the CDI. The driver realizes the completely dynamic data exchange with the monitor and control software of CDI. |