<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:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name="Microsoft Theme 2.00" content="strtedge 111"><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
h1
        {mso-style-priority:9;
        mso-style-link:"Titre 1 Car";
        margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
h2
        {mso-style-priority:9;
        mso-style-link:"Titre 2 Car";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h3
        {mso-style-priority:9;
        mso-style-link:"Titre 3 Car";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h4
        {mso-style-priority:9;
        mso-style-link:"Titre 4 Car";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h5
        {mso-style-priority:9;
        mso-style-link:"Titre 5 Car";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h6
        {mso-style-priority:9;
        mso-style-link:"Titre 6 Car";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Arial",sans-serif;
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#003399;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#660000;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.Titre1Car
        {mso-style-name:"Titre 1 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 1";
        font-family:"Arial",sans-serif;
        color:black;
        font-weight:bold;}
span.Titre2Car
        {mso-style-name:"Titre 2 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 2";
        font-family:"Arial",sans-serif;
        color:black;}
span.Titre3Car
        {mso-style-name:"Titre 3 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 3";
        font-family:"Arial",sans-serif;
        color:black;}
span.Titre4Car
        {mso-style-name:"Titre 4 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 4";
        font-family:"Arial",sans-serif;
        color:black;}
span.Titre5Car
        {mso-style-name:"Titre 5 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 5";
        font-family:"Arial",sans-serif;
        color:black;}
span.Titre6Car
        {mso-style-name:"Titre 6 Car";
        mso-style-priority:9;
        mso-style-link:"Titre 6";
        font-family:"Arial",sans-serif;
        color:black;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:"Consolas",serif;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle27
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 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 bgcolor=white lang=FR link="#003399" vlink="#660000"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Hello Paul,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Thank you for this information, it works perfectly in one Xcos schema.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>I ‘ve written a function in a sce file before starting xcos simulation, and by adding a label « PB1 » and testing « gui=CLR », the procedure is more general (see attached file).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Nevertheless, it is surely not well adapted in a stronger schema with superblocks et more than one CLR block.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Also, I think that the right solution at the right place would be to modify the CLR gui, by adding a case « Initial state », like in the Integrator with saturation block (it should definitively slove this problem).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>So, do you advice to write a bugzilla in the wishlist ?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Best regard,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Pierre<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'><img width=216 height=119 style='width:2.25in;height:1.2416in' id="_x0000_i1028" src="cid:image005.jpg@01D1E512.BCEBD840"></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:FR'><img width=378 height=222 style='width:3.9416in;height:2.3083in' id="Image_x0020_2" src="cid:image006.jpg@01D1E512.BCEBD840"></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:FR'>De :</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:FR'> users [mailto:users-bounces@lists.scilab.org] <b>De la part de</b> Paul Bignier<br><b>Envoyé :</b> vendredi 22 juillet 2016 12:13<br><b>À :</b> Users mailing list for Scilab <users@lists.scilab.org><br><b>Objet :</b> Re: [Scilab-users] Steady state condition of o first order low pass filter<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><br>Hello Pierre,<br><br>Indeed you can modify that field in the block's "model.state" parameter (0 by default).<br>From Xcos, Go to Simulation->Compile.<br>Then in Scilab (let's assume your block number is 3) :<br> --> scs_m.objs(3).model.state = newInitValue; xcos_simulate(scs_m, 4);<br><br>Regards,<br>Paul<span style='mso-fareast-language:FR'><o:p></o:p></span></p><div><p class=MsoNormal>On 07/22/2016 12:02 PM, Perrichon wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-family:"Times New Roman",serif;mso-fareast-language:FR'><img width=39 height=38 style='width:.4083in;height:.4in' id="_x0000_i1025" src="cid:image010.jpg@01D1E512.BCEBD840"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Hello,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Is there a way to initialize a first order low pass filter to an initial value to its final value, in order to avoid any transitory at start simulation ?</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>May be in a batch file and accessing to the scs_m CLR block register ?</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>But I don’t see where can I do it.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Do you have any idea.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>In the following example, I want 1 in register up to time t=5s</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Init value is not available in the CLR block.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Thanks for your response,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Sincerely</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>Pierre</span><o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:FR'><img width=418 height=206 style='width:4.35in;height:2.15in' id="Image_x0020_1" src="cid:image004.jpg@01D1E510.0E3C8620"></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Times New Roman",serif;mso-fareast-language:FR'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>users mailing list<o:p></o:p></pre><pre><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><o:p></o:p></pre><pre><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-family:"Times New Roman",serif;mso-fareast-language:FR'><br><br><o:p></o:p></span></p><pre>-- <o:p></o:p></pre><pre>Paul BIGNIER<o:p></o:p></pre><pre>Development engineer<o:p></o:p></pre><pre>-----------------------------------------------------------<o:p></o:p></pre><pre>Scilab Enterprises<o:p></o:p></pre><pre>143bis rue Yves Le Coz - 78000 Versailles, France<o:p></o:p></pre><pre>Phone: +33.1.80.77.04.68<o:p></o:p></pre><pre><a href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a><o:p></o:p></pre></div></body></html>