%0 Journal Article %T LINUX-XENOMAI TARGET: A REAL-TIME HARDWARE-IN-THE-LOOP SIMULATION FRAMEWORK BASED ON SIMULINK %J VFAST Transactions on Software Engineering %D 2015 %X Hardware-In-The-Loop (HIL) simulation has an important role on rapid prototyping and developing control software for various application areas. Having deterministic time response and high computational power, a personal computer (PC) with a real-time operating system is an efficient platform solution for HIL simulation needs. Fast development time and cost efficiency of simulation platform are other important issues for reduction of total production lead time and overall cost. In this paper; taking into consideration all these aforementioned aspects, we propose a HIL simulation software framework for PC target. Building a MATLAB/Simulink diagram and using available device drivers, an ordinary user can develop and execute HIL simulation of his/her controller. The proposed framework is developed for PC platforms that have Linux Xenomai real-time operating system infrastructure. The framework contains a Simulink Xenomai target control module, a Graphical User Interface (GUI) and a Simulink device driver library. Also, to illustrate the performance and feasibility of the proposed framework, a Xenomai real-time driver model (RTDM) based driver for Quanser Q8 data acquisition board has been implemented. Experiments performed on servo control of a two degree of freedom (DOF) robot illustrated that proposed framework meets hard real-time requirement %U https://vfast.org/journals/index.php/VTSE/article/view/324