Wiki source code of Trigger Howto

Version 27.1 by sndueste on 2023/04/28 08:20

Hide last authors
sendels 1.1 1
2
sndueste 6.1 3 {{toc/}}
sendels 1.1 4
sndueste 10.1 5 = Introduction (user panel)
6 =
sendels 1.1 7
sndueste 27.1 8 The MTCA based triggers have a jitter in the few ps range, the delay can be shifted in 9 ns steps, One can choose between 10 Hz triggers, Triggers connected to the (fast) FEL shutters,  frequencies locked to the pulses (e.g. 1MHz) and the actual bunch patterns. A detailed description can be found at the[[ N.A.T. webpage >>url:https://nateurope.com/product/namc-pstimer/||shape="rect"]].
sendels 1.1 9
sndueste 19.1 10 In short:
sendels 1.1 11
sndueste 19.1 12 * the triggers are for low impedance (~~50 Ohm )
13 * signal level is + 5V - otherwise 0V (in the expert panel one can also invert the signal - base line is +5 V and trigger 0V)
sndueste 24.1 14 * The trigger are send to the MTCA several ms before the first FEL pulse (3.1 ms for the "standard" trigger, 21.5 ms for the "early" trigger).
sndueste 19.1 15 * The timer card can delay the trigger in 9 ns  steps for more than 100 ms (an option to shift the trigger in 1 ns steps is available in the expert panel)
16 * The shown delay in µs is in respect to the //first// FEL pulse. negative delay: trigger comes before FEL, positive : trigger comes after the FEL.
17 * The desired delay has to be entered in the "delay to be set" field and as second step pressing the "set delay" sends the delay value to the timer card. Then the trigger delay will be changed and the "actual delay" will be updated.
18 * The trigger can be set to only provide a trigger signal if the FEL Fast shutter is open. One has to choose which FEL shutter to use.
19 * The trigger  width can be adjusted from 9 ns to several ms in 9 ns steps
20 * The timer card can in addition to the 10 Hz triggers also provide frequencies which are linked to the FEL repetition rate and the actual burst pattern of the FEL. For details how to set these modes see below
21 * At the beamlines the triggers are provided with a  BNC patch panel
sendels 1.1 22
sndueste 19.1 23 The main control can be done with a simplified user panel which can handle the timing in respect to the FEL pulses (and not in respect to some arbitrary event time)
24
25
sendels 1.1 26 \\
27
sndueste 20.1 28 [[image:attach:image2020-1-23_12-10-59.png||width="700"]]
sndueste 19.1 29
30 \\
31
32 \\
33
sndueste 22.1 34 Choosing a FLASH1 trigger there are 2 options to be synchronized with the BL and the PG shutter :
sndueste 21.1 35
sndueste 22.1 36 [[image:attach:image2020-1-23_12-29-40.png||height="250"]]
sndueste 21.1 37
sndueste 22.1 38 A yellow background indicates that the trigger is synchronized to a fast shutter:
39
40 [[image:attach:image2020-1-23_12-31-41.png||height="250"]] or:[[image:attach:image2020-1-23_12-32-20.png||height="250"]]
41
sndueste 19.1 42 \\
43
44 \\
45
sendels 1.1 46 \\
47
sndueste 6.1 48 = Expert panels =
sendels 1.1 49
50 \\
51
sndueste 21.1 52 [[image:attach:image2020-1-23_12-28-6.png||height="250"]] [[image:attach:image2019-9-17_13-8-46.png||height="400"]]
sndueste 6.1 53
sndueste 7.1 54 With the **"Expert overview"** one gets the overview over all channels available on the timing card and can configure the card. This is useful to look what channels are using clock settings or burst mode settings that one wants to change ... and using the other tabs one can set parameters for clocks and bursts (see below)
sndueste 6.1 55
56 \\
57
sndueste 7.1 58 For each trigger channel there is in addition an **"Expert panel"** to set the properties of THIS channel
sndueste 6.1 59
sndueste 21.1 60 [[image:attach:image2020-1-23_12-28-46.png||height="250"]] [[image:attach:image2019-9-17_13-15-38.png||width="550"]]
sndueste 6.1 61
62 \\
63
64 \\
65
sndueste 10.1 66 = Set a constant frequency to a channel =
67
68 =
sndueste 6.1 69 [[image:attach:image2019-9-17_13-18-9.png||height="250"]][[image:attach:image2019-9-17_13-18-37.png||height="149"]] =
70
71 \\
72
sndueste 7.1 73 The timer card provides the option to generate  frequencies that are synched to the FEL reprate on the ps level. One can set 3 Clocks by deviding the reference frequency of 54.2 MHz by n.** Please check (using the Expert overview ) before changing a frequency of it is used for some other channel !!**
sndueste 6.1 74
75 Since our main FEL frequency is 100.31 MHz the dividers are not straight forward:
76
sndueste 10.1 77 [[image:attach:image2019-9-17_14-22-29.png||width="450" align="right"]]
78
79 \\
80
sndueste 7.1 81 (% class="wrapped" %)
sndueste 6.1 82 |=(((
83 Clock frequency
84 )))|=(((
sndueste 7.1 85 Divider to be set
sndueste 6.1 86 )))
87 |(((
88 "1 MHz" (1000.31 kHz)
89 )))|(((
90 53
91 )))
92 |(((
sndueste 7.1 93 "500 kHz" (501.5 kHz)
sndueste 6.1 94 )))|(((
sndueste 7.1 95 107
sndueste 6.1 96 )))
97 |(((
sndueste 7.1 98 "250 kHz" (250.8 kHz)
sndueste 6.1 99 )))|(((
sndueste 7.1 100 215
sndueste 6.1 101 )))
sndueste 7.1 102 |(% colspan="1" %)(((
103 "200 kHz" (200.6 kHz)
104 )))|(% colspan="1" %)(((
105 269
106 )))
107 |(% colspan="1" %)(((
108 "100 kHz" (100.3 kHz)
109 )))|(% colspan="1" %)(((
110 539
111 )))
sndueste 6.1 112
sndueste 10.1 113 \\
114
sndueste 15.1 115 == General FLASH frequencies: ==
116
sndueste 10.1 117 \\
118
sndueste 16.1 119 (% class="relative-table wrapped" style="width: 19.422%;" %)
sndueste 17.1 120 |(% class="highlight-grey" title="Hintergrundfarbe : Grau" data-highlight-colour="grey" %)(((
sndueste 18.1 121 (% style="color: rgb(0,0,0);" title="" %)**Name          
122 **
sndueste 17.1 123 )))|(% class="highlight-grey" title="Hintergrundfarbe : Grau" data-highlight-colour="grey" %)(((
sndueste 18.1 124 (% style="color: rgb(0,0,0);" title="" %)**Frequency                
125 **
sndueste 17.1 126 )))|(% class="highlight-grey" title="Hintergrundfarbe : Grau" data-highlight-colour="grey" %)(((
127 (% style="color: rgb(0,0,0);" title="" %)**Divider**
sndueste 15.1 128 )))
129 |(((
130 1.3 GHz
131 )))|(((
132 1300.000000 MHz
133 )))|(((
sndueste 10.1 134 \\
sndueste 15.1 135 )))
136 |(((
137 108 MHz
138 )))|(((
139 108.333333 MHz
140 )))|(((
141 12
142 )))
143 |(((
144 9 MHz
145 )))|(((
146 9.02777777 MHz
147 )))|(((
148 144
149 )))
150 |(((
151 4.5 MHz
152 )))|(((
153 4.513888 MHz
154 )))|(((
155 288
156 )))
157 |(((
158 1 MHz
159 )))|(((
160 1.003086 MHz
161 )))|(((
162 1296
163 )))
sndueste 10.1 164
165 \\
166
sndueste 7.1 167 Once a clock is configured with the right frequency one can choose in the "expert panel" of the according channel the "FPGA clock" in the "input source select"  chooser.
168
sndueste 10.1 169 One has to set the delay to values less than the repetition rate ... (so for 1 MHz between 0 and 990 µs)  and the trigger width also less than the rep rate ...
sndueste 8.1 170
sndueste 15.1 171 This results in a continuous train of pulses with the set trigger width.
sndueste 8.1 172
sndueste 10.1 173 = Creating an (own) burst trigger =
174
175 One can use now a SECOND trigger channel which is set to a regular 10 Hz trigger  and gate the clock output to create a burst with defined start point and length,
176
sndueste 11.1 177 For the example we use the FRONT.TRG2 (BL3 Trg5) as gate pulse which defines the length of the burst (set with the trigger width) and the (rough) starting point of the burst. This trigger is only used as gate and the physical trigger output is NOT used.
sndueste 10.1 178
sndueste 11.1 179 The  second channel (here FRONT.TRG3 (BL3 Trg6) which is set to the clock frequency defines the reprate (by the FPGA clock setting) , the exact starting point of the first trigger ( by the delay ) and the width of the  MHz/kHz triggers (width).
sndueste 10.1 180
sndueste 11.1 181 **To get from the clock to the burst trigger** one has to:
sndueste 10.1 182
sndueste 11.1 183 * set the  "2nd source select" to the gate trigger ( here FRONT.TRG2) - this defines a second source to considder for the trigger output.
184 * and the "output source select" to "AND 2nd Ch."  this finally only sends a trigger if on both inputs (clock and gate) we have a high signal.
185
sndueste 10.1 186 \\
187
sndueste 11.1 188 [[image:attach:image2019-9-17_14-35-5.png||height="250"]] [[image:attach:image2019-9-17_14-34-38.png||width="400"]]
189
sndueste 10.1 190 \\
191
192 \\
193
sndueste 11.1 194 = Real bunch trigger  - get a trigger for each FEL pulse =
195
sndueste 10.1 196 \\
197
sndueste 11.1 198 Sometimes it is convenient to get a trigger pulse for each pulse in the FEL. thus if the FEL number of bunches or reprate are changed, the trigger adapts accordingly.
sendels 1.1 199
sndueste 11.1 200 For this one has to select the source of interest in the expert overview panel (tab: "Bunch pattern") ... well for us this is FLASH1 (FL1D) or FLASH2 (FL2D)
sendels 1.1 201
sndueste 11.1 202 There are 6 different bunch pattern "channels" one can configure. Typically only 2 are needed ... And in each one there are 6 selectors to choose sources . We only need one - it does not matter in which one is used.
sendels 1.1 203
sndueste 12.1 204 [[~[~[image:attach:image2019-9-17_14-51-28.png~|~|height="250"~]~]>>attach:image2019-9-17_14-51-28.png]][[image:attach:image2019-9-17_14-47-15.png||thumbnail="true" height="199"]]
sndueste 8.1 205
206 \\
207
sndueste 11.1 208 In the expert panel one can now choose the configured "Bunch Pattern" as "Input source select"
sndueste 10.1 209
sndueste 11.1 210 **NOTE: To shift the burst in time one can no longer use the delay of the individual channel BUT the delay in the "Bunch pattern" tab in the expert overview! This now shifts all bursts ... so you better know what you are doing. typically the burst is already shifted to the actual FEL timing ... Shifting the timing should be discussed with the beamline scientist / local contact ...**
211
sndueste 10.1 212 \\
213
sndueste 13.1 214 [[image:attach:image2019-9-17_15-4-47.png||height="250"]][[image:attach:image2019-9-17_14-52-40.png||height="250"]]
sndueste 11.1 215
sndueste 10.1 216 \\
217
218 \\
219
sndueste 20.1 220 = Different trigger events (starting points) =
221
222 one can configure each channel for an individual trigger event
223
224 **FLASH1**
225
sndueste 21.1 226 (% class="wrapped" %)
sndueste 20.1 227 |(((
228 trigger No
229 )))|(((
230 function
231 )))
232 |(% colspan="1" %)(((
233 21
234 )))|(% colspan="1" %)(((
235 Trig16 + first bunch of FLASH1 - this trigger is shifted when FL1 starts later than "700"
236 )))
237 |(% colspan="1" %)(((
238 180
239 )))|(% colspan="1" %)(((
240 shifts with the start time of FLASH1 as event 21 but comes 23 ms  before the FEL
241 )))
242 |(((
243 16
244 )))|(((
245 the MCA trigger 3.11 ms before the Flash1 pulses (same as A6 but more stable)
246 )))
247 |(((
248 166
249 )))|(((
250 A6 event. still possible to use but less precise than 16
251 )))
252 |(((
253 162
254 )))|(((
255 A2 event as earliest ( 24 ms before the FEL)
256 )))
257 |(((
258 224
259 )))|(((
260 E0 event of the BL fast shutter ( 19 ms before the FEL) - to be switched off in 2020
261 )))
262 |(((
263 225
264 )))|(((
265 E1 event of the PG fast shutter ( 19 ms before the FEL) - to be switched off in 2020
266 )))
267
sndueste 10.1 268 \\
269
270 \\
271
sndueste 20.1 272 **FLASH2**
273
sndueste 21.1 274 (% class="wrapped" %)
sndueste 20.1 275 |(((
276 trigger No
277 )))|(((
278 function
279 )))
280 |(((
281 22
282 )))|(((
283 Trig116 + first bunch of FLASH2 - this trigger is shifted when FL2 starts at a different start time
284 )))
285 |(((
286 181
287 )))|(((
288 shifts with the start time of FLASH2 as event 22 but comes 23 ms  before the FEL
289 )))
290
291 from this trigger as starting point one can shift the timing in 9 ns steps first and finally in 0.9 ns steps for fine adjustment.
292
sndueste 10.1 293 \\
294
295 \\
296
sndueste 23.1 297 = Info about the Fast shutter trigger =
sndueste 10.1 298
sndueste 23.1 299 Since Jan 2020 the fast shutter trigger at FLASH1 is generated via local inhibit at the EXP1 and EXP2 crate and not via E0 and E1 events anymore
300
301 for details see [[doc:FLASH.Fast Shutter trigger inhibit system]]
302
sndueste 10.1 303 \\
sndueste 20.1 304
sndueste 25.1 305 == Special trigger options for the fast shutter: ==
306
307 === Fast shutter inhibit signal ===
308
sndueste 26.1 309 It is possible to have the fast shutter inhibit signal (the signal coming from the fast shutter to the inhibit boxes connected to the X2 cards) directly available for users. For this one can select the output source as 2nd channel:
sndueste 25.1 310
sndueste 26.1 311 [[image:attach:image2020-2-5_10-59-41.png||height="250"]]
312
sndueste 20.1 313 \\
314
sndueste 26.1 315 === Inverse fast shutter trigger ===
sndueste 25.1 316
sndueste 26.1 317 If one wants to have an inverse fast shutter trigger (10 Hz signal that comes only if the fast shutter is** CLOSED**) one can use a T and a small Lemo cable to double the input from the fast shutter  to another input at the inhibit box.
318
319 In the FL2 case input1 is the regular fast shutter channel and input2 is usually not used. for this additional input one can set the input configuration to **inverse:**
320
321 [[image:attach:image2020-2-5_14-11-55.png||height="400"]]
322
sndueste 20.1 323 \\
324
325 \\
326
327 \\
328
329 \\
sndueste 25.1 330
331 \\