Connecting a USB device to MATLAB to receive data
85 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
chrisw23
am 20 Jul. 2023
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
Antworten (2)
Ralf Handrich
am 25 Jun. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!