You can now run the oscillating collimator for a specified number of cycles. A MOTEND event is now sent when the oscillator stops. Also temporarily set status to eEager to allow changing the motor accesscode parameter while something else is running, (eg a counter) motor.c finishDriving is no longer static so we can call it from the oscilator and generate a MOTEND event. west4100.c Return 'success' from wrapper on "controlsensor" and "sensorlist" queries so we can test and capture their values in scripts. Makefile Compile the quokka beamstopaction object site_ansto.c Add the MakeActionObject command. Currently only makes the hardcoded beamstopaction object obpar.c Report object name and parameter on an illegal attempt to set a parameter hmm_configuration_common_1.tcl Add oscillating collimator control flag for Wombat. If true we use hmm to start the histogram server instead of hmc. TODO remove hmc and always use hmm. hipd/config/motors/motor_configuration.tcl Don't load anticollider config twice. Fix oct limits wombat_configuration.tcl Environment configuration must be loaded before running server_init. hrpd/config/hmm/hmm_configuration.tcl Fix default time-bin to match 10Hz frame frequency hrpd/config/motors/motor_configuration.tcl Added dummy motor for testing. reflectometer/config/hmm/detector.tcl Fill in dhv1 configuration parameters. sans/config/hmm/detector.tcl Enable detector voltage control sans/config/hmm/hmm_configuration.tcl SICS-227 set default resolution to 192x192 sans/config/motors/motor_configuration.tcl Added dummy motor for testing quokka parameters.tcl Fix L2mm calculation, Fix SICS-228 users cannot set rotapdeg beamstopaction.[ch] NEW: Implements an action command to drive the quokka beamstops up and down. r2670 | ffr | 2008-08-07 13:17:29 +1000 (Thu, 07 Aug 2008) | 53 lines
76 lines
2.9 KiB
C
76 lines
2.9 KiB
C
/*--------------------------------------------------------------------------
|
|
SICS needs to run motors. This is where this happens.
|
|
|
|
Mark Koennecke, November 1996
|
|
|
|
copyright: see implementation file
|
|
|
|
----------------------------------------------------------------------------*/
|
|
#ifndef SICSMOTOR
|
|
#define SICSMOTOR
|
|
#include "Scommon.h"
|
|
#include "obpar.h"
|
|
#include "modriv.h"
|
|
#include "obdes.h"
|
|
#include "interface.h"
|
|
|
|
#define MOTOBPARLENGTH 12
|
|
typedef struct __Motor {
|
|
pObjectDescriptor pDescriptor;
|
|
ObPar *ParArray;
|
|
pIDrivable pDrivInt;
|
|
pICallBack pCall;
|
|
ObjectFunc pActionRoutine;
|
|
char *drivername;
|
|
char *name;
|
|
MotorDriver *pDriver;
|
|
float fTarget;
|
|
float fPosition;
|
|
long endScriptID;
|
|
int posCount; /* counter for calling the
|
|
motor callback */
|
|
int retryCount; /* for retries in status */
|
|
int posFaultCount;
|
|
int stopped;
|
|
} Motor;
|
|
typedef Motor *pMotor;
|
|
/*------------------------------------------------------------------------
|
|
a tiny structure used in CallBack work
|
|
--------------------------------------------------------------------------*/
|
|
typedef struct {
|
|
float fVal;
|
|
char *pName;
|
|
} MotCallback;
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
/* parameter management */
|
|
int MotorGetPar(pMotor self, char *name, float *fVal);
|
|
int MotorSetPar(pMotor self, SConnection *pCon, char *name, float fVal);
|
|
|
|
/* driving */
|
|
long MotorRun(void *self, SConnection *pCon, float fNew);
|
|
int MotorCheckBoundary(pMotor self, float fVal, float *fHard,
|
|
char *error, int iErrLen);
|
|
int MotorCheckPosition(void *self, SConnection *pCon);
|
|
|
|
/* Where are we ? */
|
|
int MotorGetSoftPosition(pMotor self,SConnection *pCon, float *fVal);
|
|
int MotorGetHardPosition(pMotor self,SConnection *pCon, float *fVal);
|
|
float MotorHardToSoftPosition(pMotor self, float fHard);
|
|
|
|
/* creation */
|
|
int MotorCreate(SConnection *pCon, SicsInterp *pSics, void *pData,
|
|
int argc, char *argv[]);
|
|
pMotor MotorInit(char *drivername,char *name, MotorDriver *pDriv);
|
|
void MotorKill(void *self);
|
|
|
|
/* interface to interpreter */
|
|
int MotorAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
|
int argc, char *argv[]);
|
|
pMotor FindMotor(SicsInterp *pSics, char *name);
|
|
|
|
/* Made available to oscillate.c to generate MOTEND event. Ferdi */
|
|
void finishDriving(pMotor self, SConnection *pCon);
|
|
#endif
|
|
|