Starting and using TDUControl » History » Version 8
Thomas Dealtry, 01/30/2015 04:39 AM
1 | 6 | Thomas Dealtry | {{toc}} |
---|---|---|---|
2 | 1 | Kurt Biery | |
3 | 6 | Thomas Dealtry | h1. Getting help |
4 | 6 | Thomas Dealtry | |
5 | 6 | Thomas Dealtry | Email Tom Dealtry - thomas.dealtry@physics.ox.ac.uk |
6 | 6 | Thomas Dealtry | |
7 | 6 | Thomas Dealtry | h1. Overview |
8 | 6 | Thomas Dealtry | |
9 | 6 | Thomas Dealtry | The following are instructions on how to communicate with the NOvA timing distrubution unit (TDU). The TDU distributes timing information throughout the system, handles synchronisation between boards, and includes automatic propagation delay calculation & compensation. |
10 | 6 | Thomas Dealtry | |
11 | 6 | Thomas Dealtry | There are various ways to communicate: |
12 | 6 | Thomas Dealtry | |
13 | 6 | Thomas Dealtry | * Through lbnerc & daqinterface (coming soon) |
14 | 6 | Thomas Dealtry | * Booting up an xmlrpc server & commuicating through this |
15 | 6 | Thomas Dealtry | * Communicating with the TDU directly |
16 | 6 | Thomas Dealtry | |
17 | 8 | Thomas Dealtry | h1. Communication with the TDU |
18 | 8 | Thomas Dealtry | |
19 | 8 | Thomas Dealtry | The following will get Python 2.7.8, and set the environment (the code lives in lbnerc, located at /data/lbnedaq/tdu/lbnerc/) |
20 | 8 | Thomas Dealtry | (Note when the feature/tdu branch is merged into the develop branch, the normal fireup instructions at https://cdcvs.fnal.gov/redmine/projects/lbne-daq/wiki/Running_DAQ_Interface will work) |
21 | 8 | Thomas Dealtry | |
22 | 8 | Thomas Dealtry | <pre> |
23 | 8 | Thomas Dealtry | source /data/lbnedaq/daqarea/lbne-artdaq-base/setupLBNEARTDAQ |
24 | 8 | Thomas Dealtry | cd /data/lbnedaq/tdu/ |
25 | 8 | Thomas Dealtry | source fireup_tdu |
26 | 8 | Thomas Dealtry | </pre> |
27 | 8 | Thomas Dealtry | |
28 | 8 | Thomas Dealtry | h2. Communication via xmlrpc server |
29 | 8 | Thomas Dealtry | |
30 | 8 | Thomas Dealtry | |
31 | 8 | Thomas Dealtry | |
32 | 6 | Thomas Dealtry | h1. List of commands (to be expanded) |
33 | 1 | Kurt Biery | |
34 | 8 | Thomas Dealtry | All 'get', 'do', and 'read' commands return an error code with a common numbering scheme. 'get' commands also return additional information. |
35 | 6 | Thomas Dealtry | |
36 | 6 | Thomas Dealtry | h2. 'get' commands |
37 | 6 | Thomas Dealtry | |
38 | 6 | Thomas Dealtry | * <code>get_status()</code> |
39 | 6 | Thomas Dealtry | Returns [error_code, ready_to_do]. When ready_to_do is True, the control register can be modified (i.e. a 'do' command can be performed) |
40 | 6 | Thomas Dealtry | |
41 | 6 | Thomas Dealtry | h2. 'do' commands |
42 | 6 | Thomas Dealtry | |
43 | 6 | Thomas Dealtry | * <code>do_ping()</code> |
44 | 6 | Thomas Dealtry | ping the TDU |
45 | 6 | Thomas Dealtry | |
46 | 6 | Thomas Dealtry | * <code>do_time_sync()</code> |
47 | 6 | Thomas Dealtry | Perform a time synchronisation (this calls <code>get_status()</code> internally) |
48 | 6 | Thomas Dealtry | |
49 | 6 | Thomas Dealtry | * <code>do_delay_calc()</code> |
50 | 6 | Thomas Dealtry | Perform a propagation delay calculation (this calls <code>get_status()</code> internally) |
51 | 6 | Thomas Dealtry | |
52 | 6 | Thomas Dealtry | * <code>do_send_sync_pulse()</code> |
53 | 6 | Thomas Dealtry | Send a sync pulse (this calls <code>get_status()</code> internally) |
54 | 6 | Thomas Dealtry | |
55 | 6 | Thomas Dealtry | * <code>debug_do_write_control_reg(data_to_or)</code> |
56 | 6 | Thomas Dealtry | Write the control register to perform a none standard operation (this calls <code>get_status()</code> internally) |
57 | 6 | Thomas Dealtry | |
58 | 6 | Thomas Dealtry | h2. 'read' commands |
59 | 6 | Thomas Dealtry | |
60 | 6 | Thomas Dealtry | * <code>read_tdu_id()</code> |
61 | 6 | Thomas Dealtry | Read out the TDU version & ID numbers |
62 | 6 | Thomas Dealtry | |
63 | 6 | Thomas Dealtry | * <code>read_tdu_status()</code> |
64 | 6 | Thomas Dealtry | Read out the TDU's current operating conditions (current, voltage, temperature, fan status, FPGA status) |
65 | 6 | Thomas Dealtry | |
66 | 6 | Thomas Dealtry | * <code>read_gps_status()</code> |
67 | 6 | Thomas Dealtry | Read out the GPS status (faults, timeouts, sat count, etc. + current UTC time) |
68 | 6 | Thomas Dealtry | |
69 | 6 | Thomas Dealtry | * <code>read_error_registers()</code> |
70 | 6 | Thomas Dealtry | Read out the error registers |
71 | 6 | Thomas Dealtry | |
72 | 6 | Thomas Dealtry | * <code>read_control_reg()</code> |
73 | 6 | Thomas Dealtry | Read out the control register |
74 | 6 | Thomas Dealtry | |
75 | 6 | Thomas Dealtry | * <code>debug_read_all_registers()</code> |
76 | 6 | Thomas Dealtry | Read out all the registers. Also comes with some hints on what the 'default' for normal operating conditions is. |
77 | 6 | Thomas Dealtry | |
78 | 6 | Thomas Dealtry | h2. Other commands |
79 | 6 | Thomas Dealtry | |
80 | 6 | Thomas Dealtry | * <code>close_socket()</code> |
81 | 7 | Thomas Dealtry | Safely close the connection to the TDU |
82 | 6 | Thomas Dealtry | |
83 | 6 | Thomas Dealtry | * print_log |
84 | 6 | Thomas Dealtry | Will be made private |
85 | 6 | Thomas Dealtry | |
86 | 6 | Thomas Dealtry | h2. Error codes |
87 | 1 | Kurt Biery | |
88 | 7 | Thomas Dealtry | <pre> |
89 | 7 | Thomas Dealtry | 100-120 Wrong number of bytes received |
90 | 7 | Thomas Dealtry | -200/-201 Invalid register/data on receive |
91 | 7 | Thomas Dealtry | +200/+201 Invalid register/data on send |
92 | 7 | Thomas Dealtry | 300 Cannot perform a 'do' command (get_status() returns ready_to_do=False after 10 attempts including 2 seconds of sleep) |
93 | 7 | Thomas Dealtry | 301 Not ready to sync (TDU status error) |
94 | 7 | Thomas Dealtry | 302 Not ready to sync (GPS status error) |
95 | 7 | Thomas Dealtry | 400 Error found in error registers |
96 | 7 | Thomas Dealtry | </pre> |
97 | 6 | Thomas Dealtry | |
98 | 6 | Thomas Dealtry | h1. List of TDU IP addresses (to be expanded) |
99 | 6 | Thomas Dealtry | |
100 | 6 | Thomas Dealtry | * Master: 192.168.100.201 |
101 | 6 | Thomas Dealtry | * Slave: 192.168.100.202 |
102 | 6 | Thomas Dealtry | |
103 | 6 | Thomas Dealtry | h1. Using the NOvA GUI (TDUControl) - OLD & BROKEN |
104 | 6 | Thomas Dealtry | |
105 | 1 | Kurt Biery | To start TDUControl, use the following steps: |
106 | 6 | Thomas Dealtry | |
107 | 5 | Thomas Dealtry | # log into the <code>lbnedaq</code> account on <code>lbne35t-gateway01</code> |
108 | 6 | Thomas Dealtry | # <code>source /data/lbnedaq/novadaq/setup/setup_novadaq_nt1.sh</code> |
109 | 6 | Thomas Dealtry | # <code>TDUControl -m</code> |
110 | 5 | Thomas Dealtry | # enter the IP address of the Master TDU into the GUI (192.168.100.201) |
111 | 1 | Kurt Biery | |
112 | 6 | Thomas Dealtry | Alternatively for steps 3 & 4, you can run <code>TDUControl -m -t 192.168.100.201</code> |