\section{Start and operate with high voltage FSM}

There are two different types of high voltage program. Both are running on the HV03. First, there is the isegCANHVControl, and the second is the PVSS project trd\_hv200711.

\subsection{isegCANHVControl}

\begin{compactitem}
\item Remotedesktop on HV03
\item Start the program \select{isegCANHVControl}
\item Open the profile \select{TRD\_SMint\_MS\_2007\_v01.prf}
\end{compactitem}
%\vspace{\baselineskip}


\subsection{PVSS trd\_hv200711}
Start and work:
\begin{compactitem}
\item Remote desktop to HV03
\item Open the \select{PVSS II Console} and wait until the Log Viewer is open.
\item Start the project \select{trd\_hv200711}
\item Be sure that the \select{isegHVOPCServer}, visible in another window, is running correctly and identifies 8 different EHQ modules. Otherwise restart the crate.
\item Open the \select{DeviceEditorNavigator}, which is one option in the Console.
\item Select \select{FSM}, operate in \select{Navigator Mode} and open the tree under trd\_hv to \select{Supermodule}
\item Click the button \select{start / restart all}. This will start all devices.  Wait until the information window vanishs.
\item Click the right mouse button on Supermodule and select \select{View}. This will open the top panel \select{supermodule: top}
\item \select{Unlock} to operate with the FSM. Wait until the whole supermodule is in the status \select{stby\_configured}. If the supermodule remains in the status \select{downloading}, restart the hv supply and control that the OPCServer is running correctly.
\item Set values for \select{beam tuning}  in the \select{Recipe Value} of the top panel 
  \begin{compactitem}
    \item First set all values to zero and then
    \item Anode: 500 volts and 0.01 mA
    \item Drift: 500 volts and 0.25 mA
  \end{compactitem}
\item (\grq ready \grq is a second option only used at beam time)
\item After the status \grq downloading\grq the system will again become\grq stby\_configured\grq.
\item Start ramping the voltage of the channels is possible in three ways:
  \begin{compactenum}
    \item Change the status of the whole system: Click the right mouse button on the highest \select{system}, here it is supermodule, and choose \select{go\_intermediate} or \select{go\_on}. This will ramp up all children of this system, i.e. all channels of the whole supermodule. All selected channels will arive the status \select{ beam\_tuning}.
    \item Change the status of a \select{subsystem}: By double click on the subsystems name you get a panel of it. So you can get the whole tree down, which opens with every step one window. Then you are able to change the status of one subsystem. For that you click the right mouse botton on the name of one subsystem and choose one option like \select{go\_intermediate}. In the channel panel, the deepest panel, you can choose the option \select{channel on} and control on this way only one channel.
    \item Go into the DeviceEditorNavigator. From the icon of \select{supermodule}  you open the tree and get to the icons of the subsystems. The windows for each subdevice can be opened by selecting the option \select{View} on the right mouse button. This is the shortest way, if you want to inspect only on channel.
  \end{compactenum}
\item To observe the voltage and current of every drift or anode channel, click on \select{Drift Channel} oder \select{Anode channel} on the top panel. If any channel has an alarm, you click on \select{Settings} of this channel and choose \select{Ack Alarm}. In this setting window you can control additionally everything of this single channel.
\item If you want to observe the developing of the current and voltage, you can go to the pannel of one channel. Here you see the current values and a plot of both. It is possible to scale the axis in the \select{trending window}. Therefor you put the curser in it and scroll it up or down.
\item The state diagramm shows all possible states of the systems and subsystems.\footnote{Drawing by Kengo Watanabe}
\end{compactitem}
\begin{center}
\includegraphics[width=\textwidth]{statediagram_hv.jpg}
\end{center}
\vspace{\baselineskip}


Change the logical connection between channels and  FSM
\begin{compactitem}
\item Open the \select{DeviceEditorNavigator}
\item Switch to \select{Editor Mode} and choose the tap \select{Logical}
\item Open the tree from Supermodule, to StackX, LayerX, Anode or Drift. Under this point there ist the point AnodeLayerX or DriftLayerX.
\item Remove this icon.
\item Click on the remained icon and choose the option \select{add from hardware}
\item In this window you can choose the new channel you want to use. Rename it in the logical window to AnodeLayerX or DriftLayerX.
\item Switch in the DeviceEditorNavigator to FSM. Under the right mouse button choose the option \select{Generate FSM}. 
\item Start the FSM in the way described above.
\end{compactitem}
