Machine-level coding – one trade-off at a time
The most precise gratings on the planet are useless if you can’t position them with equal precision. This is the task of Andreas Balzer and Ervis Suljoti, who build and program the controllers for the precise movements of the optical elements at EMIL (and all the other beamlines of BESSY, too).
For EMIL, they are currently testing a type of encoder that is different from the incremental encoders that are currently used at BESSY. It’s an absolute type of encoder and it would be a lot more convenient for the experimenters at EMIL, mainly because it’s faster and less vulnerable. If they get it to work, that is. Which is not as simple as everybody was hoping. In a few weeks, the final decision will have to be made: stick to the old ways or run with the new.
Before the big decision, Andreas and Ervis are testing the system in every conceivable way. They built a test stage where the absolute encoder is connected to the motor controllers. Here, the different parameters are tested at the border conditions of EMIL's specifications, like the maximum rotation speed of the stage with the finest step resolution of the motor. Other parameters are maximum length of encoder cable and maximum encoder data communication speed in order to assure the fastest position control of the rotation stage. In all this, encoder and controller have to work together with absolute precision, which in this case means deviations of less than 1 mas (milliarcsecond, Millibogensekunde).
„The system has to function within the existing structures that have grown over the years, so we have to make many optimization trade-offs. It’s like finding the perfect appartement. You almost never find the balcony and the right number of rooms and the best location – you have to weigh the different parameters, define priorities for your current situation, and then make a decision. That’s pretty much what we do here as well.“
In engineering and software terms, this „search for the perfect appartement“ looks something like this:
All these players (and probably some more) have to be taken into account: The control system is EPICS is an open source system that has been developed within the engineering community of storage ring facilities worldwide. It consists of IOC (input-output controllers) that talk to OPI (operator interfaces) via Ethernet (IP) using Channel Access as protocol. IOC deliver process variables, OPI receive them.
The IOC, among many other things, connect to the motor controllers (M) that position the monochromator. These motor controllers get sensor information about the current position from the encoders and use those data to move one grating and one mirror. This last feedback loop between motor controller and encoder is what Andreas and Ervis are working on right now.