0

I am trying to connect to two devices connected via GPIB on a remote computer connected directly via a Ethernet cable. I am using a JPIB library I found, but I am having difficulty determining how to connect to the remote computer.

My goal is to control and read the devices by connecting to the remote computer. I am also unsure as to what program or software I need to install on the remote server.

Thank you in advance,

  • You'll have to write an RMI implementation of a server and a corresponding client, see [here](http://docs.oracle.com/javase/6/docs/technotes/guides/rmi/index.html) - there's nothing in the library that implements remote operations - as explained in the article on [the website](http://jpib.sourceforge.net/) they used this library to experiment with JINI, but that code is not included in the JPIB library. – fvu May 24 '13 at 17:33

1 Answers1

3

If you can use the VISA API instead of the GPIB API, install NI-VISA on both computers. On the remote computer, enable the VISA server. You can then use the VISA API to connect to the GPIB device attached to the remote computer.

For example, if the remote computer is at 192.168.0.111, and the instrument address is:

GPIB0::16::INSTR

it can be accessed remotely as:

visa://192.168.0.111/GPIB0::16::INSTR

You can also use a hostname in place of an IP address.

To call VISA from Java, you can use JNA to invoke VISA API functions. A JNA library can be created from a stripped down copy of visa.h (just the functions you need) and even generated with a tool like JNAerator.

This works on Windows. I'm not familiar with the Linux version of NI-VISA>

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72