BNMR: Helicity: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
m (5 revisions imported)
(No difference)

Revision as of 13:43, 25 April 2022

Links

Introduction

The bnmr and bnqr experiments control the helicity via the PPG "POL DRV" output. The helicity is changed using a waveplate (Figure 1) that is moved into and out of the beam. The two helicity states are called "UP" and "DOWN". An experimental parameter flip helicity is provided for each Experimental Mode. When this is set to true, the helicity will be flipped. Some modes flip the helicity after each PPG cycle, others at the end of the scan. See BNMR Mode Parameters for details.

Waveplate.png


Figure 1 Helicity Waveplate

Helicity Switch Box

Since both experiments bnmr and bnqr control the same hardware (the helicity plate), signals to drive the helicity from both experiments are connected to a helicity switch box (Rolf's box), Figure 2. These signals are from each experiment's PPG "POL DRV" output. The electronics is edge-driven, so it only changes when it sees an edge. To ensure a particular helicity state at the begin-of-run in single channel mode (e.g. DOWN), the PPG must drive the helicity DOWN-UP-DOWN. In dual channel mode, it is not possible to ensure the required helicity in the way at the begin of run. It is assumed that by the second PPG cycle, the helicity will be in the correct state and the latched helicity readback provides confirmation. The first cycle is always discarded.

The experiment requests the helicity state for its next cycle by setting the PPG "POL DRV" output. In single channel mode, the helicity state is changed immediately. In dual channel mode, the helicity is not changed until that experiment receives the beam (see BNMR Dual Channel Mode#Helicity). A circuit diagram of the helicity switch box as used for single and dual channel modes is shown in Figure 2b. (Figure 2a shows the original, single channel mode only). The D-type flip flops are edge driven, so they only change when an edge from the beam kicker signal is received.

Figure 2 Helicity Switch box


Helicity Read Back

Helicity read back signals have been provided in recent years (Figure 1) so that the state of the helicity can be read with certainty, particularly in dual channel mode. The helicity state is read using a VME NIMIO32 register specially modified for the bnmr and bnqr experiments (see NIMIO32 for details). Each experiment in provided with a VMEIO32 register. It provides a helicity readout for the present state of the helicity (used in single channel mode) as well as a latched helicity readout for dual channel mode. The latched readout latches the helicity state at the time that channel (BNMR or BNQR) has the beam.

Helicity test program

There is a helicity test program on both experiments ~/vmetest/heltest . This can be useful to diagnose problems when the helicity readback is not working. Usually it is found that a NIM bin is switched off, or a NIM module has failed.

A simulator mode was also made to test the VME NIMIO32 modifications before the readback signals were available. This mode is not now used.

Helicity Sleep Time

After the helicity is flipped, experimenters usually want to wait a certain time before the next PPG cycle. This time is the helicity sleep time. In single channel mode, the helicity sleep time parameter can be found with the other experimental parameters on the Parameters page, with the value stored in ODB key Helicity Flip Sleep (ms).

In dual channel mode, the helicity sleep time is programmed by the experimenters in the timing of the EPICS switching between channels, and Helicity Flip Sleep (ms) is ignored.

EPICS Helicity checks

The EPICS Helicity switch ILE2:POLSW2:STATLOC must be set in the correct position for control by the DAQ if helicity flipping is enabled. The EPICS control pages are used to set the Helicity switch position. If helicity flipping is disabled, it can be set for DAQ or EPICS control.

Except in dual channel mode, both DAQ systems (bnmr and bnqr) should not be run simultaneously with helicity flipping enabled in both systems. One system must have helicity flipping disabled. See testing for details.

Helicity flipping is enabled/disabled from the Status Page which changes the ODB key Enable helicity flipping. When the key enable all hel checks is true, helicity checking is enabled.

When helicity checking is enabled, rf_config performs the following check

  • if helicity flipping is enabled, checks that the EPICS Helicity switch is Off (i.e. DAQ has control)
  • if helicity flipping is disabled, reads the EPICS Helicity switch state, writes a message if not EPICS control.

When helicity checking is enabled, the frontend program performs the following checks

with helicity flipping enabled
  • In single channel mode
    • at the start of run the program will attempt to set the helicity to the initial state (HEL_DOWN) and check the read back
    • after each helicity flip, the program will check the Helicity state using the Helicity read back values.
  • in dual channel mode
    • after each helicity flip, after each cycle the program will check the Helicity state using the Helicity read-back latched values.

If the readback does not match the set value, the cycle will be skipped and the program will try once more to set the required helicity state. If unsuccessful, the run will be stopped.

with helicity flipping disabled
  • in single channel mode
    • at the start of run the program will try to set the helicity to a known state and read it back to check.
  • in dual channel mode
    • helicity flipping disabled is not supported