User:DukeEgr93/DSPACE2
Jump to navigation
Jump to search
Building a Basic Model
Building a basic Simulink model and running it on the dSPACE cards is fairly straightforward:
- Start the dSPACE ControlDesk.
- Start MATLAB - note that on a PC, the first time MATLAB is run after the PC has been turned on may take quite a bit of time to start.
- MATLAB must run a configuration script to communicate with dSPACE. In Hudson 149, the script is already set to run. If that is not the case,
dspacerc.m
must be run. That script is provided with the dSPACE card and software.
- MATLAB must run a configuration script to communicate with dSPACE. In Hudson 149, the script is already set to run. If that is not the case,
- In MATLAB, start Simulink.
- The block library should already include the dSPACE blocksets, though the individual blocks may need to be loaded. To load them, simply expand the
dSPACE RTI1104
blockset. - In the Simulink Library Browser, go to File->New->Model; when the model comes up, save it inside the folder you chose when creating the experiment
- The model needs to know the properties of the DSP card in order to compile the model properly. To set these properties, go to the model's window, go to Simulation->Configuration Parameters
- Solver: make sure to use a fixed-step solver; change the Fixed-step size if need be
- Hardware Implementation: choose the following:
- Device type: "Custom"
- Byte ordering: "Big Endian"
- Signed integer division rounds to: "zero"
- The block library should already include the dSPACE blocksets, though the individual blocks may need to be loaded. To load them, simply expand the