Project

General

Profile

Communicating with the wire chambers » History » Version 22

Luke Batten, 02/26/2016 12:30 PM

1 1 Michael Kordosky
h1. Communicating with the wire chambers
2 1 Michael Kordosky
3 2 Jason St. John
h2. Running the Wire Chamber Mini-DAQ
4 2 Jason St. John
5 6 Jason St. John
setup ftbf
6 3 Jason St. John
cd ~ftbf_user/experiments/mc7
7 8 Jason St. John
8 3 Jason St. John
Look in instructions.txt
9 2 Jason St. John
10 7 Jason St. John
When you have a few seconds before a spill (in case you want to type a comment before you start the run)
11 3 Jason St. John
./daq-mc7.py
12 8 Jason St. John
    Example comment:  Good beam 32 GeV, 100 A. 2.5E+05 at MC7SC1
13 3 Jason St. John
14 4 Jason St. John
This daq fills one data file, appending each spill, until the user stops it.
15 3 Jason St. John
16 3 Jason St. John
h2. Looking at the data, Beam Study
17 3 Jason St. John
18 5 Jason St. John
ssh ftbflx01
19 3 Jason St. John
setup cern
20 11 Michael Kordosky
cd ~ftbf_user/experiments/mc7/TkRec
21 11 Michael Kordosky
paw
22 11 Michael Kordosky
exec runtk
23 11 Michael Kordosky
24 11 Michael Kordosky
25 5 Jason St. John
26 5 Jason St. John
27 2 Jason St. John
28 19 Jason St. John
h2. How to do a hard reboot of the WC controller
29 1 Michael Kordosky
30 1 Michael Kordosky
If the wire chamber controller at ftbfwc02 starts refusing connections it may need a reboot:
31 1 Michael Kordosky
32 1 Michael Kordosky
* from a browser go to http://ftbf-pdu00.fnal.gov
33 22 Luke Batten
* User: admin   Password: <on the board at MCenter, or the right side of the central monitor at ROC West>
34 1 Michael Kordosky
* Navigate to this screen:
35 1 Michael Kordosky
36 18 Will Foreman
!ftbfpdu00_control_screen2.png!
37 1 Michael Kordosky
38 18 Will Foreman
* click on "Outlet 6" and then choose "Reboot Immediate" from the drop-down menu at the top, and click "Next" at the bottom (you will be asked to confirm this decision in the next screen)
39 1 Michael Kordosky
* The state will change to "Off" but will be pending. Wait a little while and refresh the screen or log back in. The WC should be back on.
40 12 Michael Kordosky
41 15 Will Flanagan
42 1 Michael Kordosky
h2. The telnet interface
43 1 Michael Kordosky
44 20 Flor de maria Blaszczyk
This is experts only! If the problem persists after doing the hard reboot described in the previous section, do a hard reset from the telnet interface.
45 1 Michael Kordosky
46 1 Michael Kordosky
* telnet ftbfwc02.fnal.gov 5000
47 16 Will Flanagan
** also 5001 - 5003 are available
48 20 Flor de maria Blaszczyk
49 20 Flor de maria Blaszczyk
After issuing this command, the prompt will appear blank. Type your command in that blank space.
50 20 Flor de maria Blaszczyk
For a hard reboot, do:
51 20 Flor de maria Blaszczyk
* FF
52 20 Flor de maria Blaszczyk
53 21 Flor de maria Blaszczyk
If it worked, you will be kicked out. You can re-telnet if you need to perform other operations.
54 20 Flor de maria Blaszczyk
Other useful commands:
55 12 Michael Kordosky
56 12 Michael Kordosky
* "help" prints the top level help menu. h1,h2,h3 also print help menus
57 12 Michael Kordosky
58 12 Michael Kordosky
* "p0" gives a synopsis of the last spill, like so:
59 12 Michael Kordosky
60 12 Michael Kordosky
<pre>
61 12 Michael Kordosky
p0
62 12 Michael Kordosky
Controllers Spill Data Header  (5653mS SpillGate)
63 12 Michael Kordosky
 TotalWrdCnt  = 00009F89  (40841 D)
64 12 Michael Kordosky
 SpillCounter = 00000001  (1 D)
65 12 Michael Kordosky
 RTC Year/Mon = E08       (14/08)
66 12 Michael Kordosky
 RTC Day/Hr   = C0F       (12/15)
67 12 Michael Kordosky
 RTC Min/Sec  = F14       (15/20)
68 12 Michael Kordosky
 Trigger Cnt  = 00000110
69 12 Michael Kordosky
 Status Bits  = 0
70 12 Michael Kordosky
 Link Status  = 0
71 12 Michael Kordosky
           TDC Spill Hdrs (1 <= 16)
72 12 Michael Kordosky
 Input   Words       TDCnum   TrgCnt      Status
73 12 Michael Kordosky
   1     00000A9E    0001     00000110    0008
74 12 Michael Kordosky
   2     00000A05    0002     00000110    0008
75 12 Michael Kordosky
   3     00000A2E    0003     00000110    0008
