%ADASS_PROCEEDINGS_FORM%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEMPLATE.TEX -- ADASS VIII (98) ASP Conference Proceedings template
% Updated by N. Manset for ADASS IX (99), F. Primini for ADASS 2000,
% and D.Bohlender for ADASS 2001.
%
% Use this template to create your proceedings paper in LaTeX format
% by following the instructions given below.  Much of the input will
% be enclosed by braces (i.e., { }).  The percent sign, "%", denotes
% the start of a comment; text after it will be ignored by LaTeX.  
% You might also notice in some of the examples below the use of "\ "
% after a period; this prevents LaTeX from interpreting the period as
% the end of a sentence and putting extra space after it.  
% 
% You should check your paper by processing it with LaTeX.  For
% details about how to run LaTeX as well as how to print out the User
% Guide, consult the README file.  
% You should also consult the sample LaTeX papers,
% sample1.tex and sample2.tex, for examples of including figures, html
% links, special symbols, and other advanced features.
%
% If you do not have access to the LaTeX software or a laser printer
% at your site, you can still prepare your paper following the
% instructions in the User Guide.  In such cases, the editors will
% process the file and make any necessary editorial adjustments.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
%\documentstyle[11pt,adassconf]{article}  % Leave intact
\documentclass[11pt,twoside]{article}
\usepackage{adassconf}


\begin{document}   % Leave intact

%-----------------------------------------------------------------------
%			    Paper ID Code
%-----------------------------------------------------------------------
% Enter the proper paper identification code.  The ID code for your
% paper is the session number associated with your presentation as
% published in the official ADASS 2000 conference proceedings.  You can
% find this number locating your abstract in the printed proceedings
% that you received at the meeting or on-line via 
% http://adass2002.stsci.edu; the ID code is the letter/number sequence 
% proceeding the title of your presentation.  
%
% This will not appear in your paper; however, it allows different
% papers in the proceedings to cross-reference each other.
%
%
% Note that you should only have one \paperID, and it should not
% include a trailing period.  

\paperID{P9-4}
%%%% ID=P9-4

%-----------------------------------------------------------------------
%		            Paper Title 
%-----------------------------------------------------------------------
% Enter the title of the paper.
%
% EXAMPLE: \title{A Breakthrough in Astronomical Software Development}
% 

\title{An Overview of the Large Binocular Telescope Control System}

%-----------------------------------------------------------------------
%		          Authors of Paper
%-----------------------------------------------------------------------
% Enter the authors followed by their affiliations.  The \author and
% \affil commands may appear multiple times as necessary (see example
% below).  List each author by giving the first name or initials first
% followed by the last name.  Authors with the same affiliations
% should grouped together. 
%
% EXAMPLE: \author{Raymond Plante, Doug Roberts, 
%                  R.\ M.\ Crutcher\altaffilmark{1}}
%          \affil{National Center for Supercomputing Applications, 
%                 University of Illinois Urbana-Champaign, Urbana, IL
%                 61801}
%          \author{Tom Troland}
%          \affil{University of Kentucky}
%
%          \altaffiltext{1}{Astronomy Department, UIUC}
%
% In this example, the first three authors, "Plante", "Roberts", and
% "Crutcher" are affiliated with "NCSA".  "Crutcher" has an alternate 
% affiliation with the "Astronomy Department".  The fourth author,
% "Troland", is affiliated with "University of Kentucky"

\author{T.A. Axelrod and M.D. De La Pe\~na}
\affil{Large Binocular Telescope Observatory,
University of Arizona, Tucson, AZ  85721}

%-----------------------------------------------------------------------
%			 Contact Information
%-----------------------------------------------------------------------
% This information will not appear in the paper but will be used by
% the editors in case you need to be contacted concerning your
% submission.  Enter your name as the contact along with your email
% address.
% 
% EXAMPLE:  \contact{Dennis Crabtree}
%           \email{crabtree@cfht.hawaii.edu}
%

\contact{Michele De La Pe\~na}
\email{mdelapena@as.arizona.edu}

