MCC DaqHat and Raspberry Pi Guidance

16 次查看(过去 30 天)
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

采纳的回答

Umar
Umar 2024-7-2
编辑:Walter Roberson 2024-7-18
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 个评论
Paul Elliott
Paul Elliott 2024-7-23
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.

请先登录,再进行评论。

更多回答(1 个)

Paul Elliott
Paul Elliott 2024-7-23
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 个评论
Walter Roberson
Walter Roberson 2024-7-24
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Installation Setup and Configuration 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by