Device Adapter controllers

Hi everyone!, I am in a process of writting a device adapter which, from my POV, might be a little different from what I have encountered so far. Said device is a XY Stage which is connected to other devices and, as a result, controlled by the XY Stage in a master-slave kind of fashion. I have been looking for some similar examples of this but I could not find nothing like it. However, I did find examples of controllers that do something similar (Thorlabs BBD controllers among them) which kind of do what I am dealing with. My question is, is there something already done within these lines or any source where I can have a look at?

The basic idea of my XY Stage is that this Stage should be able to control other devices through a series of commands (For instance, XY Stage should control the movement of another Z Stage)

Any help or guidance will be helpful.

Thanks in advance,

Cheers,

Hi Kenneth,

It sounds to me like what you should do is implement a hub device. More information here:
https://micro-manager.org/wiki/Building_Micro-Manager_Device_Adapters#Complex_device_management:_writing_Hub_adapters

The idea is that the Hub device facilitates routing communication to multiple separate device adapters through a single hub device.

You can find many examples of hub devices if you look through the source code. If I remember correctly, the “Arduino” device adapter worked well as example code when I was working on implementing my own Hub device adapter.

Hi Nick,

Thanks for your reply. Indeed, my XY Stage fits the Hub description which control other devices. I have been reading the Hub documentation MM provides throuh the site you just shared. My question (probably silly since I am kinda newbie). Can I consider my XY Stage as a Hub controller (and building it as such) if said Hub, apart from controlling other devices communication such as ZStages or Turrets, should perform tasks such as the typical XY Stages actions through commands: setPosition, etc?.