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

emcmotcfg.h

Go to the documentation of this file.
00001 #ifndef EMCMOTCFG_H
00002 #define EMCMOTCFG_H
00003 
00004 /*
00005   emcmotcfg.h
00006 
00007   Default values for compile-time parameters, used to initialize
00008   global variables in emcmotcfg.c.
00009 
00010   Modification history:
00011 
00012   13-Mar-2000 WPS added unused attribute to emcmotcfg_h to avoid 'defined but not used' compiler warning.
00013   21-Jul-1999  FMP changed EMCMOT_MAX_AXIS to 6, in support of robot
00014   and hexapod kinematics. Note that re-making doesn't work, since there
00015   is a dependency somewhere that isn't captured. You need to do a
00016   'make PLAT=whatever clean headers depend all', or a ./compile in the
00017   nist directory, to get everything compiled.
00018   15-Jun-1999  FMP changed DEFAULT_VELOCITY, DEFAULT_ACCELERATION to
00019   1 and 10, respectively.
00020   8-Jun-1999  FMP removed DEFAULT_SM_CYCLE_TIME, since the stepper motor
00021   cycle time is now configured as twice the axis rate in the ini file.
00022   8-Jun-1999  RSB changed default queue size to 200
00023   18-Aug-1998  FMP added DEFAULT_BIAS, DEFAULT_MAX_ERROR
00024   6-Aug-1998  FMP added DEFAULT_SM_CYCLE_TIME decl
00025   8-Jul-1998  FMP added DEFAULT_EMCMOT_INIFILE
00026   6-Jul-1998  FMP changed BASE_ADDRESS to SHMEM_BASE_ADDRESS
00027   5-Jun-1998  FMP added DEFAULT_BACKLASH
00028   28-May-1998  FMP changed DEFAULT_TRAJ,SERVO_CYCLE_TIME to 10 ms, 1 ms
00029   respectively, since any faster may lead to indefinite postponements
00030   due to split reads
00031   1-Apr-1998  FMP added DEFAULT_EMCMOT_COMM_TIMEOUT,WAIT
00032   6-Jan-1998  FMP added PID gains, input/output offsets, default base address
00033   16-Oct-1997  FMP created
00034   */
00035 
00036 /* ident tag */
00037 #ifndef __GNUC__
00038 #ifndef __attribute__
00039 #define __attribute__(x)
00040 #endif
00041 #endif
00042 
00043 static char __attribute__((unused)) emcmotcfg_h[] = "$Id: emcmotcfg.h,v 1.3 2001/06/11 17:57:22 wshackle Exp $";
00044 
00045 /* default name of EMCMOT ini file */
00046 #define DEFAULT_EMCMOT_INIFILE "emc.ini"/* same as for EMC-- we're in touch */
00047 
00048 /* number of axes supported
00049    Note: this is not a global variable but a compile-time parameter
00050    since it sets array sizes, etc. */
00051 #define EMCMOT_MAX_AXIS 6
00052 
00053 #define EMCMOT_ERROR_NUM 32     /* how many errors we can queue */
00054 #define EMCMOT_ERROR_LEN 256    /* how long error string can be */
00055 
00056 /*
00057   base address-- make sure that
00058 
00059   DEFAULT_SHMEM_BASE_ADDRESS + sizeof(EMCMOT_STRUCT) < physical memory
00060 
00061   Examples:
00062 
00063   On a 32 MB computer, with sizeof(EMCMOT_STRUCT) = 241492,
00064   let's set aside 1 MB, so DEFAULT_SHMEM_BASE_ADDRESS is 31 MB:
00065   #define DEFAULT_SHMEM_BASE_ADDRESS = (31*0x100000)
00066   To set up Linux for this, put append="mem=31m" in lilo.conf.
00067 
00068   On a 64 MB computer, with sizeof(EMCMOT_STRUCT) = 1290068,
00069   let's set aside 2 MB, so DEFAULT_SHMEM_BASE_ADDRESS is 62 MB:
00070   #define DEFAULT_SHMEM_BASE_ADDRESS = (62*0x100000)
00071   To set up Linux for this, put append="mem=62m" in lilo.conf.
00072   */
00073 
00074 /* base address for RTLINUX shared memory */
00075 #define DEFAULT_SHMEM_BASE_ADDRESS (31*0x100000)
00076 
00077 /*
00078   Shared memory keys for simulated motion process. No base address
00079   values need to be computed, since operating system does this for us
00080   */
00081 #define DEFAULT_SHMEM_KEY 100
00082 
00083 /* default comm timeout, in seconds */
00084 #define DEFAULT_EMCMOT_COMM_TIMEOUT 1.0
00085 /* seconds to delay between comm retries */
00086 #define DEFAULT_EMCMOT_COMM_WAIT 0.010
00087 
00088 /* default cycle time for trajectory calculations; cycle time
00089    for emcmot.c main loop will be this times the interpolation rate */
00090 #if defined(rtlinux) || defined(rtai)
00091 #define DEFAULT_TRAJ_CYCLE_TIME  0.010
00092 #define DEFAULT_SERVO_CYCLE_TIME 0.001
00093 #else
00094 #define DEFAULT_TRAJ_CYCLE_TIME  0.200
00095 #define DEFAULT_SERVO_CYCLE_TIME 0.020
00096 #endif
00097 
00098 /* initial velocity, accel used for coordinated moves */
00099 #define DEFAULT_VELOCITY 1.0
00100 #define DEFAULT_ACCELERATION 10.0
00101 
00102 /* maximum and minimum limit defaults for all axes */
00103 #define DEFAULT_MAX_LIMIT 1000
00104 #define DEFAULT_MIN_LIMIT -1000
00105 
00106 /* output clamps before scaling */
00107 #define DEFAULT_MAX_OUTPUT 10.0
00108 #define DEFAULT_MIN_OUTPUT -10.0
00109 
00110 /* size of motion queue */
00111 #define DEFAULT_TC_QUEUE_SIZE 200
00112 
00113 /* size of window for averages */
00114 #define DEFAULT_MMXAVG_SIZE 100
00115 
00116 /* max following error */
00117 #define DEFAULT_MAX_FERROR 100
00118 
00119 /* PID gains */
00120 #define DEFAULT_P_GAIN 0.0
00121 #define DEFAULT_I_GAIN 0.0
00122 #define DEFAULT_D_GAIN 0.0
00123 #define DEFAULT_FF0_GAIN 0.0
00124 #define DEFAULT_FF1_GAIN 0.0
00125 #define DEFAULT_FF2_GAIN 0.0
00126 #define DEFAULT_BACKLASH 0.0
00127 #define DEFAULT_BIAS 0.0
00128 #define DEFAULT_MAX_ERROR 0.0
00129 
00130 /* input, output scales */
00131 #define DEFAULT_INPUT_SCALE 1.0
00132 #define DEFAULT_INPUT_OFFSET 0.0
00133 #define DEFAULT_OUTPUT_SCALE 1.0
00134 #define DEFAULT_OUTPUT_OFFSET 0.0
00135 
00136 #endif

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