<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1455009378540_7246"><span>Hello Clément,</span></div><div id="yui_3_16_0_1_1455009378540_7246"><span><br></span></div><div id="yui_3_16_0_1_1455009378540_7246"><span id="yui_3_16_0_1_1455009378540_7297">Thank you for the tip. Indeed running the "loader.sce" and the "*.sci" file allowed me to reuse the model later.</span></div><div id="yui_3_16_0_1_1455009378540_7246" dir="ltr"><span id="yui_3_16_0_1_1455009378540_7298">I will definitively look at the toolbox thing too, as I want to distribute my model to other people.</span></div><div id="yui_3_16_0_1_1455009378540_7246" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1455009378540_7246" dir="ltr"><span>Regards,</span></div><div id="yui_3_16_0_1_1455009378540_7246" dir="ltr"><span>Benoit</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Le Mardi 26 janvier 2016 11h01, Clément David <clement.david@scilab-enterprises.com> a écrit :<br></font></div>  <br><br> <div class="y_msg_container">Hello Benoit,<br clear="none"><br clear="none">During code generation, scilab will generate both the C file of the superblock and the equivalent<br clear="none">block interface function (a scilab macro). To re-use it later, you have to link the library (to load<br clear="none">the simulation function) and the execute the interface function file (to load the block).<br clear="none"><br clear="none">To generalize your approach I strongly suggest you to ship both the Xcos schema and the C, macro<br clear="none">files as an external module (aka toolbox). This way you will only need to build the block once on<br clear="none">your side and distribute the module to your users.<br clear="none"><br clear="none"><br clear="none">Regards,<br clear="none">--<br clear="none">Clément<br clear="none"><br clear="none">Le vendredi 22 janvier 2016 à 03:26 -0700, ENd48 a écrit :<br clear="none">> Good morning,<br clear="none">> <br clear="none">> I'm trying to compile a superblock but I've got problem running the<br clear="none">> simulation afterwards.<br clear="none">> Here is what I do:<br clear="none">>  * I create a very simple diagram (constant value fed into the two ports of<br clear="none">> a sum block then a AFFICH_m block with an event clock)<br clear="none">>  * I convert the sum block into a superblock<br clear="none">>  * At this stage the diagram works just well<br clear="none">>  * I then compile the superblock (right click -> compile)<br clear="none">>  * The compilation works and the diagram is still working<br clear="none">>  * Now if I close Scilab and reopen it, I run the "loader.sce" file that has<br clear="none">> been generated during the compilation (I get a "Link done" message)<br clear="none">>  * If I try to run the diagram, I got an error message like this one:<br clear="none">>           o=Untitled__111506_c('set',o)<br clear="none">>                                         !--error 4 <br clear="none">>           Undefined variable: Untitled__111506_c<br clear="none">>  <br clear="none">>  <br clear="none">>           do_eval: Error while calling block Untitled__111506_c<br clear="none">> [uid='-16a0de62:15268d37 <br clear="none">>                216:-7fb8']: invalid parameter (ier=4.000000,<br clear="none">> %scicos_prob=%F).           <br clear="none">> <br clear="none">> Does anybody know about such an error? What could be the solution to this<br clear="none">> problem?<br clear="none">> <br clear="none">> Thanks in advance for your help.<br clear="none">> <br clear="none">> Regards,<br clear="none">> Benoit<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> --<br clear="none">> View this message in context: <a shape="rect" href="http://mailinglists.scilab.org/Xcos-Error-when-running-a-compiled-su" target="_blank">http://mailinglists.scilab.org/Xcos-Error-when-running-a-compiled-su</a><br clear="none">> perblock-tp4033315.html<br clear="none">> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.<br clear="none">> _______________________________________________<br clear="none">> users mailing list<br clear="none">> <a shape="rect" ymailto="mailto:users@lists.scilab.org" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br clear="none">> <a shape="rect" href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><div class="yqt3262631664" id="yqtfd36268"><br clear="none">_______________________________________________<br clear="none">users mailing list<br clear="none"><a shape="rect" ymailto="mailto:users@lists.scilab.org" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br clear="none"><a shape="rect" href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>