On the photon side, scanning the energy with the accelerator is done by writing to a set of notepad PVs available for each hutch.
For HXR:
<HUTCH>:USER:MCC:EPHOT:SET{1,2}
<HUTCH>:USER:MCC:EPHOT:REF{1,2}
For SXR:
<HUTCH>:USER:MCC:EPHOTK:SET{1,2}
<HUTCH>:USER:MCC:EPHOTK:REF{1,2}
These are simple notepad PVs, meaning that they do nothing on they own, besides holding a value. In order to scan the energy, ACR needs to be contacted so that they setup the script that will listen to the PVs and move the energy according to the method agreed upon. Until this is done, writing to the PVs will have no effects.
ACR can move the energy using the Vernier or the undulator K. Combined methods are also available.
ACR moves the energy relative to a reference value, which is set to the current energy at the setup time. Because there often is an offset between the photon-energy calculation on the accelerator side and the energy measured on the photon side (by a mono or spectrometer), the REF{1,2} is used to tell ACR the current photon energy. Setting the REF PV before starting make request is mandatory, or the requests will fail.
The reference also needs to be updated if the accelerator parameters change (tuning, big energy change, ...).
Once the setup on the accelerator side is done, one can request energy change by writing (caput) to the SET{1,2} PV. In hutch python, a class is available to do that BeamEnergyRequest. It is recommended to use this class, as it can also handle wait time for motion completion and more naturally integrates with DAQ scans.
caput <HUTCH>:USER:MCC:EPHOT:REF{1,2}caput <HUTCH>:USER:MCC:EPHOT:SET{1,2}. Recommended: use an instance of BeamEnergyRequest in hutch python to do that.Accelerator-side resources