Abstract:A real-time simualation platform is built. Real-time visual monitoring system was imported based on traditional HiL( Hardware in the Loop), which implemented realtime monitoring of working condition. This platform was cost-effective and easy to implement, which consisted of three main parts: One xPC Target, an operation interface based on C#, and a 3D real-time model in Unity. Connections between these three were built via Ethernet. The simulation model of Ballast Cleaning Machine (BCM) was built in MATLAB/SIMULINK. With modular modeling methods, versatility of the modularity and parametric interface standardization are ensured to improve maintenance, expand and transpalnt of the model.