Skip to content

Clarification on MPC-XXX device operation #72

Open
@dymmR

Description

@dymmR

Hi, I am sorry to bother you, but I seem to be encountering an issue when using polarization controllers in the pylablib, namely I cannot get the system to jog() or move_to(). I am fairly sure it is user error, but any insight on how to correctly call the methods would be greatly appreciated.

I am currently running pylablib on a linux (Ubuntu) backend with an MPC-320 device, and forcing detection of _model="MPC" to get the appropriate device variables. I am able invoking the methods just by calling

move_to(position, channel =(int between 0,1,2))

and

jog ("+", channel =(int between 0,1,2))

However with either I cannot get any motion. The motors were double checked on the kinesis gui and appear to be in good order.
A little detail can be found below.

from pylablib.devices.Thorlabs import kinesis

con="/dev/ttyUSB0"

pol_test=kinesis.KinesisMotor(con,mpc_ovverride=True)

print(pol_test._get_polctl_parameters())
TPolCtlParams(velocity=10, home_position=649, jog1=25, jog2=25, jog3=25)

print(pol_test.get_all_channels())
[1]

print(pol_test.get_number_of_channels())
3

print(pol_test.get_position(channel=0))
-989

print(pol_test.get_position(channel=1))
100
print(pol_test.get_position(channel=2))
20

print(pol_test.get_position(channel=3))
648

print(pol_test.get_position(channel=4))
648

print(pol_test.get_position(channel=5))
648

print(hex(pol_test._status_comm))
0x490

print(pol_test.get_homing_parameters())
raise self.Error("read returned less than expected: {} instead of {}".format(len(result),size))
pylablib.devices.Thorlabs.base.ThorlabsBackendError: backend exception: 'read returned less than expected: 0 instead of 1' ('read returned less than expected: 0 instead of 1')

If you have a moment, any thoughts on how to properly call the methods would be greatly appreciate.

Thanks,
Liam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions