/* * Copyright (C) 2008 Manish Pandya, [manish at meetamanish dot com] * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * */ package org.hooliguns.ninja.telnet.phiPiMod; /** * The backspace (Cntl-H for Halt) immediately stops all motion and exits from a * macro if one is running. All uninterpreted data in the serial port's FIFO * buffer is purged. Since the speed is not ramped down prior to a halt, rapid * motion may overshoot the internally-stored position by four steps. (See * "Motion Dynamics" below.) Otherwise, it remembers where it is, and an S or M * command can be used to resume travel to the next chosen position. Any defined * macro is preserved and may be restarted from the beginning with the R * command. It cannot be resumed where it left off. *

Motion Dynamics

*

* The stepper motors in the Ninja are run in open loop fashion. This is to say * that, other than in the centering operation (which uses position sensors), * the Ninja doesn't know where it is - just where it's supposed to be. Each * motor is operated with two coils always active at once while moving. (The * coils are turned off between moves.) The original Ninja program used just one * coil at a time. This gives the new configuration considerably more torque and * top-end speed than the old one. In order to accommodate the highest speeds, * the new program incorporates ramping. This allows the motors to accelerate * and decelerate smoothly, thus minimizing cogging (or step errors). Even with * ramping, though, the top error-free speed will vary, depending on the load * carried on the Ninja's platform. The higher the load, the lower the top speed * (or the more chance for position errors at high speed). *

*

* The Ninja is mechanically very sloppy. This is to say it has a lot of * backlash in its linkage from motor to platform. Backlash is most noticeable * when reversing direction. The motor has to rotate a little before actual * motion resumes. This is called taking up the backlash. The new program * incorporates backlash compensation. The amount of backlash present on each * axis has been characterized, and changes of direction are given that many * extra steps to compensate. These extra steps are incorporated into the entire * trajectory and will not normally be noticed. Although a better way is to * compensate the backlash before beginning the programmed trajectory, thus * making the trajectory itself correct from start to finish, the Ninja's * simpler way still allows the endpoints to be correct. *

*

* The Y (altitude) backlash cannot be entirely compensated out. The reason is * the platform's high center of gravity. With a moderate to heavy load, the Y * axis will appear to have no backlash - until it passes it's top equilibrium * point. There the load will cause the platform to "flop over the center" all * at once, then continue with no further backlash in evidence. The Y axis, * however, seems to be much tighter than the X axis, so this phenomenon is not * very pronounced. *

* * @author Manish Pandya (July 1 2008) * */ public class BackSpace extends CommandSingleChar { /** * Creates a BackSpace command */ public BackSpace() { command = "\b"; } /* * (non-Javadoc) * * @see org.hooliguns.ninja.telnet.Command#getHumanName() */ public String getHumanName() { return "BackSpace command"; } }