4.5

4.5 | 6 ratings Rate this file 17 Downloads (last 30 days) File Size: 22.5 KB File ID: #11680
image thumbnail

Simulink(R) Execution Control

by Roger Aarenstrup

 

11 Jul 2006 (Updated 09 Sep 2009)

A Simulink(R) block for execution control of Simulink models

| Watch this File

File Information
Description

This block allows you to simulate a Simulink(R) model in "real-time". You can also set a factor of real-time, for exampel three times real-time of half real-time. It is possible to set the priority of the the Simulink process and model thread.

To install: Unpack the zip-file in a directory and add that directory to your MATLAB(R) path. When you start simulink the block library should be added automatically to your Simulink library browser.

Required Products Simulink
MATLAB release MATLAB 7.2 (R2006a)
Other requirements Windows only
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
13 Nov 2007 Devendra Rai

Wow! You made my day. Thanks!

17 Dec 2007 Erik Stalberg

I can not live without this

26 May 2008 Bjorn J

I cannot run this in Linux (Ubuntu). It says that
"S-Function 'sfun_exec_contr' does not exist."
Can you please help me?

09 Jun 2008 Robert Effinger

It's worth mentioning for us noobs out there...

You don't have to connect the output of this timer to anything for it to work. You just stick it in the simulink model on its own and it slows things down appropriately. I think the timer's outputs are for diagnostic purposes only.

15 Dec 2008 cpp

This has been really helpful to me. I have following questions though--

1)About Real-Time factor, how do we know we maxed it out given the limitations of PC?

In the overrun behavior options, if I use Error then it reports error even for lowest factors like 5,10.
In the overrun behavior options, if I use continuous it runs fine even for factors like 5000!

2) Is there a way I can run different subsystems and main model at two different Real-time factors?

05 May 2010 Kevin J. Delaney

So advanced that it appears to be magic. Many thanks!

01 Jun 2010 Toto

So perfect.
I use it for setting and getting my xPCTarget parameters and signals.
Very helpful.
Good Job.

09 Nov 2010 Nitin Kataria

Hello,

I tried using the execution control block but get the following error message:

Error while obtaining sizes from MEX S-function 'sfun_exec_contr' in 'untitled/Simulink Execution Control/S-Function'. MATLAB error message:
Invalid MEX-file 'C:\Program Files\MATLAB\R2006a\MyPlugins\exec_ctrl_V4\sfun_exec_contr.mexw32': The specified procedure could not be found.

I tired looking around everywhere but did not find a solution. Can someone please help?

Thanks,
Nitin

07 Aug 2011 kais

thinks for this file.

Please login to add a comment or rating.
Updates
18 Jul 2006

Some have asked for an option to be able to change the priorities without real-time simulation. This is reflected in the latest update of this block.

06 Jul 2009

The update include source code and is tested for release 2009a.

06 Jul 2009

The update include source code and is tested for release 2009a.

08 Sep 2009

Updated text only

08 Sep 2009

Updated text and files

09 Sep 2009

Update file

Tag Activity for this File
Tag Applied By Date/Time
clock Roger Aarenstrup 22 Oct 2008 08:32:26
fun Roger Aarenstrup 22 Oct 2008 08:32:26
realtime execution priority control Roger Aarenstrup 22 Oct 2008 08:32:26

Contact us at files@mathworks.com