diff options
author | Wolfgang Draxinger (root@gar-ex-erdastep) <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2011-12-08 21:21:49 +0100 |
---|---|---|
committer | Wolfgang Draxinger (root@gar-ex-erdastep) <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2011-12-08 21:21:49 +0100 |
commit | 4b19fc744937e53c8689733f25dedf80fa8fd396 (patch) | |
tree | 6355592f0b39c1594e98e0f38c7d72dc6b71caae /motiond | |
parent | 835da32571c08259fc81c89f711047a80bc16a5b (diff) | |
download | PyMotionControl-4b19fc744937e53c8689733f25dedf80fa8fd396.tar.gz PyMotionControl-4b19fc744937e53c8689733f25dedf80fa8fd396.tar.bz2 |
motiond started, MotionControl now keeps a dictionary of axis instance to index (for signal forwarding)
Diffstat (limited to 'motiond')
-rwxr-xr-x | motiond/motiond | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/motiond/motiond b/motiond/motiond index 6c2cadb..3bfbde2 100755 --- a/motiond/motiond +++ b/motiond/motiond @@ -1,2 +1,46 @@ #!/usr/bin/python2 # -*- encoding: utf-8 -*- + +import Phytron + +import MotionControl.MotionStage, MotionControl.PhytronAxis, MotionControl.Service +from MotionControl.MotionStage import MotionStage +from MotionControl.PhytronAxis import PhytronAxis +from MotionControl.Service import Service + +ipcomm = Phytron.IPCOMM('/dev/ttyERDASTEP', axes=4) + +axis_x = PhytronAxis( ipcomm[0], \ + max_run_freq = 825, \ + initiator = PhytronAxis.INITIATOR_PLUS, \ + initiator_position = 221786, \ + scale = {'mm': 8000} ) + +axis_y = PhytronAxis( ipcomm[1], \ + max_run_freq = 825, \ + initiator = PhytronAxis.INITIATOR_PLUS, \ + initiator_position = 115256, \ + scale = {'mm': 8000} ) + +axis_z = PhytronAxis( ipcomm[2], \ + max_run_freq = 500, \ + initiator = PhytronAxis.INITIATOR_PLUS, \ +# FIXME: Z zero position needs yet to be determined + initiator_position = 217952, \ + scale = {'mm': 8000} ) + +axis_phi = PhytronAxis( ipcomm[3], \ + max_run_freq = 1000, \ + initiator = PhytronAxis.INITIATOR_MINUS, \ + initiator_position = -273432, \ + scale = {'°': 1600} ) + +stage_axes = (axis_x, axis_y, axis_z, axis_phi) + +Service.stage = MotionStage(stage_axes) + +if __name__ == "__main__": + from rpyc.utils.server import ThreadedServer + server = ThreadedServer(Service, port = 12345) + server.start() + |