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

Committer:
fablabtruck
Date:
Fri Jun 08 09:26:40 2012 +0000
Revision:
0:3852426a5068
svn revision 379

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fablabtruck 0:3852426a5068 1 /*
fablabtruck 0:3852426a5068 2 * global.h
fablabtruck 0:3852426a5068 3 * Laos Controller, global header file, included in all other files
fablabtruck 0:3852426a5068 4 *
fablabtruck 0:3852426a5068 5 * Copyright (c) 2011 Peter Brier
fablabtruck 0:3852426a5068 6 *
fablabtruck 0:3852426a5068 7 * This file is part of the LaOS project (see: http://wiki.protospace.nl/index.php/LaOS)
fablabtruck 0:3852426a5068 8 *
fablabtruck 0:3852426a5068 9 * LaOS is free software: you can redistribute it and/or modify
fablabtruck 0:3852426a5068 10 * it under the terms of the GNU General Public License as published by
fablabtruck 0:3852426a5068 11 * the Free Software Foundation, either version 3 of the License, or
fablabtruck 0:3852426a5068 12 * (at your option) any later version.
fablabtruck 0:3852426a5068 13 *
fablabtruck 0:3852426a5068 14 * LaOS is distributed in the hope that it will be useful,
fablabtruck 0:3852426a5068 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fablabtruck 0:3852426a5068 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fablabtruck 0:3852426a5068 17 * GNU General Public License for more details.
fablabtruck 0:3852426a5068 18 *
fablabtruck 0:3852426a5068 19 * You should have received a copy of the GNU General Public License
fablabtruck 0:3852426a5068 20 * along with LaOS. If not, see <http://www.gnu.org/licenses/>.
fablabtruck 0:3852426a5068 21 *
fablabtruck 0:3852426a5068 22 */
fablabtruck 0:3852426a5068 23 #ifndef _GLOBAL_H_
fablabtruck 0:3852426a5068 24 #define _GLOBAL_H_
fablabtruck 0:3852426a5068 25
fablabtruck 0:3852426a5068 26 #include "mbed.h"
fablabtruck 0:3852426a5068 27 #include "LaosDisplay.h"
fablabtruck 0:3852426a5068 28 #include "LaosMotion.h"
fablabtruck 0:3852426a5068 29
fablabtruck 0:3852426a5068 30 // Global configuration struct
fablabtruck 0:3852426a5068 31 class GlobalConfig
fablabtruck 0:3852426a5068 32 {
fablabtruck 0:3852426a5068 33 public:
fablabtruck 0:3852426a5068 34 int ip[4], gw[4], nm[4], dns[4], port, dhcp; // network settings
fablabtruck 0:3852426a5068 35 int enable; // enable state (1 or 0)
fablabtruck 0:3852426a5068 36 int autohome; // automatically home the axis at startup
fablabtruck 0:3852426a5068 37 int autozhome; // automatically home the zaxis as well
fablabtruck 0:3852426a5068 38 int nodisplay; // there is no display
fablabtruck 0:3852426a5068 39 int cleandir; // remove files from SD at startup
fablabtruck 0:3852426a5068 40 int i2cbaud; // i2cBaudrate
fablabtruck 0:3852426a5068 41 int xmax, ymax, zmax, emax; // max values
fablabtruck 0:3852426a5068 42 int xmin, ymin, zmin, emin; // min values
fablabtruck 0:3852426a5068 43 int xpol, ypol, zpol, epol; // polarity for the home switches
fablabtruck 0:3852426a5068 44 int xinv, yinv, zinv, einv; // invert signal polarity for step/dir
fablabtruck 0:3852426a5068 45 int xhome, yhome, zhome, ehome; // home position
fablabtruck 0:3852426a5068 46 int xrest, yrest, zrest, erest; // rest positon (moveto after job)
fablabtruck 0:3852426a5068 47 int xhomedir, yhomedir, zhomedir, ehomedir;
fablabtruck 0:3852426a5068 48 int homespeed; // speed used for homing [usec]
fablabtruck 0:3852426a5068 49 int speed, xspeed, yspeed, zspeed, espeed; // Maximum linear speed and max speed per axis [mm/sec]
fablabtruck 0:3852426a5068 50 int accel; // defaul accelletaion [mm/sec2]
fablabtruck 0:3852426a5068 51 int tolerance; // corner tolerance [micrometer]
fablabtruck 0:3852426a5068 52 int xscale; // steps per meter
fablabtruck 0:3852426a5068 53 int yscale; // steps per meter
fablabtruck 0:3852426a5068 54 int zscale; // steps per meter
fablabtruck 0:3852426a5068 55 int escale; // steps per meter
fablabtruck 0:3852426a5068 56 int lenable, lon, pwmmin, pwmmax, pwmfreq; // laser enable, laser on and pwm min/max [%] and frequency [Hz];
fablabtruck 0:3852426a5068 57 GlobalConfig(char *filename);
fablabtruck 0:3852426a5068 58 };
fablabtruck 0:3852426a5068 59 extern GlobalConfig *cfg;
fablabtruck 0:3852426a5068 60
fablabtruck 0:3852426a5068 61 #define VERSION_STRING "\033LAOS v0.3" __DATE__ " " __TIME__
fablabtruck 0:3852426a5068 62
fablabtruck 0:3852426a5068 63 #endif