This Transform is no longer supported by Danlaw or dSPACE. Use dSPACE (using XIL API).
The dSPACE Connector Transform enables you to perform real-time HIL testing. This topic applies to the configuration where CLib (C libraries) are used for communication between MxTransIt and dSPACE.
•To load the dSPACE Transform, dSPACE (or the Dscoml32.dll file) must be installed on your PC. •To load a project with a dSPACE Transform onto a PC that does not have dSPACE installed, you can copy Dscoml32.dll from another system. dSPACE must be installed to run the project. |
So that Matlab can find the S-Function, set the path to the Mx Suite: In Matlab, go to: File-> Set Path... Then click Add Folder, browse to the currently installed harness folder, and add the path to it. For example: C:\Program Files\MicroMax\MxSuite 3.36.24864\Harness\dSpace |
1.In MxTransIt, use the Toolbox to put the dSPACE Transform into your Harness. 2.Insert the S-Function into the top level of your model. 3.Set the Tick Period property of the dSPACE Transform to 5 to 10ms or more, depending PC performance. 4.Set the Auto Export Signals property to True to be automatically export Signals on selection. This reduces the need to select which ports to export and the amount of mouse clicks while harnessing the system. |
There are two options for harnessing I/O with the dSPACE transform: •Automatic harnessing using the dSPACE trace file •Direct connection to the S-Function with a user-created CSV file Both options can be used together.
|
The MxNetSFunction is expected to be executed every 1ms. If this timer interferes with execution of your model, place the S‑Function into its own subsystem in the top level of your model. See Timing and Performance Considerations for Co-Simulation. To change the execution rate of the subsystem in Matlab, right click on "subsystem properties"’ put a check mark next to “treat as atomic unit,” and change rate from (-1) to 0.001 s (1 ms). |
Use the Board Name property in the dSPACE transform's properties to select the board that runs the model with the MxNetSFunction. You can use the Properties box in MxTransIt, or select Project->SUT Connector Settings->Custom Harness from the MxVDev main menu. If your dSPACE system has multiple cores, you need to select the Board Name that corresponds to the one that runs the model. By default board names for multicore systems show up with an underscore and index. For example: ds1006, ds1006_2, etc. If you select the wrong board, MxVDev will fail to connect to dSPACE with the following error: CLIB connection error, Failed to get address for "responsePacket" variable, clib error DS_ILLEGAL_VARIABLE_NAME (2102) To find which core corresponds to your CPU name and corresponding application, you can use the Control Desk platform browser: |
Timing and Performance Considerations for Co-Simulation