This directory contains the Orocos Toolbox for Simulink Copy the contents of this directory ('orocos/*') into your 'MATLAB_ROOT/rtw/c/orocos' directory or unpack the simulink4orocos-1.0.tar.gz file in your MATLAB_ROOT directory. You should then have the following layout: MATLAB_ROOT `-rtw `-c `-orocos |`orocos.tlc |`... `-taskcontext |`orocos_taskcontext.mdl |`... `-slbocks.m Next, from within Matlab, run 'cd rtw/c/orocos; install.m' script, which will configure your mex compiler and generate the files needed by Simulink. Once this is done, An Orocos4Simulink has appeared in your library browser and you can start creating Orocos models and generate Orocos components. In case you need to set the paths again, you can use 'setpath.m' which only adds the required paths to your global paths environment. NOTES: * We only support single threaded models. This is because an Orocos component can execute only one thread. In case you need multiple threads, create multiple models and generate a component from each model. Multiple rates are supported. * In some Matlab versions we have issues with wrong code generation. It is yet unclear if we can influence it with a flag in orocos.tlc... Typically, the compiler complains about a statement like (in the file 'test1_orocos/test1.c' from model 'test1.m'): Parameters_test1 *((Parameters_test1 *) test1_rtM->ModelData.defaultParam) = (Parameters_test1 *) test1_rtM->ModelData.defaultParam; The solution is to remove these two lines. This will not change the behaviour of your model. You need to do this each time code is generated. * Extended mode support is currently not enabled in orocos.tlc. Because extended mode is supported under Linux by Simulink, it should not be hard to enable it and set the correct options in orocos.tlc. See Matlab's grt.tlc for an example of setting the external mode options. The RTWComponent class has the proper hooks in place to support extended mode, but this has not yet been tested.