Does MATLAB support USB communication?
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 10 de Sept. de 2012
Editada: MathWorks Support Team
el 10 de Oct. de 2025
I would like to communicate with USB devices via a USB port. I would like to know if this is possible from MATLAB.
Respuesta aceptada
MathWorks Support Team
el 10 de Oct. de 2025
Editada: MathWorks Support Team
el 10 de Oct. de 2025
MATLAB does not provide a generic USB interface. Having an interface of this type would be in some ways like having a direct interface to either the PCI or ISA bus.
The Data Acquisition, Instrument Control, and Image Acquisition Toolboxes all support some USB devices. The list of supported hardware for each of these toolboxes is available respectively from:
For each of these USB devices, communication is handled by the driver of the device, and not by MATLAB. For example, when using the National Instruments DAQPad-6024E, which is an external data acquisition device, the communication is handled entirely by the National Instruments NIDAQ driver.
One possible option is using virtual COM ports (over USB) with MATLAB serial. This is only possible if there is a virtual COM port driver provided by the vendor.
Another option would be to create a MEX function that can communicate with a generic USB system driver. This function would serve as the glue between MATLAB and the device.
Users can also directly access shared libraries (DLLs). This functionality can be used to interface with a generic USB driver. For more information please consult the "Call C from MATLAB" section of the documentation under the section titled "External Interfaces":
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Instrument Control Toolbox Supported Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!