[Scilab-users] Problems with To workspace and From workspace

2014-04-10 Thread Michael Ungelehrt
Dear users,

 

I have a problem with the “To workspace” respectively “From workspace” block
in Xcos.

 

I’d like to write the value of a function to workspace if the value of
another function changes its sign from + to -. A short time later I’d like
to use this value in a third function and retrieve it from workspace.

 

For that I evaluate the first function with the “NEGTOPOS_f” block and give
the output event to the “TOWS_c” block. The “TOWS_c” block is connected with
the second function and should write the value to a vaiable A in the
workspace.

The “FROMWSB” block is connected with a third function which should use the
variable that is saved before.

 

Now I have the following problem:

If I start the simulation, the “FROMWSB” says that the variable A does not
exist. So my idea was to define the variable in the variable-browser before
I start the simulation. If I do so I get an error at the “TOWS_c” block:
“Evaluation problem: value not updated from context. Protected variable
name. Please choose another variable name.”

 

Is there any solution for that problem?

 

Block parameters:

From workspace:

Variable name:C

Interpolation Method: 0

Enable zero crossing: 1

Output at end: 1

 

To workspace:

Size of buffer:  1

Scilab variable name: C

Inherit:0

 

Definition of variable C in SciNotes upfront:

C.time=0;

C.values=0;

 

Thank you in advance!

 

 

Mit freundlichen Grüßen

Best regards,

 

Michael Ungelehrt

 

 

Logo_TC_Cham

 

Michael Ungelehrt, B.Eng.

Laboringenieur

 

THD – Technische Hochschule Deggendorf
Technologie Campus Cham

Badstraße 21

D-93413 Cham

 

Tel: +49 9971 99673-29

Fax: +49 9971 99673-69

E-Mail: michael.ungele...@th-deg.de

Web: www.tc-cham.th-deg.de http://www.tc-cham.th-deg.de/ 

 

image003.jpg___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Problems with To workspace and From workspace

2014-04-10 Thread Paul Bignier

  
  

Hi Michael,

Indeed it looks like you can't overwrite a variable defined in the
context.
Have you tried replacing the "FROMWSB" block with a "DOLLAR" block?
Then it would have the same data and activation inputs as the
"TOWS_c" block,
and you would not need to pre-define 'C' (just give it an initial
value in the block parameters).

Hope this helps,
Regards,
Paul


On 04/10/2014 09:27 AM, Michael
  Ungelehrt wrote:


  
  
  
  
  
Dear users,

I have a problem with
the To workspace respectively From workspace block in
Xcos.

Id like to write the
value of a function to workspace if the value of another
function changes its sign from + to -. A short time later
Id like to use this value in a third function and retrieve
it from workspace.

For that I evaluate the
first function with the NEGTOPOS_f block and give the
output event to the TOWS_c block. The TOWS_c block is
connected with the second function and should write the
value to a vaiable A in the workspace.
The FROMWSB block is
connected with a third function which should use the
variable that is saved before.

Now I have the following
problem:
If I start the
simulation, the FROMWSB says that the variable A does not
exist. So my idea was to define the variable in the
variable-browser before I start the simulation. If I do so I
get an error at the TOWS_c block: Evaluation problem:
value not updated from context. Protected variable name.
Please choose another variable name.

Is there any solution
for that problem?

Block parameters:
From workspace:
Variable
name: C
Interpolation Method:
 0
Enable zero
crossing: 1
Output at
end: 1

To workspace:
Size of
buffer: 1
Scilab variable
name: C
Inherit:
0

Definition of
  variable C in SciNotes upfront:
C.time=0;
C.values=0; 

Thank you in advance!


Mit
freundlichen Gren
Best
regards,

Michael
Ungelehrt




Michael
Ungelehrt, B.Eng.
Laboringenieur

THD 
Technische Hochschule Deggendorf
Technologie Campus Cham
Badstrae
21
D-93413
Cham

Tel:
+49 9971 99673-29
Fax:
+49 9971 99673-69
E-Mail:
michael.ungele...@th-deg.de
Web:
www.tc-cham.th-deg.de

  
  
  
  
  ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



-- 
Paul BIGNIER
Development engineer
---
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
http://www.scilab-enterprises.com 
  

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Problems with To workspace and From workspace

2014-04-10 Thread Serge Steer

  
  
The workspace variables are created in
  the Scilab environment at the end of the simulation
  You can probably use a DOLLAR block to do what you want
  
  Serge
  Le 10/04/2014 09:27, Michael Ungelehrt a crit:


  
  
  
  
  
Dear users,

I have a problem with
the To workspace respectively From workspace block in
Xcos.

Id like to write the
value of a function to workspace if the value of another
function changes its sign from + to -. A short time later
Id like to use this value in a third function and retrieve
it from workspace.

For that I evaluate the
first function with the NEGTOPOS_f block and give the
output event to the TOWS_c block. The TOWS_c block is
connected with the second function and should write the
value to a vaiable A in the workspace.
The FROMWSB block is
connected with a third function which should use the
variable that is saved before.

Now I have the following
problem:
If I start the
simulation, the FROMWSB says that the variable A does not
exist. So my idea was to define the variable in the
variable-browser before I start the simulation. If I do so I
get an error at the TOWS_c block: Evaluation problem:
value not updated from context. Protected variable name.
Please choose another variable name.

Is there any solution
for that problem?

Block parameters:
From workspace:
Variable
name: C
Interpolation Method:
 0
Enable zero
crossing: 1
Output at
end: 1

To workspace:
Size of
buffer: 1
Scilab variable
name: C
Inherit:
0

Definition of
  variable C in SciNotes upfront:
C.time=0;
C.values=0; 

Thank you in advance!


Mit
freundlichen Gren
Best
regards,

Michael
Ungelehrt




Michael
Ungelehrt, B.Eng.
Laboringenieur

THD 
Technische Hochschule Deggendorf
Technologie Campus Cham
Badstrae
21
D-93413
Cham

Tel:
+49 9971 99673-29
Fax:
+49 9971 99673-69
E-Mail:
michael.ungele...@th-deg.de
Web:
www.tc-cham.th-deg.de

  
  
  
  
  ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



  

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] call_scilab into running session

2014-04-10 Thread Arvid Rosén
Hi!

I am not really familiar with the concept of call_scilab. Is it possible to 
connect to an already running scilab session and execute commands in that 
environment? Or do I have to start a new scilab session for my program?

I am asking because I want to replace a complicated (and slow) scilab gui, with 
a C++ program, to control some measurements. I want to access features and data 
in my running scilab session from my gui.

Best Regards,
Arvid
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users