MATLAB Answers

0

Tmtool don't recognize the tcp/ip on a computer, but does it on another one

Asked by Mathieu on 12 Oct 2016
Latest activity Edited by Vinod
on 23 Oct 2016
Hello,
I write here today because I try to import a software from a laptop to a desktop computer. The laptop works on Windows 7 Pro 64bits and the desktop one on Windows 10 32bits. I developed a network using a router and ethernet cables. I also installed a software from my instruments (Tektronix function generators) which permits to watch what connections are available. MATLAB is the 2007b version.
On the laptop, using the Tektronix software, or trying to ping on a command window, or scanning for instrument with the tmtool, each time I can see my 2 connections and I can communicate with the instruments. BUT, with the desktop computer, all work except MATLAB : the tmtool don't recognize any connection, and when I try to create a visa or tcpip object, I have an error message which tell me I probably didn't installed properly a driver. But, when I look for the matlab driver with the instrhwinfo('matlab') function, I have correctly the drivers I also use on the laptop.
I don't find why the tmtool is not working. I look the firewall of windows and the antivirus but no problems here. I don't know where to search now.
I thank you in advance for each piece of advise you could give me.
PS: can we ping from MATLAB directly?

  0 Comments

Sign in to comment.

2 Answers

Answer by Vinod
on 14 Oct 2016

Since TMTOOL works on your laptop but not on your desktop, I suspect your desktop configuration has an issue. Have you added the instruments to your VISA software's list of known devices? What version/versions of VISA do you have installed on your machine?
If you post the output of executing 'instrsupport' in MATLAB on your laptop and your desktop, I may be able to provide some guidance.
Also, I would recommend upgrading to a newer version of MATLAB. R2007a is over 9 years old. It is 18 releases behind the current release (R2016b as of now).

  3 Comments

Hello Vinod,
First I can't change my version of MATLAB for now, but maybe in few months I will get the latest version.
For me, the function instrsupport doesn't exist.
For the visa, I installed the latest version of the tektronix software TekVisa 4.0.4, but I saw this one is ok for Windows Xp, 7 and 8.1 but nothing about Windows 10. And I added the matlab driver in the driver folder of the instrument toolbox. If it is not what you was waiting for as answer, can you tell me how to see what version of visa is installed?
I tried my software on another laptop and it is working normally. So I think about something: I was told a computer guy had to install the 32bits version of Windows on a computer which works with a 64bit processor, just in order to install an old version of Labview. So maybe the problem came from here : there is a sort of incompatibility between Labview and MATLAB on this computer only (the laptops have also Labview installed but no problem).
What can I do more for you ? I want to precise I never deal with the instrument toolbox before, and also never communicate with instruments, so all of this is a kind of new for me and didn't know all the tricks about visa etc.
Execute 'ver' in MATLAB and paste your answer. That will provide some information. Then also execute 'instrhwinfo visa' followed by 'insthwinfo visa tek' and paste that information as well.
ver
-------------------------------------------------------------------------------------
MATLAB Version 7.5.0.342 (R2007b)
MATLAB License Number: ••••••
Operating System: Microsoft Windows Vista Version 6.0 (Build 6002: Service Pack 2)
Java VM Version: Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
-------------------------------------------------------------------------------------
MATLAB Version 7.5 (R2007b)
Image Processing Toolbox Version 6.0 (R2007b)
Instrument Control Toolbox Version 2.5 (R2007b)
MATLAB Compiler Version 4.7 (R2007b)
Signal Processing Toolbox Version 6.8 (R2007b)
Trademarks
------------------
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, and xPC
TargetBox are registered trademarks and SimBiology, SimEvents, and SimHydraulics are trademarks of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders.
And then :
instrhwinfo visa
ans =
InstalledAdaptors: {1x0 cell}
JarFileVersion: 'Version 2.5.0'
instrhwinfo visa tek
??? Error using ==> instrhwinfo at 271
Specified ADAPTOR was not found or could not be loaded.

Sign in to comment.


Answer by Vinod
on 19 Oct 2016

It appears that MATLAB is unable to find your VISA implementation. This could be because you have 64-bit MATLAB and 32-bit VISA. To find whether you have 32-bit MATLAB or 64-bit MATLAB, execute 'mexext' at the command prompt. If you get 'mexw64', then you have 64-bit MATLAB and you need to install 64-bit Tek VISA. If you have 32-bit MATLAB, you will see 'mexw32' in which case you need to install 32-bit Tek VISA.
You are likely better off installing Keysight or NI VISA and moving on to your measurement tasks.

  2 Comments

Hello Vinod,
When I execute the mexext function, I have as answer mexw32 on all my machines. Which is normal because I had to install the 32bits MATLAB version on these ones because I have the instrument control toolbox only with the 32bit version. But the machines are on 64bit processor. So I don't know why on the laptop it is working and not on the dekstop one. I don't know why installing NI VISA whereas I don't use NI but MATLAB. And on the KeySight website I don't find any softwares for Tektronix.
Can you guide me a little more please? Because I don't see what I can do on my side, except download again the TekVisa software on the website I related before and I really don't know how, with MATLAB 2007b, install the NI Visa as explain here because it deals with Add-ons.
Mathieu,
I would recommend you download Keysight VISA on the computer that cannot find the instrument. That should allow you to create a VISA object to connect to your Tektronix instrument.
Once you have installed Keysight VISA, you can scan for new instruments on your network and it should show you the resource string needed to connect to the instrument.
In your MATLAB code you likely will need to change the code from something like
visaObj = visa('Tek','instrument resource string')
to
visaObj = visa('agilent','instrument resource string')
Hope this helps, -Vinod

Sign in to comment.