RE: linux 2.2.13 and EMC, does anybody have instructions for a li nux newbie?
- Subject: RE: linux 2.2.13 and EMC, does anybody have instructions for a li nux newbie?
- From: "Eding, Bert" <b.eding-at-Nyquist.com>
- Date: Fri, 24 Mar 2000 09:21:11 +0100
- Content-Type: text/plain; charset="iso-8859-1"
Thank you Doug, but wat I asked for was a discription for linux 2.2.13 not
2.0.36, its not the same, especially the installation of the real time part.
Even for 2.0.36, the text is not correct, it tasks about rtlinux-0.5a which
is not correct anymore. Further it talks only about emcpanel, not how to
start
any of the graphical interfaces, and which of them.
The discription really needs an update.
Bert
-----Original Message-----
From: Doug Fortune [pentam-at-home.com]
Sent: vrijdag 24 maart 2000 08:39
To: Eding, Bert
Subject: Re: linux 2.2.13 and EMC, does anybody have instructions for a
linux newbie?
Eding, Bert wrote:
> I am a Newbie in using linux, but I managed to install redhat 6.1
> Now I want to install rt-linux and EMC using steppermod (realtime and no
> feedback, right?).
> Can anybody tell me detailed how to proceed?
see the instructions at:
the pre-realtime install README:
ftp://ftp.isd.mel.nist.gov/pub/emc/emcsoft/README
which I include here for your convenience:
- - - - - -
INSTALLING THE NIST EMC SOFTWARE
--------------------------------
The NIST EMC software can be installed on Linux PCs, Sun Solaris
boxes, or most any Unix machine. Currently the distribution is set up
for Linux. We'll get a Solaris version soon and modify these
instructions.
1. Download the file "linux.tgz". This contains the NIST Real-time
Control System (RCS) header files and linkable library, EMC source
code, and other miscellaneous files. The RCS source code is not
included in this archive, since it would make it larger, but is
available at http://isd.cme.nist.gov/proj/rcs_lib.
2. Log in to your Linux PC. Become root.
3. Copy linux.tgz from wherever you downloaded it to into /usr/local,
cd there, and unpack the archive. This looks like:
root> cp linux.tgz /usr/local
root> cd /usr/local
root> tar xzvf linux.tgz
4. You should see the following files in /usr/local:
readme -- more instructions
packup -- a script for making the .gz files below
putback -- a script for checking the code back in to NIST
install -- a script for installing and compiling this software
compile -- a script for just compiling this software
clean -- a script for removing EMC/RCS software (not alltar.gz)
rcslib.inc -- a list of files used by packup to build the RCS archive
rcslib.exc -- ones not to include
emc.inc -- a list of files used by packup to build the EMC archive
emc.exc -- ones not to include
floppy.inc -- a list of these files, for building the floppy
skel.tgz -- the gzip archive for the directory skeleton
rcslib.tgz -- the gzip RCS archive
emc.tgz -- the gzip EMC archive
linux.tgz -- the full archive
5. Run the 'install' script:
root> ./install
6. Wait until it's finished. The install script creates the directory
skeleton for emc/plat; unzips the RCS code; and unzips the EMC code
and compiles it.
7. Set up RT-Linux, if applicable
First, get the RT-Linux distribution we modified, on this FTP site. It's
the same as the rtlinux-0.5a from http://rtlinux.cs.nmt.edu/~rtlinux, with a
line of code changed in rt_prio_sched.c so that Linux tasks get their FPU
registers saved/restored when RT Linux tasks interrupt them. Follow the
installation instructions per the README in this distribution.
You need to set up the RT-Linux kernel modules to run at bootup. Edit
the file "/etc/rc.d/rc.local", and add these lines at the end (note
that the "2.0.30" may be different for your version of Linux):
insmod /lib/modules/2.0.30/fs/rt_fifo_new.o
insmod /lib/modules/2.0.30/misc/rt_prio_sched.o
This will make sure the RT-Linux kernel modules are loaded whenever
you reboot Linux.
Now, set up the shared memory to be set aside for Linux <-> RT-Linux
communication. Assuming a 1 MB set-aside (which is fine) for a 32 MB
machine, edit /etc/lilo.conf and add the "append" line indicated
below (note that the other lines may be slightly different for you):
image=/boot/vmlinuz
label=linux
root=/dev/hda3
append="mem=31m" <-- add this
read-only
For a 64 MB machine, the "31" would be "63", etc.
Run lilo, as root:
root> lilo
and reboot.
8. Run the Controller
To run the EMC code on a real machine, you need to set up all the
hardware, create the wrappers or use ones provided, configure system
parameters via the INI files, and code up the discrete I/O controller
or use one provided. However, you can just run a simulation "out of
the box." There are 4 programs you need to run. They are:
emcmotmod.o OR emcmotsim (real or simulated motion control)
emcio OR emciosim (real or simulated IO control)
emctask (program interpreter/task coordinator)
emcpanel (text-based operator interface)
First, run the motion controller, like this:
[window 1]
user> cd /usr/local/emc
Real controller, as root:
user> su
Password:
root> insmod /usr/local/emc/plat/rtlinux/lib/emcmotmod.o
Or simulated controller, as normal user:
user> /usr/local/emc/plat/linux/bin/emcmotsim
This runs the motion controller. The real-time motion controller uses
the wrappers for a motion interface board. In simulation, nothing is
written or read from hardware.
Now, run the IO controller, like this:
[window 2]
user> cd /usr/local/emc
Real controller, as root:
user> su
Password:
root> /usr/local/emc/plat/linux/bin/emcio
Or simulated controller, as normal user:
user> /usr/local/emc/plat/linux/bin/emciosim
This runs the discrete I/O controller for a particular manual machine
in simulation. In a real application, you would run the actual
discrete I/O controller as a Linux process. The real discrete I/O
controller would use wrappers for a digital I/O interface board. In
simulation, nothing is written or read from hardware. The timing for
the two is identical. In fact, since both run as Linux processes, they
are not running in real time. Plain Linux gives good response on the
tens- of- milliseconds level, so this is typically OK.
[window 3]
user> cd /usr/local/emc
user> /usr/local/emc/plat/linux/bin/emctask
This runs the actual task-level numerical control executive. There is
no hardware dependency at this level, so no simulator exists.
[window 4]
user> cd /usr/local/emc
user> /usr/local/emc/plat/linux/bin/emcpanel
Window 4 is now running the text-based operator interface. The
following is a script of some commands you can send. Entering a blank
line will show the status:
emctask> [ENTER]
State: ESTOP
Mode: MANUAL
Position: -0.000000 0.000000 0.000000
Queue: 0
Inpos: 1
V Scale: 1.00
Program: (none)
Command: (none)
Line: 0
Exec: DONE
Interp: IDLE
Motion line: 0
Current line: 0
Read line: 0
Note the first line shows the state as ESTOP. Now, take the machine
out of estop, by entering "estop off":
emctask> estop off
and turn the machine on:
emctask> machine on
Enter a blank line and you can see the new status:
emctask> [ENTER]
State: ON
Mode: MANUAL
Position: 0.000000 0.000000 0.000000
Queue: 0
Inpos: 1
V Scale: 1.00
Program: (none)
Command: (none)
Line: 0
Exec: DONE
Interp: IDLE
Motion line: 0
Current line: 0
Read line: 0
Note that the first line shows the state as ON now.
Enter "help" to see the allowable commands:
emctask> help
? or help -- print help
delay <secs> -- delay reading next line
< or > -- turn prompt off or on
; -- comment follows
quit -- quit
show {params} {state} {mode} {pos} -- show status
emctask | emcio -- select emctask or emcio
estop on | off -- go into/out of estop
machine on | off -- enable/disable control
mode manual | auto | mdi -- set program mode
axis x | y | z -- select axis
speed <pos value> -- set jog speed
cont -- set continuous jog mode
incr {<pos value>} -- set incremental jog mode
jog {<abs> | + | -} -- jog absolute, or +/- in cont/incr
home -- home selected axis
a -- abort motion
run <prog name> -- run NC program
mdi <NC statement> -- send manual data input
pause -- pause motion
resume -- resume motion
To jog the X, Y, or Z axis, select the axis, the speed, jog it, and
abort:
emctask> axis x
emctask> speed 1
emctask> jog +
(wait a while)
emctask> a
Hit [ENTER] to see the current status:
State: ON
Mode: MANUAL
Position: 3.000000 0.000000 0.000000
Queue: 0
Inpos: 1
V Scale: 0.00
Program: (none)
Command: (none)
Line: 0
Exec: DONE
Interp: IDLE
Motion line: 0
Current line: 0
Read line: 0
Note that the X position is now 3.
You can put the controller into manual data input (MDI) mode, allowing
you to input G and M codes to the interpreter:
emctask> mode mdi
emctask> [ENTER]
State: ON
Mode: MDI
Position: 3.000000 0.000000 0.000000
Queue: 0
Inpos: 1
V Scale: 1.00
Program: (none)
Command: (none)
Line: 0
Exec: DONE
Interp: IDLE
Motion line: 0
Current line: 0
Read line: 0
Note that the mode is now MDI.
Enter some G codes, prefixed with "mdi":
emctask> mdi G01 X1.0 F60
emctask> [ENTER]
It may take a while to get there, but note that X got to 25.4, which
is the millimeter equivalent of 1.0 inches. More on this later.
9. Editing and Recompiling
You may need to recompile the EMC code for a number of reasons. You
may have modified the source code, or you may have downloaded just a
few new files. To recompile, do the following:
root> cd /usr/local
root> ./compile
If you want to compile code in any of the subdirectories individually,
cd to the EMC source directory and run individual makes:
root> cd /usr/local/emc/src
root> make PLAT=linux clean depend install
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact