LAN-GPIB-VXI11

Some devices used in the SµS use the GPIB (IEEE-488) hardware bus for communication (see https://en.wikipedia.org/wiki/GPIB). In order to communicate with them using an instrument PC, the LAN VXI-11 protocol is used. This is a RPC-based (https://de.wikipedia.org/wiki/Remote_Procedure_Call) protocol which allows a LAN-connected device to behave like a GPIB-connected device. In essence, VXI-11 is the GPIB ABI implemented on top of LAN.

This driver provides the following CMake targets in the toplevel CMakeLists.txt:

  • lan_gpib_vxi11_linux_64bit: A library target which can be used to write device drivers using the VXI-11 protocol, see section Integration into device driver.
  • lan_gpib_vxi11_linux_64bit_test: A test standalone executable which can be used for direct communication with a GPIB-based device over LAN using VXI-11, see section Standalone communication executable. This executable is compiled for 64bit Linux.

A lot of information collected over the decades as well as the VXI-11 bus specifications themselves are available in ./docs.

Integration into device driver

To include this driver into another driver via CMake, add the top-level directory as subdirectory and link to the library target:


add_subdirectory(
    <path-to-lan_gpib_vxi11-repository>
)

target_link_libraries(
  <device-driver-name>
  lan_gpib_vxi11_linux_64bit
)

Standalone communication executable

The standaline communication executable for 64bit Linux is defined as CMake target lan_gpib_vxi11_linux_64bit_test and can be compiled with:

cmake -S "$(pwd)" -B <directory-to-build-in> -DBUILD_TEST_EXE=ON
cmake --build <directory-to-build-in> --clean-first -- -j8

It is then available as <directory-to-build-in>/lan_gpib_vxi11_linux_64bit_test.

Code architecture

  • Files within ./bus itself are manually written specifically for LAN/GPIB usage in the Bulk muSR.
  • Files in ./bus/fgpib are Fortran bindings for LAN/GPIB. They are considered to be legacy and are currently not used in the Bulk muSR.
  • Files in ./bus/gpibs are used to run a LAN/GPIB server. They are considered to be legacy and are currently not used in the Bulk muSR.
  • Files in ./bus/rpcl can be separated in two categories:
    • *.rpcl: These files are written in the Remote Procedure Call Language (https://en.wikipedia.org/wiki/Remote_procedure_call) and are used to autogenerate C source code used for client- and serverside code.
    • *.c and *.h: These files are autogenerated using the previously discussed*.rpcl files. Files with the _clnt.c ending are needed for clients, files with the _svr.c ending are needed for servers. Both clients and servers share the code in the _xdr.c files. For the LAN/GPIB driver, only the client-side code is needed (see CMakeLists.txt).

In general, all Makefiles within ./bus can be ignored, they are legacy and only kept for reference. The only file needed to compile the driver for Bulk muSR MIDAS applications is the top-level CMakeLists.txt.

General notes to GPIB

  • GPIB allows reading out the read buffer of a device without an explicit read request (command "enter")
  • Multiple commands can be sent together (separated by spaces). This is similar to the behaviour of the "TurboPMAC" motion controller.
  • It is possible to add ";*OPC?" (OPeration Completed) to a command / a request. After all operationms have been completed, a "1" is written into the output buffer (see https://www.keysight.com/in/en/lib/resources/training-materials/using-opc.html)
  • Some devices such as e.g. Oxford IPS120 SC or SRS SR 830 Lock-In Amplifier do not fully implement the GPIB specification and sometimes cannot operate on the same bus as other devices. This is likely due to the fact that they were developed before IEEE 488.1.
S
Description
A driver implementing the VXI-11 protocol (GPIB ABI for LAN / Ethernet)
Readme 5.4 MiB
Languages
C 99.2%
CMake 0.4%
Shell 0.2%
Makefile 0.2%