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

Clément David clement.david at scilab-enterprises.com
Wed Mar 19 08:56:29 CET 2014


Hello,

Same question again :) : are you sure that you define all variables on
the diagram context ?

The "do_eval" update the block values merging the diagram context and
the updated context argument to set the expected block's values.

To view the definition of do_eval, just type : edit("do_eval") on
Scilab.

--
Clément

Le mardi 18 mars 2014 à 09:19 -0700, R0M1 a écrit :
> Thanks a lot for your clarification. I should have thought a little
> more.
> 
> So now the line in scicos_simulate are the following:
> 
> 215  if ierr == 0 then //++ no error
> 216    [scs_m, %cpr, needcompile, ok] = do_eval(scs_m, %cpr,%
> scicos_context)
> 217    if ~ok then
> 218      error(msprintf(gettext("%s: Error during block parameters
> evaluation.\n"), "scicos_simulate"));
> 219    end
> 220    if needcompile <> 4 & size(%cpr) > 0 then
> 221      %state0 = %cpr.state
> 222    end
> 223    alreadyran = %f
> 224  else
> 225    error(['Incorrect context definition, ' + lasterror()])
> 226  end
> 
> So it seems that the problem is that the ok variable (result of
> do_eval) is equal to %F (false). However, I can not access the content
> of do_eval. And when I try to execute do_eval(scs_m, %cpr,%
> scicos_context)manually, I get an error because loading my diagram did
> not create %cpr. This is surprising because even when I compile a
> working diagram it does not produce %cpr.
> 
> Any idea?
> 
> 
> 
> ______________________________________________________________________
> View this message in context: Re: 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