How can I open USB when it is not listet as COM port? In the device manager it is listed under USB-Controller
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
RJP
el 20 de Jul. de 2017
Editada: Emmanuel Le Boulbar
el 5 de Dic. de 2018
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 comentario
Emmanuel Le Boulbar
el 5 de Dic. de 2018
Editada: Emmanuel Le Boulbar
el 5 de Dic. de 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
Respuesta aceptada
Sangeetha Jayaprakash
el 25 de Jul. de 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:
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!