Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-USB 6008 Matlab Mac OSX

Solved!
Go to solution

Dear NI-Experts,

 

I wasn't sure which board to post my question to, so if this is not the right place please accept my apologies. Being a non-too-skilled computer user, I've been unsuccessfully trying to address an NI USB-6008 A/D converter from within MATLAB R2012b on a Mac OS 10.8.3 for quite a while.

 

Searching through the internet (http://www.binghamsite.com/miscellaneous/matlab-mex-and-ni-usb), I learned that the general way to go is to use the mex command from within MATLAB to compile code written in C into programs understood by MATLAB. Following the instructions provided on that website, I ran mex -setup, edited the mexopts.sh file and succeeded in compiling the simple timestwo.c file for test purposes.

 

I then tried to do the same to the example data acquisition .c-files provided with the NI-DAQmx Base (v 3.6) driver package. I was informed that mex objects require the inclusion of the NI-DAQmx Base header (NIDAQmxBase.h), so I tried to run

 

mex -I"/Applications/National Instruments/NI-DAQmx Base/includes" acquire1scan.c

 

The compilation fails producing a bunch of information I don't understand (see file enclosed). However, the error messages

 

"Error: This platform is unsupported because long is not 4 bytes." or

"Error: This platform is unsupported because int is not the same size as long."

 

show up repeatedly. My Macbook uses an Intel Core i5 processor which is 64-bit, if that can have anything to do with it.

 

Any suggestions on how to get this running would be highly appreciated.

 

Thanks,

Robert

0 Kudos
Message 1 of 8
(10,874 Views)

Hi Robert,

 

NI USB-6008 is supported by Data Acquisition Toolbox in  MATLAB on Windows 32bit and 64bit. Mac OS is not supported by Data Acquisition Toolbox. For more information please look at the following link http://www.mathworks.com/products/daq/  and for list of supported hardware https://www.mathworks.com/products/daq/supported/data-acquisition-cards-and-boards.html.

 

Using Data Acquisition Toolbox you will have inbuilt support for USB-6008 and many other devices in MATLAB and would not need to compile any C or mex files.

 

I would recommend posting MATLAB related questions to MATLAB Central at http://www.mathworks.com/matlabcentral/ .

 

Hope this helps. Please feel free to post furthur questions if any at MATLAB Central.

 

Neel Kulkarni

MathWorks

0 Kudos
Message 2 of 8
(10,831 Views)

Dear Neel,

 

Thanks for getting back to me, I've now posted the question to MATLAB Central. I'm fully aware that the Data Acquisition Toolbox, which Windows users may benefit from, would make my life much easier. But I think that I was reasonably specific about the system I'm working on and the problem I'm trying to solve. To simply suggest to go and use something entirely different is not particularly helpful.

 

Thanks,

Robert

0 Kudos
Message 3 of 8
(10,826 Views)
Solution
Accepted by rcsapo

Hey Robert,

 

I believe MATLAB 2012 for OS X is a 64 bit only application, which will not work with the 32 bit DAQ Base driver.  There may be older versions of MATLAB that do have a 32 bit version on Mac OS X, these would likely work better with the method described in your link.  

 

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies. 

 

Regards,

Eric L.
Applications Engineering Specialist
National Instruments
Message 4 of 8
(10,818 Views)

Hi Eric,

 

Thanks for this information. I understand that, currently, establishing a connection between two of the largest data acquisition and processing software solutions requires computer skills that far exceed mine. Being a Mac user can be very hard at times… 

 

Best,

Robert

0 Kudos
Message 5 of 8
(10,805 Views)

My application is 64 bit on OSX 64 bit.  I only need to perform basic digital output.  What are my options?  Aside from writing a proxy 32 bit app...

 

Does NI have any plans to support a 64 bit API for 64 bit apps to support the existing 64 bit version (kext) of NI-DAQmx Base?

 

Francois Tremblay

Avid Technologies Inc.

 

0 Kudos
Message 6 of 8
(10,463 Views)

Any update on when a Matlab/NI DAQ setup will be supported?

 

chris

0 Kudos
Message 7 of 8
(9,621 Views)

Hi biol75,

 

Unfortunately we do not have any new information yet about when this use case will be supported.  You may try contacting The Mathworks, Inc. to determine if the Data Acquisition Toolbox will support Mac OSX in the future.

 

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies. 

| Zach J. | Systems Engineer, HIL and Test Cells | National Instruments |
0 Kudos
Message 8 of 8
(9,603 Views)