TO RUN THE DSPACETEST PROGRAM: Connect a dSPACE breakout box to the back of the computer. Make sure that the cable is correctly and fully engaged. On the breakout box, connect DACH1 to ADCH1 using a BNC/BNC cable. Copy the files dspacetest.mdl and dspacetest.lay into a folder on the C:\ drive or on a USB drive connected to the computer. Click on the Matlab icon on the desktop. If asked about the platform, click on DS1104. Change the Matlab working directory to the folder where the dspacetest files were copied. Click on the dSPACE ControlDesk icon on the desktop (not the dSPACE Configuration icon!). Scroll down the warning window and click accept. In the Matlab window, type open dspacetest.mdl. After a short time, a Simulink window should open showing the block diagram of the test program. The program outputs the same sinusoid to all the D/A's and reads the A/D and encoder values. Click on the Simulink window and type ctrl-B. The results of the compilation and loading of the program should appear in the Matlab window. If all is ok, the program is automatically loaded on the dSPACE board and started. In dSPACE, click on File/Open and search for the working folder to open the dspacetest.lay file. A message should appear saying: "The layout contains data connections. Do you want them to be loaded?" Click on yes. In the dSPACE window, a smaller window should appear with 8 plots (one for each A/D input) and with 2 numerical boxes (one for each encoder input). If needed, resize the window so that all the displays are visible. Click on the Animation mode button (the fourth icon to the right of the red square or stop button). A sinusoid with magnitude +/- 1 should appear in the first plot. This indicates that A/D channel 1 and D/A channel 1 are working. If it is indeed the case, other channels can be tested by moving the BCN/BNC cable. If not, D/A channel 1 should be tested with a scope. The encoder input of the dSPACE board and the encoder of a motor can be tested by connecting the encoder to Inc1 or Inc2 on the breakout box. Rotate the shaft of the motor and check that the display changes value. Shutdown: Switch from animation mode to edit mode by clicking on the second icon to the right of the stop button. Click on the stop button. Close the dSPACE window. Close the Matlab window.