Programmatically find COM and LPT address
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using Matlab to program an experiment.
In particular, I am using these lines of code to read and send triggers to an external device:
ioObj = io64;
status = io64(ioObj);
io64(ioObj,portWriteAddress,0);
I have found the value for 'portWriteAddress by navigating to: Device manager -> Ports -> LPT1 -> Resources. Then, in Resources there is an entry called I/O Range/ Settings with a code like 02S7 - 02SS (something like that).
Then I have converted it from Hex to Dec and put it in the line above.
THE PROBLEM IS: I am running this experiment on several different computers. Is there a way to programmatically find this range (or address) information fromMatlab?
Thank you all for your time.
Gluce
P.S. The OS that I am using is Windows 7 (it should be soon updated to windows 10). The computers are running either Matlab 2015b or 2016b.
1 Kommentar
Ming Yue
am 18 Okt. 2018
When I connect a Raspberry pi device to USB, I don't see the Resources tab in the Device manager. However some other ports do have the Resources tab. So I think the I/O Range is not a common property and it likely depends on the driver of the device.
If there is any Windows Command that could show this I/O Range property, then you can make system calls in MATLAB using " system " function and get system outputs.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Use COM Objects in MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!