Last Updated: 20 July 1996
Some notes on using dSPACE equipment:
1. The boxes are labeled "dspace01" through "dspace10".
2. The pins for input/output are labeled on the top of the box. The pins most of you will need are "ADC 1" through "ADC 4", "DAC 1" through "DAC 4", and "Analog GND". These are the 4 input channels, output channels, and grounds, respectively.
3. A C program can be compiled and downloaded to a dSPACE box with the following command:
down31 foo -c dspace04
where the C program is in a file named "foo.c" and the target is dspace04.
4. All communication with the dSPACE boxes is coordinated through a daemon process running on charcoal. The communication processes occasionally get hung in a bad state, especially if the dSPACE box has been turned off/on or the Sun has been rebooted. The "dcont" command is available to fix these situations. Try typing:
dcont -c dspace04 -k
to terminate the daemon processes for dspace04. (Use the number that refers to the dSPACE box you are working on.)
Try the following demo of a first-order RC circuit
*** The RC circuit must be connected to one of the dSPACE MiniBoxes ***
1. Setup your account to be able to run the necessary commands and functions
2. Create a directory in your account by typing the following:
mkdir dspace
3. Copy the demo files to your new directory. Use the following command:
cp /home/charcoal/student/e/eg100ee1/files/est.* dspace/
4. Now we can begin the demo. Use the following commands to test the functionality of the dSPACE box:
/usr/sbin/ping dspaceXX
The system should return the following line to indicate that the dSPACE box is working properly:
dspaceXX is alive
5. All communication with the dSPACE box is coordinated through a daemon process running on charcoal. The communication processes occasionally get hung in a bad state, especially if the dSPACE box has been turned off/on or the Sun has been rebooted. The "dcont" command is available to fix these situations. Try typing:
dcont -c dspaceXX -k
to terminate the daemon processes for your MiniBox. (Replace the XX with the number that refers to the dSPACE box you are working on.)
6. We must compile the C program before we begin. Type the following to compile the C program and load it into the dSPACE MiniBox.
down31 -c est dspaceXX -k
This downloads the file est.c and loads it into the dSPACE box you are using. (Replace the XX with the number that refers to the dSPACE box you are working on.)
7. A tool called "trace31" is available as a virtual oscilloscope that can be used to probe signals on the dSPACE as it is running. Trace31 is useful for debugging a program and also to transfer data from the dSPACE to the Sun computer. Trace31 can produce plots and/or save the data for subsequent analysis with Matlab or other END software. Trace31 is executed as:
trace31 -c dspaceXX &
(Replace the XX with the number that refers to the dSPACE box you are working on.) Trace31 uses variables that are defined in the file est.trc. To bein, click on Start Trace. Data will be collected and then displayed.
Notes: After the command down31 est -c dspaceXX is executed for the first time, the C program does not need to be compiled again. Replace down31 with ld31.