\parindent 0pt
\parskip 0.3cm

%\section {The PE\,3210 Instrument Computer}
\section {THE PE\,3210 INSTRUMENT COMPUTER}
\label{ch9:PE3210}

\subsection {Introduction}
Common-User instruments on the INT are provided with their own software
packages, which run under ADAM on the dedicated PE\,3210 Instrument Computer.
 This machine is found in the air-conditioned
Instrument Computer Room, adjacent to the Telescope Control Room,
together with two Magnetic Tape Units, an EGLE disk drive, a Line Printer,
and the System Console. The system is powered via the Buffer Set (Chapter 
\ref{ch15:bufferset}). Two user terminals are located in the Telescope
Control Room: one acts as the interface to the instrumentation computer
software, and is more commonly called the ADAM terminal
(see Section \ref{ch2:croom}), whilst the other one stands
on a desk at the East end of the Control Room and is for general use during
daytime only, when the PE\,3210 is frequently used for software development.\\
{\bf Beware}! Never use the latter terminal to work on the computer during
observing: its use will substantially slow down the ADAM control software,
and may even cause data to be lost.

A full discussion of the PE\,3210 is somewhat outside the scope of this INT
User Manual. This section only deals with starting ({\it e.g.\/} after a
power failure) and stopping the computer.
However, because the Instrument Computer is also available to observers
with private (non common-user) instrumentation (in consultation
with the La Palma staff), additional information about the PE's
Operating System, its text Editor and PE-specific Tape Handling, is provided
in the appendices. Those notes are intended to assist with such private use,
and indeed may also be of
interest to observers who require a more detailed knowledge of the Instrument
and Telescope Computers. More extensive information can be
found in the documentation bays in room D102 (to be reached via the software
room, D101) on the first floor of the INT building. Tape handling under ADAM,
in particular the initialisation and writing of FITS formatted D-Tapes during
or after observing, is described in detail in the relevant instrument manuals.

The normal practice is to leave the PE\,3210 Instrument Computer
up and running during daytime for development work. At the end of the night,
after data taking and tape dumps have finished, the instrument control 
software is shut down as described in chapter \ref{ch6:INT-close}.
  
\subsection {Normal Startup and Sign On} \label{ch9:stnorm}

\begin{enumerate}
\item 
 Check that the PE\,3210 is alive by pressing the \key{RETURN} key on  
 any terminal. An asterisk ``$*$'' response indicates that all is well.
 If there is no response you will have to bootstrap the computer:
 divert to Section \ref{ch9:stcold}.
 
\item
 Go to the System Terminal in the side room and type:  

\PE{D(ISPLAY) D(EVICES)} \hspace {2cm} (or {\tt D D})

 A listing of devices known to the system and their status will appear on the
 terminal. Check that the EGLE disk is on-line and write enabled. If not,
 divert to section \ref{ch9:stcold}.

\item 
 Sign on to the computer via the ADAM terminal in the Control Room: 
 There are eight account numbers (1-8) reserved for 
 visiting astronomers, of which normally 2 or 3 are already in use by someone
 else (staff and/or the previous observers). The accounts currently in use will
 be listed on the information board above the book shelves. Choose a vacant 
 account number, say {\it n\/}, and enter your initials to the information board
 as well as the date interval during which you reserve the account for your
 exclusive use. This interval is usually from the current date until about
 three days after the end of your run.
 Accounts that have expired are considered to be vacant. If you are desperately
 short of disc space ask your Support Astronomer or one of the software staff
 to delete all the files they may contain.
 Then sign on by typing:

\PE{SI(GNON) AXZ, n, n}

where AXZ are the initials of, or used by, the observer, {\it n} is the 
account number, and the second 
{\it n\/} is provided as a password (currently the same as the account number).
The initials provided are used in combination with the name of the detector 
or instrument to
be employed to compose the names of your data files, {\it e.g.\/} CCDAXZ.003; 
more than 4 initials will be truncated. \\
Note: It would be appreciated if observers use the initials of the Principal
Investigator of the PATT or CAT proposal under which the observing time was
granted. This is because the PI is the official owner of the data during the
proprietary period of one year, and the initials are included in the La Palma
Data Archive descriptors.

\item
If your sign-on is accepted, a number of system messages will be  
generated and you will be ready to run the instrument control 
software. However, that is another story altogether ... , and the
reader is here referred to the ADAM and appropriate Instrument Manuals.
\end{enumerate}
  
