Deutsch

Opensuse Linux and the Prologix GPIB to USB converter

This page describes how to control the Prologix GPIB-USB converter on an Opensuse 10.3 linux system using Labview 8.2.
Everything described below is done as root; once it works you should give normal users read and write access to /dev/ttyUSB0 and continue to work from your normal account.

Check that the converter and the kernel work together

  • Plug in the USB cable with the converter.
  • Check if the right modules get loaded:
    • $ lsmod | grep ftdi
      ftdi_sio   37128     0
      usbserial  35252    1  ftdi_sio
      usbcore    123756  6  ftdi_sio,usbserial,nikal,ehci_hcd,uhci_hcd
    • The device should show up on the USB:
      $ lsusb:  Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
    • and a new device node should be created:
      $ ls -l /dev/ttyUSB0
      crw-rw---- 1 root uucp 188, 0 Dec 4 15:39 /dev/ttyUSB0
  • You can check if the converter works correctly by using the program kermit (package ckermit):
    $ kermit
    C-Kermit 8.0.211, 10 Apr 2004, for Linux
    Copyright (C) 1985, 2004,
    Trustees of Columbia University in the City of New York.
    Type ? or HELP for help.
    (/root/) C-Kermit>set line /dev/ttyUSB0
    (/root/) C-Kermit>set terminal echo on
    (/root/) C-Kermit>connect
    Connecting to /dev/ttyUSB0, speed 9600
    Escape character: Ctrl-\ (ASCII 28, FS): enabled
    Type the escape character followed by C to get back,
    or followed by ? to see other options.
    ----------------------------------------------------
    ++ver (enter)
    Prologix GPIB-USB Controller version 5.0

Communicate with the converter using National Instruments VISA 4.2

prepare the system for installation

  • Make sure you have the necessary packages installed (your version numbers will probably be higher than mine due to security updates).
    $ rpm -qa | grep kernel
    kernel-default-2.6.22.13-0.3
    kernel-source-2.6.22.13-0.3
    linux-kernel-headers-2.6.22-19
    kernel-syms-2.6.22.13-0.3
  • do:
    $ cd /usr/src/linux
    $ make cloneconfig
    $ make modules_prepare
    $ make modules
    (the last step is according to the NI-Visa documentation not mandatory, it avoids some warning messages)

install NI-VISA

  • Download the newest NI-VISA for linux (at the time of writing version 4.2) from the National Instruments website.
  • Run the INSTALL script from /usr/src/linux
  • check for error messages, especially in the NI-KAL post installation script.
  • create/edit /etc/profile.local with:
    VXIPNPPATH=/usr/local/vxipnp
    export VXIPNPPATH
    export LD_LIBRARY_PATH=/usr/local/vxipnp/linux/bin:$LD_LIBRARY_PATH
  • reboot

communicate with the converter using visaconf and NIvisaic

Figure 1
Figure 2
Figure 3
  • run visaconf from the command line
    press the add static button
    select Local Serial Port as the new interface
    set the binding: /dev/ttyUSB0
    set an alias like prologix
    change the interface number to 5 (or another non used number)
    The other settings like Baudrate, parity, stop bits and flow control can remain unchanged; they are irrelevant.
    After pressing OK the main window should look like Figure 1.
    If you now plug in the device and press edit on the ASRL5::INSTR, the Resource editor (Figure 2) window should show the state of the device as ready.
  • Start NIvisaic
    if ASRL5::INSTR shows up you are ready to use the device under labview.

    However there seems to be a bug in the NI software which only shows up if your computer has no generic serial port like some laptops:
    $ NIvisaic
    An error message pops up:
    unable to find resources using expression "?*"
    Return status code 0xBFFF0011
    Status name: VI_Error_RSRC_NFOUND
  • Workaround: create a hardlink:
    $ rm /dev/ttyS0
    $ ln /dev/ttyUSB0 /dev/ttyS0
    $ ls -l /dev/ttyS0
    crw-rw---- 2 root uucp 188, 0 Dec   7 10:17 /dev/ttyS4

    Now NIvisaic looks like Figure 3; both entries will work under labview.

Communicate with the converter using Labview 8.2

  • find in the examples the "Basic Serial Write and Read.vi" (Figure 4)
  • set the VISA Ressource name to ASRL5::INSTR
  • open the Visa Configure Serial Port SubVI and set the button Enable Termination Char to off. (Figure 5)
Figure 4
Figure 5