%==============================================================================
% Document header
%==============================================================================
\documentclass[a4paper,11pt]{article}

% Margin setup to use more of the page
\usepackage[top=3cm, bottom=3cm, left=2cm, right=2cm]{geometry}

% Color package
\usepackage[usenames,dvipsnames,table]{xcolor}

% Hyperrefs
\usepackage[
  colorlinks = true,
  linkcolor  = black,
  citecolor  = black,
  urlcolor   = blue,
]{hyperref}

% Longtable
\usepackage{longtable}

% Graphics, multirow
\usepackage{graphicx}
\usepackage{multirow}

% Appendix package
\usepackage[toc,page]{appendix}

\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyhead[R]{}
\renewcommand{\footrulewidth}{0.4pt}

% Row number command
\newcounter{rownr}
\newcommand{\rownumber}{\stepcounter{rownr}\arabic{rownr}}

%==============================================================================
% Start of document
%==============================================================================
\begin{document}

%------------------------------------------------------------------------------
% Title
%------------------------------------------------------------------------------
\include{cern-title}

%------------------------------------------------------------------------------
% Licensing info
%------------------------------------------------------------------------------
\pagebreak

\thispagestyle{empty}

\addcontentsline{toc}{section}{Licensing information}
\section*{Licensing information}

\noindent
This document is licensed under a Creative Commons Attribution-ShareAlike 4.0
International License. If you have not received a copy of the license along with this
work, see \\
\url{http://creativecommons.org/licenses/by-sa/4.0/}

%------------------------------------------------------------------------------
% Revision history
%------------------------------------------------------------------------------
\section*{Revision history}
\addcontentsline{toc}{section}{Revision history}

\centerline
{
  \rowcolors{2}{white}{gray!25}
  \begin{tabular}{l c p{.6\textwidth}}
  \hline
  \multicolumn{1}{c}{\textbf{Date}} & \multicolumn{1}{c}{\textbf{Version}} & \multicolumn{1}{c}{\textbf{Change}} \\
  \hline
  DATE & 0.1 & First draft \\
  \hline
  \end{tabular}
}

%------------------------------------------------------------------------------
% Table of contents, list of figs, tables
%------------------------------------------------------------------------------
\pagebreak
\pdfbookmark[1]{\contentsname}{toc}
\tableofcontents

\listoffigures
\listoftables

%------------------------------------------------------------------------------
% List of abbreviations
%------------------------------------------------------------------------------
\pagebreak
\section*{List of abbreviations}
\begin{tabular}{l l}
FM & Front Module \\
\end{tabular}
\addcontentsline{toc}{section}{List of abbreviations}

%==============================================================================
% SEC: Intro
%==============================================================================
\pagebreak
\section{Introduction}
\label{sec:intro}

This document shows how to install a PTS test system for the CONV-TTL-RS485 FM cards.
It takes the reader through installing wires that are needed for these cards through the 19'' rack,
and then focuses on installing the test system (scripts, preparing shortcuts, etc.) on the PTS laptop.

%==============================================================================
% SEC: Rack setup
%==============================================================================
\section{Rack setup}
\label{sec:rack}

To setup the rack for the PTS system, we will need to pass some Lemo 00 cables from the
front to the back of the 19'' rack. Then, we'll need to connect two RS-485 tester cards
to these cables so that the FM can drive the tester card to perform the tests.
The following steps should be performed:

\begin{enumerate}
  \item Open the top and back of the 19'' rack
  \item Grab four \textcolor{red}{\textbf{LENGTH}} cables and pass them from the front
  to the back of the rack
  \item Fix them to the rack so that they hang out enough to reach until the second
  slot of the ELMA crate
  \item Grab the two RS-485 tester cards
  \item Grab four Lemo 00 T splitters and connect one short (1~ns delay) Lemo 00 cable
  on each top side of the T splitters
  \item Using Lemo 00 female-to-female adapters, connect the long cables coming
  from the front of the rack to the T splitters
  \item Label each of the long cables with colored labels on both sides, in this order from
  left to right:
  \begin{itemize}
    \item blue
    \item green
    \item red
    \item yellow
  \end{itemize}
  \item Close the top of the 19'' rack
  \item Insert a CONV-TTL-RTM-RS485 card into the back of the ELMA crate, in slot 4
  \item Insert the two RS485 tester cards all the way into the RTM in slot 4:
  \begin{itemize}
    \item one tester card for channels 1--3
    \item the other for channels 4--6
  \end{itemize}
  \item Close the back of the 19'' rack
\end{enumerate}


\end{document}
