Does MATLAB support USB communication?

8 Ansichten (letzte 30 Tage)
MathWorks Support Team
MathWorks Support Team am 10 Sep. 2012
I would like to communicate with USB devices via a USB port. I would like to know if this is possible from MATLAB.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 14 Okt. 2022
Bearbeitet: MathWorks Support Team am 10 Nov. 2022
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 communications is handled entirely by the National Instruments NIDAQ driver.
One possible option is using virtual COM ports (over USB) with MATLAB serial. This can be possible only 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.
As of MATLAB 6.5 (R13) users have the ability to directly access any Dynamic Link Library (DLL) in Microsoft Windows. This functionality can be use to interface with a generic USB driver. For more information please consult the MATLAB Interface to Generic DLLs section of the documentation under the section titled "External Interfaces":

Weitere Antworten (0)

Kategorien

Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by