Post Go back to editing

Controlling AD5372 Using 64-bit MATLAB

Hi,

I am trying to control the DAC EVAL-AD5372 from the MATLAB software environment.

I was able to do this successfully from 32bit MATLAB using the loadlibrary function and DLL ADI_CYUSB_USB4.dll found from http://ez.analog.com/thread/11105 and a wrapper I created.

However, when I try to do the same for 64bit MATLAB, the board fails to be detected. Has anyone been successful using this DLL in a 64bit application? Is it a problem of MATLAB using a specific compiler?

Thanks,

Luke

  • Is there an updated 64 bit version of this DLL?

    Is there source code for ADI_CYUSB_USB4.dll?

  • Hi LukeW,

    We do not provide support for the .dll... in fact, we do not provide support for any software for the EVBs.

    Being said that, the .dll should be capable of operating in windows 64bits.. as we are doing... the only 64bits operating system that is not valid is xP but is is already obsolete so, I believe is not applicable in this case.

    Answering your question... does Matlab 64bits operates in the same way that Matlab 32bits in terms of libraries?

    Regards,

    Miguel

  • Hi ,

    Thanks for the reply. Yes a 32bit DLL can be used in a 64bit Windows system as long as it is called by a 32bit process. However, 64bit MATLAB can not be used to directly load a 32bit DLL. The 32 bit DLL is fine for 32bit MATLAB. I tried to create a 64bit wrapper DLL which loads ADI's 32bit DLL, calling the 64bit wrapper DLL from MATLAB works but it doesn't initialize the board properly.

    Everything worked for 32bit MATLAB of course (i.e. a 32 bit version of this wrapper interfaces with MATLAB fine)

    According to this it doesn't seem like people had much success: MATLAB Central - loading 32 bit DLL on 64 bit matlab? 

    I'm not a software engineer so maybe there is a way but probably not

    Another reason for the wrapper is that MATLAB does create its own C prototype/conversion functions when it loads a C++ DLL. Thus it is advantageous to simplify the function prototypes in the wrapper to make the loading more successful. This MATLAB conversion process is probably different for 32 bit vs 64 bit.

    If ADI made this DLL, then I presume someone has the source code and would be able to compile a 64 bit version at the press of a button. This would be much easier. Then at least if it fails I would know the problem is with the MATLAB C functions

  • Hi Luke,

    Did you try to look into Cypress web page? I mean, the dll has been created to interact with their microcontroller... I think they may have something similar for 64 bits.

    Answering your question, teh dll was created ages ago so, find the source code could take for ever, as I dont know who was the responsible to create it.

    Regards,

    Miguel

  • Hi Miguel,

    I haven't looked at that yet, something like this I guess: SuiteUSB 3.4 - USB Development tools for Visual Studio | Cypress Semiconductor 

    I don't really have time right now to go through how their dll operates, so I just downgraded to 32bit MATLAB...

    There isn't a SVN repository somewhere with the old code? I got old VB6 source code from ADI before that must have been 10 years old

    Thanks,

    Luke

  • Hi,

    We updated few years ago the old VB6 code to use the new dll librarie... but for commodity we used VB6 so, the VB6 still is applicable BUT may be you have the old VB6 code using the old dll libraries as I dont remember to publish anywhere the new code.

    From were did you got the code?

    Regards,

    Miguel

  • Hi Miguel,

    I got the old code from your application(?) engineer Michael & Kevin G. when I first used the board. It used the old dll USBFunctions.dll, he didn't know anything about the new dll. In fact I found the new one via this forum. I doubt he has any other source code aside from that. I don't have his direct contact information since it was all through ADI support. I was also told the original coder is gone from ADI, so I assume someone knew who that person was.

    In any case, making a true x64 application for controlling the board is probably advantageous for ADI as fewer x32 machines survive.

    For future reference, are any of your DAC boards capable of working with 64bit MATLAB? Have you seen any applications of this?

    Luke

  • Hi Luke,

    We are now using different platforms to communicate with our devices, Cypress is not longer the standard, but boards like the SDP... You can find more info about this board in our web.

    Im not sure if the dll for the SDP has been developed in 32 or 64 bits.. but I can ask.

    Regards,

    Miguel

  • you mean this System Demonstration Platform?

    Please do ask.

  • Hi Luke,

    Yes, Im referring to the system demonstration platform.. and the developers confirmed than the dll can operate fine in 32 and 64 bits... whatever that means.

    Best Regards,

    Miguell