Products > Test Equipment
EZGPIB and TelNet failing
DeepLink:
Hi
I've been using EZGPIB to control my equipment for a while now.
It works like a charm over GPIB (using a genuine NI USB GPIB adapter) and with simple RS-232
Now I also have some equipment only with LAN, which work over TelNet
When I try to connect to my Keysight 34461A over ethernet, using PuTTY, no problem. The DDM works fine
***
Welcome to Keysights's 34460A Digital Multimeter
34460A> *IDN?
Keysight Technologies,34461A,MY60003833,A.03.02-03.15-03.02-00.52-04-03
34460A> MEAS:VOLT:DC?
+3.24852284E-05
34460A>
***
Trying to connect and ask the 34461A using EZGPIB - it fails
Program pretty simple
***
Program New;
var answer:string;
begin;
EZGPIB_ScreenClear;
EZGPIB_TelNetConnect('192.168.0.76',5024);
EZGPIB_TimeSleep(1);
EZGPIB_TelNetWrite('192.168.0.76','*IDN?');
EZGPIB_TimeSleep(1);
answer:=EZGPIB_TelNetRead('192.168.0.76');
EZGPIB_ScreenWriteLn(answer);
end.
***
The DMM goes into remote, but only replies my request:
***
Welcome to Keysights's 34460A Digital Multimeter
34460A> *IDN?
***
Unfortunately the developer is longer among us
Anybody had luck with EZGPIB and TelNet?
/Hans
Kean:
I'm not familiar with EZGPIB, but I took a quick look at the manual for it that is hosted at the xdevs site (dated 20121217).
I see an immediate syntax error in your sample code, you are missing a parameter when calling EZGPIB_TelnetConnect().
It is defined as:
--- Code: ---Function EZGPIB_TelnetConnect(Name:string;IPAddress:string;Port:LongInt):Boolean
--- End code ---
The first parameter should be a name of the device (I believe this is something you nominate, e.g. "DMM1"), and that is what you then pass as the parameter to TelnetRead() or TelnetWrite() instead of the IP address.
So, something like:
--- Code: ---Program New;
var answer:string;
begin;
EZGPIB_ScreenClear;
EZGPIB_TelNetConnect('DMM1','192.168.0.76',5024);
EZGPIB_TimeSleep(1);
EZGPIB_TelNetWrite('DMM1','*IDN?');
EZGPIB_TimeSleep(1);
answer:=EZGPIB_TelNetRead('DMM1');
EZGPIB_ScreenWriteLn(answer);
end.
--- End code ---
Give that a go and see if it works.
Honestly, you might want to try moving to Python going forward considering EZGPIB is no longer supported. There are a few topics here about how to use Python, with or without pyvisa.
DeepLink:
Tried that, but that won't compile :(
In EZGPIB's own samples, it is written as my test code
I've been looking for a more modern alternative, but I'm an old fart, who grew up with Basic and later Pascal, so EZGPIB was perfect for me
Also I have written many programs now, so it's easy for me to put something together
I took a look at Python (for something else) a while ago, but it didn't catch me a first
Maybe its time for this old dog to learn some new tricks
Or try the Visa approach in EZGPIB
edpalmer42:
I've found multiple instances where EZGPIB's documentation and the sample programs don't agree. The documentation often shows semicolons between parameters but it doesn't work until I change them to commas. This applies to both built-in and EZGPIB functions. Maybe in this case, you have to use semicolons rather than the commas shown in the samples. :-//
aeg:
You're not sending a newline character. Try:
--- Code: ---EZGPIB_TelNetWrite('192.168.0.76','*IDN?'+#13);
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version