Hardware-in-the-Loop (HIL) is an important strategy to test a control system on a model of the real plant. This is particular important in the engineering process related to machine development since it permit to save many resources wasted in the development of a real experiment.This paper discusses how the modular approach in system development (Machine Modular Development, MMD), can support the system engineer (SE) to deal with system complexity in achieving a good HIL structure for validating the automation software.