1. INTRODUCTION Real-time ship motion simulation system based on ship motion kinematic mathematical model utilize computer simulation and human-computer interaction technology to acquire real-time interactive simulation of process of sailing and operation. The system possesses the ability of testing performance of ship motion, training ship operators and obtaining prediction and assessment of on-sea operation schemes, which shorten the periods and costs of real-ship training, reduce the possibility of risky on-sea operation and damaging marine equipment and effectively secure the safety of workers and equipment. However, adding UDP protocol module and real-time control mode into C mode transferred from Simulink model gains executable program, which greatly increasing the amount of work in post-processing and program changing [1]. In this paper, modular ship motion mathematical model is established including propeller model and wind, wave and current environmental models. And utilize UDPbased protocol to communicate directly with other systems and S-fun to develop real-time simulation module [2-4]. Finally Simulink directly compile an executable file to achieve a smooth transition from Simulink to real-time communication with other systems without post-processing and a perfect link between design phase and implementation phase