No sets possible while
2 ms regulation for main dipoles 4 ms for quads
50hz on the real time channel
https://gitlab.cern.ch/ccs/fgc/-/blob/master/sw/lib/cclibs/libref/src/refEvent.c?ref_type=heads#L163
PLP Parabola Linear ExPonential
cc_float const acceleration = *ref_mgr->ref_defaults[ref_mgr->pc_on_cache.load_select][REG_CURRENT].acceleration;
cc_float const linear_rate = 0.97F * (regMgrParValue(reg_mgr,LIMITS_V_POS) - ref1 * reg_mgr->load_pars.ohms) * reg_mgr->load_pars.inv_henrys;
cc_float const initial_ref = ref_armed->fg_pars.meta.range.initial_ref;
25kV LIMIT_V_POS get load_pars_ohms, inv_henrys from FGC
Track delay is 2 periods (4ms) Measurement delay is 950 us filter delay + 50us = 1 ms Ref advance is 1 ms. Function played ahead of time (<ms) to get ahead of regulation .
initial_ref is the current at the start of the function (usually 155A)
For real-time implementation, speak to Diogo Alves.