cscilabxcos

C/C++ Code generation from xcos in scilab


I've developed a model in xcos in scilab and I'd like to generate the C/C++ code of this model so that I can deploy it in embedded system.

However the issue is that the Code generating item in Tools menu is disabled. I guess it means I don't have the tool which converts the graphical model into code. I'm running linux.

Could you please help me with finding the plugin to generate the code?


Solution

  • You might have already done it, but would be useful for others. The answer is X2C software, can be downloaded from - http://www.mechatronic-simulation.org/download/

    Download the zip file, unzip it and navigate to "X2Copen-v1028-2016-09-10\X2C\System\Scilab\Scripts" and run the file "setup.sce" from scilab console. You can run this file just by drag and drop to scilab console.

    Start XCOS from scilab and create your model, then press "Start communicator" and "Transform model and push to communicator". You will see a dialog box for connection configuration, choose appropriate and download.