[Scilab-users] Xcos: Error when running a compiled superblock

Clément David clement.david at scilab-enterprises.com
Tue Jan 26 10:59:12 CET 2016


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 at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list