Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

emcglb.c

Go to the documentation of this file.
00001 /*
00002   emcglb.c
00003 
00004   Globals initialized to values in emccfg.h
00005 
00006   Modification history:
00007 
00008   31-May-2001  FMP took extern off decl of taskplanopen, making it a def.
00009   How did this work before?
00010   19-May-2000  FMP added LUBE_WRITE_INDEX,POLARITY
00011   23-Feb-2000  FMP added AXIS_MAX_VELOCITY[], emcInitGlobals()
00012   17-Nov-1999 WPS removed emcGetArgs function to put it in emcargs.cc.
00013   10-Nov-1999 WPS added -host option to emcGetArgs.
00014   16-Sep-1999  FMP took out errors in emcGetArgs for unrecognized args
00015   31-Aug-1999  FMP took out EMC_NMLFILE for -nml, since this is in ini file
00016   19-Aug-1999  FMP tidied up indenting
00017   21-Jul-1999  FMP removed -d from emcGetArgs() since DEBUG is now in
00018   ini file; added EMC_NMLFILE in emcGetArgs()
00019   2-Jun-1999  FMP added TRAJ_DEFAULT_VELOCITY
00020   6-Jul-1998  FMP added EMC_DEBUG, emcGetArgs()
00021   15-May-1998  FMP added TRAJ_MAX_VELOCITY
00022   23-Apr-1998  FMP added TOOL_TABLE_FILE
00023   1-Apr-1998 FMP added SPINDLE_ON_INDEX, SPINDLE_ENABLE_INDEX,POLARITY
00024   15-Nov-1997 FMP created
00025   */
00026 
00027 #include <string.h>             /* strcpy() */
00028 #include "emcglb.h"             /* these decls */
00029 #include "emccfg.h"             /* their initial values */
00030 
00031 // ident tag
00032 #ifndef __GNUC__
00033 #ifndef __attribute__
00034 #define __attribute__(x)
00035 #endif
00036 #endif
00037 
00038 static char __attribute__((unused)) ident[] = "$Id: emcglb.c,v 1.8 2001/07/31 15:47:45 wshackle Exp $";
00039 
00040 char EMC_INIFILE[EMC_INIFILE_LEN] = DEFAULT_EMC_INIFILE;
00041 
00042 char EMC_NMLFILE[EMC_NMLFILE_LEN] = DEFAULT_EMC_NMLFILE;
00043 
00044 char RS274NGC_STARTUP_CODE[RS274NGC_STARTUP_CODE_MAX]= DEFAULT_RS274NGC_STARTUP_CODE;
00045 
00046 
00047 int EMC_DEBUG = 0;      /* initially no debug messages */
00048 
00049 double EMC_TASK_CYCLE_TIME = DEFAULT_EMC_TASK_CYCLE_TIME;
00050 
00051 double EMC_IO_CYCLE_TIME = DEFAULT_EMC_IO_CYCLE_TIME;
00052 
00053 char TOOL_TABLE_FILE[TOOL_TABLE_FILE_LEN] = DEFAULT_TOOL_TABLE_FILE;
00054 
00055 double TRAJ_DEFAULT_VELOCITY = DEFAULT_TRAJ_DEFAULT_VELOCITY;
00056 double TRAJ_MAX_VELOCITY = DEFAULT_TRAJ_MAX_VELOCITY;
00057 
00058 double AXIS_MAX_VELOCITY[EMC_AXIS_MAX] = {0.0};
00059 
00060 double SPINDLE_OFF_WAIT = DEFAULT_SPINDLE_OFF_WAIT;
00061 double SPINDLE_ON_WAIT = DEFAULT_SPINDLE_ON_WAIT;
00062 
00063 int ESTOP_SENSE_INDEX = DEFAULT_ESTOP_SENSE_INDEX;
00064 int LUBE_SENSE_INDEX = DEFAULT_LUBE_SENSE_INDEX;
00065 
00066 int ESTOP_SENSE_POLARITY = DEFAULT_ESTOP_SENSE_POLARITY;
00067 int LUBE_SENSE_POLARITY = DEFAULT_LUBE_SENSE_POLARITY;
00068 
00069 int LUBE_WRITE_INDEX = DEFAULT_LUBE_WRITE_INDEX;
00070 int LUBE_WRITE_POLARITY = DEFAULT_LUBE_WRITE_POLARITY;
00071 
00072 int SPINDLE_ON_INDEX = DEFAULT_SPINDLE_ON_INDEX;
00073 
00074 int SPINDLE_FORWARD_INDEX = DEFAULT_SPINDLE_FORWARD_INDEX;
00075 int SPINDLE_REVERSE_INDEX = DEFAULT_SPINDLE_REVERSE_INDEX;
00076 int SPINDLE_BRAKE_INDEX = DEFAULT_SPINDLE_BRAKE_INDEX;
00077 int SPINDLE_DECREASE_INDEX = DEFAULT_SPINDLE_DECREASE_INDEX;
00078 int SPINDLE_INCREASE_INDEX = DEFAULT_SPINDLE_INCREASE_INDEX;
00079 int SPINDLE_ENABLE_INDEX = DEFAULT_SPINDLE_ENABLE_INDEX;
00080 int MIST_COOLANT_INDEX = DEFAULT_MIST_COOLANT_INDEX;
00081 int FLOOD_COOLANT_INDEX = DEFAULT_FLOOD_COOLANT_INDEX;
00082 int ESTOP_WRITE_INDEX = DEFAULT_ESTOP_WRITE_INDEX;
00083 
00084 int SPINDLE_FORWARD_POLARITY = DEFAULT_SPINDLE_FORWARD_POLARITY;
00085 int SPINDLE_REVERSE_POLARITY = DEFAULT_SPINDLE_REVERSE_POLARITY;
00086 int MIST_COOLANT_POLARITY = DEFAULT_MIST_COOLANT_POLARITY;
00087 int FLOOD_COOLANT_POLARITY = DEFAULT_FLOOD_COOLANT_POLARITY;
00088 int SPINDLE_DECREASE_POLARITY = DEFAULT_SPINDLE_DECREASE_POLARITY;
00089 int SPINDLE_INCREASE_POLARITY = DEFAULT_SPINDLE_INCREASE_POLARITY;
00090 int ESTOP_WRITE_POLARITY = DEFAULT_ESTOP_WRITE_POLARITY;
00091 int SPINDLE_BRAKE_POLARITY = DEFAULT_SPINDLE_BRAKE_POLARITY;
00092 int SPINDLE_ENABLE_POLARITY = DEFAULT_SPINDLE_ENABLE_POLARITY;
00093 int EMCLOG_INCLUDE_HEADER = DEFAULT_EMCLOG_INCLUDE_HEADER;
00094 
00095 int taskplanopen = 0;
00096 
00097 void emcInitGlobals()
00098 {
00099   int t;
00100 
00101   for (t = 0; t < EMC_AXIS_MAX; t++) {
00102     AXIS_MAX_VELOCITY[t] = DEFAULT_AXIS_MAX_VELOCITY;
00103   }
00104 }

Generated on Sun Dec 2 15:27:38 2001 for EMC by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001