[Scilab-users] Xcos - Problem with tf variable name in a superblock

paul.bignier at scilab-enterprises.com paul.bignier at scilab-enterprises.com
Tue Jun 14 09:09:36 CEST 2016


Hi Pierre,

What you want to do is check your environment at context evaluation,
so simply write a "pause;" at the start of the context and when you 
press Play
you will be prompted to resume in the Scilab console.
You can then write "-->who()" or "-->who('get')" to list all existing 
variables.
Note that you can safely overwrite these variables because when you 
leave your context the modifications will be lost (their scope is 
limited to the context).

Regards,
Paul

On 2016-06-13 18:44, Perrichon wrote:
> Hello Paul,
> 
> Thanks you for your quit response
> 
> It confirms that « tf » is a reserved word in Xcos context, and must
> be used with caution.
> 
> In fact, I shall drive in September a student in Master2 on a subject
> concerning turbines simulation, and I inherit a program done with Xcos
> where condition « if ~exists(« foo ») foo=xx » is systematically
> used, and I see a big number of Xcos blocks and hundreds of variables.
> 
> This is correctly done because all variables are not necessary
> transmitted when launching Xcos. Part of them are redefined, part of
> them are values by default, which explains this program structure done
> by a student a few year ago.
> 
> So, has to control that, my main question was to know where I could
> finf a list of reserved words or variables in xcos.
> 
> We have together seen that « tf » was one of them, which also define
> the « Final Integration Time »
> 
> I had a look on the Help in Scilab (describing a lot of thing », very
> clearly, but nothing about « tf » for example.
> 
> For example, what are the others reserved keyword for the rest of
> these variables, in the above table ?
> 
> A list would be welcome, or a reference to access this one.
> 
> Your sincerely,
> 
> Pierre
> 
> BEFORE PRINTING, THINK ABOUT ENVIRONMENTAL RESPONSABITY
> 
> DE : users [mailto:users-bounces at lists.scilab.org] DE LA PART DE Paul
> Bignier
> ENVOYÉ : lundi 13 juin 2016 09:09
> À : Users mailing list for Scilab <users at lists.scilab.org>
> OBJET : Re: [Scilab-users] Xcos - Problem with tf variable name in a
> superblock
> 
> Hello Pierre,
> 
> 100000 is indeed the "Final integration time" parameter in the
> Simulation->Setup menu.
> By using exists() (you might want to use isdef() [3] instead) you
> don't override the existing parameters,
> and in Scilab, functions can see the superior-scope variables (here,
> 'tf').
> So just write "tmf=3; tf=2;" in your context and everything should run
> fine.
> 
> Regards,
> Paul
> 
> On 06/10/2016 06:47 PM, Perrichon wrote:
> 
>> Hello
>> 
>> I retrieve an old xcos program about hydraulic simulation.
>> 
>> Worry :
>> 
>> A superblock containing a vairable « tf « doesn't match the value
>> programmed in the initialization part.
>> 
>> If « tf » a reserved word and where can I find a reserved list
>> 
>> Or is it a bugg ?
>> 
>> Are other variables concerned?
>> 
>> Thanks for yout help
>> 
>> Regards.
>> 
>> _______________________________________________
>> 
>> users mailing list
>> 
>> users at lists.scilab.org
>> 
>> http://lists.scilab.org/mailman/listinfo/users [1]
> 
> --
> 
> Paul BIGNIER
> 
> Development engineer
> 
> -----------------------------------------------------------
> 
> Scilab Enterprises
> 
> 143bis rue Yves Le Coz - 78000 Versailles, France
> 
> Phone: +33.1.80.77.04.68
> 
> http://www.scilab-enterprises.com [2]
> 
> 
> Links:
> ------
> [1] http://lists.scilab.org/mailman/listinfo/users
> [2] http://www.scilab-enterprises.com
> [3] https://help.scilab.org/docs/5.5.2/en_US/isdef.html
> 
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list