...
Anchor | ||||
---|---|---|---|---|
|
The goal is to receive inputs from sensors and other systems and calculate the maximum current and charge (called signal sum) of the electron beam. Those are indirect measurements representing the amplitude and area of a Gaussian, which are easily translated to a bunch length by the Physicists. Details on this process and the calculation itself are described in How the Length of the Bunch is Measured.
...
The weight parameters A0 and A1, and Offset are the first 3 boxes on the snapshot.
The last section of this document showed how the integration windows are adjusted. An EPICS database takes care of changing A0 and A1 automatically when the windows' width is changed. So, this guarantees that if the background and signal are approximately horizontal lines, no change in the window's width will change the final result of ARAW. A deep detail about this database is described in Auto adjustment of weight factors A0 and A1 below.
...
table below connects registers, Asyn parameters, and PVs. Offset is called as the Coefficient I by the firmware.
Register name | Asyn parameter name | PV |
---|---|---|
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefA0 | AMC0:CoefA0 | BLEN:$(AREA):$(POS):$(INST)_CoefA0 |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefA0 | AMC1:CoefA0 | BLEN:$(AREA):$(POS):$(INST)_CoefA0 |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefA1 | AMC0:CoefA1 | BLEN:$(AREA):$(POS):$(INST)_CoefA1 |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefA1 | AMC1:CoefA1 | BLEN:$(AREA):$(POS):$(INST)_CoefA1 |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefI | AMC0:CoefI | BLEN:$(AREA):$(POS):$(INST)_CoefI |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefI | AMC1:CoefI | BLEN:$(AREA):$(POS):$(INST)_CoefI |
The last section of this document showed how the integration windows are adjusted. An EPICS database takes care of changing A0 and A1 automatically when the windows' width is changed. So, this guarantees that if the background and signal are approximately horizontal lines, no change in the window's width will change the final result of ARAW. A deep detail about this database is described in Auto adjustment of weight factors A0 and A1 below.
Revisiting the equation defined some sections above, we already have described the origin of two components:
The remaining coefficients are given directly by the Physicist and are PVs that write to and read directly from the FPGA registers. The screen that exposes these PVs is the same one shown in the previous section. This is the table connecting registers, Asyn parameters, and PVs:
Register name | Asyn parameter name | PV |
---|---|---|
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefB | AMC0:CoefB | BLEN:$(AREA):$(POS):$(INST)_CoefB |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefB | AMC1:CoefB | BLEN:$(AREA):$(POS):$(INST)_CoefB |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefC | AMC0:CoefC | BLEN:$(AREA):$(POS):$(INST)_CoefC |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefC | AMC1:CoefC | BLEN:$(AREA):$(POS):$(INST)_CoefC |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefD | AMC0:CoefD | BLEN:$(AREA):$(POS):$(INST)_CoefD |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefD | AMC1:CoefD | BLEN:$(AREA):$(POS):$(INST)_CoefD |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefE | AMC0:CoefE | BLEN:$(AREA):$(POS):$(INST)_CoefE |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefE | AMC1:CoefE | BLEN:$(AREA):$(POS):$(INST)_CoefE |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefF | AMC0:CoefF | BLEN:$(AREA):$(POS):$(INST)_CoefF |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefF | AMC1:CoefF | BLEN:$(AREA):$(POS):$(INST)_CoefF |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefG | AMC0:CoefG | BLEN:$(AREA):$(POS):$(INST)_CoefG |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefG | AMC1:CoefG | BLEN:$(AREA):$(POS):$(INST)_CoefG |
/mmio/AppTop/AppCore/SysGenMr[0]/DspCoreConfigMr/CoefH | AMC0:CoefH | BLEN:$(AREA):$(POS):$(INST)_CoefH |
/mmio/AppTop/AppCore/SysGenMr[1]/DspCoreConfigMr/CoefH | AMC1:CoefH | BLEN:$(AREA):$(POS):$(INST)_CoefH |
The Bunch Length IOC application provides 4 parameters for the BSA (Beam Synchronous Acquisition) system. A brief introduction for BSA can be found here: Beam Synchronous Acquisition (BSA).
These are the parameters based on the two pyrodetector sensors:
The first thing that the IOC needs to do is to create one BSA channel for each parameter. What triggers this action is the IOC shell function blenConfigure, on st.cmd. The first parameter of this function is the "Station Name" that is the beginning of the PV names of the IOC. For instance, in sector 21, st.cmd has:
Code Block | ||||
---|---|---|---|---|
| ||||
# Area, position, and instrument names to be used in record names
epicsEnvSet("AREA", "LI24")
epicsEnvSet("POS", "886")
epicsEnvSet("INST", "BL21")
(...)
# blenConfigure parameters:
# 1 - Station name
# 2 - BSA stream name must be identical to definition in yaml file
# 3 - PV used to get TMIT from FCOM
# 4 - IP address and port to send TMIT information to ATCA
blenConfigure "BLEN:${AREA}:${POS}" "${BSA_STREAM_YAML_NAME}" "${TMIT_PV}" "${FPGA_IP}:${IP_PORT_TMIT}" |
blenConfigure will, among other things, call the function BSA_CreateChannel, from BsaApi.h. Here are the relevant parts from blenBSA.h and blenBSA.cpp:
Code Block | ||||
---|---|---|---|---|
| ||||
#define NUM_CHANNELS 4
static const char* const channelNames[NUM_CHANNELS] = {"AIMAX", "BIMAX", "ARAW", "BRAW"};
class BlenBSA {
private:
BsaChannel *bsaChannels;
(...)
public:
(...)
int createChannels(const char *stationName);
(...)
} |
Code Block | ||||
---|---|---|---|---|
| ||||
int BlenBSA::createChannels(const char *stationName) {
char param_name[64];
bsaChannels = new BsaChannel[NUM_CHANNELS];
/* Create NUM_CHANNELS BSA channels with the name formed by the
* stationName that comes from the IOC shell, plus the channel
* acronym defined by the constant array channelNames. */
using namespace std;
for (int i = 0; i < NUM_CHANNELS; i++) {
sprintf(param_name, "%s:%s", stationName, channelNames[i]);
bsaChannels[i] = BSA_CreateChannel(param_name);
}
return 0;
} |
As explained in Calculate the maximum current and signal sum, there is a thread responsible to store the data to the BSA Core as soon as the data is ready.
Anchor | ||||
---|---|---|---|---|
|
...