This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPLCRC410EVM: Comunicate with the DLPLCRC410EVM through Matlab or Python

Part Number: DLPLCRC410EVM
Other Parts Discussed in Thread: DLPLCR70EVM,

Hello

Just bought the Discovery 4100 kit ( DLPLCRC410EVM + DLPLCR70EVM ) and i need to command it from matlab. 

The installation path of D4100Explorer-2.0 Software includes a file called "D4100_usb.dll" ( here ...\D4100Explorer-2.0\rollbackBackupDirectory\C\Windows\System32 ) .


Such file should be the dll to communicate with the board, i would like to use it but i'm missing the .h file.

Could you please provide it ? 

Thanks 

Federico.

  • Hi Federico,

    PFA the .h and .lib file.

    -ykc8055.D4100_usb.h6562.D4100_usb.lib

  • Hello ykc 

    Thanks again for your answer. 

    I've just downloaded the files you sent me, but once i try to load the library on Matlab (i.e. loadlibrary('D4100_usb.dll','8055.D4100_usb.h') ) 
    i get an error that says the file  "RegisterDefines.h"  is missing.

    The inclusion of "RegisterDefines.h" is requested at line 19 of 8055.D4100_usb.h.  

    Is "RegisterDefines.h" a TI header ? can you provide it as well? 

    Thanks again

    Federico

  • Hi Federico,

    PFA the files. 

    RegisterDefines.hCyAPI.h

    -ykc

  • Hello ykc, hello Federico,

    I'm using the same device and am currently trying to load the library into MATLAB.

    I'm using Windows 10 and have folder on my desktop with the following files from this thread: '8055.D4100_usb.h', 'RegisterDefines.h', 'D4100_usb.dll', 'CyAPI.h'.

    In MATLAB I use the following commands which looks as follows:

    -fullpathtolibrary='C:\Windows\SysWOW64\D4100_usb.dll'

    -fullpathtoheader='C:\Windows\SysWOW64\8055.D4100_usb.h'

    -loadlibrary(fullpathtolibrary,fullpathtoheader);

    After that 'loadlibrary' command, MATLAB is busy for a while but finally gives me a lot of errors.

    Every advice and help is much appreciated and I'd be grateful for some support. Thanks.

  • Hi Louis 

    I had exactly the same problem of yours.
    After a couple of hours of attempts i gave up and wrote a c++ executable. It did the job! 

    In any case, i wandered among Mathworks forums and the reason for all that errors could be incompatibility of a 32 bit dll ( the DLP one )  with 64 bit Matlab. 

    An interesting attempt would be to test it on a 32 bit Matlab!
    The 2013b should be the last 32 bit one.

    Hope this helps 

    Federico 

  • Hello Federico,

    thank you for your swift reply.

    I'd like to follow your example and use the 8055.D4100_usb.h as a c++ executable file.

    I read that you can use a MEX application for MATLAB in order to integrate it?

    Could you please tell me how you have done it and made it work?

    Thank you very much.

    Best,

    Louis

  • Hi Louis

    Sorry for the late response, i've been quitte busy lately.

    I never developed MEX applications for MATLAB! So i don't know how to help you for this. 

    In any case another good idea could be the development of a dll that wraps the original DLP dll.
    According to my actual knowledge the dll wrapper is a good and fast-to-develop tool for your purposes.

    Best

    Federico