-
Notifications
You must be signed in to change notification settings - Fork 40
Clarification on MPC-XXX device operation #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dear Liam, It's hard to tell what exactly is going on. Could you give me some more information?
from pylablib.devices.Thorlabs import kinesis
con="/dev/ttyUSB0"
pol_test=kinesis.KinesisMotor(con,mpc_ovverride=True)
print(pol_test._model)
print(hex(pol_test._get_status_n()))
print(hex(pol_test._status_comm))
print(pol_test._move_by_mode)
print(pol_test.get_full_info())
from pylablib.devices.Thorlabs import kinesis
con="/dev/ttyUSB0"
pol_test=kinesis.KinesisMotor(con,mpc_ovverride=True)
print(hex(pol_test._get_status_n()))
pol_test.jog("+")
print(hex(pol_test._get_status_n()))
Sincerely, Alexey. |
Hi Alexey, Thanks for the quick response.
pol_test.move_to(position=Y,channel=X) Where after calling I do not get any physical motor movement, however after calling get_position(channel=X) I observe a change in the motor position for all channels that are not X=0.
class KinesisMotor(KinesisDevice): class KinesisDevice(IMultiaxisStage,BasicKinesisDevice): Thank you for the help. |
There's a couple of possibilities:
A couple more comments:
|
Hi Alexey, I appreciate the help. so for posterity on points 2-4:
I do have good news to report, the addition of _enable_channel and a wait_for_stop successfully works for 2/3 paddles. I have channels 1,2 working, 3 appears to not be receiving the commands. but I will double check if that is a hardware problem. If you have any further insight absolutely let me know. I am able to enable and disable the channel, and it does not appear to give any busy status commands. Once again thank you for the help, sorry for the headache. |
Hey @dymmR, I had similiar issues as you had. T On another note. I keep having the issue, that at some point the Device stops responding entirely, even in Kinesis. |
Hi Silas, For the error problem, it appears that at least for the MPC it really cannot stand having any error happen on the pc or the controller, it just hangs. I believe there is a close method hidden in the core/devio/interface methods, as it's invoked in the local _close_on_error function during the device init. it might be worth doing a quick test with a try-except code and adding a device.close() on the except case, if thats what you are looking for. |
So if there is any insight, I still have the problem of one paddle not moving. In Kinesis it is not a problem, however in python it is limited to only channels 1 and 2. For the third paddle, when addressing channel 4, the time between sending a signal and waiting for stop is equivalent to what we see on channels 1 and 2, but the paddle just does not move. It seems like a ridiculously simple problem but we are getting absolutely cooked by it |
@dymmR |
@SilasEul |
Hi Alexey, Apologies, we found the solution a couple days ago but I did not update fast enough. So we did a fresh pull about a week and a half back and still had the same issue. We found a solution, taking inspiration from another issue (#27) where we simply removed the decorator on top of the polmotor enable functions (@interface.use_parameters(channel="channel_id")) and instead we simply pass the full bit representation of the integers (0x01, 0x02, 0x04) instead of (1,2,4) when we call the enable and move functions . This works flawlessly. The specific change is noted below. Line 796, Kinesis.py #@interface.use_parameters(channel="channel_id") |
I don''t really have a good reason why this is the solution to our problems, as I would think the EnumParameterClass should not really pose a big obstacle. May just be an added feature of trying to run it on a linux system |
Hmm, that's strange. I would expect |
Apologies for the delay. I will give it a check in the next day and let you know |
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
and
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.
If you have a moment, any thoughts on how to properly call the methods would be greatly appreciate.
Thanks,
Liam
The text was updated successfully, but these errors were encountered: