.

Release Note
MPI/XMP Linux Package

 

Version

Firmware

642A3

MPI/XMP Library

03.04.22

MPI/Linux Library

03.04.22

Release Date

10Jul2010

Introduction

Welcome to the MPI/XMP-Linux Support package. The distribution was built and tested with Ubuntu Linux 10.04, kernel version 2.6.32. The libraries have been built with standard GNU tools included with the Ubuntu software. This document provides an overview of the release and describes the new features and changes from the standard WinNT MPI/XMP software releases.

Each MPI/XMP-Linux distribution has a particular version number. To properly run client/server applications between Linux and WinNT systems, the WinNT systems must have the standard, WinNT MPI/XMP release of the identical version number.

 

Linux System Requirements

This release requires an Intel x86 processor, running the Linux kernel 2.6.32. Only use the standard GNU tools and library versions that are supplied with the Ubuntu 10.04 distribution.

Target System

x86 platforms

Kernel Version

2.6.32

Supported Compiler

GNU C Compiler

Access

root (super user)

 

Linux Software Installation Instructions

The MPI/XMP-Linux installation consists of a tarball file base distribution. The recommended installation directory is /MEI. To install the compressed release, you need to do the following as the 'root' user:

mkdir /MEI
mv XMP_SeriesXX.XX.XX_Linux.tar.gz /MEI/
cd /MEI
tar xvfp *.tar

The release will require a few minutes to extract to disk.

The MPI/XMP-Linux installation is designed as a stand alone MPI/XMP release. All Linux specific files are installed into Linux/x86 subdirectories. Key components of the distribution are:

 

  • Linux driver, installed in the (/MEI)/XMP/MPI/Linux/x86/meixmp subdirectory.
  • The release and debug versions of the MPI/XMP-Linux libraries, installed in the (/MEI)/XMP/ lib/ Linux/x86 subdirectory.
  • GNU Makefiles for various sample applications and utilities.

 

General Operation

Starting and Building the MEI/XMP driver

The MEIXMP driver needs to be loaded each time the system is rebooted. A script can be added to rc.local or similar to load device module at startup. A generic x86 driver for Linux is included in every release in the (/MEI)/XMP/MPI/Linux/x86/meixmp directory. This driver was built using Ubuntu Linux 10.04, kernel 2.6.32. A debug version of the driver can be created using debug switches. Motion Engineering recommends using the release version of the Linux driver.

To load this module, you will need to do the following as the 'root' user:
     $ cd /MEI/XMP/MPI/Linux/x86/meixmp
     $ insmod meixmp.ko (loads driver)
     $ grep meixmp /proc/devices (returns device "major_no")
     $ mknod /dev/xmpcontrol0 c "major_no" 0 (makes boot device)

To build and load a custom module for your Linux system:
     $ cd /MEI/XMP/MPI/Linux/x86
     $ cd meixmp
     $ make
     $ insmod meixmp.ko (loads driver)
     $ grep meixmp /proc/devices (returns device "major_no")
     $ mknod /dev/xmpcontrol0 c "major_no" 0 (makes boot device)
 

Host/Client Communication between WinNT and Linux Applications

The target system is accessible from a WinNT client through TCP/IP via the server.c utility. The server.c source code is included in the directory (/MEI)/XMP/util/. A compiled version of the utility is provided in (/ MEI)/XMP/bin/Linux/x86/Release. This process must be spawned to receive any commands from a WinNT host. Press to begin the process shutdown of the server.c thread. To completely exit the application when running under Linux, press Ctrl + C. This is different than WinNT systems, which only require esc to exit Server.exe. On the Client side, all WinNT utilities and sample programs must be run with the -server 'target' flag.

 

Running XMP support utilities under Linux

Pre-compiled utilities are included in the Linux release. These utilities support two modes of communication - they can be loaded and run from the target system or across ethernet from a WinNT host with the -server flag.

NOTE: Linux is case sensitive.

Here is the syntax for a few of the support utilities:

 

Configuration Utility

 

  • The map file must be specified with the Configuration Utility by using the -map option.
         
    config -map XXXnX.map -file filename

 

flash program

 

  • From the (/MEI)/XMP/bin/Linux/ directory, type:
         
    ./flash ../../XMPnnnXn.bin
  • Running via TCP/IP from a WinNT host, type:
         
    flash -server 'target' XMPnnnXn.bin

 

VM3 program

 

  • Operation not supported on the Linux system.
  • Running via TCP/IP from a WinNT host, type:
         
    VM3 -server 'target'
  • For operation instructions, please refer to the VM3 section.

 

Motion Console program

 

  • Operation not supported on the Linux system.
  • Running via TCP/IP from a WinNT host.
  • For operation instructions, please refer to the Motion Console section.

 

Motion Scope program

 

  • Operation not supported on the target system.
  • Running via TCP/IP from a WinNT host.
  • For operation instructions, please refer to the Motion Scope section.

 

 

MPI/XMP Sample Applications

This release installs a makefile for building the sample applications with GCC. The makefile provides an interface to build all the sample apps from the command line using the make utility.

 

Application Makefile

If you want to create your own makefile, use the sample applications makefile as a guide. Make sure to:

 

  1. Add include in the paths to the MPI (MPI\Include), MEI (XMP\Include), and SqNodeLib (XMP\SqNodeLib\Include) header files.
  2. Add libraries and library paths for mpixmp.lib, sqnode.lib, and apputil.lib.
  3. Add defines for the following:
        MEI_PLATFORM_LINUX
        MPI_DECL1=extern
        MPI_DECL2=
        MEI_ASSERT
        _GNU_SOURCE
  4. Use the complier switch:
        -malign-double

Known Bugs and Issues

There are no known bugs or open issues in the Linux support package. Please see the general release notes for outstanding MPI/XMP bugs and limitations.

Limitations

User Must Have Root (Super User) Access to run MPI Applications

In order to run MPI applications, the user must have root (Super User) access on the Linux machine.

Single Controller Support for Linux Distributions

A limitation exists with the MEI Linux driver, which only allows one controller to be used in a given system. Unlike Win32, where multiple controllers are supported, the Linux device driver can only support one MEI controller at a time. For SynqNet systems, this effectively limits the axes per machine to 32.

Using the Server Utility with Multiple Processes (Applications)

A limitation exists with the Linux Ubuntu 10.04 distribution, which prevents two applications (processes) from safely running at the same time. This limitation is a result of the way semaphores and mutexs are used. In Linux, mutexs and semaphores only lock across threads operating in the same process, which breaks the process-safe design of the MPI. Therefore, you cannot run two applications safely at the same time on the target machine. Until Linux Ubuntu 10.04 supports locking across processes with semaphores and mutexs, there are two workable solutions.

The recommended solution is to run all applications through the server utility. This will allow all applications to access the controller through the same process. Please refer to the Server Utility section for more information.

The alternative solution is to spawn the server utility in a separate thread within your application, so that the application and the server utility are in the same process. Source code for the Server Utility can be found in server.c, which is shipped with the standard MPI software package. Separate applications can access the motion controller through this same server process.

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering