[Scilab-users] Help to set parameters in an Xcos Diagram

Clément David clement.david at scilab-enterprises.com
Thu Mar 21 17:59:20 CET 2013


Hello Cédric,

The max integration time interval can be set using the scs_m.props.tol
vector which is documented [1].

To set a specific parameter values, define a variable in the diagram
context which is used as dt then set it the right value the
scicos_context struct.

For more information on setting variable values, take a look at the
"Optimization of a PID" [2] wiki page.

[1]: http://help.scilab.org/docs/5.4.0/en_US/scicos_params.html
[2]: http://wiki.scilab.org/Xcos/Examples/PID?highlight=%28%
scicos_context%29


> I'd like to set  parameters of my scs_m structure for an Xcos Diagram (see
> attached file) using command lines.
> 
> To be specific I'd like to set the following imulation parameters :
> 
> - final integration time
> 
> - max integration time interval
> 
> I want them to be equal to a dt that I already define in my program. I am
> using this code so far :
> 
>  
> 
>     loadXcosLibs() importXcosDiagram('C:\STAMPE_3.5\STAMPE_SRC\essai.xcos');
> 
>     typeof(scs_m)          // Diagram structure
> 
>     scs_m.props.tf = dt;            // Final integration time
> 
>      
> 
>     xcos_simulate(scs_m,4);
> 
>      
> 
> But I don't know what command line to use to set the max step of integration
> time for my simulation.
> 
>  
> 
> Also, I'd like to set to dt in the same way the parameters (period,
> iniialization time) of the block "CLOCK_c" which is in my xcos diagram.
> 
> I think I must use something like scs_m.objs.something = dt. 
> 
>  
> 
> I would be very thankful for any help :) essai.xcos
> <http://mailinglists.scilab.org/file/n4026319/essai.xcos>  

-- 
Clément DAVID
Development Engineer / Account Manager
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Mobile: +33.6.26.26.51.90
Phone: +33.2.90.22.78.96
http://www.scilab-enterprises.com




More information about the users mailing list