- New oscillator module - Bug fixes SKIPPED: psi/buffer.c psi/el734hp.c psi/el737hpdriv.c psi/make_gen psi/nextrics.c psi/nxamor.c psi/pimotor.c psi/polterwrite.c psi/psi.c psi/swmotor2.c psi/tasscan.c psi/tricssupport.c psi/tricssupport.h psi/tecs/make_gen psi/utils/ecb_load_new/ecb_load.c psi/utils/ecb_load_new/ecb_load.h psi/utils/ecb_load_new/ecbdriv_els.c psi/utils/ecb_load_new/gpib_els.c psi/utils/ecb_load_new/makefile psi/utils/ecb_load_new/makefile_EGPIB psi/utils/ecb_load_new/makefile_GPIB
77 lines
2.7 KiB
OpenEdge ABL
77 lines
2.7 KiB
OpenEdge ABL
\subsection{Configurable Virtual Motor}
|
|
This is an object which can help in realizing complex scans in space.
|
|
In principle this object implements a virtual motor. When this motor is
|
|
started a script is called with the desired new position as a parameter.
|
|
This script is supposed to either return an error or a comma separated
|
|
list of strings motor=value. The name of this script is a configurable
|
|
parameter. The object then takes care of starting all the motors (or
|
|
better Drivables) and watching over them during the driving operation.
|
|
|
|
This objects data structure:
|
|
@d confvirt @{
|
|
typedef struct __CONFVIRTMOT {
|
|
pObjectDescriptor pDes;
|
|
pIDrivable pDriv;
|
|
char *scriptName;
|
|
char *readScript;
|
|
int motorList;
|
|
float targetValue;
|
|
int targetReached;
|
|
char scriptError[512];
|
|
int parseOK;
|
|
}ConfigurableVirtualMotor, *pConfigurableVirtualMotor;
|
|
@}
|
|
The fields are:
|
|
\begin{description}
|
|
\item[pDes] The standard object descriptor.
|
|
\item[pDriv] The drivable interface
|
|
\item[scriptName] The name of the program to calculate the new positions
|
|
of the real motors.
|
|
\item[readScript] A script to read back the current value of the virtual motor.
|
|
\item[motorList] A list of the motors to start and control.
|
|
\item[targetValue] The target value we wanted to have.
|
|
\item[targetReached] A flag which becomes true when a check has showed that
|
|
all desired motors have reached their targets.
|
|
\item[scriptError] A temporary buffer holding all errors encountered
|
|
during processing of the script.
|
|
\item[parseOK] a flag which indicates if parsing and execution of the
|
|
script went OK.
|
|
\end{description}
|
|
|
|
|
|
All the magic of this object is hidden in the implementation of the methods
|
|
of the drivable interface. Additioanlly there is the standard interpreter
|
|
interface.
|
|
|
|
@o confvirtmot.i @{
|
|
/*-----------------------------------------------------------------------
|
|
Configurable Virtual Motor. This is an generated file describing the
|
|
internal data structure of this object. Do not edit.
|
|
-----------------------------------------------------------------------*/
|
|
@< confvirt @>
|
|
|
|
@}
|
|
|
|
@o confvirtmot.h @{
|
|
/*-----------------------------------------------------------------------
|
|
A configurable virtual motor object. At motor start a script is called
|
|
which returns the motors and positions to drive as a comma separated
|
|
list holding entries of the form mot=value.
|
|
|
|
COPYRIGHT: see file COPYRIGHT
|
|
|
|
Mark Koennecke, August 2004
|
|
-------------------------------------------------------------------------*/
|
|
#ifndef CONFIGURABLEVIRTUALMOTOR
|
|
#define CONFIGURABLEVIRTUALMOTOR
|
|
|
|
#include "sics.h"
|
|
|
|
int MakeConfigurableVirtualMotor(SConnection *pCon, SicsInterp *pSics,
|
|
void *data, int aargc, char *argv[]);
|
|
int ConfigurableVirtualMotorAction(SConnection *pCon, SicsInterp *pSics,
|
|
void *data, int argc, char *argv[]);
|
|
#endif
|
|
|
|
@}
|