Octave-Scilab co-simulation package
Toolbox provides the functions for variable exchange between Octave and Scilab workspaces, and for the remote commands execution in Scilab, such as starting xcos simulation. The main goal of this toolbox is to make an alternative for Simulink in Octave from Scilab xcos. But it can be also used to uses functions from Scilab toolboxes, that are unavailable for Octave.
1. Install Octave version 4.0.0 or higher and Scilab v.5.5.2 or higher
2. Install sockets package in Octave by executing
pkg install -forge -auto sockets
3. Download sci_cosim package from https://github.com/amromanov/sci_cosim
4. Install sci_cosim package in Octave by executing
pkg install -auto sci_cosim_0.1.2.tar.gz
5. Start Scilab GUI and install Toolbox Backdoor by pressing in main menu Applications → Module manager - ATOMS → Technical → Backdoor → Install
6. Restart Scilab. If every thing was done correct, after restart there will message in command window "BackDoor: listening to connections on TCP port"
1. Download demo from https://github.com/amromanov/sci_cosim/demo.tar.gz
2. Extract it to any folder, where your user has read/write rights
3. Run Scilab. It doesn't matter for the co-simulation package if you are using GUI version (scilab) or console one (scilab-adv-cli).
4. Run Octave and change folder to the one, where you have extracted demo
5. Run sci_sim_example.m
sci_connect - connects to running SciLab with Toolbox Backdoor. It should be used at least once per Octave session.
sci_disconnect - disconnects from SciLab with Toolbox Backdoor.
sci_setvar - transfers variables, which names are listed in function arguments, from Octave to Scilab workspace.
sci_getvar - transfers variables, which names are listed in function arguments, from Scilab to Octave workspace.
sci_cmd - executes single command in Scilab.
sci_sim - starts xcos simulation in Scilab. In the most cases, .xcos file should be in the Octave current directory. To set simulation duration use End block in Xcos and transfer its parameter as variable from Octave, using sci_setvar.
For more detailed usage description execute help FUNCTION_NAME in Octave.
Author and Licensing
Author: Romanov Alexey (romanov at mirea.ru)
Moscow, Control Problems Department MIREA, 2015
Distributed under the New BSD License