Skip to content

Conversation

@cassie-song
Copy link
Collaborator

Kinesis driver for stepper stages; tested to work on olympus. Swapping channels currently doesn't work, but we've just locked it in as a read-only pref for now. Will go back and fix later, just wanted to get the bulk of it reviewed.

Homed;
isMoving = false;

Travel = [-2 2] * 1000;
Copy link
Collaborator

@ebersin ebersin Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this hardcoded for all kinesis stages, or what is this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't fully understand what was going on here, but there seemed to be a mysterious factor of 2 between the commands that are sent in and the actual motion of the stage. As far as we know it's the same from device to device. Might be good to test on another setup, but in principle calibration could be handled by the stage calibration if it is different.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now taken out the default value for calibration and travel. The travel is a required input for this BSC203 stage during initialization. I've changed the 'calibration' property name to 'factor' and made it a pref that the user can set manually depending on how the stage is responding

obj.currentDeviceSettingsNET{i}=obj.channelsNET{i}.MotorDeviceSettings;
obj.deviceInfoNET{i} = obj.channelsNET{i}.GetDeviceInfo(); % Get deviceInfo via .NET interface
catch
error(['Unable to initialize channel ', num2str(i)]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything helpful in the caught error that should be included in the rethrown error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will include a line to rethrow the caught error

end
end
else
error('Target position is out of range')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could shorten this with assert(obj.checkMove(target_pos),'Target position is out of range')

@@ -0,0 +1,2 @@
classdef NanoMax300 < Modules.Stage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a placeholder class, or what is this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might have been created by mistake. We'll consider deleting it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also reminds me we should consider adding a warning message when you try to open up the APT stage that is now deprecated.

Copy link
Collaborator

@ebersin ebersin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments here and there, seems good as far as I can tell, though I've never used this hardware so I'd prefer someone else approve before merge. One question; it seems like a lot of the code in the KinesisBSC203 could be in the invisible superclass; can you take a look through and see what could be generalized up one level?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants