Skip to content
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

2 position objective changer #83

Merged
merged 6 commits into from
Feb 3, 2025
Merged

Conversation

Alpaca233
Copy link
Contributor

@Alpaca233 Alpaca233 commented Feb 1, 2025

Xeryon objective switcher implementation. Tested with hardware

@Alpaca233 Alpaca233 changed the title Xeryon objective switcher 2 position objective changer Feb 1, 2025
@Alpaca233 Alpaca233 marked this pull request as ready for review February 2, 2025 01:19
@@ -482,6 +492,14 @@ def setupHardware(self):
if SQUID_FILTERWHEEL_HOMING_ENABLED:
self.squid_filter_wheel.homing()

if USE_XERYON:
self.objective_changer.homing()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be home instead of homing

Comment on lines 498 to 501
if DEFAULT_OBJECTIVE == XERYON_OBJECTIVE_SWITCHER_POS_1:
self.objective_changer.moveToPosition1()
elif DEFAULT_OBJECTIVE == XERYON_OBJECTIVE_SWITCHER_POS_2:
self.objective_changer.moveToPosition2()
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make XERYON_OBJECTIVE_SWITCHER_POS_x a list. E.g. XERYON_OBJECTIVE_SWITCHER_POS_1 = ['4x','10x'], XERYON_OBJECTIVE_SWITCHER_POS_2 = ['25x','40x','60x'].

self.position1 = -19
self.position2 = 19

self.current_position = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it should be None

Comment on lines 22 to 23
def stopScan(self):
self.axisX.stopScan()
Copy link
Contributor

Choose a reason for hiding this comment

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

The objective changer does not need stopScan


def homing(self):
self.axisX.findIndex()
self.axisX.stopScan()
Copy link
Contributor

Choose a reason for hiding this comment

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

is stopScan needed here?

@hongquanli hongquanli merged commit 0b96aa3 into Cephla-Lab:master Feb 3, 2025
0 of 2 checks passed
import time
import serial

from control.Xeryon import *
Copy link
Contributor

Choose a reason for hiding this comment

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

@Alpaca233 we should avoid import *

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.

2 participants