Re: beating a dead horse --> usrmot: perhaps interesting for the FAQ too
Hi,
some long time ago I had a problem setting up EMC.
I then read about usrmot in the NIST docs.
<quote>
usrmot
A terminal-based diagnostics program that connects to the EMC
motion controller, not the top-level EMC, and lets you type in motion
commands and view status. It only requires that the motion controller
be running.
</quote>
You can even move your machine with usrmot. help or ?
will give you a summary of what is available.
<quote from usrmot.c>
/* match it in the big if loop */
if (! strcmp(cmd, "help") ||
! strcmp(cmd, "?")) {
printf("? or help\tprint help\n");
printf(">\ttoggle prompt on or off\n");
printf(";\tcomment follows\n");
printf("quit\tquit\n");
printf("show {pids} {flags} {limits} {scales} {times}\tshow status\n");
printf("show debug <screen>\tshow debug\n");
printf("show config <screen>\tshow config\n");
printf("free\tset mode to free\n");
printf("teleop\tset mode to teleop\n");
printf("coord\tset mode to coordinated\n");
printf("pause\tpause motion controller\n");
printf("resume\tresume motion controller\n");
printf("a\tabort motion controller\n");
printf("scale <0..1>\tscale velocity\n");
printf("enable | disable\tenable or disable motion controller\n");
printf("jog <axis> + | -\tjog axis pos or neg\n");
printf("jog <axis> + | -\tjog axis pos or neg\n");
printf("id <num> \tset base id for subsequent moves\n");
printf("<x> <y> <z>\tput motion on queue\n");
printf("load <file>\tput motions from file on queue\n");
printf("cw <x> <y> <z> <cx> <cy> <cz> <turn>\tput CW circle on queue\n");
printf("ccw <x> <y> <z> <cx> <cy> <cz> <turn>\tput CCW circle on queue\n");
printf("set t <traj t> | s <servo t> | v <vel> | a <acc>\tset params\n");
printf("oscale <axis 0..n-1> <a> <b>\traw[n] = a(out[n]-b)\n");
printf("iscale <axis 0..n-1> <a> <b>\tin[n] = a(raw[n]-b)\n");
printf("pol <axis 0..n-1> <enable nhl phl homedir homesw fault> <0 1>\n");
printf("pid <axis 0..n-1> <ini file>\tset PID gains for motor n\n");
printf("limit <axis> <min> <max>\tset position limits\n");
printf("clamp <axis> <min> <max>\tset output limits\n");
printf("ferror <axis> <value>\tset max following error\n");
printf("live <axis 0..n-1>\tenable amp n\n");
printf("kill <axis 0..n-1>\tkill amp n\n");
printf("activate <axis 0..n-1>\tactivate axis n\n");
printf("deactivate <axis 0..n-1>\tdeactivate axis n\n");
printf("log open <type ...> | start | stop | close | dump <file>\tlog data\n");
printf("dac <axis 0..n-1> <-10.0 .. 10.0>\toutput value to DAC\n");
printf("home <axis 0..n-1>\thome axis\n");
printf("nolim \toverride hardware limits\n");
printf("wd on | off\tenable or disable watchdog toggle\n");
#ifdef ENABLE_PROBING
printf("probe <x> <y> <z>\tMove toward x,y,z, if probe is tripped on the way the probe position will be updated and moti
on stopped.\n");
printf("probeclear\tClear the probeTripped status flag.\n");
printf("probeindex <index>\tSet which input is checked for probe status.\n");
printf("probepolarity <polarity>\tSet whether a probe is tripped on a 0 or 1.\n");
#endif
}
</quote>
For running usrmot you do not have to run all modules or the gui, but see below.
<shameless quote from http://www.isd.mel.nist.gov/projects/emc/emcsoft.html#USRMOT>
Using the USRMOT Motion Utility
USRMOT is an interactive text-based utility that is used to set and test motion parameters for the EMCMOT motion controller. To use
USRMOT, first run EMCMOT standalone (yourprompt> represents whatever your system prompt is):
yourprompt> emcmot
In another window, run the USRMOT utility:
yourprompt> usrmot
motion>
The motion> prompt is displayed by USRMOT when it runs. Entering a blank line lets you see the status:
motion>
mode: free
cmd echo: 0
split: 0
heartbeat: 605
compute time: 0.014992
traj time: 0.200000
servo time: 0.020000
interp rate: 10
axes enabled: 0 0 0
cmd pos: 0.000000 0.000000 0.000000
act pos: 0.000000 0.000000 0.000000
velocity: 10.000000
accel: 100.000000
id: 0
depth: 0
active depth: 0
inpos: 1
vscales: Q: 1.00 X: 1.00 Y: 1.00 Z: 1.00
logging: closed and stopped, size 0, skipping 0, type 0
homing: ---
enabled: DISABLED
</quote>
and another quote, again by Will, from this list from 13 March 2000
<quote>
Unfortunately there are a lot of reasons for not being able to come out of
estop. Ussually I start to look for the reason by running
plat/linux_2_2_13/bin/usrmot -ini mymachine.ini
And entering "show flags" to see most of the flags that might prevent you from
coming out of estop.
</quote>
and yet another quote from Fred from 17 March 2000
<quote>
You can run the "usrmot" motion controller utility when the whole
controller is up, or just if the motion controller is loaded. If you
just load the motion controller, you can send its .ini file parameters
down to it using the "inimot" utility, like this:
you> cd /usr/local/nist/emc
you> insmod plat/rtlinux_09J/lib/stg2mod.o
you> plat/linux_2_0_36/bin/inimot -ini yourfile.ini
(some messages saying initing axis #...done, or something like that)
you> plat/linux_2_0_36/bin/usrmot -ini yourfile.ini
motion> help
(shows terse help list)
motion> [ENTER] shows status
motion> enable
motion> show pids
motion> [ENTER] shows just the PIDs
motion> show times
motion> [ENTER] shows the min/max/average compute times
motion> show
motion> [ENTER] shows full status
--Fred
</quote>
I really hope this big mess of quotes about usrmot helps you find a reason for
your problems.
Regards
Max
--
Max Heise <max.heise-at-gmx.net>
Student Mechatronik/Automatisierungstechnik
PGP public key from:
http://www.fht-esslingen.de/~mahemt01/pgp50i.pub or any keyserver
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact