Auto beam position control

Automated procedure that steers the beam to the optimal position.

The beam position monitoring device, it's electronics and software were all designed by Dr. Emile Rienks.

In our beamline the beam moves away from the optimal path when the photon energy is changed. To compensate for this effect one can move one of the SMU mirrors by hand to bring the beam back.

Now there is an automated procedure that can control the beam position and keep it optimal.

To start it (for example after PC was rebooted) you will need to do the following:

  1. Open powershell (or open a new tab in the existing one, e.g. the one used for beamline control).

  2. Type in ssh melmak2 and press enter to execute (this is to connect to the Raspberry Pi)

  3. Execute caMonitor vxi-11/psdutil/pvNames.txt (to monitor mono status)

  4. Open another tab in powershell and also execute ssh melmak2

  5. Execute psdControl bruecke13,1,4 lcmAB (this will start the main script that does the adjustment)

  6. If you want to stop it, type in q and press Enter. The error message "Error opening /dev/ttyUSB0: No such file or directory" will appear, this is normal.

Most probably all these commands have been executed recently, so after you ssh to melmak2 instead of typing you can simply press arrow up several times and you will find the correct commands.

But please check that they are indeed the same!

General info about how it works

//maybe a figure with explanation will help

There is a special device inside the beamline at the position of the slit that is monitored by a camera. Beam hits both plates and one can measure photocurrent from each of them, this is done by two Keithley ampermeters located on top of the rack of 1^3 beamline (see photo below). These two currents change monotonously as a function of beam position (one increases and another one decreases) and the optimal position is calibrated to be at the point where the currents are equal. To avoid electrons excited from one plate to reach the other one (which would lead to erroneous measurements) there is a bias voltage of 100 V applied between the plates.

The current signals from Keithleys are passed to a Raspberry Pi which (if current is large enough) will move the SMU M3 in decreasing steps until the currents are equal.

The left Keithley is number 1, the right one on top is number 2

There are two beamline branches using the same technique, and at the moment (May 2025) users need to switch a pair of cables manually to change the controlled branch from 1-Squared to 1-Cubed. One pair of cables is labeled with roman numerals (I, II) and another with arabic (1, 2). Arabic one is for 1-squared, roman — for 1-cubed. They should go to corresponding Keithleys (currently 1 is on the left, 2 is on the top-right, but you can just swap 1<->I and 2<->II cables if the configuration has changed). Always switch both cables and make sure that the connected cables belong to the same pair.

Cables I and II are connected (for 1-cubed), the pair (1, 2) is lying on top

Troubleshooting

If the terminal was closed without quitting the beam control procedure correctly by q it could happen that the procedure will not do anything next time. In this case try to quit the procedure with q, then switch two Keithley devices off and on again, then start the procedure again.

In the worst case, you can switch it off and correct the beam position manually.

Last updated

Was this helpful?