<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Sprechblasentext Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.SprechblasentextZchn
{mso-style-name:"Sprechblasentext Zchn";
mso-style-priority:99;
mso-style-link:Sprechblasentext;
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Dear users,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have a problem with the “To workspace” respectively “From workspace” block in Xcos.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The “FROMWSB” block is connected with a third function which should use the variable that is saved before.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Now I have the following problem:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>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.”<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is there any solution for that problem?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><u><span lang=EN-US>Block parameters:<o:p></o:p></span></u></p><p class=MsoNormal><u><span lang=EN-US>From workspace:<o:p></o:p></span></u></p><p class=MsoNormal><span lang=EN-US>Variable name: C<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Interpolation Method: 0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Enable zero crossing: 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Output at end: 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><u><span lang=EN-US>To workspace:<o:p></o:p></span></u></p><p class=MsoNormal><span lang=EN-US>Size of buffer: 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Scilab variable name: C<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Inherit: 0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><u><span lang=EN-US>Definition of variable C in SciNotes upfront:<o:p></o:p></span></u></p><p class=MsoNormal>C.time=0;<o:p></o:p></p><p class=MsoNormal>C.values=0; <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you in advance!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Mit freundlichen Grüßen<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Michael Ungelehrt<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><img width=138 height=133 id="Bild_x0020_1" src="cid:image003.jpg@01CF549F.0B6C64A0" alt="Logo_TC_Cham"><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Michael Ungelehrt, B.Eng.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Laboringenieur<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>THD – Technische Hochschule Deggendorf<br>Technologie Campus Cham</span><span style='mso-fareast-language:DE'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Badstraße 21<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>D-93413 Cham<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Tel: +49 9971 99673-29<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Fax: +49 9971 99673-69<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>E-Mail: <a href="mailto:michael.ungelehrt@th-deg.de">michael.ungelehrt@th-deg.de</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Web: <a href="http://www.tc-cham.th-deg.de/">www.tc-cham.th-deg.de</a><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>