AlexShkarin / pyLabLib

Python package for device control and experiment automation
http://pylablib.readthedocs.io
GNU General Public License v3.0
125 stars 28 forks source link

setup_velocity method does not change minimum velocity and maximum velocity #85

Open XiaoL1 opened 2 months ago

XiaoL1 commented 2 months ago

I am using KDC101 and was trying the adjust the velocity using the setup_velocity method.

x.setup_velocity(1,1,2, channel = None, scale = True)
x.get_velocity_parameters()

The velocity parameters returned are:

TVelocityParams(min_velocity=0.0, acceleration=0.0, max_velocity=2.0)

I realize that max_velocity is the only parameter that changes while min_velocity and acceleration get set to zero no matter what the input is. I tried to set the velocity manually in the kinesis.py file but it doesn't make any difference. Do you know why?

AlexShkarin commented 2 months ago

It looks like, according to the documentation, the minimal velocity is always zero image I haven't realized it when implementing those methods. I'll add a remark in the docstring for the next release. Sorry for the confusion!

The acceleration problem is less clear. Perhaps, it's a scaling issue? Can you specify the stage that you are using and show the output of x._get_scale()? You can also try getting or changing the acceleration in the raw units (i.e., setting scale = False) and see if it works? The values should be on the scale of several 100 (raw units of 100 corresponds to about 0.5mm/s^2 for linear stages, or about 7deg/s^2 for rotational ones).