Hello Clément,
Thank you for the tip. Indeed running the "loader.sce" and the "*.sci" file 
allowed me to reuse the model later.I will definitively look at the toolbox 
thing too, as I want to distribute my model to other people.
Regards,Benoit 

    Le Mardi 26 janvier 2016 11h01, Clément David 
<clement.da...@scilab-enterprises.com> a écrit :
 

 Hello Benoit,

During code generation, scilab will generate both the C file of the superblock 
and the equivalent
block interface function (a scilab macro). To re-use it later, you have to link 
the library (to load
the simulation function) and the execute the interface function file (to load 
the block).

To generalize your approach I strongly suggest you to ship both the Xcos schema 
and the C, macro
files as an external module (aka toolbox). This way you will only need to build 
the block once on
your side and distribute the module to your users.


Regards,
--
Clément

Le vendredi 22 janvier 2016 à 03:26 -0700, ENd48 a écrit :
> Good morning,
> 
> I'm trying to compile a superblock but I've got problem running the
> simulation afterwards.
> Here is what I do:
>  * I create a very simple diagram (constant value fed into the two ports of
> a sum block then a AFFICH_m block with an event clock)
>  * I convert the sum block into a superblock
>  * At this stage the diagram works just well
>  * I then compile the superblock (right click -> compile)
>  * The compilation works and the diagram is still working
>  * Now if I close Scilab and reopen it, I run the "loader.sce" file that has
> been generated during the compilation (I get a "Link done" message)
>  * If I try to run the diagram, I got an error message like this one:
>           o=Untitled__111506_c('set',o)
>                                         !--error 4 
>           Undefined variable: Untitled__111506_c
>  
>  
>           do_eval: Error while calling block Untitled__111506_c
> [uid='-16a0de62:15268d37 
>                216:-7fb8']: invalid parameter (ier=4.000000,
> %scicos_prob=%F).           
> 
> Does anybody know about such an error? What could be the solution to this
> problem?
> 
> Thanks in advance for your help.
> 
> Regards,
> Benoit
> 
> 
> 
> --
> View this message in context: 
> http://mailinglists.scilab.org/Xcos-Error-when-running-a-compiled-su
> perblock-tp4033315.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
> Nabble.com.
> _______________________________________________
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


  
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to