Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyAPT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
from __future__ import absolute_import
import pylibftdi

from pyAPT import message, controller, mts50, prm1
from pyAPT import message, controller, mts50, prm1, kdc101

__version__ = "0.01"
__author__ = "Shuning Bian"

__all__ = ['Message', 'Controller', 'MTS50', 'OutOfRangeError', 'PRM1',
'add_PID']
"KDC101", 'add_PID']

Message = message.Message
Controller = controller.Controller
MTS50 = mts50.MTS50
PRM1 = prm1.PRM1
KDC101 = kdc101.KDC101
OutOfRangeError = controller.OutOfRangeError

_PRODUCT_IDS = pylibftdi.USB_PID_LIST
Expand Down
25 changes: 25 additions & 0 deletions pyAPT/kdc101.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from __future__ import absolute_import, division
from .controller import Controller

class KDC101(Controller):
"""
A controller for a KDC101 linear translation stage.
"""
def __init__(self,*args, **kwargs):
super(KDC101, self).__init__(*args, **kwargs)

# can be set manually in the menu of the KDC101
self.max_velocity = 0.48
self.max_acceleration = 0.48

# see manual https://www.thorlabs.com/drawings/7edd686f3ac5c5ad-097D682C-AA42-53E4-3C7EB522A4840171/KDC101-KDC101ManualforAPT.pdf
enccnt = 34304
T = 2048/6e6

# these equations are taken from the APT protocol manual
self.position_scale = enccnt
self.velocity_scale = enccnt * T * 65536
self.acceleration_scale = enccnt * T * T * 65536

self.linear_range = (0,50)