Empty available serial ports list for visa interfacing
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello !
I am trying to control an Agilent Power supply via Matlab but my computer do not recognize it. I use visa to open it :
obj = visa('ni', 'GPIB1::2::INSTR');
fopen(obj)
The error then is : Invalid RSRCNAME specified. Type 'instrhelp visa' for more information.
In fact, the problem seems to be that no serial port is available. In particular, the command
instrhwinfo('visa', 'ni');
returns :
AdaptorDllName: 'C:\Program Files\MATLAB\R2021b\toolbox\instrument\instrumentadaptors\win64\mwnivisa.dll'
AdaptorDllVersion: 'Version 4.5'
AdaptorName: 'NI'
AvailableChassis: []
AvailableSerialPorts: ''
InstalledBoardIds: []
ObjectConstructorName: []
SerialPorts: ''
VendorDllName: 'nivisa64.dll'
VendorDriverDescription: 'National Instruments VISA Driver'
VendorDriverVersion: 20
So the AvailableSerialPorts is empty... I think this is the problem but cannot see how to solve it. The command
instrhwinfo('Serial')
returns something similar.
Interestingly, the same piece of code works with another computer (in Matlab R2019b)... Do you have some tips ? Thanks !
V.M.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Instrument Control Toolbox Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!