Setting up Beam, Tape & Trigger Enable sequences and cycles
From tigwiki
Contents |
[edit] Caveat Emptor
Last updated 2007 Oct 16. On 2007 Oct 16, the J221 was congifured to take an external clock and downscale it by 10. The external clock was set to 10 kHz. So at the last update time the "clock tick" rate was 1 kHz. The outputs were changed so that Output 1 is still Global
Enable, Output 2 is Germanium Enable, Output 3 is for Sceptar Enable.</p>However, all examples below are from a run in August 2003 when the clock was set to the internal 1 MHz oscillator downscaled by 10, and when the outputs were 1-2 global enable, 3-4 not connected.
[edit] Jorway 221
The Jorway 221 controls the beam, tape, and trigger enable systems. The manual is here: http://www.jorway.com/pdf/dsp221ak.pdf
The Jorway 221 is a sequencer that is programmed to set a 12-bit output pattern register at times specified from the initialization of a sequence. So, you load it up with an array of bit patterns and another array with the "set point" times at which that bit pattern is to be set. It can cycle automatically, but in our implementation we don't have it automatically restart a cycle. It can raise a LAM at the end of a sequence. The sequence counter can be driven by an external clock or by an internal 1 MHz clock. It also has a scale-down-by-ten jumper that we use so our set points are in increments of 10 microseconds. The outputs are TTL.
[edit] What the outputs mean
The meaning of the 12 different outputs is defined in the front end. As of Sept 2010:
| Output(s) | Meaning |
| 1,2,3 | Trigger Enable (Can be done separately for different streams) |
| 5,6 | Clear FERA Scaler |
| 7,8 | Move Tape (needs to be asserted a minimum of 10 ms) |
| 11,12 | Beam On |
| others | reserved |
An output patern of 0xF3 would enable triggers, move the tape, and clear the scalers.
Some useful words:
| Binary | HEX | Meaning |
| 0000 0000 0111 | 7 | Trigger Enable (Can be done separately for different streams) |
| 0000 0011 0000 | 30 | Clear FERA Scaler |
| 0000 1100 0000 | C0 | Move Tape (needs to be asserted a minimum of 10 ms) |
| 1100 0000 0000 | C00 | Beam On (Triggers disabled) |
| Combinations: | ||
| 1100 0000 0111 | C07 | Beam On, all triggers enabled |
| 0000 1111 0000 | F0 | Move tape and clear scalers, triggers disabled |
[edit] ODB Entries
Operation of the Sequencer is controlled by the ODB under /Equipment/Camac/Settings/Jorway, http://isdaq08.triumf.ca:8081/Equipment/Camac/Settings/Jorway?exp=8pi, a sample being shown below. Program selects one of (at this time) four programs for the sequencer. Pattern when
not
running is what the output will be set to when the front end is
started
or when a run is paused or ended. In the example below, Program 0
would
be executed during runs. When the run is not active
(paused,
stopped, or not yet started), output pattern 0x00 will be put out.
A program is defined in each of the Program X
subdirectories.
The first entry, Cycle Enable, determines whether
the
program will be executed repeatedly during the run (Cycle Enabled
is y), or will only be executed one-shot at the very
beginning
of the mode (Cycle Enabled is n). The
former
is also referred to as "pulsed" mode as traditionally it refers to
experiments
where the beam is pulsed and the acquisition is periodically inhibited,
reset,
or both. The second is referred to as "Continous" as it
corresponded
to experiments where there was no need to sweep the beam or . The
next
set of entries, Interval[], are the times in clock ticks
(10
microsecond ticks as of 7 Aug 2003) for which a given output pattern
will
be asserted. The Pattern[] entries specify the
output
patterns.
An Interval[] time of 0 indicates the
end of
the program. In one-shot or "Continuous" mode (Cycle
Enabled
is n), the Pattern[]at the end of
the program
will be set and held until the run is paused or stopped.
In "Cycled" mode ((Cycle
Enabled
is n), the Pattern[]at the end of
the program
will be set until MIDAS restarts the cycle.
- If your cycle is not working properly, check if you've accidentally set a "zero" interval somewhere before the end of the program.
[edit] Example of Pulsed (or cycled) Mode of Operation
In the example Program 0
below, the program starts by
sending a 10 ms pulse to clear the scalers with the triggers disabled,
then sends a 1 second pulse to the motor controller with triggers still disabled,
then enables triggers for 5 seconds to collect background,
then turns on the beam and keeps triggers enabled for 4 seconds,
then stops implanting the beam but keeps triggers enabled for 30 seconds (Watch the decay).
Since Cycle Enabled is y, at the end of the program, the acquisition is set up to read out the scalers and then restart the program. This particular program might be appropriate, for example, in experiments where the tape system is used to sweep daughter "contaminants" out of the view of 8pi/SCEPTAR.
| Interval | Bit Pattern | Function | Duration (s) |
| 10 | 0x30 | Clear Scalers | 0.01 |
| 1000 | 0xC0 | Move Tape | 1 |
| 5000 | 0x7 | Beam off, All triggers enabled | 5 |
| 4000 | 0xC07 | Beam on, All triggers enabled | 4 |
| 30000 | 0x7 | Beam off, All triggers enabled | 30 |
| 0 | 0 | END OF CYCLE: Disable triggers | until MIDAS restarts it |
[edit] Example of One-Shot (or Continuous) Mode operation
See #Caveat Emptor The example below of one-shot operation starts a run by sending a 100ms pulse to clear the scalers, then waits 10ms, then enables triggers and enables beam for the rest of the run. This would be appropriate for source measurements.
| Interval | Bit Pattern | Function | Duration (s) |
| 100 | 0xF0 | Clear Scalers, Move tape | 0.1 |
| 10 | 0x0 | Wait | 0.01 |
| 0 | 0xC07 | Beam on, All triggers enabled | Forever or until the end of the run, whichever is first |
Note that the Jorway itself will set its outputs to zero at the
end of a
program, and that this behavior cannot itself be modified. At the
end
of a one-shot mode program, the output is set to the first
Pattern[] for which the Interval[] is zero.
[edit] Cycle number encoded in each event and in the CAMA bank
In cycle mode, the cycle number is encoded as a 12-bit digital number on the output of an output register that is patched into the bit pattern inpujt register of the 2366 ULM. At the beginning of a run this output register is set to 1. At the end of a cycle, the scalers are read, written as an SCLR bank, and cleared, and the contents of the bit register are read back and written as a CAMA bank, and the cycle number output register is then incremented. The reason for all this is so that:
- Each real physics event within a FMEM bank is tagged with a cycle number
- Each "Camac" event contains the scalers and cycle number of the cycle.
This would, for example, allow you to inspect what happened in a given cycle by looking for the CAMA bank containing the cycle number, and then looking at the SCLR bank within that event. You could then decide whether or not that was a good cycle and keep (or throw out) physics events from FMEM banks with that cycle number.


