The block "MBlock" provides an easy way to build a Scicos block whose behavior is specified by a Modelica program. Using this block, the user is able to write and compile Modelica programs in Scicos without creating any interfacing function. The associated Modelica program of this block can be either given in a file or written in the window opened by the block. In order to link this block to other Scicos blocks that may be other Modelica blocks, the types of block ports' as well as their associated variables should be specified.
These values that can be scalar or vector, can also be defined in the Scicos context. In order to access the Scicos context, click on the "Diagram" menu then click on the "Context" submenu. For instance, here is an example of overloading of parameters in a Modelica program.
Class Example parameter Real Speed=12.0; Real Position[3](start={0.0,0.1,0.5},fixed={true,true,true}); Real Length[2](start={13.0,12.1}); ... equation ... end Example;
Parameters vector = ['Speed';'Position';"Length"]
Parameters properties vector = [0;2;1]
Speed value = [12.0]
Position value = [0.0 ; 0.1 ; POS]
Length value = [13.0 ; 12.1]