Skip to content

Conversation

@annie-xd-wang
Copy link
Collaborator

NI-DAQ–controlled filter wheels rotate/toggle on every 5 V edge trigger. If the wheel is already at the requested position, sending another trigger will shift it to the wrong position. This PR caches the current position and suppresses triggers when the wheel is already at the target slot.

@AdvancedImagingUTSW
Copy link
Collaborator

filter_wheel_value is implemented as a class variable instead of an instance variable, which will cause issues if multiple filter wheels are in use. Thus, the current implementation uses type(self).filter_wheel_value to read/write this value. This will...

  • All NIFilterWheel instances share the same filter_wheel_value
  • If multiple filter wheels exist, they cannot track their positions independently
  • One filter wheel's position change will overwrite another's cached value

is this intentional @annie-xd-wang? Or should it be an instance variable?

def __init__(self, microscope_name, device_connection, configuration, device_id=0):
    super().__init__(microscope_name, device_connection, configuration, device_id)
    self.wait_until_done_delay = self.device_config["filter_wheel_delay"]
    self.filter_wheel_task = None
    self.filter_wheel_value = None 

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