76 12 Michael Kordosky
   4     00000A22    0004     00000110    0008
77 12 Michael Kordosky
   5     000009D2    0005     00000110    0008
78 12 Michael Kordosky
   6     00000A89    0006     00000110    0008
79 12 Michael Kordosky
   7     000009E0    0007     00000110    0008
80 12 Michael Kordosky
   8     00000A32    0008     00000110    0008
81 12 Michael Kordosky
   9     000009D3    0009     00000110    0008
82 12 Michael Kordosky
  10     000009C8    000A     00000110    0008
83 12 Michael Kordosky
  11     000009D3    000B     00000110    0008
84 12 Michael Kordosky
  12     000009B0    000C     00000110    0008
85 12 Michael Kordosky
  13     000009C2    000D     00000110    0008
86 12 Michael Kordosky
  14     000009CE    000E     00000110    0008
87 12 Michael Kordosky
  15     000009B9    000F     00000110    0008
88 12 Michael Kordosky
  16     000009B8    0010     00000110    0008
89 12 Michael Kordosky
</pre>
90 12 Michael Kordosky
91 12 Michael Kordosky
* "hc n string" with n=1-16 writes string to TDC n. If n=0 then all TDCs are written to.
92 12 Michael Kordosky
* "hc 0 rdi 0"  writes the command "rdi 0" to all TDCS.  
93 12 Michael Kordosky
** The rdi command is documented in the help menu:  RDI adr c   Read/and Incr FPGA Addr(H), c=WrdCnt(D)
94 12 Michael Kordosky
** The output is:
95 12 Michael Kordosky
<pre>
96 12 Michael Kordosky
hc 0 rdi 0
97 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
98 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
99 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
100 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
101 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
102 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
103 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
104 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
105 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
106 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
107 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
108 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
109 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
110 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
111 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
112 12 Michael Kordosky
   7   27   ac   a0 ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
113 12 Michael Kordosky
</pre>
114 13 Michael Kordosky
** The rows of this readout correspond to the different TDCs.
115 13 Michael Kordosky
** The columns of this readout have a well defined meaning. They correspond to registers in the "FTBF TDC FPGA Register Map" document found at [[TDC Readout Documentation]].  For example:
116 13 Michael Kordosky
*** The first column is the Control and status register - 0x00. 
117 13 Michael Kordosky
*** The second is the gate width register - 0x01. 
118 13 Michael Kordosky
*** The third is the time stamp counter initial value (a.k.a. clock adjust) - 0x03. 
119 13 Michael Kordosky
*** The forth column is the Hit Pipeline Delay Register - 0x03. A value of a0 = 160 and the unit is 9.416ns (RF period / 2) so the delay is 1,506ns.
120 14 Michael Kordosky
121 14 Michael Kordosky
h3. Adjusting the Hit Pipleline Delay
122 14 Michael Kordosky
123 14 Michael Kordosky
* We want to adjust the pipeline to take out about 200ns of delay. Thus we want to reduce the register value by 21 going from 0xa0=160 to 139=0x8B
124 14 Michael Kordosky
* The command is "HC 0 WR 3 8B"
125 14 Michael Kordosky
<pre>
126 14 Michael Kordosky
HC 0 WR 3 8B
127 14 Michael Kordosky
128 14 Michael Kordosky
hc 0 rdi 0
129 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
130 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
131 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
132 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
133 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
134 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
135 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
136 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
137 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
138 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
139 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
140 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
141 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
142 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
143 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380 
144 14 Michael Kordosky
   7   27   ac   8b ffff ffff ffff ffff  380  380  380  380  380  380  380  380
145 14 Michael Kordosky
</pre>
146 14 Michael Kordosky
147 14 Michael Kordosky
* Then, one needs to store the new setting in flash : "HC 0 DSAV 1"
148 14 Michael Kordosky
<pre>
149 14 Michael Kordosky
HC 0 DSAV 1
150 14 Michael Kordosky
Setup saved to ATMEL Page 1
151 14 Michael Kordosky
Setup saved to ATMEL Page 1
152 14 Michael Kordosky
Setup saved to ATMEL Page 1
153 14 Michael Kordosky
Setup saved to ATMEL Page 1
154 14 Michael Kordosky
Setup saved to ATMEL Page 1
155 14 Michael Kordosky
Setup saved to ATMEL Page 1
156 14 Michael Kordosky
Setup saved to ATMEL Page 1
157 14 Michael Kordosky
Setup saved to ATMEL Page 1
158 14 Michael Kordosky
Setup saved to ATMEL Page 1
159 14 Michael Kordosky
Setup saved to ATMEL Page 1
160 14 Michael Kordosky
Setup saved to ATMEL Page 1
161 14 Michael Kordosky
Setup saved to ATMEL Page 1
162 14 Michael Kordosky
Setup saved to ATMEL Page 1
163 14 Michael Kordosky
Setup saved to ATMEL Page 1
164 14 Michael Kordosky
Setup saved to ATMEL Page 1
165 14 Michael Kordosky
Setup saved to ATMEL Page 1
166 14 Michael Kordosky
</pre>