[Scilab-users] Context error in Xcos Scilab 6.1.0
Perrichon
perrichon.pierre at wanadoo.fr
Sat Feb 29 19:35:20 CET 2020
Hello Samuel,
Glad to see you confirm this bug
Context is executed at line 26 of the A.sce file, and not before :
---> xcos_simulate(scs_m, 4);
So in scilab 6.1.0, the A.ctx is executed.
I also add in A610.zcos the instruction
* mprintf("Running context in xcos. ...So A=%i\n",A)
And then here is the track in my PC when running A.sce in xcos 6.1.0 :
--> exec('C:\0 - tampon\A.sce', -1)
Chargement du contexte d'exécution A.ctx
Running context in xcos. ...So A=50
Where we can see that A=50 inside A610.zcos.
We also can see that A is lost a the end of the context execution
This bad behavior also explains that my projects dont migrate from xcos
5.5.2 to 6.1.0
Be sure that in my projects, the ct xis a set of a lot of scilab
instructions who generate variables.
These variables are use in any bloscks and under blocks of my main shemes
BR
De : users <users-bounces at lists.scilab.org> De la part de Samuel Gougeon
Envoyé : samedi 29 février 2020 17:53
À : users at lists.scilab.org
Objet : Re: [Scilab-users] Context error in Xcos Scilab 6.1.0
Le 29/02/2020 à 17:41, Samuel Gougeon a écrit :
Hello Pierre,
Le 29/02/2020 à 11:32, Perrichon a écrit :
Hello,
I try to understand and find a reason why my projects done with xcos scilab
5.5.2 not run i 6.1.0
So I isolate at least one reason in a basic test program (see attached
files)
Here, zcos file are lunched into scilab 5.5.2 or 6.10, with the A.sce file
which test the version
A.ctx is a context file. Here is a simple variable definition A=50 in that
case.
Every zcos file contains in its simulation contexte, the instruction «
exec("A.ctx") » ; accessible with simulation-> context modifying
To run this program, make a directory, a copy of the attached files, and
change eventually line 4 in A.sce :
Root="c:\0 - tampon"
// Répertoire de travail pour le test
So run A.sce inside xcos scilab 5.5.2 or 6.1.0
Scilab 5.5.2 run correctly :
<diagram image>
Scilab 6.1.0 is bugged :
Apparently, the problem is that the context is not executed when the diagram
is loaded.
Despite what the context message indicates:
Indeed, the message mprintf("Chargement du contexte d''exécution
%s\n\n",FichierContexte)
set in the context is not displayed when the diagram is loaded in 6.1.0 ;
only when the context
is updated (or simply edited and revalidated).
With Scilab 5.5, the context is not executed when loading the diagram,but
when running it.
So, to me, there are apparently 2 issues:
1. The Set Context message should be fixed: "... and every time the
diagram is run" (not loaded)
2. The fact that the context is executed when the diagram is run should
be restored in Scilab 6.
Sorry, i don't know what occurred with my first trial, but now it works:
In 6.0.2 and 6.1.0, the message is well displayed when the diagram is run.
The error message displayed on the icon is the following:
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200229/80697657/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 3199 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20200229/80697657/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 4152 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20200229/80697657/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A610.zcos
Type: application/octet-stream
Size: 2375 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20200229/80697657/attachment.obj>
More information about the users
mailing list