Project

General

Profile

Starting and using TDUControl » History » Version 8

« Previous - Version 8/21 (diff) - Next » - Current version
Thomas Dealtry, 01/30/2015 04:39 AM


Getting help

Email Tom Dealtry -

Overview

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.

There are various ways to communicate:

  • Through lbnerc & daqinterface (coming soon)
  • Booting up an xmlrpc server & commuicating through this
  • Communicating with the TDU directly

Communication with the TDU

The following will get Python 2.7.8, and set the environment (the code lives in lbnerc, located at /data/lbnedaq/tdu/lbnerc/)
(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)

source /data/lbnedaq/daqarea/lbne-artdaq-base/setupLBNEARTDAQ
cd /data/lbnedaq/tdu/
source fireup_tdu

Communication via xmlrpc server

List of commands (to be expanded)

All 'get', 'do', and 'read' commands return an error code with a common numbering scheme. 'get' commands also return additional information.

'get' commands

  • get_status()
    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)

'do' commands

  • do_ping()
    ping the TDU
  • do_time_sync()
    Perform a time synchronisation (this calls get_status() internally)
  • do_delay_calc()
    Perform a propagation delay calculation (this calls get_status() internally)
  • do_send_sync_pulse()
    Send a sync pulse (this calls get_status() internally)
  • debug_do_write_control_reg(data_to_or)
    Write the control register to perform a none standard operation (this calls get_status() internally)

'read' commands

  • read_tdu_id()
    Read out the TDU version & ID numbers
  • read_tdu_status()
    Read out the TDU's current operating conditions (current, voltage, temperature, fan status, FPGA status)
  • read_gps_status()
    Read out the GPS status (faults, timeouts, sat count, etc. + current UTC time)
  • read_error_registers()
    Read out the error registers
  • read_control_reg()
    Read out the control register
  • debug_read_all_registers()
    Read out all the registers. Also comes with some hints on what the 'default' for normal operating conditions is.

Other commands

  • close_socket()
    Safely close the connection to the TDU
  • print_log
    Will be made private

Error codes

100-120    Wrong number of bytes received
-200/-201  Invalid register/data on receive
+200/+201  Invalid register/data on send
300        Cannot perform a 'do' command (get_status() returns ready_to_do=False after 10 attempts including 2 seconds of sleep)
301        Not ready to sync (TDU status error)
302        Not ready to sync (GPS status error)
400        Error found in error registers

List of TDU IP addresses (to be expanded)

  • Master: 192.168.100.201
  • Slave: 192.168.100.202

Using the NOvA GUI (TDUControl) - OLD & BROKEN

To start TDUControl, use the following steps:

  1. log into the lbnedaq account on lbne35t-gateway01
  2. source /data/lbnedaq/novadaq/setup/setup_novadaq_nt1.sh
  3. TDUControl -m
  4. enter the IP address of the Master TDU into the GUI (192.168.100.201)

Alternatively for steps 3 & 4, you can run TDUControl -m -t 192.168.100.201