aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 8212d3decc508f95d868d464a463121120396675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
PyMotionControl

Classes and modules for building motion control
systems with Python.

---

PyMotionControl itself does not interface with
actuator controllers. Instead the user of this
library is required to derive from
MotionControl.Axis.AxisBase and in the derived class
interface with actuator control packages of choice.

Axes are assembled into a so called "Stage". The class
MotionControl.Stage.Stage provides general motion stage
functionality. However one may choose to derive from it
to form a application specific stage.

---

Overview

PyMotionControl forms *model* part of a Model View Controller
(MVC) design. The "MotionControl" class provides an abstraction
for a generic motion control stage. As such the only interface
it exposes are function for setting a motion target position
and starting and aborting a *cycle*.

*Cycles* are sequences of "Actions", instances of classes derived
from "AbstractAction" base class. Each action effects on all assigned
axes simulatanously and the action queue is advaned upon successfull
completion of the currently active action. If a action fails, the
rest of the queue is not executed, but cleared and the
*emergency_abort_action* executed, which usually just stops all axes,
but may also perform a movement into a safe position.

A MotionControl has a number of axes, which are instances of
classes detived from "Axis". "Axis" abstracts a typical motion
axis interface.

To program complex action sequences, subclass from "MotionControl".
Provide interface functions which turn a given target destination
or ultimate action into a sequence of sub-actions, queueing them
up in MotionControl.cycle_queue

"Constraints" interface with "MotionControl": Every "MotionControl"
instance has a set of constraints. In the most simple case just the
axis limits. Upon setting a new target position the constraints
are checked. Only if all constraints are met a cycle can be started.

---

NOTE scratchpad.py:

scratchpad.py is the source file where new things are
tested and outlined, before they are moved into their
proper module file. So all contents of it are
work-in-progress, highly experimental and most likely
not working in the state you see them there.