How can I open USB when it is not listet as COM port? In the device manager it is listed under USB-Controller
13 ビュー (過去 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 で Instrument Control Toolbox Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!