examples/xenomai_posix/README
author Florian Pose <fp@igh-essen.com>
Tue, 10 Apr 2012 19:09:16 +0200
changeset 2389 02f32b78f79d
parent 2059 ab0b96ac18bb
permissions -rw-r--r--
Added e100 driver for kernel 3.0.
2059
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     1
-------------------------------------------------------------------------------
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     2
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     3
$Id$
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     4
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     5
-------------------------------------------------------------------------------
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     6
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     7
This is a minimal example application for the use of the EtherCAT
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     8
master realtime RTDM interface with an XENOMAI POSIX thread.
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
     9
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    10
The application expects an XENOMAI installation. Configure the master sources
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    11
specifying --enable-rtdm --with-xenomai-dir to have the right include paths.
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    12
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    13
Most probably you'll have different EtherCAT slaves present. Try adjusting the
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    14
section "process data" in main.c to your bus configuration.
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    15
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    16
There are some features that can be disabled by commenting out the respective
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    17
defines at the head of main.c.
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    18
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    19
---
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    20
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    21
To build the example, call:
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    22
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    23
make 
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    24
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    25
To run it, preload the EtherCAT RTDM module:
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    26
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    27
modprobe ec_rtdm
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    28
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    29
and call as root:
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    30
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    31
./ec_xenomai_posix_example
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    32
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    33
...and watch the system logs for the outputs.
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    34
ab0b96ac18bb Working RTAI LXRT example
Andreas Stewering-Bone <ab@igh-essen.com>
parents:
diff changeset
    35
-------------------------------------------------------------------------------