Convert a mechatronic actuator model to C code and simulate in a hardware-in-the-loop configuration. Simscape parameters are tuned on the real-time target.