How can I open USB when it is not listet as COM port? In the device manager it is listed under USB-Controller
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
Emmanuel Le Boulbar
2018-12-5
编辑:Emmanuel Le Boulbar
2018-12-5
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
采纳的回答
Sangeetha Jayaprakash
2017-7-25
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Manage Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!