Scilab/Scicos


Files for Scicoslab-4.4

scicoslab44.tgz

Adding your own blocks in 7 steps

  1. Create the scicos interfaces file using the qxml2sci and xml2sci applications provided here under "Additional files". Follow the steps described in the "Xml2Sci.pdf" file. Here are an example of a XML file and of the corresponding SCI file.

  2. Copy the generated SCI files in the SCIDIR/macros/RTAI folder and launch "make" here as superuser.

  3. Create a new folder and put there the files "template.c.tmp", "machine.h" and "scicos_block.h" (or "scicos_block4.h" for scilab-4.1.2) from the rtai-lab/scilab/devices folder of the RTAI distribution.

  4. Put also this Makefile and modify it by changing the name of the generated library (in the example the name is "libmysci.a").

  5. For each new block generate the Implementation file by running "gen_dev target" where "target" is the name of the blocks used in the first step. Modify the generated files for your purposes.

  6. Run "make" and "make install" as superuser. This will copy the generated library in the rtai installation folder.

  7. Modify the SCIDIR/macros/RTAI/RT_templates/rtai.mak file by adding "$(RTAIDIR)/lib/libmysci.a" to "ULIBRARY".

The tutorial explains how to generate a new Palette for the new blocks and how to integrate it in the Scilab/Scicos environment. You can also add the new generated palette in the ".Scilab/scilab-4.1.x/.scilab" startup file, like the "RTAI-Lib.cosf" palette.

Additional files

Scicos automatic block generator

xml2sci.tgz
Xml2Sci.pdf


Additional blocks for Scicos

supsi.tgz

Follow these steps to install the new files:

  1. Go to the directory "<rtai_root>/rtai-lab/scilab

  2. Untar the "supsi.tgz" file

  3. Go under "macros"

  4. Modify the "supsi.mak" file (SCILAB_DIR) + "cat supsisci..." (last line)
    to fit your Scilab installation

  5. Run "make -f supsi.mak install" as superuser

  6. Run "make -f supsi.mak user" as normal user

  7. Go under "mydevices"

  8. Run "make" and "make install" as superuser


Examples

Test: discrete time system with scopes, meter and led

test.cos

Test: continous time system

test.cos

Working with mailboxes

test.cos
start_send
start_rcv

Working with semaphores and asynchronous tasks

test_sem.cos
start_send
start_rcv

Working with external data generated in scilab

inp_test.cos
generate.sci

System identification with repeated input signals

gen_prbs.sci
gen_sweep.sci
id_prbs.cos
id_sweep.cos
ident.sci
README

Contact

Roberto Bucher

roberto.bucher@supsi.ch