Instructions for goniometer expert operations

From GlueXWiki
Jump to: navigation, search
Goniometer and radiator control

The radiators are on a wheel mounted on the goniometer inside the vacuum chamber on the beamline just before tagger.

This page is for shift operators and experts who want to install new radiators etc. The gory details of the EPICS controls for the goniometer are explained on the XXX page.

How to operate

Command Line Utilities

The recommended procedure is to use the CSS GUI tools to control the goinometer (see below). However, there are some simple command line utilities which may be useful. The commands are currently in this directory ~hdops/cbrem/scripts/

 * get_goni_info.sh lists the available radiators, positions and IDs. For example:

a2cb@macrobusy:~$ /home/a2cb/scripts/get_goni_info.sh
The goni has 6 radiators
Index	                Name	      X axis(mm)	      Y axis(mm)	 Roll axis (deg)	ID
1	           RETRACTED	   0.000 +/- 0.100	   0.000 +/- 0.100	   0.000 +/- 0.100	5
2	               BLANK	 160.000 +/- 0.100	  82.000 +/- 0.100	   0.000 +/- 0.100	0
3	         FOIL 1 10um	 148.114 +/- 0.100	  48.054 +/- 0.100	   0.000 +/- 0.100	0
4	         FOIL 2 10um	 152.250 +/- 0.100	  23.862 +/- 0.100	   0.000 +/- 0.100	0
5	        FOIL 2 100um	 178.701 +/- 0.100	  30.573 +/- 0.100	   0.000 +/- 0.100	0
6	         JD70-3 80um	 176.500 +/- 0.100	  64.750 +/- 0.100	   0.000 +/- 0.100	1
7	          J1A50 50um	 178.386 +/- 0.100	  47.684 +/- 0.100	  -6.500 +/- 0.100	2
8	       SI45-S90 90um	 162.500 +/- 0.100	  57.000 +/- 0.100	   0.000 +/- 0.100	3
9	        J2A100 100um	 161.000 +/- 0.100	  71.000 +/- 0.100	   0.000 +/- 0.100	4

 * insert_radiator.sh <index> can be used to insert a radiator - it will pop up a window to confirm that the beam is off.

For EPICS experts, the available pv names are described on the XX page.

CSS GUI tools

To change the radiator, use the goni_simple which can be brought up by clicking the Goniometer radiators button on the main GlueX Overview GUI. Alternatively, on GUI Main Action Bar under BEAM select Motors, which will bring up the Motors GUI. From this select Goniometer.


Goni simple gui.png

The buttons on the right are used to select the radiator. You will be asked to confirm that the beam is off. It is important not to move radiators with the beam on. This could cause serious damage. When a known radiator is installed the relevant button will be green. If there is no known radiator installed then a red message None in place will appear. The radiator positions are defined in a setup file by their positions on the X, Y and ROLL axes. The current values for these are shown on the bottom left of the box, and they will change when radiators are installed.

The image on the left is from the goniometer camera. It refreshes regularly when the X, Y or ROLL axis are moving. This image is cropped by CSS. Warning: Sometimes CSS forgets to crop the image. This is fixed by refreshing the GUI (f5 key). There is a green crosswire superimposed on the camera image. The position of the wire can be adjusted to coincide with the beam spot by using caput / caget to the EPICS PVs HD:GONI:CROSSX and HD:GONI:CROSSY

The CBREM GUI button brings up the GUI to control the coherent bremsstrahlung and diamond radiator

The Expert button, brings up the GUI allowing motion on the axes,

Expert options

Goni expert gui.png

The snapshot above shows more GUIs which are available to access the extra features of the gonometer controls (left to right is increasing degree of expertise). To access these click the <key>Open goni GUI</key> button. This will open the goni.opi GUI (2nd from left), which has the same information as the simple box on the main GUI plus some additional features: Below the camera image there is more detailed information for each of the axes - a menu button, 2 LEDs and a display of the current position on the axis. If there is motion on an axis the **Move** LED will be green, and if the goniometer is in the home position on an axis, the **Home** LED will be green. The menu button offers offers the following choices:

 - <key>Initialise the axis</key>
   * Will prompt for beam off. **Expert use only**
 - <key>Open the expert GUI</key> (furthest right window on the snapshot above).
   * This will open up the standard motor control GUI which comes with the motor device support for EPICS. It will **not** ask if beam is off. **Be careful:** This should only be for troubleshooting.

