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

newstg.h

Go to the documentation of this file.
00001 #ifndef NEWSTG_H
00002 #define NEWSTG_H
00003 
00004 /*
00005   newstg.h
00006 
00007   Servo To Go board decls for new boards
00008 
00009   Modification history:
00010 
00011   25-Oct-2001 WPS created.
00012 */
00013 
00014 /* ident tag */
00015 #ifndef __GNUC__
00016 #ifndef __attribute__
00017 #define __attribute__(x)
00018 #endif
00019 #endif
00020 
00021 
00022 static char __attribute__((unused)) stg_h[] = "$Id: newstg.h,v 1.3 2001/10/30 23:34:05 paul_c Exp $";
00023 
00024 /*
00025  Number of axes in system defaults to 4. If STG_8_AXES is defined
00026  by compiler directive or other means, code will support 8 axes,
00027  e.g., -DSTG_8_AXES. Note that only 6 axes are really supported, since
00028  there is not enough digital IO for limit and home switches for all 8.
00029 
00030  Analog input is an option, normally not present. If STG_ANALOG_INPUT is
00031  defined by compiler directive or other means, code will support analog
00032  input, e.g., -DSTG_ANALOG_INPUT
00033  */
00034 
00035 /*
00036   Base address defaults to 0x200
00037   */
00038 #define DEFAULT_STG_BASE_ADDRESS 0x200
00039 extern unsigned short STG_BASE_ADDRESS;
00040 
00041 #define DEFAULT_STG_IRQ 5
00042 extern int STG_IRQ;
00043 
00044 /* decls for external interface */
00045 
00046 extern int stgMotInit(const char * stuff);
00047 extern int stgMotQuit(void);
00048 
00049 extern int stgDacNum(void);
00050 extern int stgDacWrite(int dac, double volts);
00051 extern int stgDacWriteAll(int max, double * volts);
00052 
00053 extern int stgEncoderSetIndexModel(unsigned int model);
00054 extern int stgEncoderNum(void);
00055 extern int stgEncoderRead(int encoder, double * counts);
00056 extern int stgEncoderReadAll(int max, double * counts);
00057 extern int stgEncoderResetIndex(int encoder);
00058 extern int stgEncoderReadLatch(int encoder, int * flag);
00059 extern int stgEncoderReadLevel(int encoder, int * flag);
00060 
00061 extern int stgMaxLimitSwitchRead(int axis, int * flag);
00062 extern int stgMinLimitSwitchRead(int axis, int * flag);
00063 
00064 extern int stgHomeSwitchRead(int axis, int * flag);
00065 
00066 extern int stgAmpEnable(int axis, int enable);
00067 extern int stgAmpFault(int axis, int * fault);
00068 
00069 extern int stgDioInit(const char * stuff);
00070 extern int stgDioQuit(void);
00071 
00072 extern int stgDioMaxInputs(void);
00073 extern int stgDioMaxOutputs(void);
00074 extern int stgDioRead(int index, int *value);
00075 extern int stgDioWrite(int index, int value);
00076 extern int stgDioCheck(int index, int *value);
00077 extern int stgDioByteRead(int index, unsigned char *byte);
00078 extern int stgDioShortRead(int index, unsigned short *sh);
00079 extern int stgDioWordRead(int index, unsigned int *word);
00080 extern int stgDioByteWrite(int index, unsigned char byte);
00081 extern int stgDioShortWrite(int index, unsigned short sh);
00082 extern int stgDioWordWrite(int index, unsigned int word);
00083 extern int stgDioByteCheck(int index, unsigned char *byte);
00084 extern int stgDioShortCheck(int index, unsigned short *sh);
00085 extern int stgDioWordCheck(int index, unsigned int *word);
00086 
00087 extern int stgAioInit(const char * stuff);
00088 extern int stgAioQuit(void);
00089 
00090 extern int stgAioMaxInputs(void);
00091 extern int stgAioMaxOutputs(void);
00092 extern int stgAioStart(int index);
00093 extern void stgAioWait(void);
00094 extern int stgAioRead(int index, double *volts);
00095 extern int stgAioWrite(int index, double volts);
00096 extern int stgAioCheck(int index, double *volts);
00097 extern int stgModel(void);
00098 
00099 #endif /* NEWSTG_H */

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