[scilab-Users] Symbolic variables in a XCOS Cblock

Clément DAVID clement.david at scilab.org
Tue Aug 16 09:26:51 CEST 2011


Hi,

The context is propagated at evaluation time (before compilation and
simulation) thus it's not possible to modify it on the block
implementation.

Therefore you can use interactive simulation calls (using
scicos_simulate) with a modified context. A tutorial can be found at
[1].

[1]: http://wiki.scilab.org/Xcos/Examples/PID

Regards,

--
Clément

Le mercredi 10 août 2011 à 12:27 +0000, Bubbio Pierpaolo a écrit :
> All
> 
>  
> 
> Thank you for considering this question I cannot get rid of and that
> is possibly very simple to answer to.
> 
>  
> 
> I built a simple XCOS scheme in SCILAB 5.3.3, Windows environment. I
> used some contest parameters (one is for example “MotorVoltage” that
> is used by some blocks inside the XCOS scheme). At a certain point, I
> had the need to define an XCOS block to apply a certain modification
> and the change the value of MotorVoltage. I decided to write a CBLOCK2
> block where I am called with the known proto:
> 
>  
> 
> void ChangeVoltage(scicos_block *block,int flag)
> 
> {
> 
>> 
> }
> 
>  
> 
> and where the structure scicos_block handles a lot of parameters
> coming inside the function body. Well, the question is: between those
> input parameters, can I find somewhere the XCOS contest parameters (so
> MotorVoltage I look for) and, if yes, where? Obviously I would need a
> reference to them (and not a copy) to change their value when needed.
> 
>  
> 
> Thank you for any help coming.
> 
>  
> 
> Best regards
> 
>  
> 
> 





More information about the users mailing list