Hardware-in-the-Loop (HIL) Simulation is a technique that is used for testing Control Systems, Embedded Systems, etc. Carrying out a HIL Simulation to Test the Control System, Embedded System, etc. is called HIL Testing.
The machine or physical part of the system (which we call the plant) is normally connected with the control system, through actuators and sensors. With HIL testing the plant is replaced by a simulation of the plant (which we call the HIL simulator). If the HIL simulator is designed well, it will accurately mimic the plant, and can be used to test the control system.
Introduction to Hardware in the Loop Simulation and Testing:
PowerPoint used in the Video
Example Code (LabVIEW)