[Scilab-Dev] Xcos debugging : 'redefining permanent variable'

patrick at digimetrie.com patrick at digimetrie.com
Wed Jul 30 15:50:56 CEST 2014


Hello,

> I am unable to reproduce the problem, because I am working with Linux.
> However I gave a look at your code and and found some strange things
> which may explain the problem:
>
> In the beginning of your macros/*.sci file you have added things like
>
> if ~exists("scicos_diagram") then loadXcosLibs(); end
> clear SciCos_Digi_AInf;
>
> These instructions should not be there,  the xcos libs must be loaded in
> the digimetrie_start file using  loadXcos(); &t the beginning
>
> Some other remarks on the fly (without connection with your problem):
> - the cases  'plot'  'getinputs'  'getoutputs' 'getorigin' are no more
> useful with Xcos

I apply your above suggestions, and it seems to solve my problem. I still
wait the teacher's confirmation, but i'm confident and gratefull to you.
Thanks.


> -  the calls to digi_TestParam should not be done in the set case
> (because if one loads a diagram and run it the set case is not
> executed). This tests must be done in the initialization part of the
> associated simulation function.

I've a problem with this one : the digi_TestParam test that the "board
number" used is valid :
the "board number" is a number xcos-configurable
So it must be tested each time parameters are 'set'. Don't the 'set' case
is the correct place for this ?
In any case, if the 'set' case is not used when the user fire the
simulation immediatly after loading a diagram, there's still problem:
Does the 'initialization part'  is the correct place for the test (ie.
does the block parameters have been loaded)
If yes, where is this 'initialization part' ?


Thanks,
Patrick N.






More information about the dev mailing list