The paper presents a concept and its implementation software modules to obtain ready to run real-time simulation code directly from Modelica models. Basically, a Modelica special model building block has been developed supporting the definition of the realtime input /output variables, their communication with external tasks or systems (e.g. a real hardware and software controller), and the sche...