3 REFERENCE MANUAL
This chapter provides a detailed description of the mot API procedures and tools and motci ACI commands provided by these two modules.
The API functions and tools are described in UNIX man-page format and are organized in alphabetical order.
The ACI commands are described in the Command Definition Table of the process motServer (file motServer.cdt).
Necessary include files are also listed.
3.1 Aplication Programmatic Interface
#include "mot.h"
ccsCOMPL_STAT motAttach (
IN dbSYMADDRESS dbPath,
IN motACCESS_MODE mode,
OUT motHANDLE *handle,
OUT ccsERROR *error
)
This routine attaches a motor to the user's application.
The motor is specified by its pathname <dbPath>, which is the absolute
path to the motor or its alias in the local database.
The parameter <mode> specifies the access rights to motor.
The returned <handle> identifies the channel to the motor and
is required for any further motor library function call.
Possible access modes are:
- motREAD_ONLY : only read actions are possible
- motEXCLUSIVE : all functions provided by the motor library
are allowed; a motor can be attached only
once in this mode
- motEMERGENCY : for emergency case only
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motCheckBrake (
IN motHANDLE handle[],
IN vltINT32 *status,
OUT ccsERROR *error
)
The mot Server routine motCheckBrake() checks the status of the
brake for the set of motors, specified in the <handle> list.
It returns the values in the <status> array. The <status> array need
not provide space for a terminator entry.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine processes
all motors of the <handle> list, and does not stop execution when an
error occurs.
#include "mot.h"
ccsCOMPL_STAT motCheckInterlock (
IN motHANDLE handle[],
IN vltINT32 *status,
OUT ccsERROR *error
)
The mot Server routine motCheckInterlock() checks the status of the
interlock line for the set of motors, specified in the <handle> list.
It returns the values in the <status> array. The <status> array need
not provide space for a terminator entry.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine processes
all motors of the <handle> list, and does not stop execution when an
error occurs.
#include "mot.h"
ccsCOMPL_STAT motCheckMove (
IN motHANDLE handle[],
IN motMOTION *motionReq,
OUT ccsERROR *error
)
This routine check the validity of the requested motions for all
motors specified by the <handle> list.
The <motionReq> array must at first contain the motions for the first
motor in the <handle> list, with the 'lastStep' flag set in the last
motion for this motor. Then the motion entries for the second motor
in the <handle> list in the same way, and so on.
The motion mode for each motor must have been defined by a
previous motSetMotionMode() call.
Each movement represents one entry in <motionReq> array,
and is defined as follows :
<motionReq>->posType - the position types are :
motABSOLUTE, motRELATIVE,
motLOWER_LIMIT, motUPPER_LIMIT,
motREFERENCE_SWITCH, motINDEX_PULSE,
motHOME_POSITION, motBY_SPEED,
motTWO_STEP_ABS, motTWO_STEP_REL
motHALF_TURN_ABS, motHALF_TURN_REL
<motionReq>->speed - moving speed
For the motion mode motPOSITION_MODE & motTRACKING_MODE, the target
position must be provided, except for the position type motBY_SPEED.
<motionReq>->pos - the target position
<motionReq>->lastStep - flag to indicate the last step of a sequence
for a motor (TRUE/FALSE)
The minimum access right is READ_ONLY. The validity of the motion
sequences is checked if the motor(s) is(are) not moving, but their
validity may change if a motion is performed after this call.
In order to avoid any dependency, it is recommended to start the
sequence from a known position.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs or when a motion is illegal, and does
not process the remaining motors of the set.
The mot Server routine motClampBrake() clamps the brakes
of the set of motors, specified in the <handle> list.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned in the <error> variable. The routine does not
break execution when an error occurs, but tries to process the
remaining motors of the set.
The mot Server routine motConnect() enables the electrical connection
of the set of motors, specified in the <handle> list.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, nad does not process the remaining
motors of the set.
This routine releases the access to the motors, specified in the
<handle> list. If a motor is still moving, it is not detached and
an error is returned.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The processing is
stopped when the first error occurs.
#include "mot.h"
ccsCOMPL_STAT motDigToCurrent (
IN motHANDLE handle,
IN vltINT32 currDig,
INOUT motMETRIC *currUser,
OUT ccsERROR *error
)
The mot Server routine motDigToCurrent() converts a motor current
from the digital value <currDig> to the value <currUser> in user units.
The required unit has to be specified in <currUser>->unit
(for example "mA"), the value evaluated is returned by
<currUser>->value (double). The unit specified must be defined
in the local database.
The conversion is specified for the motor defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable.
The mot Server routine motDisable() disables the motion control loop
for a set of motors, specified by the <handle> list. This function
is supported by motion controller boards only. If no controller is
configured an error is returned.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
The mot Server routine motDisconnect() disables the electrical
connection of the set of motors, specified in the <handle> list.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
The mot Server routine motEnable enables the motion control loop for
the set of motors, specified by the <handle> list.
This function is supported by motion controller boards only.
If no controller is configured an error is returned.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motEncToName (
IN motHANDLE handle,
IN vltINT32 posEnc,
INOUT motSECTION *section,
OUT vltBYTES32 name,
OUT ccsERROR *error
)
The mot Server routine motEncToName() tries to convert a position
<posEnc>, given in encoder ticks to a <name>, which corresponds to
a named position.
By <section> the type of position requested is specified.
Possible values are:
- motOBSERVATION
- motMAINTENACE
- motUSER_DEFINED
- motALL_SECTION
In case of motALL_SECTION, the associated named position is searched
in all sections, starting with OBSERVATION. The first matching named
position is returned. The name and section are set to the matching
values.
If no matching name is found,
<name> is set to empty string "",
<section> is set to motNO_SECTION.
The database section SERVER_CONF:POSITIONS is queried for the named
positions.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motEncToPos (
IN motHANDLE handle,
IN vltINT32 posEnc,
INOUT motMETRIC *posUser,
OUT ccsERROR *error
)
The mot Server routine motEncToPos converts the position from encoder
ticks <posEnc> to user units defined by <posUser>->unit
(for example "deg").
The value evaluated is returned by <posUser>->value (double).
The user unit specified must be defined in the local database.
The conversion is specific for the motor, defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motEncToVel (
IN motHANDLE handle,
IN vltDOUBLE velEnc,
INOUT motMETRIC *velUser,
OUT ccsERROR *error
)
This routine motEncToVel() converts the velocity from encoder ticks
per time unit <velEnc> to user units specified by <velUser>->unit
(for example "deg/sec"). The value evaluated is returned by
<velUser>->value (double). The user unit specified must be defined
in the local database.
The conversion is specific for the motor, defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motGetOpMode (
IN motHANDLE handle[],
OUT motOPMODE mode[],
OUT ccsERROR *error
)
This routine returns the operational modes of all motors in the
specified <handle> list in the array <mode>.
Possible modes are:
- motNOT_AVAILABLE
- motFIXED_POSITION
- motSIMULATION
- motNORMAL
- motHANDSET
Note: the <mode> array is not terminated by a special entry.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motGetSemIEV (
IN motHANDLE handle,
OUT SEM_ID *semIEV,
OUT ccsERROR *error
)
The mot Server routine motGetSemIEV() retrieves the semaphore given
by the Interrupt Service Routine handling the external encoder value.
It returns FAILURE if the pointer to the semaphore is NULL.
The function waits forever until the semaphore has been created
by motInitSw().
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description is returned in the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motGetStatus (
IN motHANDLE handle[],
INOUT motSTATUS status[],
OUT ccsERROR *error
)
This routine returns status information for the specified set of motors
in the <status> array with an entry for each motor specified by the
<handle> list. Additionally the MOTOR_STATUS section of each motor
database-point is updated accordingly.
The <status> data structure is build up in the following way:
parameter | meaning | possible values
--------------+------------------------+-------------------------------
opMode | operational mode | motNOT_AVAILABLE/motHANDSET
| | motFIXED_POSITION/motNORMAL
| | motSIMULATION
motionMode | actual motion mode | motDIRECT_MODE/motSPEED_MODE
| | motTRACKING_MODE
| | motPOSITION_MODE
motionStatus | motion status | motSTANDING/motMOVING
| | motTIMEOUT/motABORTED
motionStep | number of motion |
initStatus | initialization status | motNOT_INT/motSW_INIT
| | motHW_INIT_RUN
| | motINIT_DONE
initStep | step of init sequence |
brakeClamped | brake status | (I/O signal)
axisEnabled | axis enabled flag | TRUE/FALSE
eventMask | bit mask to encode | motMOTION_END/motDRIVE_FAULT
| abnormal events | motEMERGENCY_STOP
| | motOVER_TEMPERATURE
| | motOVER_CURRENT/motON_LIMIT
| | motPOSITIONING_ERROR
| | motNORMAL_STOP
amplStatus | amplifier status | motNOT_AVAILABLE/OK/ERROR
powerStatus | electrical connection | motBOTH/motNEGATIVE
| | motPOSITIVE/motDISCONNECTED
mconStatus | controller status | motNOT_AVAILABLE/OK/ERROR
inPos | in position flag | TRUE/FALSE
amplOnLimit | amplifier limit flag | motNOT_ON_LIMIT/motHW_UPPER
| | motHW_LOWER
mconOnLimit | controller limit flag | motNOT_ON_LIMIT
| | motSW_LOWER/motSW_UPPER
| | motHW_LOWER/motHW_UPPER
| | motHW_BOTH
interlock | interlock line status | (I/O signal)
speed | actual speed |
speedUnit | speed unit | for example "deg/sec"
| | (type motUNIT)
current | actual motor current |
currentUnit | motor current unit | for example "mA"
| | (type motUNIT)
posEnc | actual position in |
| encoder ticks |
posUser | actual position in |
| user units |
posUnit | position user unit | for example "deg"
| | (type motUNIT)
posName | name of actual position| NULL, if none available
posSection | position section | motOBSERVATION/motMAINTENANCE
| | motUSER_DEFINED/motNO_SECTION
nextPosEnc | next position in |
| encoder ticks |
nextPosUser | actual position in |
| user units (posUnit) |
nextPosName | name of next position | NULL, if none available
nextPosSection| next position section | motOBSERVATION/motMAINTENANCE
| | motUSER_DEFINED/motNO_SECTION
followingErr | actual following error |
| in user units (posUnit)|
startTime | start time of movement |
| in UTC |
endTime | end time of movement |
| in UTC |
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motInitHw (
IN motHANDLE handle[],
IN vltLOGICAL mandatory,
OUT ccsERROR *error
)
The mot Server routine motInitHw initializes the board hardware of
the boards controlling the motors specified in the <handle> list.
The <mandatory> flag specifies whether the initialization has to be
performed in any case (TRUE) or only, if not done before (FALSE).
If any user functions are used for HW initialization, pointers
to user defined data structures to be passed to the functions are
located in the Database :SERVER:INIT:INIT:action[].userParList.
The following parameters will be passed to the user function:
- pointer to user defined data structure
- error structure address
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motInitSampling (
IN motHANDLE handle[],
IN vltINT32 period,
IN motSECTION section,
OUT ccsERROR *error
)
The mot Server routine motInitSampling starts the status sampling
for the motors, specified in the <handle> list. The sample data is
stored in intervals of <period> in the local database general status
section. For each motor one sampling task is spawned.
The named positions are searched for in the given <section>.
Depending on the <period>, the effective sampling period is:
range [-100 ; -2] : the period is 1/|<period>| in seconds
value -1 : as fast as possible
value 0 : set to the DB value SERVER:CONF.motor(0,timemon).
range [+1 -> ) : the period is <period> in seconds
The minimum <period> is -100, any setting below is forced to 100Hz.
Since the time to retrieve the boards' status is approx. 10ms, and
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motInitSw (
IN motHANDLE *handle,
IN vltLOGICAL mandatory,
OUT ccsERROR *error
)
The mot Server routine motInitSw initializes the board software of
the boards controlling the motors, specified in the <handle> list.
The <mandatory> flag specifies whether the initialisation has to be
performed in any case (TRUE) or only, if not done before (FALSE).
If anything goes wrong FAILURE is returned and the error reason and
description are returned in the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motLoadPar (
IN motHANDLE handle,
IN motBOARD_TYPE board,
INOUT vltUINT32 *number,
IN motPARAMETER *parBuf,
OUT ccsERROR *error
)
The mot Server routine motLoadPar() loads board specific parameters
for the motor, specified through its <handle> to the <board> of the
specified type.
Possible board types are motAMPLIFIER/motCONTROLLER.
The number of parameters to be loaded is passed by <number>,
parameter names and values are defined by the <parBuf> array
(<parBuf>->parName/<parBuf>->parValue).
After termination of this function <number> contains the number of
parameters successfully loaded.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
parameters.
This routine is for ONE motor only, not for a set of motors. It is
intended to be used for maintenance purposes only.
This function returns in the string pointed to by <list> the list of
the installed motors using the DB aliases.
If the list is to be returned in the string <list>, enough space MUST
have been allocated (up to 20 bytes per motor).
#include "mot.h"
ccsCOMPL_STAT motMove (
IN motHANDLE handle[],
IN motMOTION *motionReq,
OUT ccsERROR *error
)
This routine initiates motions for all motors specified by the
<handle> list.
For each motor a sequence of motions can be defined by <motionReq>.
For each movement one entry in <motionReq> must contain:
<motSeq>->posType - the position type
(motABSOLUTE/motRELATIVE/motLOWER_LIMIT/
motUPPER_LIMIT/motREFERENCE_SWITCH/motINDEX_PULSE/
motHOME_POSITION/motBY_SPEED/
motTWO_STEP_ABS/motTWO_STEP_REL/
motHALF_TURN_ABS/motHALF_TURN_REL)
<motSeq>->speed - moving speed
<motSeq>->pos - the position to move to (motABSOLUTE/motRELATIVE)
<motSeq>->lastStep - flag to indicate the last step of a sequence
for a motor (TRUE/FALSE)
The <motionReq> array must at first contain the motions for the first
motor in the <handle> list, with the 'lastStep' flag set in the last
motion for this motor. Then the motion entries for the second motor
in the <handle> list in the same way, and so on.
The motion mode for each motor must have been defined by a previous
motSetMotionMode() call.
If the motor is electrically disconnected, it will be automatically
connected.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motNameToEnc (
IN motHANDLE handle,
IN vltBYTES32 name,
IN motSECTION section,
OUT vltINT32 *posEnc,
OUT ccsERROR *error
)
The mot Server routine motNameToEnc() converts a named position,
specified by its <name> and <section> to the corresponding encoder
ticks and returns its value by <posEnc>.
Possible values for <section> are: - motOBSERVATION
- motMAINTENANCE
- motUSER_DEFINED
The routine works specific for the motor <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motNameToEnc (
IN motHANDLE handle,
IN vltBYTES32 name,
IN motSECTION section,
OUT vltINT32 *posEnc,
OUT ccsERROR *error
)
The mot Server routine motNameToEnc() converts a named position,
specified by its <name> and <section> to the corresponding encoder
ticks and returns its value by <posEnc>.
Possible values for <section> are: - motOBSERVATION
- motMAINTENANCE
- motUSER_DEFINED
The routine works specific for the motor <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motPosToEnc (
IN motHANDLE handle,
IN motMETRIC *posUser,
OUT vltINT32 *posEnc,
OUT ccsERROR *error
)
The mot Server routine motPosToEnc() converts the position in user
units <posUser> (for example "deg") to an encoder specific value
and returns it by <posEnc>. The user unit specified must be defined
in the local database.
The conversion is specific for the motor defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motRefToVel (
IN motHANDLE handle,
IN vltINT32 velRef,
OUT motMETRIC *velUser,
OUT ccsERROR *error
)
The mot Server routine motRefToVel() converts the velocity from
amplifier velocity reference <velRef> to user units <velUser>
(for example "deg/sec").
The user unit specified must be defined in the local database.
The conversion is specific for the motor, defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motRetrievePar (
IN motHANDLE handle,
IN motBOARD_TYPE board,
INOUT vltUINT32 *number,
INOUT motPARAMETER *parBuf,
OUT ccsERROR *error
)
The mot Server routine motRetrievePar retrieves board specific
parameters of the motor, specified by <handle> from the <board> of the
specified type.
Possible board types are motCONTROLLER and motAMPLIFIER.
The number of parameters to be retrieved is specified by <number>.
Each parameter is specified by its name in the corresponding <parBuf>
entry (<parBuf->parName), whereby the parameter value will be returned
by <parBuf>->parValue.
After termination of this function <number> contains the number of
parameters successfully read.
This routine needs EXCLUSIVE access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
parameters.
This routine is for ONE motor only, not for a set of motors. It is
intended to be used for maintenance purposes only.
#include "mot.h"
ccsCOMPL_STAT motSetDefaultUnits (
IN motHANDLE *handle,
IN motDEFAULT_UNITS *units,
OUT ccsERROR *error
)
The mot Server routine motSetDefaultUnits() defines the default <units>
for position, speed and electric current for the set of motors
specified in the <handle> list. The default units are stored in the
local database and are used in the motor status, where parameters are
noted in user units.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motSetMotionMode (
IN motHANDLE handle[],
IN motMOTIONMODE mode[],
OUT ccsERROR *error
)
This routine sets the motion mode of each motor specified by the
handle list <handle>. The mode array need not be terminated.
Supported motion modes are:
- DIRECT : control through amplifier only
- POSITION : move to absolute or relative position
- TRACKING : follow a sequence of positions
- SPEED : drive with a constant speed, no target position
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the list.
#include "mot.h"
ccsCOMPL_STAT motSetOpMode (
IN const motHANDLE handle[],
IN const motOPMODE opMode[],
OUT ccsERROR *error
)
This routine sets all motors in the specified <handle> list to the
operational mode as specified in the corresponding entry of the
<opMode> array.
Possible operational modes are: - motNOT_AVAILABLE
- motFIXED_POSITION
- motSIMULATION
- motNORMAL
- motHANDSET
If a required mode is equal to the current mode, no error is returned.
The <opMode> array need not have a terminating entry, unlike the
<handle> array.
If the operational mode is set to NORMAL or HANDSET the motor is
automatically electrically connected; in any other case the motor
is disconnected.
If a motion controller is available the control loop will be
automatically disabled.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine stops
execution when an error occurs, and does not process the remaining
motors of the set.
motSetParListAddress, motGetParListAddress - Write / read the address
of the user data structure to the Database
#include "mot.h"
ccsCOMPL_STAT motSetParListAddress (
IN motHANDLE handle,
IN motUSER_FCT fctType,
IN vltINT32 fctOccurence,
IN vltBYTES32 fctName,
IN vltUINT32 parList,
OUT ccsERROR *error
)
ccsCOMPL_STAT motGetParListAddress (
IN motHANDLE handle,
IN motUSER_FCT fctType,
IN vltINT32 fctOccurence,
IN vltBYTES32 fctName,
IN vltUINT32 *parList,
OUT ccsERROR *error
)
The two routines motSetParListAddress() & motGetParListAddress()
writes / reads in the Database the address <parList> of the data
structure to be used by the specified user function <fctName>
for the given motor <handle>.
According to the function type <fctType>, the routine will determine
where to access the <parList> value in the Database.
- motUSER_INIT : :SERVER:INIT:INIT.action[].userParList
- motUSER_CONV : :SERVER:UNITS:UNITS.unitConversion[].userParList
The parameter <fctOccurence> defines the accessing mode of the address:
- 0 : all occurences of the function in the table are updated
(only for motSetParListAddress())
- 1 : the first occurence only
- 2 : the second occurence only
- etc ...
This routine needs EXCLUSIVE access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motSetSwLimits (
IN const motHANDLE handle[],
IN motPOSITION *positions,
IN motPOS_TYPE *posTypes,
IN motLIMITS *limitFlags,
OUT ccsERROR *error
)
The mot Server routine motSetSwLimits() sets the software limits
of the set of motors, specified in the <handle> list.
This routine needs EXCLUSIVE access right to the motors.
For each motor, an entry in the array <limitFlags> has to be provided
specifying the limits to be set.
The possible values are : motSW_UPPER / motSW_LOWER / motSW_BOTH.
Dependent on this flag, the limits have to be defined in the array
<positions>. If both limits have to be set, the lower limit has to be
defined first in the array <position>.
The <posTypes> array must built as <positions> and defines the setting
type of the limit, i.e.:
- motABSOLUTE : limit is given as an absolute position
- motRELATIVE : limit is given relative to actual position
- motLOWER_LIMIT : limit is given relative to lower HW limit
- motUPPER_LIMIT : limit is given relative to upper HW limit
- motREFERENCE_SWITCH : limit is given relative to the ref switch
- motINDEX_PULSE : limit is given relative to the index pulse
- motHOME_POSITION : limit is given relative to the home position
If anything goes wrong FAILURE is returned and the error reason and
description is returned by the <error> variable. The routine stops
execution when an error occurs, nad does not process the remaining
motors of the set.
The mot Server routine motStop() stops all motors specified in the
<handle> list. The Motion Monitor is informed to stop monitoring these
motors. If a motor has already stopped no error is returned.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine does not
stop execution when an error occurs, and processes the remaining
motors of the set.
The mot Server routine motStopSampling() stops the status sampling
for all motors specified by the <handle> list.
Note: This routine stops when an error occurs, and does not process
the remaining motors.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
The mot Server routine motUnclampBrake() unclamps the brakes
of all motors specified by the <handle> list.
This routine needs EXCLUSIVE access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable. The routine does not
stop execution when an error occurs, but tries to process the remaining
motors of the set.
#include "mot.h"
ccsCOMPL_STAT motVelToEnc (
IN motHANDLE handle,
IN motMETRIC *velUser,
OUT vltDOUBLE *velEnc,
OUT ccsERROR *error
)
The mot Server routine motVelToEnc() converts the velocity in user
units <velUser> (for example "deg/sec") to an encoder specific value
and returns it by <velEnc>. The user unit specified must be defined
in the local database.
The conversion is specific for the motor defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motVelToRef (
IN motHANDLE handle,
IN motMETRIC *velUser,
OUT vltINT32 *velRef,
OUT ccsERROR *error
)
The mot Server routine motVelToRef() converts the velocity in user
units <velUser> (for example "deg/sec") to an amplifier velocity
reference value and returns it by <velRef>. The user unit specified
must be defined in the local database.
The conversion is specific for the motor defined by <handle>.
This routine needs READ_ONLY access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description are returned by the <error> variable.
#include "mot.h"
ccsCOMPL_STAT motWaitInit (
IN motHANDLE handle[],
IN vltINT32 timeout,
IN motSTATUS *statusBuffer,
OUT ccsERROR *error
)
The routine motWaitInit is used to wait for the initialization
completion of all motors specified by the <handle> list.
The routine waits until all initializations have been completed
within <timeout> milliseconds, passed this time it returns FAILURE.
The routine returns FAILURE as soon an initialization failed,
the remaining motors of the list are ignored.
The current status of all motors is returned in the
<statusBuffer> array, one entry per motor in the same order as the
handle list, but without a termination entry.
Multiple use of this function by several applications for the same
motor is not possible.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned in the <error> stack. The routine stops
execution when an error occurs, and does not process the remaining
motors of the list.
SUCCESS if function terminated successfully
FAILURE if a time-out occurred
an initialization failed
an other task is already waiting for one motor
an internal error occurred while initiating the wait
or reading the motor status.
#include "mot.h"
ccsCOMPL_STAT motWaitMove (
IN motHANDLE handle[],
IN vltINT32 timeout,
IN motSTATUS *motStatus,
OUT ccsERROR *error
)
The routine motWaitMove is used to wait for the motion
completion of all motors specified by the <handle> list.
The routine waits until all motion sequences have been completed
within <timeout> milliseconds, passed this time it returns FAILURE.
The routine returns FAILURE as soon a motion failed, the remaining
motors of the list are ignored.
The current status of all motors is returned in the
<motStatus> array, one entry per motor in the same order as the
handle list, but without a termination entry.
Multiple use of this function by several applications for the same
motor is not possible.
This routine needs READ_ONLY access right to the motors.
If anything goes wrong FAILURE is returned and the error reason and
description are returned in the <error> stack. The routine stops
execution when an error occurs, and does not process the remaining
motors of the list.
SUCCESS if function terminated successfully
FAILURE if a time-out occurred
a motion failed
an other task is already waiting for one motor
an internal error occurred while initiating the wait
or reading the motor status.
#include "mot.h"
ccsCOMPL_STAT motWriteEncoderValue (
IN const motHANDLE handle,
IN vltINT32 encoderValue,
OUT ccsERROR *error
)
The mot Server routine motWriteEncoderValue() writes the
<encoderValue> to the Motion Controller board.
This routine needs EXCLUSIVE access right to the motor.
If anything goes wrong FAILURE is returned and the error reason and
description is returned in the <error> variable.
3.2 Application Command Interface
Considered the size of the command definition table, the reader is invited to refer directly to the file $VLTROOT/CDT/motServer.cdt.
All the parameters and returned values are either character strings or binary formatted numbers.
Help texts, command and parameter description are available on-line using lccei.
===========================================================================
===========================================================================
Commands to create, modify and delete motor sets
===========================================================================
CREASET ADDMOT REMMOT DELSET GMOTSET
===========================================================================
Commands to get/release access to a motor or a set of motors
===========================================================================
===========================================================================
===========================================================================
CHKLOCK CHKBRAK CLAMP CONNECT DISABLE
DISCON ENABLE GENSTAT GETOPMO HWSTAT
INITDB INITHW INITSAM INITSW LOADPAR
MOTMODE MOTPAR RESETAX RESETBO RETRPAR
SETADDR SETLIM SETOPMO STATUS STOPSAM
===========================================================================
Commands to define/modify motion sequences
===========================================================================
===========================================================================
Commands to start/stop motions
===========================================================================
MOVEABS MOVEREL MOVEUHW MOVELHW MOVEREF
MOVEIND MOVEHOM MOVESPD MOVESEQ STOPMOT
===========================================================================
===========================================================================
DEFUNIT DIG2CUR ENC2NAM ENC2POS ENC2VEL
NAM2ENC POS2ENC REF2VEL VEL2ENC VEL2REF
===========================================================================
===========================================================================
===========================================================================
===========================================================================
EXIT STASIM STOSIM SELFTST KILL
===========================================================================
===========================================================================
===========================================================================
3.3 Tools
The mot server routine motClear is used to reinitialize the descriptor
of the motor defined by <dbPath> (absolute symbolic path or alias)
No checks with regard to access rights etc. will be done. Any user
attached to the motor will be detached immediately.
This function restores the MCM database for the DB branch
@<lcuEnv><alias><motor>, taking the values from the '.dbcfg' <file>.
<motor> IN name of the camera
<file> IN absolute pathname of the '.dbcfg' file
<error> OUT error structure
This routine initializes the motor control module "mot" (first call),
and the motor designated by the argument <dbPath>,
database path to the motor point (symbolic or alias).
The routine checks whether the Local Database exists and the motor
section is accessible and then initializes all sub-modules: API and SDL
If anything goes wrong FAILURE is returned and the error reason and
description are logged.
Extracts the version number of the installed Motor Control Module.
If <version> is NULL, the line is printed to the console.
3.4 Include files
In order to get the necessary MCM and LCC data type definitions and function prototypes, the file mot.h must be included by any application source file referencing API functions and/or data structures. The file motDefines.h contains all the macros used in MCM. The file motPublic.h contains additional data type and structure definitions mapping database data structures. This file is intended to be included by SDL modules only, thus it should not be used at API level.
3.4.1 mot.h
* "@(#) $Id: mot.h,v 2.7 1998/09/18 14:03:28 vltsccm Exp $"
* -------- -------- ----------------------------------------------
* CAM GmbH --/05/94 Created for Release 1.1
* P.Duhoux --/07/94 Modified for Release 1.2
* P.Duhoux 09/09/94 Renamed motVERSION_NUMBER to motVERSION
* P.Duhoux 12/05/95 Modified interface to motPrintMotors ( void )
* P.Duhoux 09/06/95 Modified for CMM Archive
* P.Duhoux 07/07/95 Removed all literal definitions and
* include motDefines.h instead
* P.Duhoux 25/07/95 Added new function motCheckBrake()
* P.Duhoux 26/03/96 Added motStatus
* onLimit,emergencyStop,driveFault,posError
* P.Duhoux 29/03/96 Added new functions:
* motGetSemIEV() & motWriteEncoderValue()
* P.Duhoux 12/09/96 Added new function motEncToIndex(), motGetHandle()
* P.Duhoux 13/09/96 Added new function motSetSection()
* P.Duhoux 10/11/96 Added new function motGetDbStatus()
* P.Duhoux 12/11/96 Moved definitions from motPublic.h for
* Added new function motGetDbConfig(), motFreeConfig()
* P.Duhoux 19/12/96 Added `par' in motMOTION for INIT HW (initCode/waitDelay)
* P.Duhoux 14/01/97 Added functions motResetSw/motResetHw equivalent to
* motResetAxis/motResetBoards (for cosmetics)
/******************************************************************************
* mot.h - motor control module API definition file
*------------------------------------------------------------------------------
******************************************************************************
******************************************************************************
******************************************************************************
******************************************************************************
#define motMODULE_NAME "Motor Control Module API"
/* literal for motor library version */
#define motVERSION "$Revision: 2.7 $"
#define motVERSION_DATE "SEP98"
******************************************************************************
******************************************************************************
/* data type for access modes */
typedef vltINT32 motACCESS_MODE;
/* data type for operational modes */
/* data type for axis types */
typedef vltINT32 motAXIS_TYPE;
/* data type for encoder types */
/* data type for motor types */
typedef vltINT32 motMOTOR_TYPE;
/* data type for encoder coding types */
/* data type for abnormal event types */
typedef vltINT32 motEVENT_TYPE;
/* data type for digital IO signal types */
typedef vltINT32 motSIGNAL_TYPE;
/* data type for position/speed definition types */
typedef vltINT32 motSPEC_TYPE;
/* data type for section types */
/* data type for position types */
/* data type for motion modes */
typedef vltINT32 motMOTIONMODE;
/* data type for electrical connection types for amplifier boards */
typedef vltINT32 motCONNECTION;
/* data type for board types */
typedef vltINT32 motBOARD_TYPE;
/* data type for limit types */
/* data type for motion status types */
typedef vltINT32 motMOTION_STATUS;
/* data type for initialization status types */
typedef vltINT32 motINIT_STATUS;
/* data structure for parameters */
/* data structure for default units */
/* data structure for metric number */
/* data structure for speed definition */
motSPEC_TYPE how; /* speed definition mode */
motMETRIC number; /* speed literal (value and unit) */
vltBYTES32 name; /* speed name */
vltUINT32 index; /* index in speed name table */
vltUINT32 pollInt; /* polling interval in millisec */
vltUINT32 endPollInt; /* end-phase polling interval in millisec */
vltUINT32 inPosTime; /* needed in-position count for motion */
/* complete condition in ms */
/* data structure for position name */
/* data structure for position definition */
motSPEC_TYPE how; /* position definition mode */
motMETRIC number; /* position literal (value and unit) */
motPOS_NAME name; /* named position */
vltUINT32 index; /* name index */
/* data structure for motion definition */
motPOS_TYPE posType; /* position type */
motPOSITION pos; /* position */
vltINT32 par; /* initCode/waitDelay (INIT only) */
vltLOGICAL lastStep; /* flag for "last step in motion sequence" */
motMOTOR_TYPE type; /* DC | STEPPER */
vltINT32 timeout; /* motion timeout in milliseconds */
vltINT32 timelim; /* timeout for motion out of limit */
vltINT32 timemon; /* automatic monitoring period */
motOPMODE opMode; /* operational mode on first attach */
vltINT32 posEnc; /* Fixed Position definition */
vltINT32 chkHwLimit;/* Check flag for HW limits */
/* database map for board configuration */
vltINT32 signal; /* Signal type */
vltBYTES8 device; /* Associated device name */
vltINT32 startBit; /* Start bit number */
vltINT32 level; /* Signal logic */
motENC_TYPE type; /* Encoder type */
motBOARD_TYPE board; /* Interface board */
motENC_CODE code; /* Code type [binary/BCD/Gray] */
vltUINT32 address; /* Address for external */
vltUINT32 resolution; /* Valid bits (absolute only) */
vltUINT32 count; /* Encoder Counts / Encoder Turn */
vltUINT32 circularRange; /* Circular Range */
vltUINT32 stepCount; /* Encoder Counts / Motor turn (STP) */
vltUINT32 bitShift; /* Shift (SSI only) */
/* database map for special positions' configuration */
motUNIT unit; /* Unit must be motBOARD_UNIT_POS */
/* database map for named position offsets in Enc */
/* Offsets - Unit must be motBOARD_UNIT_POS or default position unit */
vltDOUBLE maintOffset; /* offset to maintenance section */
vltDOUBLE userOffset; /* offset to user defined section */
/* reserved for internal use - Unit is motBOARD_UNIT_POS */
vltINT32 maintOffsetEnc; /* Unit is motBOARD_UNIT_POS */
vltINT32 userOffsetEnc; /* Unit is motBOARD_UNIT_POS */
/* database map for named positions */
vltBYTES32 name; /* position name */
motPOS_TYPE posType; /* position type */
vltDOUBLE obsPos; /* nominal observation position value */
vltDOUBLE lowRange; /* lower range offset */
vltDOUBLE upRange; /* upper range offset */
vltINT32 maintOffsetAvail;/* maintenance offset available flag */
vltDOUBLE maintOffset; /* offset to maintenance position */
vltINT32 userOffsetAvail;/* user offset available flag */
vltDOUBLE userOffset; /* offset to user position */
motUNIT unit; /* position unit */
/* reserved for internal use - Unit is motBOARD_UNIT_POS */
vltINT32 available; /* named position is resolved */
vltINT32 obsPosEnc[3]; /* observation positions [low,nom,up] */
vltINT32 mntPosEnc[3]; /* maintenance positions [low,nom,up] */
vltINT32 usrPosEnc[3]; /* userDefined positions [low,nom,up] */
vltBYTES32 name; /* speed name */
vltDOUBLE speed; /* speed value */
motUNIT unit; /* speed unit */
vltUINT32 pollInt; /* polling interval in ms */
vltUINT32 endPollInt; /* end-phase polling interval in ms */
vltUINT32 inPosTime; /* needed in-position time for */
/* motion complete condition in ms */
/* reserved for internal use - Unit is motBOARD_UNIT_SPD */
vltDOUBLE speedEnc; /* Speed in motBOARD_UNIT_SPD */
/* database map for two step offset */
vltDOUBLE offset; /* offset value in user unit */
motUNIT unit; /* Unit must be motBOARD_UNIT_POS */
motSPEED speed; /* speed to be used for second step */
vltINT32 offsetEnc; /* offset in motBOARD_UNIT_POS */
vltDOUBLE speedEnc; /* Speed in motBOARD_UNIT_SPD */
/* database map for index pulse speed */
motSPEED speed; /* speed to be used for second step */
vltDOUBLE speedEnc; /* Speed in motBOARD_UNIT_SPD */
/* data structures for motor configuration */
motBOARD_CONF boards[motMAX_BOARD];
motEVENT_CFG events[motMAX_EVENT];
motSIGNAL_CFG signals[motMAX_SIGNAL];
motSPECIAL_POSITIONS_CFG specialPositions[motMAX_SPECIAL_POSITION];
motNAMED_POSITION_OFFSET offsets;
motNAMED_POSITION *namedPositions;
motTWO_STEP_OFFSET twoStepOffset;
motINDEX_PULSE_SPEED indexPulseSpeed;
motOPMODE opMode; /* operational mode */
motMOTIONMODE motionMode; /* motion mode */
motMOTION_STATUS motionStatus; /* motion status */
vltINT32 motionStep; /* motion step */
motINIT_STATUS initStatus; /* initialization status */
vltINT32 initStep; /* step of initialization sequence */
vltINT32 brakeClamped; /* brake status */
vltINT32 axisEnabled; /* axis enabled flag */
vltUINT32 eventMask; /* bit mask to encode abnormal events */
vltINT32 amplStatus; /* amplifier board status */
motCONNECTION powerStatus; /* pos./neg. relay open closed */
vltINT32 overCurrent; /* Amplifier Current (over=1) */
vltINT32 overTemperature;/* Amplifier Temperature (over=1) */
vltINT32 mconStatus; /* controller board status */
vltINT32 driveFault; /* Drive Fault (Fault=1) */
vltINT32 emergencyStop; /* Emergency Stop (Stopped=1) */
vltINT32 posError; /* Positioning Error (Error=1) */
vltINT32 inPos; /* in position flag */
vltINT32 onLimit; /* Motor On Limit */
motLIMITS amplOnLimit; /* on limit flag for amplifier */
motLIMITS mconOnLimit; /* on limit flag for controller */
vltINT32 mconOnRef; /* on RefSwitch for controller */
vltINT32 mconOnInd; /* on IndexPulse for controller */
vltINT32 interlock; /* interlock line status */
vltDOUBLE speed; /* actual speed in user units */
motUNIT speedUnit; /* motor speed user unit */
vltDOUBLE current; /* actual motor current in user units */
motUNIT currentUnit; /* motor current user unit */
vltINT32 posEnc; /* actual position in encoder ticks */
vltDOUBLE posUser; /* actual position in user units */
motUNIT posUnit; /* position user unit */
vltBYTES32 posName; /* actual position as name */
motSECTION posSection; /* specifies the section of the name */
vltINT32 posIndex; /* position index */
vltINT32 nextPosEnc; /* next position */
vltDOUBLE nextPosUser; /* next position in user units */
vltBYTES32 nextPosName; /* next position as name */
motSECTION nextPosSection; /* specifies the section of the name */
vltINT32 nextPosIndex; /* next position index */
vltDOUBLE followingErr; /* actual following error in user unit */
ccsTIMEVAL startTime; /* start time of last movement in UTC */
ccsTIMEVAL endTime; /* end time of last movement in UTC */
/* type for user function types */
/* type for user init function */
typedef ccsCOMPL_STAT (* motINIT_FUNC) ( void *, ccsERROR *);
/* type for user unit conversion function */
typedef ccsCOMPL_STAT (* motCONV_FUNC) ( motMETRIC *, motMETRIC *,
******************************************************************************
******************************************************************************
ccsCOMPL_STAT motInstall ( char *dbPath, ccsERROR *pError );
ccsCOMPL_STAT motDeinstall ( char *dbPath, ccsERROR *pError );
ccsCOMPL_STAT motInitDb ( char *motor, char *file, ccsERROR *pError);
ccsCOMPL_STAT motAttach ( dbSYMADDRESS dbPath, motACCESS_MODE mode,
motHANDLE *handle, ccsERROR *error );
ccsCOMPL_STAT motDetach ( motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motDisable ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motEnable ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motSetOpMode ( const motHANDLE handle[], motOPMODE *mode,
ccsCOMPL_STAT motGetOpMode ( const motHANDLE handle[], motOPMODE *mode,
ccsCOMPL_STAT motNameToEnc ( motHANDLE handle, vltBYTES32 name,
motSECTION section, vltINT32 *posEnc,
ccsCOMPL_STAT motEncToIndex ( motHANDLE handle, vltINT32 posEnc,
motSECTION *section, vltINT32 *index,
ccsCOMPL_STAT motEncToName ( motHANDLE handle, vltINT32 posEnc,
motSECTION *section, vltBYTES32 name,
ccsCOMPL_STAT motNameToVel ( motHANDLE handle, vltBYTES32 name,
vltDOUBLE *velEnc, ccsERROR *error );
ccsCOMPL_STAT motPosToEnc ( motHANDLE handle, motMETRIC *position,
vltINT32 *encValue, ccsERROR *error );
ccsCOMPL_STAT motEncToPos ( motHANDLE handle, vltINT32 encValue,
motMETRIC *position, ccsERROR *error );
ccsCOMPL_STAT motVelToEnc ( motHANDLE handle, motMETRIC *velocity,
vltDOUBLE *encValue, ccsERROR *error );
ccsCOMPL_STAT motEncToVel ( motHANDLE handle, vltDOUBLE encValue,
motMETRIC *velocity, ccsERROR *error );
ccsCOMPL_STAT motVelToRef ( motHANDLE handle, motMETRIC *velocity,
vltINT32 *refValue, ccsERROR *error );
ccsCOMPL_STAT motRefToVel ( motHANDLE handle, vltINT32 refValue,
motMETRIC *velocity, ccsERROR *error );
ccsCOMPL_STAT motDigToCurrent ( motHANDLE handle, vltINT32 currDig,
motMETRIC *currUser, ccsERROR *error );
ccsCOMPL_STAT motInitSw ( const motHANDLE handle[],
vltLOGICAL mandatory, ccsERROR *error );
ccsCOMPL_STAT motInitHw ( const motHANDLE handle[],
vltLOGICAL mandatory, ccsERROR *error );
ccsCOMPL_STAT motSetDefaultUnits( const motHANDLE handle[],
motDEFAULT_UNITS units[], ccsERROR *error );
ccsCOMPL_STAT motSetMotionMode ( const motHANDLE handle[],
motMOTIONMODE mode[], ccsERROR *error );
ccsCOMPL_STAT motMove ( const motHANDLE handle[], motMOTION *motion,
ccsCOMPL_STAT motCheckMove ( const motHANDLE handle[], motMOTION *motion,
ccsCOMPL_STAT motSetSection ( const motHANDLE handle[], motSECTION *section,
ccsCOMPL_STAT motGetStatus ( const motHANDLE handle[], motSTATUS *status,
ccsCOMPL_STAT motGetDbStatus ( const motHANDLE handle[], motSTATUS *status,
ccsCOMPL_STAT motGetDbConfig ( const motHANDLE handle[], motCONFIG *config,
ccsCOMPL_STAT motFreeConfig ( motCONFIG *config );
ccsCOMPL_STAT motWaitInit ( const motHANDLE handle[], vltINT32 timeout,
motSTATUS *motStatus, ccsERROR *error );
ccsCOMPL_STAT motWaitMove ( const motHANDLE handle[], vltINT32 timeout,
motSTATUS *motStatus, ccsERROR *error );
ccsCOMPL_STAT motResetSw ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motResetHw ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motStop ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motConnect ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motDisconnect ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motClampBrake ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motUnclampBrake ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motCheckInterlock ( const motHANDLE handle[], vltINT32 *status,
ccsCOMPL_STAT motCheckBrake ( const motHANDLE handle[], vltINT32 *status,
ccsCOMPL_STAT motInitSampling ( const motHANDLE handle[], vltINT32 seconds,
motSECTION section, ccsERROR *error );
ccsCOMPL_STAT motStopSampling ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motLoadPar ( motHANDLE handle, motBOARD_TYPE board,
vltUINT32 *number, motPARAMETER *parBuf,
ccsCOMPL_STAT motRetrievePar ( motHANDLE handle, motBOARD_TYPE board,
vltUINT32 *number, motPARAMETER *parBuf,
ccsCOMPL_STAT motSetSwLimits ( const motHANDLE handle[],
ccsCOMPL_STAT motSetParListAddress ( motHANDLE handle, motUSER_FCT fctType,
vltINT32 fctOccurence, vltBYTES32 fctName,
vltUINT32 parList, ccsERROR *error );
ccsCOMPL_STAT motGetParListAddress ( motHANDLE handle, motUSER_FCT fctType,
vltINT32 fctOccurence, vltBYTES32 fctName,
vltUINT32 *parList, ccsERROR *error );
ccsCOMPL_STAT motGetHandle ( char *name, motHANDLE *handle,
ccsCOMPL_STAT motGetSemIEV ( const motHANDLE handle, SEM_ID *semIEV,
ccsCOMPL_STAT motWriteEncoderValue ( const motHANDLE handle,
vltINT32 encoderValue, ccsERROR *error );
void motVersion ( vltBYTES80 version );
ccsCOMPL_STAT motClear ( dbSYMADDRESS dbPath );
ccsCOMPL_STAT motPrintMotors ( void );
ccsCOMPL_STAT motMotors ( int *num, vltBYTES20 list[] );
void motDebug ( vltINT32 level );
ccsCOMPL_STAT motResetAxis ( const motHANDLE handle[], ccsERROR *error );
ccsCOMPL_STAT motResetBoards ( const motHANDLE handle[], ccsERROR *error );
/*************************************************************************/
3.4.2 motDefines.h
# "@(#) $Id: motDefines.h,v 2.7 1998/09/18 14:04:36 vltsccm Exp $"
* -------- -------- ----------------------------------------------
* P.Duhoux 07/07/95 Created for Release 1.3
* P.Duhoux 25/07/95 Added new literals for optimized unit conversions
* motBOARD_UNIT_... motUNIT_... [POS/SPD/CUR/REF]
* P.Duhoux 04/12/95 Added new literal for motion to HOME position
* P.Duhoux 26/03/96 Added macros for position index with section (SPR960183)
* P.Duhoux 26/03/96 Added macros motHALF_TURN_ABS/REL (SPR960512)
* P.Duhoux 13/12/96 Added macros motACTION_DELAY
/******************************************************************************
* motDefines.h - MCM definition file
* This file contains all definitions needed for MCM as #define macros.
*-----------------------------------------------------------------------------
#define motDBCFG_FMT "%s.dbcfg"
#define motDBCFG_CWP_FMT "%s=@%s<alias>%s"
#define motDBCFG_CWP "<CWP>: "
/* literals for event types */
#define motEVENT_DRIVE_FAULT 1
#define motEVENT_EMERGENCY_STOP 2
#define motEVENT_OVER_TEMPERATURE 3
#define motEVENT_OVER_CURRENT 4
#define motEVENT_POSITIONING_ERROR 5
#define motEVENT_NORMAL_STOP 7
#define motEVENT_INTERLOCK_ACTIVE 8
#define motEVENT_BOARD_INIT_READY 10
/* Public events (mot<event> = 2 << motEVENT_<event>) */
#define motPOSITIONING_ERROR 32
#define motINTERLOCK_ACTIVE 256
#define motBOARD_INIT_READY 1024
/* interlock status strings */
#define motUNLOCKED_STRING "Unlocked"
#define motLOCKED_STRING "Locked"
#define motUNCLAMPED_STRING "Unclamped"
#define motCLAMPED_STRING "Clamped"
#define motDISABLED_STRING "Disabled"
#define motENABLED_STRING "Enabled"
/* literal for maximum number of special positions */
#define motMAX_SPECIAL_POSITION 7
/* literal for maximum number of motors to be controlled */
/* literal for maximum number of control boards */
/* literal for maximum number of events */
/* literal for maximum number of digital IO signals */
/* literal for minimum number of conversion methods */
/* literal for maximum number of steps in a motion sequence */
/* literal for minimum polling rate in milli-seconds */
#define motMIN_MOVE_POLL_FAR 100
#define motMIN_MOVE_POLL_NEAR 20
/* literal for maximum number of interpolation points */
#define motMAX_INTERPOL_POINTS 50
/* literal for maximum length of motor name/alias */
#define motMAX_MOTORNAME_LENGTH 12
/* definition of access modes */
#define motUNUSED_STRING "Unused"
#define motREAD_ONLY_STRING "Read-Only"
#define motEXCLUSIVE_STRING "Exclusive"
#define motEMERGENCY_STRING "Emergency"
#define motDETACHED_STRING "Detached"
#define motNOT_AVAILABLE_STRING "NotAvailable"
#define motFIXED_POSITION_STRING "FixedPosition"
#define motSIMULATION_STRING "Simulation"
#define motNORMAL_STRING "Normal"
#define motHANDSET_STRING "Handset"
#define motAXIS_CIRCULAR_OPT 3
#define motAXIS_OFF_STRING "Off"
#define motAXIS_LINEAR_STRING "Linear"
#define motAXIS_CIRCULAR_STRING "Circular"
#define motAXIS_CIRCULAR_OPT_STRING "CircularOptimized"
#define motENC_NONE_STRING "None"
#define motENC_INC_STRING "Incremental"
#define motENC_ABS_STRING "Absolute"
#define motENC_ABS_REL_STRING "Absolute in relative mode"
/* position/speed definition types */
#define motBY_DEFAULT_STRING "ByDefault"
#define motBY_VALUE_STRING "ByValue"
#define motBY_NAME_STRING "ByName"
#define motBY_INDEX_STRING "ByIndex"
#define motNAMED_POSITION_DUMMY "DUMMY"
#define motNO_SECTION_STRING "None"
#define motOBSERVATION_STRING "Observation"
#define motMAINTENANCE_STRING "Maintenance"
#define motUSER_DEFINED_STRING "UserDefined"
#define motALL_SECTIONS_STRING "AllSections"
#define motSET_OBSERVATION_INDEX(i) \
(vltUINT32)((i & 0x00FFFFFF) | (vltUINT32)motOBSERVATION << 24)
#define motSET_MAINTENANCE_INDEX(i) \
(vltUINT32)((i & 0x00FFFFFF) | (vltUINT32)motMAINTENANCE << 24)
#define motSET_USERDEFINED_INDEX(i) \
(vltUINT32)((i & 0x00FFFFFF) | (vltUINT32)motUSER_DEFINED << 24)
#define motOFF_REFERENCE_SWITCH (motOFF_POSITION | motREFERENCE_SWITCH)
#define motABSOLUTE_STRING "Absolute"
#define motRELATIVE_STRING "Relative"
#define motLOWER_LIMIT_STRING "LowerLimit"
#define motUPPER_LIMIT_STRING "UpperLimit"
#define motREFERENCE_SWITCH_STRING "ReferenceSwitch"
#define motINDEX_PULSE_STRING "IndexPulse"
#define motHOME_POSITION_STRING "HomePosition"
#define motBY_SPEED_STRING "BySpeed"
#define motTWO_STEP_ABS_STRING "TwoStepAbsolute"
#define motTWO_STEP_REL_STRING "TwoStepRelative"
#define motHALF_TURN_ABS_STRING "HalfTurnAbsolute"
#define motHALF_TURN_REL_STRING "HalfTurnRelative"
#define motINVALID_MOTION_MODE 1
#define motINVALID_MOTION_MODE_STRING "Invalid"
#define motDIRECT_MODE_STRING "Direct"
#define motPOSITION_MODE_STRING "Position"
#define motTRACKING_MODE_STRING "Tracking"
#define motSPEED_MODE_STRING "Speed"
/* electrical connection types for amplifier boards */
#define motDISCONNECTED_STRING "Disconnected"
#define motPOSITIVE_STRING "Positive"
#define motNEGATIVE_STRING "Negative"
#define motBOTH_STRING "Both connected"
#define motNO_BOARD_STRING "No Board"
#define motAMPLIFIER_STRING "Amplifier"
#define motCONTROLLER_STRING "Controller"
#define motDIGITAL_IO_STRING "Digital I/O"
#define motCPU_BOARD_STRING "CPU Board"
#define motEXT_BOARD_STRING "External Board"
#define motNOT_ON_LIMIT_STRING "Not on Limit"
#define motSW_LOWER_STRING "Lower SW Limit"
#define motSW_UPPER_STRING "Upper SW Limit"
#define motSW_BOTH_STRING "Both SW Limit"
#define motHW_LOWER_STRING "Lower HW Limit"
#define motHW_UPPER_STRING "Upper HW Limit"
#define motHW_BOTH_STRING "Both HW Limit"
#define motSTANDING_STRING "Standing"
#define motMOVING_STRING "Moving"
#define motTIMEOUT_STRING "Timeout"
#define motABORTED_STRING "Aborted"
#define motREDEFINED_STRING "Redefined"
#define motNOT_INIT_STRING "Not Initialized"
#define motSW_INIT_STRING "S/W Initialized"
#define motHW_INIT_RUN_STRING "H/W Initialization Running"
#define motINIT_DONE_STRING "Initialization Done"
/* conversion methods types */
#define motBOARD_UNIT_POS "Enc"
#define motBOARD_UNIT_SPD "Enc/ms"
#define motBOARD_UNIT_CUR "Dig"
#define motBOARD_UNIT_REF "Ref"
/* HW initialization actions */
#define motACTION_SET_LOW_SW_LIMIT 3
#define motACTION_SET_UP_SW_LIMIT 4
#define motACTION_SET_ENC_VALUE 5
#define motACTION_CLAMP_BRAKE 6
#define motACTION_DISCONNECT 7
#define motACTION_USERFUNCTION 8
#define motACTION_BOARD_PROCEDURE 9
#define motSIGNAL_BRAKE_ACTION 0
#define motSIGNAL_BRAKE_STATUS 1
#define motSIGNAL_BRAKE_ACTION_NAME "brakeAction"
#define motSIGNAL_BRAKE_STATUS_NAME "brakeStatus"
#define motSIGNAL_INTERLOCK_NAME "interlock"
#define motSIGNAL_ATTRIBUTE_NAME "value"
#define motSIGNAL_ACTIVE_LOW 1
#define motSIGNAL_ACTIVE_HIGH 2
* index of motor status database attributes for cai Access
#define motDB_STATUS_OP_MODE 0
#define motDB_STATUS_MOTION_MODE 1
#define motDB_STATUS_MOTION_STATUS 2
#define motDB_STATUS_MOTION_STEP 3
#define motDB_STATUS_INIT_STATUS 4
#define motDB_STATUS_INIT_STEP 5
#define motDB_STATUS_BRAKE_CLAMPED 6
#define motDB_STATUS_AXIS_ENABLED 7
#define motDB_STATUS_EVENT_MASK 8
#define motDB_STATUS_AMPL_STATUS 9
#define motDB_STATUS_POWER_STATUS 10
#define motDB_STATUS_OVER_CURRENT 11
#define motDB_STATUS_OVER_TEMPERATURE 12
#define motDB_STATUS_MCON_STATUS 13
#define motDB_STATUS_DRIVE_FAULT 14
#define motDB_STATUS_EMERGENCY_STOP 15
#define motDB_STATUS_POS_ERROR 16
#define motDB_STATUS_IN_POS 17
#define motDB_STATUS_ON_LIMIT 18
#define motDB_STATUS_AMPL_ON_LIMIT 19
#define motDB_STATUS_MCON_ON_LIMIT 20
#define motDB_STATUS_INTERLOCK 21
#define motDB_STATUS_SPEED_UNIT 23
#define motDB_STATUS_CURRENT 24
#define motDB_STATUS_CURRENT_UNIT 25
#define motDB_STATUS_POS_ENC 26
#define motDB_STATUS_POS_USER 27
#define motDB_STATUS_POS_UNIT 28
#define motDB_STATUS_POS_NAME 29
#define motDB_STATUS_POS_SECTION 30
#define motDB_STATUS_POS_INDEX 31
#define motDB_STATUS_NEXT_POS_ENC 32
#define motDB_STATUS_NEXT_POS_USER 33
#define motDB_STATUS_NEXT_POS_NAME 34
#define motDB_STATUS_NEXT_POS_SECTION 35
#define motDB_STATUS_NEXT_POS_INDEX 36
#define motDB_STATUS_FOLLOWING_ERR 37
#define motDB_STATUS_TIME_BEG 38
#define motDB_STATUS_TIME_END 39
* index of motor configuration database attributes for cai Access
#define motDB_CONF_SPECIAL_POS 7
#define motDB_CONF_NAMED_POSITIONS 8
#define motDB_CONF_NAMED_SPEEDS 9
#define motDB_CONF_TWO_STEP_OFFSET 10
#define motDB_CONF_INDEX_PULSE_SPEED 11
#define motDB_CONF_DEFAULT_SPEED 12
/*************************************************************************/
/* THE FOLLOWING MACROS REMAIN AVAILABLE BUT ARE NOT USED ANYMORE */
/* SINCE THE DIMENSION OF THE TABLES IS FREE */
/*************************************************************************/
/* literal for maximum number of named positions */
#define motMAX_NAMED_POSITION 15
/* literal for maximum number of named speeds */
/* literal for maximum number of HW init actions */
/* literal for maximum number of conversion methods */
#endif /* if !MOT_DEFINES_H */
/*************************************************************************/
3.4.3 motPublic.h
* "@(#) $Id: motPublic.h,v 2.7 1998/09/18 14:03:29 vltsccm Exp $"
* -------- -------- ----------------------------------------------
* CAM GmbH --/05/94 Created for Release 1.1
* P.Duhoux --/07/94 Modified for Release 1.2
* P.Duhoux 25/01/95 Compliance with OO approach
* P.Duhoux 31/01/95 Added eventIsr in descriptor (Only set by ISR)
* P.Duhoux 15/05/95 Removed field `motAlias' from the descriptor
* - Field `motName' is now the ALIAS
* P.Duhoux 09/06/95 Modified for CMM Archive
* P.Duhoux 04/07/95 Added literal motMIN_POLL_RATE for status sampling task
* P.Duhoux 07/07/95 Removed all literal definitions (now in motDefines.h
* P.Duhoux 25/07/95 Modified motDESCRIPTION for optimized unit conversions
* P.Duhoux 28/08/95 Renamed from motInternal.h
* P.Duhoux 05/12/95 Added flag convConfigDone to indicate the DB config
* attributes have been converted to board units
* P.Duhoux 19/01/96 Added defaultUnits and posEnc in descriptor
* P.Duhoux 29/03/96 Added mconSemIEV in motDESCRIPTION
* P.Duhoux 12/11/96 Move definitions to mot.h for motCONFIG data structure
* P.Duhoux 11/12/96 Increased motSEM_TIMEOUT from 5 to 10 seconds (SPR960747)
* P.Duhoux 05/08/97 Removed task option VX_NO_STACK_FILL
/******************************************************************************
* motPublic.h - motor library public interface file
* This header file contains data type definitions and global variables for the
* interface between the mot server and the mot single device libraries. Hence,
* all these sub-modules need to include this file.
*------------------------------------------------------------------------------
/******************************************************************************
*****************************************************************************/
/* macros for task priorities */
#define motBASE_TASK_PRIOR (desc->priority) /* API level */
#define motINIT_TASK_PRIOR (motBASE_TASK_PRIOR + 1) /* H/W Init Task */
#define motMOVE_TASK_PRIOR (motBASE_TASK_PRIOR + 2) /* Motion Task */
#define motPOLL_TASK_PRIOR 200 /* Sampling Task */
#define motTASK_FLAGS (VX_FP_TASK)
#define motINIT_TASK_FLAGS motTASK_FLAGS /* H/W Init Task */
#define motMOVE_TASK_FLAGS motTASK_FLAGS /* Motion Task */
#define motPOLL_TASK_FLAGS motTASK_FLAGS /* Sampling Task */
#define motINIT_TASK_STACK 50000 /* H/W Init Task */
#define motMOVE_TASK_STACK 30000 /* Motion Task */
#define motPOLL_TASK_STACK 30000 /* Sampling Task */
#define motINIT_TASK_NAME "tInit_%s" /* H/W Init Task */
#define motMOVE_TASK_NAME "tMove_%s" /* Motion Task */
#define motPOLL_TASK_NAME "tPoll_%s" /* Sampling Task */
/* timeout for <motor descriptor>.accessSem - in seconds */
#define motsrvSemTimeout ((int)(motTimeout * motTicksPerSecond))
/******************************************************************************
*****************************************************************************/
* index of motor status database attributes for cai Access
motsrvDB_STAT_OP_MODE = motDB_STATUS_OP_MODE,
motsrvDB_STAT_OVER_TEMPERATURE,
motsrvDB_STAT_NEXT_POS_SECTION,
/* data type for conversion methods */
typedef vltINT32 motCONV_TYPE;
/* data type for HW initialization actions */
typedef vltINT32 motACTION_TYPE;
/* interpolation table fix point */
typedef struct /* conversion record */
motPOINT point[motMAX_INTERPOL_POINTS];
motACTION_TYPE actionType; /* action type (see above) */
vltBYTES32 userFctName; /* if action USER_FUNCTION: function name */
vltUINT32 userParList; /* pointer to parameter list */
vltINT32 initCode; /* if action BOARD_PROCEDURE: init code */
motMOTIONMODE motionMode; /* motion mode */
motPOSITION position; /* definition of the position */
motPOS_TYPE posType; /* position type: ABSOLUTE, RELATIVE, ... */
motSPEED speed; /* definition of the speed */
/* database map for special position values (-> SERVER:INTERN) */
vltINT32 encValue; /* Position in motBOARD_UNIT_POS */
/* data structures for motor descriptor */
typedef struct motDESCRIPTION *motDESCRIPTION_PTR;
vltBYTES20 motName; /* alias to motor point */
int priority; /* API task priority */
motACCESS_MODE accessMode; /* highest access mode */
SEM_ID accessSem; /* semaphore for descriptor access */
vltUINT8 numHandles; /* number of open handles */
motOPMODE opMode; /* operational mode */
char *motDbStatus; /* server database address table STATUS */
char *motDbServer; /* server database address table SERVER */
struct motDESCRIPTION *next; /* ptr to next motor descriptor */
vltLOGICAL mconAvail; /* flag for "controller available" */
vltBYTES8 mconPrefix; /* prefix of controller SDL */
char *mconFunc; /* controller SDL routine table */
char *mconDesc; /* controller descriptor */
SEM_ID mconSemIEV; /* semaphore for IEV (external encoder) */
vltLOGICAL amplAvail; /* flag for "amplifier available" */
vltBYTES8 amplPrefix; /* prefix of amplifier SDL */
char *amplFunc; /* amplifier SDL routine table */
char *amplDesc; /* amplifier descriptor */
motMOTOR_TYPE motorType; /* type of the motor DC/STP */
motAXIS_TYPE axisType; /* type of the axis LIN/CIR/OPT */
motENC_TYPE encoderType; /* type of the encoder NO/INC/ABS */
int circularRange;/* range for Circular Axis */
vltINT32 chkHwLimit; /* Check flag for HW limits */
vltLOGICAL logChkHwLimit;/* Log Check flag for HW limits */
int sampleTid; /* task id of sampling task */
motSECTION sampleSection;/* section for sampling / get status */
int pollRate; /* polling rate in ticks */
SEM_ID pollSem; /* poll task start semaphore */
SEM_ID pollAck; /* poll task done semaphore */
int motionTid; /* task id of motion task */
ccsERROR *motionErr; /* Error stack */
int hwinitTid; /* task id of HwInit task */
ccsERROR *hwinitErr; /* Error stack */
motINIT_STATUS initStatus; /* initialization status */
vltINT32 initStep; /* initialization procedure step */
motMOTION *motionSeq; /* pointer to motion sequence to run */
motMOTIONMODE motionMode; /* motion mode */
motMOTION_STATUS motionStatus; /* motion status */
vltINT32 motionStep; /* number of current motion step */
SEM_ID moveSem; /* motion task end semaphore */
SEM_ID initSem; /* semaphore to release motWaitInit */
SEM_ID waitSem; /* semaphore to release motWaitMove */
vltINT32 posEnc; /* current position */
vltINT32 nextPosEnc; /* next position */
ccsTIMEVAL startTime; /* start time of last motion in ticks */
ccsTIMEVAL endTime; /* end time of last motoin in ticks */
/* digital IO signals access section */
ioDIRADDRESS ioSignals[motMAX_SIGNAL];
/* default unit conversion section */
vltUINT8 convConfigDone; /* flag to indicate conv config done */
vltUINT16 numConvMethods; /* Number of conversion methods */
motUNIT_CONV *convMethods[motMIN_CONV_METHOD]; /* default methods */
motDEFAULT_UNITS defUnits; /* default units */
/* KEEP STRICTLY AT END OF STRUCTURE */
SEM_ID eventSem; /* semaphore for abnormal events */
typedef ccsCOMPL_STAT (* motFUNCTION) ( void * );
/* data type for error messages */
typedef vltBYTES256 motERRMSG;
/* data structure for handle description */
vltUINT32 idFlag; /* own address for identification */
motDESCRIPTION *motDesc; /* pointer to motor descriptor */
motACCESS_MODE accessMode; /* access mode */
struct motHANDLEDATA *next; /* pointer to next handle */
******************************************************************************
* Server internal global Variables
******************************************************************************
extern SEM_ID motsrvSemAccess; /* access protection semaphore */
extern motsrvHANDLEDATA *motsrvFirstHandle; /* ptr to first motor handle */
extern motDESCRIPTION *motsrvFirstDesc; /* ptr to first motor descriptor */
extern int motTimeout; /* semaphore timeout value */
extern int motFisTimeout; /* FIS timeout value */
extern int motTicksPerSecond; /* CPU ticks per second */
******************************************************************************
******************************************************************************
extern vltINT32 motDebugLevel;
#define motDEBUG_NONE 0x00000000
#define motDEBUG_API 0xF0000000
#define motDEBUG_API_SERVER 0x10000000
#define motDEBUG_API_MOTOR 0x20000000
#define motDEBUG_ACI 0x0F000000
#define motDEBUG_MESSAGE 0x000000F0
#define motDEBUG_MSG_COMMAND 0x00000010
#define motDEBUG_MSG_REPLY 0x00000020
#define motDEBUG_MSG_ERROR 0x00000040
#define motDEBUG_POLLING 0x00000100
#define motDEBUG_MONITOR 0x00000200
#define motDEBUG_CHKSTACK 0x00000400
#define motDEBUG_SDL 0x00F00000
#define motDEBUG_CONTROLLER 0x00100000
#define motDEBUG_AMPLIFIER 0x00200000
#define motDEBUG_DIGITALIO 0x00010000
#define motDEBUG_DRIVER 0x0000000F
#define motDEBUG_WRITE 0x00000001
#define motDEBUG_READ 0x00000002
#define motDEBUG_COMMAND 0x00000004
#define motDEBUG_INTERRUPT 0x00000008
{ ccsTIMEVAL utc; timsMODE tm; ccsERROR err; vltBYTES32 str; \
errResetStack(&err); timsGetUTC(&utc,&tm,&err); \
timsTimeToIsoString(&utc,timsTIME_OF_DAY,6,str,&err); str[15]=0; \
printf("%s [%s] : %s\n",fct,str,txt); }
#define MCM_LOG1(fct,fmt,p1) \
{ ccsTIMEVAL utc; timsMODE tm; ccsERROR err; vltBYTES256 msg,str; \
errResetStack(&err); timsGetUTC(&utc,&tm,&err); \
timsTimeToIsoString(&utc,timsTIME_OF_DAY,6,str,&err); str[15]=0; \
sprintf(msg,"%s [%s] : ",fct,str); sprintf(str,fmt,p1); \
#define MCM_LOG2(fct,fmt,p1,p2) \
{ ccsTIMEVAL utc; timsMODE tm; ccsERROR err; vltBYTES256 msg,str; \
errResetStack(&err); timsGetUTC(&utc,&tm,&err); \
timsTimeToIsoString(&utc,timsTIME_OF_DAY,6,str,&err); str[15]=0; \
sprintf(msg,"%s [%s] : ",fct,str); sprintf(str,fmt,p1,p2); \
#define MCM_LOG3(fct,fmt,p1,p2,p3) \
{ ccsTIMEVAL utc; timsMODE tm; ccsERROR err; vltBYTES256 msg,str; \
errResetStack(&err); timsGetUTC(&utc,&tm,&err); \
timsTimeToIsoString(&utc,timsTIME_OF_DAY,6,str,&err); str[15]=0; \
sprintf(msg,"%s [%s] : ",fct,str); sprintf(str,fmt,p1,p2,p3); \
/*****************************************************************************/
3.4.4 motciDefines.h
* "@(#) $Id: motciDefines.h,v 1.21 1997/08/08 11:40:13 vltsccm Exp $
* -------- -------- ----------------------------------------------
* P.Duhoux 28/08/95 Created for Release 1.5
* MACROS for Status Names [Indexes & associated Strings]
#define motciSTAT_MOTIONMODE 1
#define motciSTAT_MOTIONSTATUS 2
#define motciSTAT_MOTIONSTEP 3
#define motciSTAT_INITSTATUS 4
#define motciSTAT_CONTROLLER 11
#define motciSTAT_INPOSITION 12
#define motciSTAT_INTERLOCK 13
#define motciSTAT_NEXTPOSENC 19
#define motciSTAT_NEXTPOSUSER 20
#define motciSTAT_NEXTPOSNAME 21
#define motciSTAT_FOLLOWINGERR 22
#define motciSTAT_STARTTIME 23
#define motciSTAT_OPMODE_STRING "OperationalMode"
#define motciSTAT_MOTIONMODE_STRING "MotionMode"
#define motciSTAT_MOTIONSTATUS_STRING "MotionStatus"
#define motciSTAT_MOTIONSTEP_STRING "MotionStep"
#define motciSTAT_INITSTATUS_STRING "InitStatus"
#define motciSTAT_INITSTEP_STRING "InitStep"
#define motciSTAT_BRAKE_STRING "Brake"
#define motciSTAT_AXIS_STRING "Axis"
#define motciSTAT_EVENTMASK_STRING "EventMask"
#define motciSTAT_AMPLIFIER_STRING "AmplifierStatus"
#define motciSTAT_POWER_STRING "PowerStatus"
#define motciSTAT_CONTROLLER_STRING "ControllerStatus"
#define motciSTAT_INPOSITION_STRING "InPosition"
#define motciSTAT_INTERLOCK_STRING "Interlock"
#define motciSTAT_SPEED_STRING "Speed"
#define motciSTAT_CURRENT_STRING "Current"
#define motciSTAT_POSENC_STRING "PositionEnc"
#define motciSTAT_POSUSER_STRING "PositionUser"
#define motciSTAT_POSNAME_STRING "PositionName"
#define motciSTAT_NEXTPOSENC_STRING "NextPositionEnc"
#define motciSTAT_NEXTPOSUSER_STRING "NextPositionUser"
#define motciSTAT_NEXTPOSNAME_STRING "NextPositionName"
#define motciSTAT_FOLLOWINGERR_STRING "FollowingError"
#define motciSTAT_STARTTIME_STRING "StartTime"
#define motciSTAT_ENDTIME_STRING "EndTime"
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |