How can I open USB when it is not listet as COM port? In the device manager it is listed under USB-Controller

29 views (last 30 days)
How can I open USB when it is not listet as COM port? In the device manager it is listed under USB-Controllerö...
I tried:
powerm = serial('Newport Power Meter');
% I tried everything else e.g. 'USB\VID_104D&PID_CEC7' (Hardware ID)
set(powerm, 'DataBits', 8);
set(powerm, 'Parity', 'none');
set(powerm, 'StopBits', 1);
set(powerm, 'BaudRate', 38400);
fopen(powerm,'w');
fprintf(powerm, '*IDN?')
fscanf(powerm)
fclose(powerm);
How can I open a device by its location information like Port_#0002.Hub_#0005?
  1 Comment
Emmanuel Le Boulbar
Emmanuel Le Boulbar on 5 Dec 2018
Edited: Emmanuel Le Boulbar on 5 Dec 2018
Dear RJP,
I am facing the same issue with one of the instrument provided by Newport, the ILX1 FPM-8220 Fiber Optic Power Meter.
The instrument is being recognized as a USB controller and not a COM port. I have been browsing for a solution to connect it using Matlab and I found you asked the same question.
Did you manage to connect and talk to your instrument? If so, would you be able to share how you managed to do it?
Thank you

Sign in to comment.

Accepted Answer

Sangeetha Jayaprakash
Sangeetha Jayaprakash on 25 Jul 2017
I assume you are trying to connect to a 'Newport Power Meter' device. It is possible that it is not listed as a COM port because it does not have USB to serial conversion, and hence not being detected by the "serial" command.
In order to use this device with MATLAB, try to load the C/C++ USB Driver DLL given by the device manufacturer and make calls to the functions provided in the DLL from MATLAB. This can be done by using "loadlibrary" and "callib" functions in MATLAB.
The "loadlibrary" will load the DLL into MATLAB and then we can use "callib" function to call a particular function.
Calling C Shared Libraries in MATLAB:
The function signatures can be found in the User manual of the device.
More information on "loadlibrary" and "callib" can be found in the documentation link below: https://www.mathworks.com/help/matlab/ref/loadlibrary.html
To look at available functions in a shared library:

More Answers (0)

Categories

Find more on Manage Products in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!