This is the firmware for the LaOS - Laser Open Source project. You can use it to drive a laser cutter. For hardware and more information, look at our wiki: http://wiki.laoslaser.org
Dependencies: EthernetNetIf mbed
LaosMotion.h
00001 /** 00002 * LaosMotion.cpp 00003 * Motion Controll functions for Laos system 00004 * 00005 * Copyright (c) 2011 Peter Brier 00006 * 00007 * This file is part of the LaOS project (see: http://laoslaser.org) 00008 * 00009 * LaOS is free software: you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation, either version 3 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * LaOS is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with LaOS. If not, see <http://www.gnu.org/licenses/>. 00021 * 00022 * 00023 * 00024 */ 00025 #ifndef _LAOSMOTION_H_ 00026 #define _LAOSMOTION_H_ 00027 #include "global.h" 00028 00029 00030 // the state of the laser OUTPUT 00031 #define LASEROFF 1 00032 #define LASERON 0 00033 00034 /** Motion Controll system 00035 * 00036 * Example: 00037 * @code 00038 * @endcode 00039 */ 00040 class LaosMotion { 00041 public: 00042 /** Make new LaosMotion object. 00043 * Installs ticker 00044 */ 00045 LaosMotion(); 00046 ~LaosMotion(); 00047 void write(int i); // write command word to motion controller 00048 int ready(); // returns true if we are ready to accept a new instruction 00049 void reset(); // reset the instruction decoder and motion controller 00050 void home(int xhome, int yhome, int zhome); // home the system, move to the sensors and set the specified position 00051 bool isStart(); // start button is enabled 00052 bool isHome; // system is homed 00053 void setPosition(int x, int y, int z); // set the absolute position [micron] 00054 void getPosition(int *x, int *y, int *z); // get actual absolute position [micron] (current position of the motors) 00055 void setOrigin(int x, int y, int z); // set the origin to this absolute position [micron] 00056 void moveTo(int x, int y, int z); // move (jog) to a specific position [microns] 00057 void moveTo(int x, int y, int z, int speed); // move (jog) to a specific position [microns] 00058 int queue(); // queued items 00059 private: 00060 00061 }; 00062 00063 00064 00065 #endif
Generated on Tue Jul 12 2022 21:03:03 by 1.7.2