Programmatically find COM and LPT address
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Ming Yue
il 18 Ott 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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Use COM Objects in MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!