Code covered by the BSD License  

Highlights from
Airport Conveyer Belt

image thumbnail

Airport Conveyer Belt



19 Jul 2011 (Updated )

The demo is about a airport conveyer belt modeled in Simulink, with controls modelled in Stateflow.

function waitfortreal(tsim)
% This function is intended to synchronize the Simulink clock with real time.  
% When called with t = 0, the beginning time is established.  Subsequent calls, with 
% tsim > 0, enter a busy wait state until the real-time clock catches up to tsim.
% It is assumed that the Simulink clock, tsim, is faster than real time.  

%	Stan Quinn December 1996
%   Copyright (c) 1995-97 by The MathWorks, Inc.
%   $Revision: 1.1 $

global waitfortrealTstart;

if (tsim == 0)
   waitfortrealTstart = clock;
else % Check elapsed time
    while etime(clock, waitfortrealTstart) < tsim

Contact us