Table Of Contents

Previous topic

poolmotion

Next topic

poolmotorgroup

This Page

poolmotor

This module is part of the Python Pool libray. It defines the base classes for

Classes

PoolMotor

Inheritance diagram of PoolMotor

class PoolMotor(**kwargs)[source]

Bases: sardana.pool.poolelement.PoolElement

An internal Motor object. NOT part of the official API. Accessing this object from a controller plug-in may lead to undetermined behavior like infinite recursion.

on_change(evt_src, evt_type, evt_value)[source]
calculate_state_info(state_info=None)[source]
inspect_limit_switches()[source]

returns the current (cached value of the limit switches

Returns:the current limit switches flags
get_limit_switches(cache=True, propagate=1)[source]

Returns the motor limit switches state.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware
  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
Returns:

the motor limit switches state

Return type:

SardanaAttribute

set_limit_switches(ls, propagate=1)[source]
put_limit_switches(ls, propagate=1)[source]
limit_switches

motor limit switches

has_instability_time(cache=True)[source]
get_instability_time(cache=True)[source]
set_instability_time(instability_time, propagate=1)[source]
instability_time

motor instability time

has_backlash(cache=True)[source]
is_backlash_positive(cache=True)[source]
is_backlash_negative(cache=True)[source]
get_backlash(cache=True)[source]
set_backlash(backlash, propagate=1)[source]
backlash

motor backlash

get_offset_attribute()[source]
get_offset(cache=True)[source]
set_offset(offset, propagate=1)[source]
offset

motor offset

get_sign_attribute()[source]
get_sign(cache=True)[source]
set_sign(sign, propagate=1)[source]
sign

motor sign

get_step_per_unit(cache=True, propagate=1)[source]
set_step_per_unit(step_per_unit, propagate=1)[source]
read_step_per_unit()[source]
step_per_unit

motor steps per unit

get_acceleration(cache=True, propagate=1)[source]
set_acceleration(acceleration, propagate=1)[source]
read_acceleration()[source]
acceleration

motor acceleration

get_deceleration(cache=True, propagate=1)[source]
set_deceleration(deceleration, propagate=1)[source]
read_deceleration()[source]
deceleration

motor deceleration

get_base_rate(cache=True, propagate=1)[source]
set_base_rate(base_rate, propagate=1)[source]
read_base_rate()[source]
base_rate

motor base rate

get_velocity(cache=True, propagate=1)[source]
set_velocity(velocity, propagate=1)[source]
read_velocity()[source]
velocity

motor velocity

define_position(position)[source]
get_position_attribute()[source]

Returns the position attribute object for this motor

Returns:the position attribute
Return type:SardanaAttribute
get_position(cache=True, propagate=1)[source]

Returns the user position.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware
  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
Returns:

the user position

Return type:

SardanaAttribute

set_position(position)[source]

Moves the motor to the specified user position

Parameters:position (Number) – the user position to move to
set_write_position(w_position, timestamp=None, propagate=1)[source]

Sets a new write value for the user position.

Parameters:
  • w_position (Number) – the new write value for user position
  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
read_dial_position()[source]

Reads the dial position from hardware.

Returns:a SardanaValue containing the dial position
Return type:SardanaValue
put_dial_position(dial_position_value, propagate=1)[source]

Sets a new dial position.

Parameters:
  • dial_position_value (SardanaValue) – the new dial position value
  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
get_dial_position_attribute()[source]

Returns the dial position attribute object for this motor

Returns:the dial position attribute
Return type:SardanaAttribute
get_dial_position(cache=True, propagate=1)[source]

Returns the dial position.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware
  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
Returns:

the dial position

Return type:

SardanaAttribute

position

motor user position

dial_position

motor dial position

get_default_attribute()[source]
get_motion()[source]
motion

motion object

calculate_motion(new_position, items=None, calculated=None)[source]

Calculate the motor position, dial position, backlash for the given final position. Items specifies the where to put the calculated values, calculated is not used by physical motors

start_move(new_position)[source]