\subsection {Starting the Instrument Computer}
\subsubsection{Cold Start} \label{ch9:stcold}
 A `cold' ({\it i.e.\/} from the very beginning) startup of the PE 3210 will be
needed if there has been a power failure or system crash, or if the computer
has been closed down deliberately or accidentally ({\it e.g.} the pressing 
of the INIT key as described in item 4). After a power break it can take
some time before the power supply is restored. Wait for a message from the
Duty Officer for the Buffer Set to be restarted.
This will normally be done by the
Duty Technician or the Telescope Operator. If the power supply to the INT
building is in order, reboot as follows:

\begin {enumerate}
\item Check that the Instrument Computer and peripherals are powered up. If
not, see that the mains switch (high on the wall) is turned to position `1'.
 This 
switches on everything except the CPU and the Line Printer, which are powered
via an additional red socket on the wall behind the computer.

\item 
The 400 Mbyte EGLE disk is located below Magnetic Tape Drive number
 1.  Make sure that:
\begin{itemize}
\item
 The {\bf protect} switch is at OFF, {\it i.e.\/} in the position opposite ON.
\item
 The {\bf start} ON/OFF switch is at ON. If the EGLE was OFF it will take about
 a minute for the disk to reach operational speed after being switched on. The
 disk is powered up when:
\item
The three red lights (Start, Power On and Ready) on the front panel are all lit.
\end{itemize}

\item
Go to the computer rack with the `Perkin Elmer 3210' label.
 Press down two finger catches at the top so that the front panel
 comes away in your hands to reveal the consolette at the top inside. 
Check that the ENABLE/DISABLE switch on the consolette above the
computer is in the DISABLE position.

\item 
Press the INIT button on the PE 3210 consolette. This initialises the computer. 
If the machine refuses to cold start when the INIT button is pressed, check that
the little plastic key is turned to ON and not to STANDBY.

\item 
Replace the front panel.

\item 
The boot loading sequence will have started and you will be asked two questions
at the System Console. Answer as follows:

\begin {tabular}{llll}
\\
{\bf $*$DEV: } & {\tt DSC2} & \\
{\bf $*$VOL=SYS FILE= } & {\tt EGLE3210.LPO} & (Beware `{\tt 0}' and `{\tt O}')
\\
\\
\end{tabular}

The system will now be loaded and configured for your use, a process taking
approximately three minutes. Several messages will be generated
about discs being checked, and (after a previous power failure or crash) 
warnings can appear about possibly lost data, which can safely be ignored
(they are generated when the system closes files that are found to be open).
 
The punch line you are looking for is:
\vspace{0.3cm}

\centerline {END OF ENVIRONMENT CONFIGURATION}

If the line printer is off-line, an additional message will appear:
\vspace{0.3cm}

\centerline {.SPL: I/O error A009 on LP1 - Please correct}

This is just a warning and can again be ignored until you wish to use 
the printer.

\item 
The system is now up and running and you can proceed with
the normal Sign-on procedure at the ADAM terminal as described in the
previous Section \ref{ch9:stnorm}. 
\end{enumerate}

\subsubsection{Warm Start} \label{ch9:stwarm}
If the computer was shut down in a controlled manner, {\it e.g.\/} in 
anticipation of a power failure, then it can be `warm' restarted as follows:

\begin {enumerate}
\item
Check that the EGLE disc is ready:
\begin{itemize}
\item {\bf protect} switch OFF, {\it i.e.\/} in position opposite ON
\item {\bf start} switch ON.
\item Start, Power On and Ready lights all lit.
\end{itemize}
\item
Go to the system console, and check that the EGLE disc is ON with:

\PE{D D} 

If the device EGLE is OFF, then do:

\PE{MA EGLE:,ON,,CD=ALL}

\item
Subsequently, type:

\PE{STARTUP}

When the system is ready for use it will display the message:
\vspace{0.3cm}

\centerline{ END OF ENVIRONMENT CONFIGURATION}
\end{enumerate}

\subsection {Stopping the Instrument Computer} \label{ch9:shdown}
A controlled shut down of the PE\,3210 
({\it e.g.\/} in anticipation of a Power Failure) is done as follows: 
\begin {enumerate}
\item
Sign off all (three) terminals, if not yet done, by typing on each terminal:
\begin{itemize}
\item \PE{SO}
\end{itemize}

\item
Go to the System Terminal in the computer room and type:

\begin{itemize}
\item \PE{STOPALL}
\item \PE{OFF}
\end{itemize}
Wait for the message about the EGLE disc still being marked ON; then type:
\begin{itemize}
\item \PE{MA EGLE:,OFF}
\end{itemize}

\item
Go to the EGLE disc and:
\begin{itemize}
\item Switch the {\bf write protect} switch to ON
\item Switch the {\bf start} swith to OFF, {\it i.e.\/} the position 
opposite ON.
\end{itemize}
After a successful controlled shutdown, the Instrument Computer can be restarted
following the Warm Start procedure described in the previous Section 
\ref{ch9:stwarm}.
\end{enumerate}

\subsection{Problems with the EGLE disc}
\subsubsection{Shortage of Disc Space}
During a Cold Start (see Section \ref{ch9:stcold}) initialisation sequence one
of the tests done by the operating system is to determine the amount of free
space on the EGLE disc. Normally there should be several 100000 blocks 
available, but on occasion the disc may be nearly full. Ask your Support 
Astronomer to delete files (if any) from expired accounts.

Within the ADAM data acquisition software environment one can check how much
disc space is left with the commands CCDSPACE or DSPACE; use these commands
occasionally to keep track of the available disc space. If you do run out of
space then ADAM will write the next image (observation) into file R0 (normally
used for GLANCEs) and will display a warning that it has done so, and why.
Thus, if you are low on disc space be on the lookout for such a message.

Inside ADAM you can create more space by purging some of your files that you
have already written to the D-tape. Use the PURGE command, answer SYS to the
first prompt, and take it from there. If you try to PURGE a file that has
{\it not\/} been written to tape previously, you will get an error message
to the effect:

`FILE PROTECTED, ARE YOU SURE YOU WANT TO DELETE Y/N'

