Empty available serial ports list for visa interfacing

2 views (last 30 days)
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.

Answers (0)

Categories

Find more on Instrument Control Toolbox Supported Hardware in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!