ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

SXD: Benchtop Sample Imaging (Alternative Solution) #6069

Open kjwoodsISIS opened 3 years ago

kjwoodsISIS commented 3 years ago

As an SXD scientist I would like to use IBEX to acquire images of samples offline.

An existing Benchtop Sample Imaging solution already exists, but it is somewhat ad-hoc in nature. The table-top rotation stage & camera live (and are used) in the SXD cabin. The SXD scientists would prefer to have the table-top rotation stage & camera controlled by IBEX. It would make it easier for them to script the acquisition of images and to manage the downstream analysis of images and data.

A possible means of supporting the existing solution is proposed in #4060. The following alternative solution is proposed.

  1. Create an SXD SETUP instance of IBEX (see #NNNN).
  2. Create an IOC & OPI to control the motor used to rotate the sample.
    • the current motor uses an Arduino device as a controller (using HTerm to send commands to the Arduino). It would be possible to write an IOC to directly control the Arduino device. However, ...
    • it might be better (and more supportable) to acquire a new inexpensive motor with a built-in controller supported by the EPICS motor record (e.g. a Schneider Electric Lexium model). It could be connected to a MOXA box in the SXD cabin.
  3. Create an IOC & OPI to control the camera used to acquire an image of the sample.
    • the current camera is a DFK 41AU02. has a USB 2.0 interface.
    • it might be better to acquire a similar camera with a GigE interface (so that it can communicate with IBEX via the network). Alternatively, the existing camera could be connected to the network via a MOXA box that supports USB devices.

Acceptance Criteria

  1. I can control my table-top rotation stage & camera using IBEX.
  2. I can script the acquistion of sample images using genie_python.

Notes

  1. None.
ChrisM-S commented 3 years ago

Yes, it would be better if the camera was a Gig-E device, but not essential. Although the SXD VM and SETUP VM are not able to talk directly to USB. It is possible that we could use a USB input into the Host OS on the SETUP machine with something like a simple VLC instance configured for streaming the camera output from the USB to rtsp: protocol (or similar) on the network which could then be received by both SETUP and/or SXD machines. This use of the SETUP machine hardware in this way is not inconsistent with the described use and is exactly the compromise which the current instrument host servers make when handling the USB input from the DAEII and streaming it to the network for the control machine to receive. No hardware option is wasted and the SETUP machine can clearly be local to the camera if required (and also have a screen if necessary whilst hosting the SETUP VM).