Below the individual axes items there is a menu button labelled <key>Full goniometer menu</key>. This has the following options:

 - <key>Initialise all goniometer axes.</key>
   * This may work! However, it is preferable, and faster, to do the full initialisation from the front panel of the goniometer controller. To do this, it is best to kill the Goni IOC and restart after the initialisation (see below on starting and restarting the IOC. 
 - <key>Tool for simple axis motion</key>
   * This brings up the GUI (3rd window on snaphshot) which allows relative and absolute movement on each of the axis. Needless to say, doing this with the beam on **could be dangerous**.

The setup file for the radiators

All the parameters for the goniometer and radiators are set in text files on the IOCs which control the goniometer and radiators (currently on slowcontrol). To define a new radiator or change an existing one the relevant text file must be edited and the radiator IOC restarted. Instructions for restarting the IOCs are given below, and a more detailed description of the slow controls is given here (link).

The file must be edited in the a2cb account on slowcontrol Edit the file /opt/epics/iocs/slowcontrol/radiators/radiators.substitutions, which looks like this: file "radiators.db"

  1. one line for each radiator - and set the total number below in the whole goniometer section

{

       pattern                 
  1. Macros are
  2. P Prefix
  3. N Index of radiator - must start at 1 and go consecutively
  4. NAME Name of radiator (Will appear in GUI)
  5. ID Unique ID number for crystals, 0 for amorphous radiators
  6. X Position of radiator is defined by its X,Y,ROLL coords, (mm,mm,deg).
  7. Y
  8. ROLL
  9. R Distance radiator center to centre of wheel (mm)
       {P,             N,  NAME,               ID,     X,      Y       ROLL,  R     }
       {BEAM:GONI:,    1,  "Blank",            0,  -54.50,     0.0,  -100.0,  17.5  }  
       {BEAM:GONI:,    2,  "Cu 1",             23,  -54.50,     0.0,   -40.0,  17.5 }  
       {BEAM:GONI:,    3,  "Screen",           0,  -54.50,     0.0,    20.0,  17.5  }   
       {BEAM:GONI:,    4,  "Cu 2",             0,  -54.50,     0.0,    80.0,  17.5  }   
       {BEAM:GONI:,    5,  "Cross",            0,  -72.00,     0.0,  -100.0,  0.0   }   
       {BEAM:GONI:,    6,  "Moeller",          0,   74.62,     0.0,    45.0,  0.00  }   
  1. .....
  2. ..... as may as you like, but change NRAD, below to reflect the number, and change any GUI's / scripts if required.

}

  1. For whole goniometer/radiators - only as single line here

file "goni.db" {

       pattern
  1. Macros are
  2. CROSSX x,y of crosswires marking the beam pos in the goni camera on the GUI.
  3. CROSSY
  4. DX,DY... Tolerances on each axis for flagging a radiator is in positon.
       {P,             NRAD,   CROSSX, CROSSY, DX,  DY,  DROLL, DPITCH, DYAW }
       {BEAM:GONI:,    6,      55.6,     53,     0.1, 0.1, 0.1,   0.001,  0.001}

}

Only the parameters N,NAME,ID,X,Y,ROLL,R are required to specify the position of the radiators. The extra parameters are for diamonds and coherent bremsstrahlung, and are explained elsewhere (link). Lines can be commented out of this file with a # at the beginning. Normally the aim would be to replace a radiator, or to enter new position for it's coordinates (X,Y,ROLL).

The radiators must be numbered consecutively from 1, and the total number defined must be set ing the goni section (see below). Any diamond radiator should have a unique value ID to differentiate it from other diamonds used, to allow tracking of radiation dose etc. Non-diamond radiators should have an ID of 0.

The final section defines some general parameters which are used for the whole goniometer.

       ...
       {P,             NRAD,   CROSSX, CROSSY, DX,  DY,  DROLL, DPITCH, DYAW }
       {BEAM:GONI:,    6,      46,     51,     0.1, 0.1, 0.1,   0.001,  0.001}

It should no be neccessary to change these, but just in case:

 *NRAD is the total number of radiators defined above. Anything above 6 will require some minor modifications to the CSS GUIs.
 *DX,DY,DROLL,DPITCH,DYAW are the tolerances used to determine if an axis has got to the requested position. 
 *CROSSX, CROSSY define the initial position of the green crosswires on the image from the goniometer camera. This is rather arbitrary, and depends on the beam position and camera position. However, if these are stable, then the cross should be set up withthe sliders as described above and the corresponding values of CROSSX and CROSSY put in the setup file. 
   
    • Note** the radiators IOC needs to be restarted (see below) to pick up any of the changes made in this file.


A procedure for defining the positions of radiators

The aim is to get the positions of the radiators using a combination of measurement, common sense and beam - without blasting any beam onto the radiator frame.

 - Before starting to use any beam
   * Make sure the goni IOC is running (controls the motors)
   * Stop the radiators IOC 
   * Initialise all the goniometer axes on the controller box.
   * Start the goni IOC and use the CSS GUIs are described above. 
   * Get the green cross-wire in the Goni GUI onto the approximate beam position, eg. 
     * If possible, look though the telescope and identify the point on radiator wheel which is currently on the beamline.
     * Use the knowldege of the recent beamtimes. Eg put in the diamond radiator and focus on the centre.
     * Adjust the cross-wires in the GUI until they are on the point selected above.
 - Use the electron beam to refine the position of the cross-wire
   * Tagger off, beam stop in.
   * Select the screen as a radiator. 
     * Does it look correct according to the position of the cross-wires?
     * If not, adjust the position on X,ROLL (and maybe Y) using the GUI as describe above, until the centre of the screen is aligned with the cross-wire. 
   * Turn up the beam gradually until a spot appears on the screen. It should take XXnA (find out) for the spot to become visible.
   * Adjust the green cross-wire until it is on the beam spot. Take a note of the values of XCROSS and YCROSS by right clicking on the white part of the sliders to get a menu, and selecting Show PV Info. **Do not move the cross-wire again**.
   * **Turn off the beam**
 - Without the electron beam, check the other radiator positions.
   * Now that the cross-wire is on the beam spot, move each radiator on X,ROLL (and maybe Y) in turn until the centre is on the cross-wire. Take a note of the X,Y,ROLL positions.
   * You should now have enough information to enter all the settings into the setup file (described above). ie. XCROSS, YCROSS and X,Y,ROLL for each radiator.
   * If the setup file was edited, restart the goniIOC.
 - Fine tuning the position of the radiators
   * It is not possible to find the radiator positions to much better that +/- 1mm using the above steps withthe cross-wire. For better precision some scanning with the beam is required. Normally this would only be required for the diamond.
     - Make sure the beam is off.
     - Put the diamond in position 
     - Get a small amount of beam (eg 0.5nA).
     - Switch on the HV on the tagger and check the rates. 
     - Use the expert GUI (<key>Tool for simple axis motion</key>, described above).
     - Make small, relative motions on X,Y,ROLL axes as required, whilst tracking the TaggerOR rate. This should help the centre of the radiator to be better defined and updated in the setup file.
      

Restart the radiators or goni IOC

 - Logon to slowcontrol: ssh a2cb@slowcontrol
 - Check what's running in the screen-session, should be EPICS
   * screen -list gives:
   * There is a screen on:

3779.EPICS (01/05/2015 01:47:07 PM) (Detached)

       1 Socket in /var/run/screen/S-a2cb.
     
 - Attach the screen-session hosting the EPICS: screen -r EPICS
   * A terminal show the running IOCs with numbers along the bottom.
   * goni was number 7 at last look, radiators was number 8 
 - Select the goni ioc <key>C-a</key><key>7</key>
 - Restart: <key>C-c</key><key>r</key>
 - Detach the screen session again: <key>C-a</key><key>d</key>