MCC DaqHat and Raspberry Pi Guidance

22 views (last 30 days)
We are in the process of building a data acquisitoin system using a remote Raspberry Pi, and 2 Daqhats from MCC-DAQ. I am wondering if anyone else has tried this configuration and if so is there any guidance that they would recommend?
-Matlab says that they don't support these modules. I was pretty sure when we purchased it they acted like they did. I have been unable to find any reference to this within Mathlab or the Forums.
-MCC-DAQ acted like it was fairly straightforward. However, since starting this they have made it very difficult to communicate with them. I have not really found any material there either yet.
I apologize for this being a vague post but I don't have many details to share yet.
Sincerely, Paul

Accepted Answer

Umar
Umar on 2 Jul 2024
Edited: Walter Roberson on 18 Jul 2024
Hi Paul,
I am wondering if anyone else has tried this configuration and if so is there any guidance that they would recommend? -Matlab says that they don't support these modules. I was pretty sure when we purchased it they acted like they did. I have been unable to find any reference to this within Mathlab or the Forums. -MCC-DAQ acted like it was fairly straightforward. However, since starting this they have made it very difficult to communicate with them. I have not really found any material there either yet.
To answer your questions, please see my comments below.
There are alternative ways to interface with these devices using Matlab. One approach is to utilize the MCC-DAQ provided APIs or SDKs to communicate with the Daqhats directly from Matlab. By leveraging these APIs, you can access the functionalities of the Daqhats within your Matlab environment, enabling seamless integration with your data acquisition system.
Here is a simplified example of how you can interact with the Daqhats in Matlab using the MCC-DAQ API:
% Load the MCC-DAQ library
loadlibrary('mccdaq', 'mccdaq.h');
% Initialize the Daq device
boardNum = 0; % Specify the board number
errorCode = calllib('mccdaq', 'mccOpen', boardNum);
if errorCode == 0 disp('Daq device opened successfully'); % Perform data acquisition operations here else disp('Failed to open Daq device'); end
% Unload the library
unloadlibrary('mccdaq');
If you are experiencing difficulties in communicating with MCC-DAQ directly, exploring their documentation, knowledge base, or contacting their technical support team might provide valuable insights and solutions.
While the initial hurdles you are encountering may seem daunting, there are avenues to explore and resources to leverage in order to successfully build your data acquisition system with Raspberry Pi and Daqhats. By combining technical knowledge, community support, and perseverance, you can overcome these challenges and create a robust and efficient data acquisition setup tailored to your needs.
  7 Comments
Paul Elliott
Paul Elliott on 23 Jul 2024
Walter reading your first response for th 5th time. I know, I'm a bit dense right now, but this is frustrating. I just realized you said using the 'DAQHAT API.' I was told BY MATLAB just days ago that MATLAB did not have any API's for these products. This sort of thing is where my frustatation lies at this time. I think the people who talked to me up front know what I want to do, however getting someone within Matlab that knows the same stuff is a challenge. Thank you very much. Sorry for being a bit of a jerk.
Walter Roberson
Walter Roberson on 23 Jul 2024
It was @Umar that said to use the MCC-DAQ API

Sign in to comment.

More Answers (1)

Paul Elliott
Paul Elliott on 23 Jul 2024
Since we appear to be working in an area with limited documentation I thought I would post what we have learned so far with regard to this post, with hopes it will help get someone else started on the right path later.
1- We found a Support package for MCC equipment. We installed that.
2- we researched it a bit further, and do not see our devices covered under the supported hardware (MCC-172 and MCC-128 cards).
3- It looks like these API's are for equipment directly connected to a computer, while DAQHATS are installed on a raspberry pi.
4- We did install a python library onto the PI. That required a virtual environment. This caused issues when we tried to call 2 scripts in a row from Matlab and the conclusion of the 1st script appeared to close the virtual environment.
5- We did figure out that to call the fuctions properly using the virtual environment, the full path of the python script in the virtual environment is needed. Information found outside of Matlab.
6- with this and the odd examples given in the mcc library we have been able to piece together a simple code that records N-samples at S-Samples/sec.
  1 Comment
Walter Roberson
Walter Roberson on 24 Jul 2024
MCC Staff wrote
It is not possible to read the inputs with simple GPIO control. Our driver uses GPIO and the SPI bus to select and control each board, and how it works is proprietary information.

Sign in to comment.

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!