%-----------------------------------------------------------------------
%		      Author Index Specification
%-----------------------------------------------------------------------
% Specify how each author name should appear in the author index.  The 
% \paindex{ } should be used to indicate the primary author, and the
% \aindex for all other co-authors.  You MUST use the following
% syntax: 
%
% SYNTAX:  \aindex{LASTNAME, F. M.}
% 
% where F is the first initial and M is the second initial (if
% used).  This guarantees that authors that appear in multiple papers
% will appear only once in the author index.  
%
% EXAMPLE: \paindex{Crabtree, D.}
%          \aindex{Manset, N.}        
%          \aindex{Veillet, C.}        

\paindex{Axelrod, T. A.}
\aindex{De La Pe\~na, M. D.}     % Remove this line if there is only one author

%-----------------------------------------------------------------------
%			Subject Index keywords
%-----------------------------------------------------------------------
% Enter up to 6 keywords describing your paper.  These will NOT be
% printed as part of your paper; however, they will be used to
% generate the subject index for the proceedings.  There is no
% standard list; however, you can consult the indices for past ADASS
% proceedings (http://iraf.noao.edu/ADASS/adass.html). 
%
% EXAMPLE:  \keywords{visualization, astronomy: radio, parallel
%                     computing, AIPS++, Galactic Center}
%
% In this example, the author noticed that "radio astronomy" appeared
% in the ADASS VII Index as "astronomy" being the major keyword and
% "radio" as the minor keyword.

\keywords{telescope control system, astronomy: optical}

%-----------------------------------------------------------------------
%			       Abstract
%-----------------------------------------------------------------------
% Type abstract in the space below.  Consult the User Guide and Latex
% Information file for a list of supported macros (e.g. for typesetting 
% special symbols). Do not leave a blank line between \begin{abstract} 
% and the start of your text.

\begin{abstract}          % Leave intact
% Place the text of your abstract here 
The Large Binocular Telescope (LBT) consists of two 8.4-meter mirrors on a
common mount.  This configuration provides the light gathering power equivalent 
to an 11.8-meter telescope and the resolving power of an 22.8-meter telescope. 
Due to the binocular nature of the telescope, there are unique requirements 
imposed on the telescope control system (TCS) to ensure the health and 
safety of the telescope, while also enabling observations in both independent 
and interferometric mode.

This paper presents an overview of the design of the TCS, from the graphical 
user interface (GUI) and the plotting and analysis capabilities at the highest 
interaction level to the low-level interfaces for the software.  
\end{abstract}

%-----------------------------------------------------------------------
%			      Main Body
%-----------------------------------------------------------------------
% Place the text for the main body of the paper here.  You should use
% the \section command to label the various sections; use of
% \subsection is optional.  Significant words in section titles should
% be capitalized.  Sections and subsections will be numbered
% automatically. 
%
% EXAMPLE:  \section{Introduction}
%           ...
%           \subsection{Our View of the World}
%           ...
%           \section{A New Approach}
%
% It is recommended that you look at the sample papers, sample1.tex
% and sample2.tex, for examples for formatting references, footnotes,
% figures, equations, html links, lists, and other special features.  

\section{Overview of the System}
A {\em logical} view of the LBT TCS subsystems, represented by rectangles,
and the controllers, represented by rounded-corner rectangles, is shown
in Figure~\ref{P9-4:fig-1}.
Subsystems are autonomous entities which control attached telescope
hardware through one or more interfaces.  In contrast, controllers are
autonomous entities without attached hardware.  The connecting lines in
Figure~\ref{P9-4:fig-1} represent the major communication paths
between components.

From the physical point of view, the TCS
has three support (control, global memory, and telemetry) and an 
instrument network, all of 1 Gb/s capacity.
\begin{figure}
\epsscale{.73}
\plotone{P9-4_f1.eps}
\caption{TCS Logical Overview of Subsystems and Controllers 
(Axelrod 2003)}\label{P9-4:fig-1}
\end{figure}
The {\em control} network is used for shipping commands through the
system.  The {\em global memory} network is used to maintain a
globally accessible data structure which contains complete state
information for the system.  This global or shared memory is
replicated on each platform, and therefore, is robust to individual
subsystem failures.  Telemetry streams can originate in any subsystem
and are stored in the telemetry archive.  Certain subsystems can require
high bandwidth (MCS servo loops, AO loops) which cannot be 
accommodated on the other networks, raising the need for
a dedicated {\em telemetry} network.   The {\em instrument} network
services the requirements of the instruments and storage of the acquired 
data.

\section{Low-Level Infrastructure: Common Software Layer}
This software layer provides the fundamental foundation upon which the
TCS is constructed and functions.  This layer is comprised of a series
of services and structures which are accessed by the higher levels of
the system.

\begin{description}
\item{\bf System Data Dictionary and Network Shared Memory}
All system commands, variables and their corresponding attributes, and 
ancillary information are defined in a system data dictionary which 
enforces the concept of a single information source, allowing for a 
greater level of system integrity.  Telescope
status is organized by subsystem and maintained in a segment of 
network shared memory specifically designated for the subsystem.  
Collectively, the subsystem segments comprise a ``telescope-wide
shared memory'' where each segment is propagated to all TCS platforms for
a contemporaneous update of all the platforms.

\item{\bf Event Subsystem}
Events are the means of recording actions, as well as errors or abnormal
conditions in the
system.  This mechanism provides a means to both generate events and to be
notified via a callback when a particular event has occurred elsewhere in
the system.  Notification of events is only sent to subsystems which have
subscribed to receive such events; the subsystem decides on the appropriate
action to handle the event.  All events are stored in a central logging 
archive for diagnostic purposes.

\item{\bf Telemetry Streams}
Subsystems may register telemetry streams, sets of time-sampled variables,
which are delivered over the telemetry network to an archive.

\item{\bf Customized RPC Library}  The library was created to support a
multi-threaded environment.  Since communication is accomplished via XML
strings, only strings need to be accommodated by the library.

\item{\bf Time Service}
A GPS synchronized time server will be present on the LBT ethernet
and will offer time services to any client via ntp.  Since
the system design is intended to keep the ethernet load light, ntp
should easily provide time accurate to 1 msec.
\end{description}

\section{High-Level Interface: GUI}
Each subsystem has a dedicated GUI, created with Qt Designer, which is
comprised of a main window and ancillary support panels and dialogs.
The LBT TCS GUI guidelines are defined by De La Pe\~na (2003).
Each GUI is an independent executable and
\begin{itemize}
\item {\em never} communicates directly with its corresponding subsystem or
to any hardware,
\item {\em never} communicates with GUIs for any other subsystem,
\item issues its commands as customized RPC calls to the command 
sequencer (CSQ),
\item receives a handle from the CSQ which it uses to poll the status of
the issued command,
\item obtains subsystem state and other critical information from the
network shared memory, and
\item registers itself with the event handling system for direct
communication of alarms.
\end{itemize}

\noindent
The GUIs have been designed such that they 
are instantiated in their ``design-time'' form ({\em disabled}).
Only when status is successfully obtained from networked shared
memory is the GUI {\em enabled} for use.
A GUI can be aborted and restarted without any interference to/from the TCS.
Each subsystem GUI has exclusive use of a monitor, giving rise 
to a TCS display wall.  The display wall provides individuals in the
control room simultaneous state information for all of the telescope 
subsystems.  Finally, a standalone Matlab GUI application provides 
capabilities for plotting telemetry streams.

\section{Commanding and Sequencing}
\subsection{Communication}
Command and control of the telescope is done primarily through a series 
of GUIs which communicate directly with a centralized controller or command 
sequencer (CSQ).
Commanding is accomplished by sending XML strings using a 
customized remote procedure call (RPC) library.  The customized
library properly supports a multi-threaded environment and
only needs to accommodate the transfer of strings.  The controller
which initiates the command maintains a handle from the receiving system
which can be used to determine the status of the command.  System status
(e.g., running, stopped) and state (nominal, alarm) are read from network
shared memory.

\subsection{Command Sequencer}
The primary responsibilities of the CSQ are to validate incoming requests and
to route the requests to the appropriate subsystems.  Since a single command 
can blossom into a series of necessary actions which need to be assigned
to a variety of the telescope subsystems (e.g., mount control, pointing
control), a petri net technique is employed by the CSQ to handle the 
sequencing.  Petri nets are well suited to model concurrent and discrete 
events, and therefore, are ideal for control system specification.  

\subsection{Subsystems}
While subsystems control specific hardware and unique characteristics,
all subsystems share common properties.  These properties consist of:
autonomous operation, heartbeat, remote reboot, subsystem network
interfaces, subsystem API, and subsystem template.  A few of these
properties are discussed here.

\begin{description}
\item{\bf Autonomous Operation}
For testing purposes, each subsystem must be able
to work autonomously.  While the entire TCS depends upon the common
software layer, a minimal version of the common software should be
able to support autonomous operation of a subsystem.  The minimal
common software has the following capabilities:
manage subsystem configuration 
via the data dictionary and configuration files, log events to local 
log files, collect telemetry streams to a local archive, and use customized 
RPC services to communicate with local or remote clients.  

\item{\bf Heartbeat}
As the TCS is a distributed system, a software implemented heartbeat is
used to monitor the health of all the subsystem nodes.  Each subsystem
provides a ``heartbeat'' function which returns with minimal latency a 
system health code.  In the event of an abnormal health code, the 
controllers monitoring the heartbeat, GUI and CSQ, will alert the
telescope operator and client (respectively) that the subsystem should 
be restarted.

\item{\bf Subsystem API}
The subsystem API consists of two major components: commanding and
getting/setting values.  Commands are issued as customized RPC calls,
and a handle can be retrieved from the server such that the commanding
subsystem can monitor the progress of the issued command and continue to 
perform other tasks.  All subsystems support a minimal set of commands 
which accommodate an orderly startup and shutdown of the subsystem.

All values which can be configured and all read-only state values for a 
subsystem comprise the keyword interface.  The keywords define the
external state of the subsystem, and are stored in the LBT System Data 
Dictionary as discussed in Section 2.  The configurable values are
accessible via accessor or modifier functions.


\end{description}





%-----------------------------------------------------------------------
%			      References
%-----------------------------------------------------------------------
% List your references below within the reference environment
% (i.e. between the \begin{references} and \end{references} tags).
% Each new reference should begin with a \reference command which sets
% up the proper indentation.  Observe the following order when listing
% bibliographical information for each reference:  author name(s),
% publication year, journal name, volume, and page number for
% articles.  Note that many journal names are available as macros; see
% the User Guide listing "macro-ized" journals.   
%
% EXAMPLE:  \reference Hagiwara, K., \& Zeppenfeld, D.\  1986, 
%                Nucl.Phys., 274, 1
%           \reference H\'enon, M.\  1961, Ann.d'Ap., 24, 369
%           \reference King, I.\ R.\  1966, \aj, 71, 276
%           \reference King, I.\ R.\  1975, in Dynamics of Stellar 
%                Systems, ed.\ A.\ Hayli (Dordrecht: Reidel), 99
%           \reference Tody, D.\  1998, \adassvii, 146
%           \reference Zacharias, N.\ \& Zacharias, M.\ 2003,
%                \adassxii, \paperref{P7.6}
% 
% Note the following tricks used in the example above:
%
%   o  \& is used to format an ampersand symbol (&).
%   o  \'e puts an accent agu over the letter e.  See the User Guide
%      and the sample files for details on formatting special
%      characters.  
%   o  "\ " after a period prevents LaTeX from interpreting the period 
%      as an end of a sentence.
%   o  \aj is a macro that expands to "Astron. J."  See the User Guide
%      for a full list of journal macros
%   o  \adassvii is a macro that expands to the full title, editor,
%      and publishing information for the ADASS VII conference
%      proceedings.  Such macros are defined for ADASS conferences I
%      through XI.
%   o  When referencing a paper in the current volume, use the
%      \adassxii and \paperref macros.  The argument to \paperref is
%      the paper ID code for the paper you are referencing.  See the 
%      note in the "Paper ID Code" section above for details on how to 
%      determine the paper ID code for the paper you reference.  
%
\begin{references}
\reference Axelrod, T.\ 2003, LBT CAN 481s001 
\reference De La Pe\~na, M.D.\ 2003, LBT CAN 481s010a
\end{references}

% Do not place any material after the references section

\end{document}  % Leave intact
