motor
borealis.motor
Created on Mon Mar 6 10:50:29 2023.
@author: René Bes
Motor(alias, motor_id, motor_offset, controller, positive_direction=True, soft_limit_low=-inf, soft_limit_high=inf)
Bases: ControllerComponent
Motor generic class.
Source code in borealis/motor.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
amove(user_position)
Move the motor to a new position (user) in absolute scale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_position
|
float
|
New position (user) to move the motor to. |
required |
Returns:
| Type | Description |
|---|---|
None.
|
|
Source code in borealis/motor.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
check_soft_limits(target_user)
Check if dial value is within the limits (inclusive).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_user
|
float
|
Target position in user unit. |
required |
Raises:
| Type | Description |
|---|---|
SoftLimitError when dial is outside the allowed range.
|
|
Source code in borealis/motor.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
log(level, msg, *args, **kwargs)
Log a message with prepending the device's alias in front of the message.
Source code in borealis/motor.py
40 41 42 43 | |
rmove(rel_position)
Move the motor by a relative position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rel_position
|
float
|
Relative value to move the motor by. |
required |
Returns:
| Type | Description |
|---|---|
None.
|
|
Source code in borealis/motor.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
scan(start, stop, step, acq_time=0.0)
Perform a scan, if acq_time > 0 will also do an acquisition on all sensors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
float
|
Start of interval. The interval includes this value. |
required |
stop
|
float
|
End of interval. The interval does not include this value. |
required |
step
|
float
|
Spacing between values. For any output |
required |
acq_time
|
float
|
|
0.0
|
Source code in borealis/motor.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
set_current_as_zero()
Set motor current position as 0.
Source code in borealis/motor.py
170 171 172 173 174 175 | |
where()
Print motor dial / user positions from controller.
Returns:
| Type | Description |
|---|---|
str
|
|
Source code in borealis/motor.py
66 67 68 69 70 71 72 73 74 75 | |