Files
sicspsi/tabledrive.h
koennecke a91056837e - Added another slit for AMOR
- Fixed timeout for pimotor
- Fixed a bug which could cause tabledrive to go into an endless loop
2006-12-07 14:05:35 +00:00

55 lines
1.5 KiB
C

/*---------------------------------------------------------------------------
SICS object for driving a couple of motors along a tabulated given path.
copyright: see file COPYRIGHT
Mark Koennecke, July 2005
---------------------------------------------------------------------------*/
#ifndef SICSTABLEDRIVE
#define SICSTABLEDRIVE
#include <sics.h>
#include "../motor.h"
/*-------------------------------------------------------------------------*/
typedef struct{
double lower, position, upper;
int tablePos;
}tdEntry, *ptdEntry;
/*-------------------------------------------------------------------------*/
typedef struct {
char motorName[132];
int table;
pMotor pMot;
}tdMotor, *ptdMotor;
/*-------------------------------------------------------------------------*/
typedef struct{
pObjectDescriptor pDes;
pIDrivable pDriv;
int motorTable;
int tableLength;
float targetPosition;
float currentPosition;
int state;
char orientMotor[80];
int debug;
tdMotor oriMotor;
int oriInvalid;
}TableDrive, *pTableDrive;
/*-------------------------------------------------------------------------*/
int TableDriveFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
int TableDriveAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
#endif