Real-Time Workshop | ![]() ![]() |
Implementation Overview
Real-Time Workshop includes DOS run-time interface modules designed to implement programs that execute in real time under DOS. These modules, when linked with the code generated from a Simulink model, build a complete program that is capable of executing the model in real time. The DOS run-time interface files can be found in the matlabroot
/rtw/c/dos/rti
directory.
Real-Time Workshop DOS run-time interface modules and the generated code for the f14
demonstration model are shown in Figure C-1.
Figure C-1: Source Modules Used to Build the DOS Real-Time Program
This diagram illustrates the code modules that are used to build a DOS real-time program.
To execute the code in real time, the program runs under the control of an interrupt driven timing mechanism. The program installs its own interrupt service routine (ISR) to execute the model code periodically at predefined sample intervals. The PC-AT's 8254 Programmable Interval Timer is used to time these intervals.
In addition to the modules shown in Figure C-1, the DOS run-time interface also consists of device driver modules to read from and write to I/O devices installed on the DOS target.
Figure C-2 shows the recommended hardware setup for designing control systems using Simulink, and then building them into DOS real-time applications using Real-Time Workshop. The figure shows a robotic arm being controlled by a program (i.e., the controller) executing on the target PC. The controller senses the arm position and applies inputs to the motors accordingly, via the I/O devices on the target PC. The controller code executes on the PC and communicates with the apparatus it controls via I/O hardware.
Figure C-2: Typical Hardware Setup
![]() | DOS Device Drivers Library | System Configuration | ![]() |