Programmatically find COM and LPT address
9 views (last 30 days)
Show older comments
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 Comment
Ming Yue
on 18 Oct 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.
Answers (0)
See Also
Categories
Find more on Use COM Objects in MATLAB 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!