Difference between revisions of "DSPACE"

From PrattWiki
Jump to navigation Jump to search
Line 3: Line 3:
 
== Templates ==
 
== Templates ==
 
Currently there are two useful templates for the dSPACE cards with Simulink.  To download, right-click the link to the file name and download it to your computer.  Pictures of the .mdl files are shown at right.
 
Currently there are two useful templates for the dSPACE cards with Simulink.  To download, right-click the link to the file name and download it to your computer.  Pictures of the .mdl files are shown at right.
# [http://www.duke.edu/~mrg/FILES/DACtemplate.mdl DACtemplate.mdl] - containing all eight DACH linkages, including input ports and 1/10x gains.
+
# [http://www.duke.edu/~mrg/FILES/DACtemplate.mdl DACtemplate.mdl] - containing all eight DACH linkages, including input ports and 1/10x gains. [[Image:DACtemplate.png|thumb|DAC template]]
[[Image:DACtemplate.png|thumb|DAC template]]
+
# [http://www.duke.edu/~mrg/FILES/ADCtemplate.mdl ADCtemplate.mdl] - containing all eight ADCH linkages, including output ports, 10x gains, and a demultiplexer for the first four channels.[[Image:ADCtemplate.png|thumb|ADC template]]
# [http://www.duke.edu/~mrg/FILES/ADCtemplate.mdl ADCtemplate.mdl] - containing all eight ADCH linkages, including output ports, 10x gains, and a demultiplexer for the first four channels.
 
[[Image:ADCtemplate.png|thumb|ADC template]]
 
 
To use the templates, simply download them, open them in Simulink, and drag-and-drop the relevant chanels into your model.  Note, however, the the input and output numbers - may change as a result of conflicts with other inputs and outputs in your system.  After saving the model, you may want to go back and re-number those ports before continuing.
 
To use the templates, simply download them, open them in Simulink, and drag-and-drop the relevant chanels into your model.  Note, however, the the input and output numbers - may change as a result of conflicts with other inputs and outputs in your system.  After saving the model, you may want to go back and re-number those ports before continuing.
 +
 +
== File for Labs ==
 +
# Instrumentation Lab, Fall 2008: [[DSPACE/TakeData1|TakeData1.m]] file
  
 
== Accessing Values with ControlDesk ==
 
== Accessing Values with ControlDesk ==

Revision as of 11:21, 6 October 2008

dSPACE generally refers to a microprocessing card used in the ME 125 labs. As more dSPACE tutorials become available, this page will list them.

Templates

Currently there are two useful templates for the dSPACE cards with Simulink. To download, right-click the link to the file name and download it to your computer. Pictures of the .mdl files are shown at right.

  1. DACtemplate.mdl - containing all eight DACH linkages, including input ports and 1/10x gains.
    DAC template
  2. ADCtemplate.mdl - containing all eight ADCH linkages, including output ports, 10x gains, and a demultiplexer for the first four channels.
    ADC template

To use the templates, simply download them, open them in Simulink, and drag-and-drop the relevant chanels into your model. Note, however, the the input and output numbers - may change as a result of conflicts with other inputs and outputs in your system. After saving the model, you may want to go back and re-number those ports before continuing.

File for Labs

  1. Instrumentation Lab, Fall 2008: TakeData1.m file

Accessing Values with ControlDesk

With respect to ControlDesk, you will generally want to access the output value of the relevant ADCn gain to get the actual measurement from the channel and you will want to access the output value of the block just before the DGn gain to get the desired voltage sent to the DACHn card. For the template itself, this will be the output of the DACn in port; if you are performing signal processing to assign a voltage value - and have thus removed the in port - you will need to use the output value from whatever block feeds into the DGn block.


Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References