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

R0M1 romain.desbats at ifsttar.fr
Fri Mar 14 14:26:44 CET 2014


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 
----- Mail original -----

> De: "R0M1 [via Scilab / Xcos - Mailing Lists Archives]"
> <ml-node+s994242n4029302h81 at n3.nabble.com>
> À: "R0M1" <romain.desbats at ifsttar.fr>
> 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) <http://mailinglists.scilab.org/attachment/4029312/0/input.csv>
model_NL2.xcos (100K) <http://mailinglists.scilab.org/attachment/4029312/1/model_NL2.xcos>
NL_Capacitor.mo (298 bytes) <http://mailinglists.scilab.org/attachment/4029312/2/NL_Capacitor.mo>




--
View this message in context: http://mailinglists.scilab.org/Scilab-users-Using-Modelica-generic-block-MBLOCK-in-Xcos-tp4029200p4029312.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140314/2f73dbf4/attachment.htm>


More information about the users mailing list