This section aids in resolving connection issues between the MxVDev software and dSPACE hardware.  Below is a list of possible errors and the steps to correct them.

General Errors

Ensure model was rebuilt

Delete temporary files prior to rebuilding the model or the previously generated code will be used to rebuild the dSPACE binary.

Be sure to delete the auto-generated folders (sfprj, slprj, *_rti1006, and *_rti1005) before rebuilding the application.
We suggest that you to add a script to delete those folders along with other scripts that you run before the build.

Verify the date-time stamp on the trace file (.trc), map file (.map), and binary file (.x86, .ppc) are consistent and recent.

Ensure rebuilt binary is loaded

There is a check-box option in the dSPACE model parameters to automatically load the built binary.

If this is not enabled or if it fails the binary much be manually loaded onto the target board using Control Desk.

Ensure correct dSPACE board is selected in transform

If you select  the wrong board, MxVDev will fail to connect to dSPACE with this error:
CLIB connection error, Failed to get address for "responsePacket" variable, clib error DS_ILLEGAL_VARIABLE_NAME (2102)

Ensure the Board Name property of the dSPACE transform is correct. See dSPACE–Select Board Name.

A separate dSPACE transform is needed for each dSPACE board in the system.

Could not load MicroMax.MxNet.Clib.dll


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. Copy the file into the /bin subfolder in the MxSuite Installation Folder. This enables you to open and run projects, but dSPACE must be installed to run the project.

Connection Failures

Failed to get board index for board

Verify the dSPACE board name is set correctly in the Transform properties. See dSPACE–Select Board Name.

Failed to get board spec for board

This is an internal dSPACE error. Reset the PC and dSPACE system.

Reinstall/repair dSPACE software.

Contact dSPACE support for CLIB.

Failed to get address

The most likely cause of this error is an inconsistency in the setup.

Follow the General Error instructions to rebuild and reload the dSPACE model.

MxNet version mismatch

This is caused by a inconsistency in the setup.

Be sure the Matlab Path is set to the current version of the MxSuite.

Follow the steps under General Errors to rebuild and reload the dSPACE model.

MxNet endianness mismatch

Contact Danlaw MxSuite support and verify which dSPACE board is in use: DS-1005, DS-1006, DS-1002, etc...

Test read of stimulus packet header as failed

Reset the system, both the PC and the dSPACE hardware.

If the problem persists, contact Danlaw MxSuite support.

Send connect failed

Verify the dSPACE model is executing.

First flush failed, Second flush failed

These are warnings, the flushes may fail but the system may recover.

If the system fails to connect and the flushes are failing reset the system, both the PC and the dSPACE hardware.

CLIB data integrity failure. Wrote X but read back Z.

There is an inconsistency between reading and writing data to the dSPACE memory.

Reset the system, both the PC and the dSPACE hardware, and it the problem persist contact dSPACE support for CLIB.

Debugging Steps for dSPACE and MxVDev

1.Install MxVDev.

2.Open Matlab.

3.Add path to the to Harness folder of the currently installed MxVDev so Matlab can find the S-Function. For example:

C:\Program Files\MicroMax\MxSuite\Harness\dSpace

The Model is in the user's project folder and is named {model_name}.mdl

Scroll up and down the Path list and make sure there are no other paths to MxSuite present.

4.Delete the auto-generated folders: sfprj, slprf, *_rti1006, *_rti1005
Warning: If temporary folders are not deleted, Matlab will re-use old generated code.

5.To Build:

Single Board: Ctrl-Shift B (or through the main menu)

Multi Board:

i)Click on the “multi-processor” block.

ii)Select “Build All”.

6.Wait. (Large models can take a few minutes.)

7.Launch dSPACE Control Desk.

8.From the main menu:

a.Platform -> Application -> Load Application -> Load “{model_name}.sdf”

b. File -> Recent Experiments -> .cdx file

9.Make the experiment controls go live on Control Desk through the menu or the toolbar. This way you can see live values being updated. This step shows if the model is loaded and running.

10. Close Control Desk.

11.Launch MxVDev and check that the harness connects.

Adding Signals

To add signals found in Control Desk to the transform:

1.Right click on a control.

2.Choose highlight variable.

3.Look at the sdf tab at the bottom.

4.Click on a control.

It will show the information at the bottom.

5.Drag to Excel.

6.The path you get is the path to the variable from the Trace File.

7.Replace “SlaveAppl” with “dSpace” when using with dSPACE transform 'Select Signals' control.

HILAPI version change

If user admin rights prevent automatic editing of config files, you can manually edit MxTransIt.exe.config and MxVGUI.exe.config located in the Bin subfolder of the MxSuite Installation folder to allow DLL redirection to a different version of HILAPI. For example, if 1.6 version of HILAPI is present, the following lines should be added to config files:


<assemblyIdentity name="dSPACE.HILAPI.Common" publicKeyToken="F9604847D8AFBFBB" />

<bindingRedirect oldVersion="" newVersion="" />



<assemblyIdentity name="dSPACE.HILAPI.MAPort" publicKeyToken="F9604847D8AFBFBB" />

<bindingRedirect oldVersion="" newVersion="" />


Related Topics:



dSPACE (using CLib)