OWIS MMS19-12-HiSM

Last modified by henrikma@helsinki_fi on 2024/02/07 06:21

The OWIS micrometer screw communicates with a PC via USB that is seen as a virtual serial port. It can be operated either with the program OWISoft on the Windows PC or straight through spec  on the Linux machine. Currently the screw is connected to the Linux PC.

The necessary macros (functions) for operating the screw are found on GitLab: https://version.helsinki.fi/xraylab/imaging/phase-contrast/phase-grating-control/. Clone the repository to the Linux PC, for example to:

/home/phasecontrast/phasecontrast_control/

If you already cloned this repository before (e.g. for piezo macros), you don't have to do it again, since it already includes the macros for OWIS. These macros can be loaded into spec with:

qdofile("/home/phasecontrast/phasecontrast_control/owis.mac")

Spec configuration

Add the device under "serial" in the "Interface configuration" tab in spec config (type config in spec, and navigate to the correct tab either using the c key on your keyboard or directly by pressing shift+I). The macros assume it is device "0". Once connected to the PC, the device will show under /dev/ probably as ttyACM0 or ttyACM1, or similar. It is best to create a symbolic link to the device using the instructions found here. You can name the device for example ttyOWIS. Then you can add the device /dev/ttyOWIS to the spec config. The "baud" can be 115200, and the "mode" raw.

Usage

  1. When connected to the PC, first turn on the power supply (control unit) with the on/off-switch on the back. It is advisable to open spec only after the power is on. This is to make sure that the screw occupies the device at ttyACM0 (virtual serial device 0), which has been configured to spec. If it is not recognized properly, close spec and the power supply, then turn on the power supply and start spec again.
  2. The next step is to initialize the screw (axes). This can be done with the macro owisinit. It also performs a reference run (finds the closest reference switch) to specify the "zero position".
    Initialization without the reference run can be done with the owisinit_only macro. If the screw motor has been off, the location information is most likely lost and the latest set position is now zero. If a successful reference run has not been done, the green LED on the power supply blinks.
  3. The screw position can be read with the macro owisrd. It prints the position in steps (presumably) and in micrometers (conversion found from OWISoft program).
  4. The screw can be extended to a desired position x (in micrometers) by calling the macro owismvcancel.
  5. The motor of the screw can be turned off by calling owisoff. It can be turned on again with owison.
  6. While in motion, the screw can be stopped with the owisstop macro.