Skip to the content.

GPIB setup on Linux

Introduction

We want to make remote control over the power supply for our cryogen-free superconducting magnet (SMS80C, Cryogenics) on the console software of Opencore NMR 2. I have attempted to program on Windows for a while, but never succeeded, and gave up. Now I decided to program on Linux.

Our GPIB

Driver compilation (Cent OS)

linux-gpib-4.1.0
linux-gpib-4.2.0

Installation and setup

interface {
        minor = 0       /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
        board_type = "ni_usb_b" /* type of interface board being used */
        name = "current"        /* optional name, allows you to get a board descriptor using ibfind() */
        pad = 0 /* primary address of interface             */
        sad = 4 /* secondary address of interface           */
        timeout = T10s  /* timeout for commands */
        eos = 0xda      /* EOS Byte, 0xa is newline and 0xd is carriage return */
        set-reos = yes  /* Terminate read if EOS */
        set-bin = no    /* Compare EOS 8-bit */
        set-xeos = no   /* Assert EOI whenever EOS byte is sent */
        set-eot = no    /* Assert EOI with last byte on writes */
        master = yes    /* interface board is system controller */
}

Without sudo…

Go to /dev, and sudo chmod a+rw ./gpib0.

TODO

To realize plug and play, udev needs to be configured to (i) change the mode of /dev/gpib0 to 0666, and (ii) implement gpib_config. I will try to work it out and update this page (12 Oct 2018).


Back