Welcome to our user forum (read only mode).
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Read mcd data in a 64bit system by matlab

3 posters

Go down

Read mcd data in a 64bit system by matlab Empty Read mcd data in a 64bit system by matlab

Post  axone.h Wed Feb 22, 2012 8:56 am

Hi all,
I use matlab version7.10.0 (R2010a) to read mcd data, it works well, and the system is 32bit, using the functions in the C:\Program Files\Multi Channel Systems\MCRack\MCStreamSupport\Matlabx.

However, when I use the same functions under a 64bit system (matlab version 7.12.0(R2011)) to read mcd data by ‘datastrm’, matlab reported it cannot find the MCStreamMEX, the folder has been under the path.

Is there any differences using the MCStreamMEX.dll to read the data between 32bit and 64bit system or the higher matlab version has not support the .dll function? If it is, how can I read the mcd data file in a 64bit system by matlab?

Thanks in advance!

axone.h

Posts : 5
Join date : 2012-02-16

Back to top Go down

Read mcd data in a 64bit system by matlab Empty Re: Read mcd data in a 64bit system by matlab

Post  Jens Thu Feb 23, 2012 11:32 am

We are not distributing the MCStreamMex.dll with MC_Rack for 64bit systems.

There are two possibilities to work around this:

  • You can use the Neuroshare interface that is available on our website. For precompiled Mex-files for Neuroshare, see the Neuroshare web site.
  • Or you can try to compile MCStreamMex.dll for 64bit system yourself. The sources are distributed with MC_Rack. The MCStream64.dll that is the underlying OCX component is automatically installed with MC_Rack on a 64bit system.
Jens

Jens

Posts : 55
Join date : 2009-03-06
Location : Multi Channel Systems

http://www.multichannelsystems.com

Back to top Go down

Read mcd data in a 64bit system by matlab Empty Another Solution to the 64-bit problem (a bit awkward, though)

Post  1flyguy Fri May 25, 2012 9:37 pm

Windows 64-bit will execute a 32-bit application that accesses the 32-bit McStreamMEX.dll. I wanted to run datastrm() on a 64-bit computer because I was having trouble recreating some of the datastrm fields using NeuroShare.

(1) If you have access to a matlab compiler, compile a standalone console application something like this (very simple example for purpose of illustration):

%-------------------
function [ D ] = DataStrm32( varargin )
% pass the MCD target full file path on the command line and receive the datastrm object D
D=datastrm(varargin{1});

% save D to a matfile, which in this case is a scratch file named "D32.datastrm"; this will be re-written
% every time DataStrm32.exe is executed
save('D32.datastrm','-mat','D');
end
%-------------------

Make sure the mcintfac folder and MCStreamMEX.dll files are included in the project. I have used the
paths as the MC_Rack installer defines them and have not experimented with variants.
Also, as indicated elsewhere in these forums, I modified datastrm() to return MCD parameters for the
USB-256 MEA data files, although I cannot actually read the waveform data.

(2) Put the executable somewhere in your matlab path.

(3) Then execute from Matlab:
>>system(['DataStrm32 N:\Sweeps\20120503_CM3_ctrl_Bsw.mcd']);

Other forms of system calls (e.g. using "!") work as well . This will create the mat-file "D32.datastrm"
which contains the datastrm object D.

(4) Load D into workspace. For example:
>>load('D32.datastrm','-mat')

I imagine any m-file that accesses the 32-bit MCStreamMEX.DLL can be handled the same way. Not an ideal solution, but this seems to work so far.

--Geoff


1flyguy

Posts : 3
Join date : 2011-11-20

Back to top Go down

Read mcd data in a 64bit system by matlab Empty Re: Read mcd data in a 64bit system by matlab

Post  axone.h Thu Jul 19, 2012 5:27 pm

Thank you for your replay. I have tried the method and compiled a standalone console application but when I executed from Matlab:
>>system(['DataStrm32 D:\MEADISC1\20120703-wt\amy-20120703-WT-spike.mcd']);
it displayed an error "Undefined function or method 'mcstreammex' for input arguments of type 'struct'. " Moreover, I am sure that MCStreamMEX.dll file is include in the current path. The matlab version is R2011a.

Is there anything wrong?


He



axone.h

Posts : 5
Join date : 2012-02-16

Back to top Go down

Read mcd data in a 64bit system by matlab Empty Re: Read mcd data in a 64bit system by matlab

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum