mechanism
index
/home/optics/dazle/dics/dics/mechanism.py

 
Modules
       
ConfigParserRT
cortex
logging
time

 
Classes
       
mechanism

 
class mechanism
    Base clase for instrument mechanisms.  Stores mechanism status
information and provides methods corresponding to basic mechanism
actions which dispacth the appropriate sequence of commands to a
cortex instance.
 
  Methods defined here:
__init__(self, cortex, icu_num, axis_num, base_speed, max_speed, acceleration, deceleration, position, name='mechanism')
Initialiser for mechanism class.
 
Arguments:
    cortex:      String containing the name of the cortex based
                 ICU daisy chain instance that this mechanism is a
                 part of.
    icuNum:      Which ICU in the chain this mechanism is connected
                 to.
    axisNum:     Which axis of the ICU the mechansism is connected
                 to.
    baseSpeed:   Starting speed (steps/half steps per sec?)
    maxSpeed:    Peak speed (steps/half steps per sec?)
    acceleration:Acceleration (steps/half steps per sec^2?)
    deceleration:Deceleration (steps/half steps per sec^2?)
    position:    Initial position of the mechanism (steps)
    name:        Label used for logging purposes.
getMotorParams(self)
Returns a tuple of the four motor motion parameters, baseSpeed,
maxSpeed, acceleration, deceleration.
getPosition(self)
Returns the current motor position.
moveBy(self, steps, blocking=True)
Initiates a movement of the mechanism by a given number of steps.
Second, optional, boolean argument specifies whether the call
should block until the movement has been completed or return
immediately (default is True).
moveTo(self, new_position, blocking=True)
setMotorParams(self, baseSpeed, maxSpeed, acceleration, deceleration)
Sets the four motor motion parameters, baseSpeed, maxSpeed,
acceleration and deceleration.   Takes 4 integer arguments.
setPosition(self, new_position=0)
Defines the current mechanism position to be equal to the single
integer argument.  If no argument is given, the mechanism position
is zeroed.
updateConfig(self, config)
Should be called by the parent instrument object's destructor
to enable status information to be saved to file on exit.
 
Takes a ConfigParserRT.SafeConfigParser object as argument.