Connecting a USB device to MATLAB to receive data
조회 수: 30 (최근 30일)
이전 댓글 표시
Hello.
I am trying to connect a device that collects data and outputs that information through a usb to a computer. A software exists to receive the information but the goal is to bypass that and send the information directly to matlab. The device streams 43 bytes every 53 usec, the packet structure starts with a 16 byte header that starts with ASCII spelling out yoho, bytes 17-19 contain status of the device and bytes 20-43 contain the information of the sensors, the information in bytes 20-43 are split into three byte chunks (ex. s1 20-22, s2 23-25, s3 26-28). The device is sampling at 19.23 kHz so if the data cant be received at that speed or faster the data is not viable.
Thank you for any assistance
-KT
댓글 수: 1
chrisw23
2023년 7월 20일
Look for a .net compatible driver, load the assembly and instantiate the class to get a driver object.
asm = NET.addAssembly(<pathToYourUsbDriver.dll> ) % look for classes provided under asm.Classes
myDrvObj = <identifiedUsbDriverClass>
myDrvObj.<OpenCommunication> % i.e. to open device communication
use details(myDrvObj) / methodsview(myDrvObj) to get API informations or read the API description provided
답변 (2개)
Ralf Handrich
2024년 6월 25일
Hello Kevin,
you can try AHid.dll. It's a commercial product, but there is also a free version that you can try:
Best regards, Potter
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Hardware Discovery and Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!