What is the instrfind function equivalent for tcpclient objects?
6 次查看(过去 30 天)
显示 更早的评论
Mathworks will remove tcpip and visa, replacing it with tcpclient and visadev. It's common the use of instrfind to find the tcpip and visa sockets created (even in the tmtool), so it's not necessary to create a new one. It solves a lot of connection problems...
But... what is the instrfind equivalent for tcpclient and visadev objects?
a = tcpclient('127.0.0.1', 3485);
b = tcpip('127.0.0.1', 3485);
c = tcpip('127.0.0.1', 3485);
instrfind
% Instrument Object Array
%
% Index: Type: Status: Name:
% 1 tcpip closed TCPIP-127.0.0.1
% 2 tcpip closed TCPIP-127.0.0.1
0 个评论
采纳的回答
Harimurali
2024-3-20
Hi Eric,
The "instrfind" equivalent for "tcpclient" and "visadev" objects will be introduced in MATLAB R2024a. Please refer to the New functions and property to label and find Instrument Control Toolbox interface objects section of the release notes for MATLAB R2024a version:
The "instrfind" equivalent for the "tcpclient" object is the "tcpclientfind" function which finds existing TCP/IP client connections and returns an array of "tcpclient" objects corresponding to each connection.
The "instrfind" equivalent for the "visadev" object is the "visadevfind" function finds existing VISA device connections and returns an array of "visadev" objects corresponding to each connection.
As the funtionality is not availabe in MATLAB R2021b, a workaround to achieve similar functionality would be to maintain a list of the "tcpclient" or "visadev" objects and implement a search function, which acts as an equivalent to the "instrfind" function, that searches the list based on criteria you define.
Hope this helps.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!