Has anybody succesfully managed to run C/C++ code created by Xcos (or Simulink) on RP?

I don't understand neither how to make a working interface between RP API and Xcos C code.
Nor I couldn't find a suitable tutorial. All found tutorials regarding this topic use Scilab plugins, e.g. X2C or Arduino Toolbox.
Real time monitoring in Scilab would be nice, but it isn't necessary.

The final aim is to create a desired controlling structure in Xcos, export this structure as C code, compile it, put it onto RP and verify the real system's behaviour vs simulation results.