Airport Conveyer Belt
19 Jul 2011
24 Aug 2011)
The demo is about a airport conveyer belt modeled in Simulink, with controls modelled in Stateflow.
% 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 $
if (tsim == 0)
waitfortrealTstart = clock;
else % Check elapsed time
while etime(clock, waitfortrealTstart) < tsim