<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hi, <br></div><div><br></div><div>you might want to use the discrete block "DLR" instead. <br></div><div><br></div><div>first you could convert the PID in s-domain into z domain using the dscr function in the Scilab, and then use the value in DLR block for hybrid simulation. make sure the clock u use for the block is same as the sampling rate in the dscr function. <br></div><div><br></div><div>hope this helps.<br></div><div><br></div><div>rgds,<br>CL</div><br><div style="" data-zbluepencil-ignore="true" class="zmail_extra"><br><div id="Zm-_Id_-Sgn1">---- On Mon, 14 Sep 2020 22:13:05 +0800 <b>Steve <stepan.podhorsky@gmail.com></b> wrote ----<br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;"><div>Hello, <br> <br>I have been facing a problem how to develop a hybrid simulation in the <br>Scilab/Xcos. The simulation consists of a SISO (single input single output) <br>system in continuous time domain and a discrete PID controller. The PID <br>controller is a CBLOCK containing the code in the C programmin language. <br>Interface between the "analog world" and the "discrete world" consists of <br>two SAMPLEHOLD blocks. My problem is that I don't know how to achieve a <br>state when the CBLOCK is calculated in synchronism with the sample and hold <br>process realized in the SAMPLEHOLD blocks. Can anybody give me an advice or <br>recommend me some tutorial? Thanks in advance. <br> <br> <br> <br>-- <br>Sent from: <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html" target="_blank">http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a> <br>_______________________________________________ <br>users mailing list <br><a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a> <br><a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a> <br></div></blockquote></div><div><br></div></div><br></body></html>