[Scilab-users] Using Modelica generic block MBLOCK in Xcos

Clément David clement.david at scilab-enterprises.com
Tue Mar 18 10:19:00 CET 2014


Hello,

Are you sure that you define all the parameters ? Note that to view the
real line number you should enable the "whereami mode" or "Local
numbering" in Scinotes -> Options.

--
Clément

Le vendredi 14 mars 2014 à 06:26 -0700, R0M1 a écrit :
> Hi everyone,
> 
> Problems are still there...
> 
> When I try with the following code to run the attached model (with one
> custom block, compiling well), I get this error:
> 
> -->exec('folder\test.sce', -1)
>  !--error 10000 
> scicos_simulate : Error during block parameters evaluation.
> at line     218 of function scicos_simulate called by :  
> Info=scicos_simulate(scs_m,list(),%scicos_context);
> at line      62 of exec file called by :    
> folder\test.sce', -1
> 
> Of course, removing the custom block makes the model work fine.
> 
> The content of the function scicos_simulate is:
> 
> 209  //** retrieve Info list
> 210  if Info <> list() then
> 211    [%tcur, %cpr, alreadyran, needstart, needcompile, %state0] =
> Info(:)
> 213  else
> 213    %tcur = 0;
> 214    %cpr = list();
> 215    alreadyran = %f;
> 216    needstart = %t;
> 217    needcompile = 4;
> 218    %state0 = list();
> 219  end
> 
> I don't see why line 218 would create a problem.
> 
> Here is my code:
> 
> loadScicos;
> loadXcosLibs();
> exec(loadpallibs,-1);
> 
> importXcosDiagram('model_NL2.xcos')
> 
> 
> T=0.0001;
> end_time=0.201;
> 
> C=1;
> R=1;
> 
> // model simulation
> %scicos_context=[];
> %scicos_context.C=C;
> %scicos_context.R=R;
> %scicos_context.T=T;
> %scicos_context.end_time=end_time;
> Info=scicos_simulate(scs_m,list(),%scicos_context);
> 
> Romain
> 
> 
> ______________________________________________________________________
>         De: "R0M1 [via Scilab / Xcos - Mailing Lists Archives]"
>         <[hidden email]>
>         À: "R0M1" <[hidden email]>
>         Envoyé: Vendredi 14 Mars 2014 11:52:50
>         Objet: Re: [Scilab-users] Using Modelica generic block MBLOCK
>         in Xcos
>         
>         Just to make the community benefit of Dirk's answer: 
>         
>                 Dirk wrote
>                 Rename "NL_Capacitor1" to "NL_CapacitorA" this will
>                 avoid 
>                 a name clash generated by the modelica compiler!
>         
>         
>         
>         ______________________________________________________________
>         If you reply to this email, your message will be added to the
>         discussion below:
>         http://mailinglists.scilab.org/Scilab-users-Using-Modelica-generic-block-MBLOCK-in-Xcos-tp4029200p4029302.html 
>         To unsubscribe from [Scilab-users] Using Modelica generic
>         block MBLOCK in Xcos, click here.
>         NAML 
> 
> 
> 
>  input.csv (2K) Download Attachment
>  model_NL2.xcos (100K) Download Attachment
>  NL_Capacitor.mo (298 bytes) Download Attachment
> 
> 
> ______________________________________________________________________
> View this message in context: Re: [Scilab-users] Using Modelica
> generic block MBLOCK in Xcos
> 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