{"id":9632,"date":"2018-04-06T09:00:06","date_gmt":"2018-04-06T13:00:06","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=9632"},"modified":"2018-04-16T09:10:02","modified_gmt":"2018-04-16T13:10:02","slug":"simulink-pacer-again","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2018\/04\/06\/simulink-pacer-again\/","title":{"rendered":"Simulink Pacer (Again)"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\n   <introduction><\/p>\n<p><a href=\"https:\/\/www.mathworks.com\/\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>&#8216;s pick this week is <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2018a\/simulink\/ug\/simulation-pacing.html\">Simulink Pacing<\/a> by MathWorks&#8217; Simulink Development team.\n      <\/p>\n<p>   <\/introduction><\/p>\n<p>Last summer, <a href=\"https:\/\/blogs.mathworks.com\/pick\/2017\/07\/28\/real-time-pacer-for-simulink\/\">I highlighted the Simulink Pacer block<\/a> as a means to slow a simulation down to a desired speed so you can see what&#8217;s happening.  Yesterday, one my colleagues was demonstrating a customized prototype that streams data directly from Simulink to a cloud IoT platform.  He elegantly used the new simulation pacing capabilities to slow the simulation so you could see the simulation in Simulink and the IoT dashboard updating at the same time.\n   <\/p>\n<p>Here&#8217;s the same model from last time.  To enable simulation pacing in Simulink, select the &#8220;Simulation&#8221; drop down and then &#8220;Pacing Options&#8221;.\n   <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/simpacer2_1.png\"> <\/p>\n<p>The new simulation pacing options allow me to drag the slider to adjust the speed as necessary.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/simpacer2_2.gif\"> <\/p>\n<h3>Comments<a name=\"2\"><\/a><\/h3>\n<p>Give R2018a a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=9632#respond\">here<\/a>.\n   <\/p>\n<p><script language=\"JavaScript\">\n<!--\n\n    function grabCode_537e57f891c6427fa6af2a05297ec6da() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='537e57f891c6427fa6af2a05297ec6da ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 537e57f891c6427fa6af2a05297ec6da';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        author = 'Sean de Wolski';\n        copyright = 'Copyright 2018 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\n\n\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }   \n      \n-->\n<\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><a href=\"javascript:grabCode_537e57f891c6427fa6af2a05297ec6da()\"><span style=\"font-size: x-small;        font-style: italic;\">Get<br \/>\n            the MATLAB code<br \/>\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>      Published with MATLAB&reg; R2018a<\/p>\n<\/div>\n<p><!--\n537e57f891c6427fa6af2a05297ec6da ##### SOURCE BEGIN #####\n%% Simulink Pacing in Base Simulink\n%\n% <https:\/\/www.mathworks.com\/\/matlabcentral\/profile\/authors\/3208495 Sean>'s\n% pick this week is\n% <https:\/\/www.mathworks.com\/help\/releases\/R2018a\/simulink\/ug\/simulation-pacing.html\n% Simulink Pacing> by MathWorks' Simulink Development team.\n% \n\n%% \n% Last summer,\n% <https:\/\/blogs.mathworks.com\/pick\/2017\/07\/28\/real-time-pacer-for-simulink\/\n% I highlighted the Simulink Pacer block> as a means to slow a simulation\n% down to a desired speed so you can see what's happening.  Yesterday, one\n% my colleagues was a demonstrating a customized prototype that streams\n% data directly from Simulink to a cloud IoT platform.  He elegantly used\n% the new simulation pacing capabilities to slow the simulation so you\n% could see the simulation in Simulink and the IoT dashboard updating at\n% the same time.\n%\n% Here's the same model from last time.  To enable simulation pacing in\n% Simulink, select the \"Simulation\" drop down and then \"Pacing Options\".\n%\n% <<simpacer2_1.png>>\n%\n% The new simulation pacing options allow me to drag the slider to adjust\n% the speed as necessary.\n%\n% <<simpacer2_2.gif>>\n\n\n%% Comments\n% \n% Give R2018a a try and let us know what you think\n% <https:\/\/blogs.mathworks.com\/pick\/?p=9632#respond here>.\n%\n \n\n##### SOURCE END ##### 537e57f891c6427fa6af2a05297ec6da\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/simpacer2_1.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Sean&#8216;s pick this week is Simulink Pacing by MathWorks&#8217; Simulink Development team.<\/p>\n<p>Last summer, I highlighted the Simulink Pacer block as a means to slow a simulation down&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2018\/04\/06\/simulink-pacer-again\/\">read more >><\/a><\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/9632"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=9632"}],"version-history":[{"count":6,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/9632\/revisions"}],"predecessor-version":[{"id":9648,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/9632\/revisions\/9648"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=9632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=9632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=9632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}