Reflect on this question, before answering! Pessimists don't purge before
their files have been copied to 1600\,BPI D-Tape and then recopied to 6250\,BPI
C-Tape. The copying program alerts the operator to possibly corrupted files
on the D-Tape. Therefore, it is a good idea to use the {\bf verify} option of
the FITSOUT programme when saving data files on the D-Tape. Writing a file to
D-Tape unprotects the disc file.

As an alternative to PURGE you can use the DELETE command to delete files
{\it m} to {\it n}:

\PE{DELETE R{\it m}\,$-$R{\it n}}

The DELETE command will ignore protected files (and not prompt for a decision).
If you are very sure, you can unprotect a data file with:

\PE{REPROTECT/WKEY=0,189 R{\it m\/}$-$R{\it n}}

Finally, if the cleanup of disc space was prompted by ADAM writing an 
observation into R0, don't forget to KEEP that data file!

\subsubsection{``Funny Images'': DMA Transfer Problems and Bad Disc Sectors}
Occasionally, you will get a funny looking image which looks as if one part
has slipped relative to the other, or has bars across it or some equally
obvious fault. The most likely cause is a fault occurring during the
transfer of the image from detector to disc. In order to check this, look
a few lines back on the ADAM screen for a line to the effect:

`Time-out during DMA transfer'

If you do find this message then the image is hopelessly corrupted and cannot
be recovered. The observation is unfortunately lost; you may as well PURGE
the file at once, and use the NEXTRUN command to reset the run number if you
do not want an hiatus in the numbering of your observations. After a failed
DMA transfer the next observation usually transfers without difficulty. You
can do a CCDINIT, but there is no clear evidence that this makes subsequent
transfers any more reliable.

However, {\bf if you do NOT find} an error message about DMA transfer problems,
then your image has probably been written on to an irrecoverably corrupt
sector of the EGLE disc. In this case do NOT purge or delete the file! Instead,
leave the file as it is, but don't copy it to tape, because the image is
corrupted forever and you cannot do anything about it, except repeat the
observation. Further, leave a note to the software group to the effect that
file R{\it n} on account {\it m} is written on a corrupt sector of the EGLE.
They will then rename the file to a hidden account, leaving the data on the
disc, which effectively prevents ADAM from trying to use that part of the
disc again. Therefore, whatever you do, DO NOT DELETE the file, as the software
group won't be able to find the corrupted area again until some unfortunate
following observer, or indeed you yourself, succeeds in putting a (necessarily
corrupted) image on it.
By following this policy quite a number of bad sectors on the disc are now
protected from being used by ADAM, and faults of this nature are now rarely
encountered.

The worst variation of the aforementioned problem is that your GLANCE files
are written on a bad sector: doing a new GLANCE simply will write on the same
bad sector. The only way out is to KEEP the glance file with the faulty image,
which is then renamed to R{\it n}, and inform the software staff as before
about the corrupted file. Subsequent GLANCEs will be directed to a different
part of the disc.

\vfill
\eject
