Author Topic: GPIB-ENET still usable?  (Read 12927 times)

0 Members and 1 Guest are viewing this topic.

Offline openloop

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: GPIB-ENET still usable?
« Reply #25 on: March 10, 2019, 02:46:25 am »
Quote
Does anyone know how I can assign an IP address?

There is a switch to allow the DHCP (check documentation).
Here's how I did it - I turned the device on and it grabbed an IP address from my router. Then I turned it off and moved the switch back - it remembers the last IP address used.
 
The following users thanked this post: jpb

Offline 1audio

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: us
Re: GPIB-ENET still usable?
« Reply #26 on: March 10, 2019, 03:58:06 am »
I have a first gen GPIB-ENET that works fine. However there are some limitations and tricks.
First, I have a linux server on my network running RARPd set to hand the ENET its IP address. Turns out its pretty simple to set up. RARPd (daemon) docs will give you most of what you need. The rest is in the ENET docs if you can find them. let me know if not and I'll look in my archives.

Second, you need an older version of the NI explorer, I think support for the ENET stopped at Win 7 era.

I found it worth the effort since I have several programs that don't know how to talk to any other interface.

I did break down and get an ENET-100 but its expensive.
 
The following users thanked this post: jpb

Offline openloop

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: GPIB-ENET still usable?
« Reply #27 on: March 10, 2019, 05:09:26 am »
Right, right - I forgot. It wasn't DHCP, it was rarpd.
But it still needed to be done only once (that's why I forgot)

/etc/ethers file had this line for the device:
Ethernet_address IP_address

then I ran
rarpd -aAvode

Mine works fine too. But I use it only from python or matlab/octave so the python library mentioned earlier in this thread is enough.
Not all useful things implemented, but just enough to get the job done.

 
The following users thanked this post: jpb

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: GPIB-ENET still usable?
« Reply #28 on: March 10, 2019, 01:33:21 pm »
Thank you everyone for the helpful responses.
I currently have Windows 7 on my workstation at home (where my lab is) but I work mainly with Linux in my job (and do quite a bit with networks - I've just never used RARP before and generally goto an "infrastructure guy" for this low level stuff!). It looks as if I should re-instate my Linux drive.

It sounds as if it should be an educational experience, I hate to give up on things even if it would be more sensible just to buy a used /100. I only need it for data extraction, mainly from a Keithley 2303 which only has GPIB - everything else has some or all of USB, RS232 or Etherenet as well as GPIB.
 

Offline mimmus78Topic starter

  • Supporter
  • ****
  • Posts: 676
  • Country: it
Re: GPIB-ENET still usable?
« Reply #29 on: March 10, 2019, 09:21:03 pm »
Yes rarpd is the way to go ... Pretty easy to configure. Anyway still using this guy by phyton snakes, and it was very reliable in last years.

Inviato dal mio ONEPLUS A5010 utilizzando Tapatalk

 

Offline evac

  • Contributor
  • Posts: 26
  • Country: pt
Re: GPIB-ENET still usable?
« Reply #30 on: December 01, 2021, 09:49:27 am »
I recently got one of these for cheap, and ended up finding a bunch of resources for both Windows and Linux, and thought I would share it here.

Most of it can actually be found at the NI ftp server, ftp.ni.com:
  • /support/gpib/ni488224/Windows2000XP/ni488224.exe - NI 488.2 for Windows. I believe this is the last version that supports GPIB-ENET, should work with Win2k and XP, contains all the utilities to assign IP, update firmware, and scan and test communication with instruments.
  • /support/gpib/linux/nienet-linux-1.2.tar.gz - Linux set of tools for assigning IP and updating firmware, as well as a C library that can be used to communicate with the controller.
  • /support/gpib/firmware/GPIBENET/EnetA5.bin - Latest firmware
  • /support/manuals/320910a.pdf - Software Reference Manual for the GPIB-ENET - It mentions an ESP-488 diskette which should also contain the C source code for all the communication functions, but I was not able to find this anywhere.
  • /support/manuals/321243e.pdf - Getting started guide

The easiest way to work with it is using the Python implementation here as mentioned by mimmus78.
You only really need libnienet.py which gives you the set of basic functions, although not all functions are implemented.
It is Python 2, but converting to 3 is not a big effort, it's mostly about changing internal functions to use bytes explicitly instead of strings.

If you do need some functions which are not implemented in libnienet.py, you can either use C, include ugpib.h and link to the library provided by e.g. the nienet-linux package above (32-bit only), or you can use ctypes to load the shared library into Python and have access to all the ib* C functions from there.
On 64-bit Python, you won't be able to load the 32-bit library directly, but you can use MSL-LoadLib package to achieve this.
I tried all 3 methods (pure Python, C, C->Python) and they all seem to work well.

Overall I'm quite happy with it, it's very convenient to be able to connect from any host and operation has been reliable so far, and if you can get it for cheap (I paid ~€30) then it's a no brainer.
Only downside is lack of support for more standard APIs like linux-gpib/PyVISA/sigrok, but on the other hand it's not rocket science to make use of the NI-488 functions to do what you need.
 
The following users thanked this post: vc12345679

Offline vc12345679

  • Newbie
  • Posts: 2
  • Country: us
Re: GPIB-ENET still usable?
« Reply #31 on: March 29, 2022, 11:30:37 pm »
I got one GPIB-ENET by mistake last week :'(, and had to spend the past two days studying how to make it work. Fortunately, I made it. I got a lot of help from this thread so I registered and post my solution here.
RARP IP assignment
In my case,
ItemMACIPIP(hex)
PC90-B1-1C-9B-B1-E9192.168.3.1C0 A8 03 01
GPIB-ENET00-80-2F-FF-09-94192.168.3.2C0 A8 03 02

RARP reply packet to assign the IP address. (detailed explanations in https://www.cloudshark.org/captures/c6729d0fc558)
00 80 2F FF 09 94 90 B1 1C 9B B1 E9 80 35 00 01 08 00 06 04 00 04 90 B1 1C 9B B1 E9 C0 A8 03 01 00 80 2F FF 09 94 C0 A8 03 02

Replace the MAC/IP with the ones in your case. Use any traffic generator on Wireshark wiki to send the reply packet.
https://gitlab.com/wireshark/wireshark/-/wikis/Tools#traffic-generators

Communication
I modified the Python2 script libnienet.py (http://bazaar.launchpad.net/~jordens/gpib-devices/trunk/view/head:/gpib/libnienet.py) to a Python3 version, and wrote a simplified high-level wrapper. The codes can be found at https://github.com/vc12345679/NI_GPIB_ENET_Py3. Just a glance,
Code: [Select]
from example_simple_wrapper import GPIBENET
GPIB_ENET_ADDR = '192.168.3.2'
DEV_GPIB_ADDR = 16
dev = GPIBENET(GPIB_ENET_ADDR, DEV_GPIB_ADDR)
print(dev.query(b'*IDN?').encode())
# OUTPUT:
# KEITHLEY INSTRUMENTS INC.,MODEL 2010,0772543,A10  /A02

Hope this post can help.
« Last Edit: March 29, 2022, 11:33:17 pm by vc12345679 »
 
The following users thanked this post: croma641, trebejo


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf