[How To] Use a Velleman K8055 board with Matlab 64 bits

8 views (last 30 days)
Hi,
I just wanted to inform people having a Velleman K8055 board that it is possible to use it with Matlab 64 bits.
Actually, a solution was found in this forum thread. The idea is simply to use a DLL compiled in 64 bits (for instance this one, from the forum thread) and to modify slightly the "setup.m" and "ExperimentBoard.m" files included in the 32 bits package found here. The installation is straightforward following the "readme" in the package.
Here are the changes I made :
- In the "setup.m" file in the support package provided by matlab, comment any code that tests if it is a 32-bit matlab.
- When running the setup, use the 64bits DLL (rename it to K8055D.dll) instead of the official one that the "readme.pdf" tells you to dowload.
- To be able to load the library, I made a .m file named "mHeader". For this, first seek the K8055.h file in the package and copy it to the folder containing the 64bits version of your DLL. Then in matlab go to this folder and :
[notfound, warnings] = loadlibrary('K8055D.dll', 'K8055D.h', 'mfilename', 'mHeader')
(This creates other files in the same folder that seem to be important also)
- Still in the support package, Matlab uses "ExperimentBoard.m" to connect to the board, so edit this file and comment any code that tests if it is a 32-bit matlab, again. Also change the calls to 'loadlibrary' so that it uses mHeader.m instead of K8055D.h :
loadlibrary('K8055D.dll',@mHeader)
And of course adapt the if conditions that lead to this call.
Hope it helps !

Answers (4)

Johannes
Johannes on 13 Jan 2013
Hey, I tried to do this, but always I try to do: [notfound, warnings] = loadlibrary('K8055D.dll', 'K8055D.h', 'mfilename', 'mHeader'). I get the following error message:
??? Error using ==> loadlibrary at 365 Failed to preprocess the input file. Output from preprocessor is:Der Befehl "cl" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
I absolutely don't know how to make it. I hope you or sb else know an answer.

Johannes
Johannes on 13 Jan 2013
I tried all and reinstalled microsoft visual studio 2008 professional in matlab just 2008 extended is shown. i selected this. and it workes. after that I continued and at least i tried vellboard.util.Test It worked very well. but just one time. if i trie it again the following message is shown
??? Error using ==> ExperimentBoard>ExperimentBoard.ExperimentBoard at 68 Could not find K8055D.dll.
Error in ==> Test at 12 board = vellboard.ExperimentBoard;
I first have to type loadlibrary('K8055D.dll',@mHeader)
(in the folder of the datas) in command window, then it works again
This maybe is because in the file "ExperimentBoard.m" isn't change correctly. I comment any code that tests if it is a 32-bit matlab
what should i change exactly?

Johannes
Johannes on 13 Jan 2013
yes

Abdelrahman Karrar
Abdelrahman Karrar on 23 Mar 2019
Awsome! 2019 now, and I'm using Matlab 2016b. Method works like a charm. Thanks!

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!