\section{Spellman DF3/FF3 Series High Voltage Power Supplies}
The
\MxLink{http://www.spellmanhv.com/tech/pdf/DF3FF3MAN.pdf}
{Spellman DF3/FF3 series}
\textit{(http://www.spellmanhv.com/tech/pdf/DF3FF3MAN.pdf)}
of high voltage power supplies for X-ray generator systems.
MX communicates with the power supply via an RS-232 link.

The available drivers include:
\begin{center}
\begin{tabular}{ll}
\textit{spellman\_df3} 
	& - Communicates with the power supply via RS-232.\\
\textit{spellman\_df3\_ain}
	& - Reports the value of the voltage, current, or filament current.\\
\textit{spellman\_df3\_aout}
	& - Controls the setpoint for the voltage, current, power limit,
		or filament current limit.\\
\textit{spellman\_df3\_din}
	& - Turns the X-ray generator on/off or resets a power supply fault.\\
\textit{spellman\_df3\_dout}
	& - Reports the X-ray on status or any of the fault conditions.\\
\end{tabular}
\end{center}

The record fields for the \textit{spellman\_df3} driver are:
\newline\ \newline
\begin{tabular}{|c|c|c|c|p{60mm}|}
\hline
\MxTextFieldName & \MxTextFieldType & \MxTextNumDimensions 
	& \MxTextSizes & \MxTextDescription \\
\hline
\multicolumn{5}{|c|}{\linkrecordfields} \\
\hline
\textit{rs232\_record} & string & 1 & 0 &
	Name of the RS-232 port used to communicate with the
	Spellman power supply.\\
\hline
\textit{query\_interval} & double & 0 & 0 &
	Minimum time interval between hardware queries.\\
\hline
\textit{default\_power\_limit} & hex & 0 & 0 &
	Default value for the power limit specified as a
	hexadecimal integer.\\
\hline
\textit{default\_filament\_current\_limit} & hex & 0 & 0 &
	Default value for the filament current limit specified as a
	hexadecimal integer.\\
\hline
\end{tabular}
\newline\ \newline

The RS-232 command language for the Spellman power supply only supports
a single `Q' command that reports all of the analog and digital input
values at once.  Since there are 12 of these values, reading out all of
them can lead to a lot of redundant polling.  The purpose of the
\textit{query\_interval} field is to specify a minimum time in seconds
between `Q' commands.  If a client asks for an input value before the
minimum time has elapsed, the values cached from a previous call to `Q'
are returned instead.

%--------------------

The record fields for the \textit{spellman\_df3\_ain} driver are:
\newline\ \newline
\begin{tabular}{|c|c|c|c|p{60mm}|}
\hline
\MxTextFieldName & \MxTextFieldType & \MxTextNumDimensions 
	& \MxTextSizes & \MxTextDescription \\
\hline
\multicolumn{5}{|c|}{\linkainputfields} \\
\hline
\textit{spellman\_df3\_record} & record & 0 & 0 &
	The Spellman power supply record.\\
\hline
\textit{input\_type} & double & 0 & 0 &
	The type of input used for this record.\\
\hline
\end{tabular}
\newline\ 

\ \newline
The \textit{input\_type} field can have any of the following values:
%
\begin{itemize}
  \item[\textbf{0}] - Voltage ( 0 to 0x3FF, 60 kV max )
  \item[\textbf{1}] - Current ( 0 to 0x3FF, 80 mA max )
  \item[\textbf{2}] - Filament current ( 0 to 0x3FF, 5 amps max )
\end{itemize}

%--------------------

\ \newline
The record fields for the \textit{spellman\_df3\_aout} driver are:
\newline\ \newline
\begin{tabular}{|c|c|c|c|p{60mm}|}
\hline
\MxTextFieldName & \MxTextFieldType & \MxTextNumDimensions 
	& \MxTextSizes & \MxTextDescription \\
\hline
\multicolumn{5}{|c|}{\linkaoutputfields} \\
\hline
\textit{spellman\_df3\_record} & record & 0 & 0 &
	The Spellman power supply record.\\
\hline
\textit{output\_type} & double & 0 & 0 &
	The type of output used for this record.\\
\hline
\end{tabular}
\newline\ 

\ \newline
The \textit{output\_type} field can have any of the following values:
%
\begin{itemize}
  \item[\textbf{0}] - Voltage setpoint ( 0 to 0xFFF, 60 kV max )
  \item[\textbf{1}] - Current setpoint ( 0 to 0xFFF, 80 mA max )
  \item[\textbf{2}] - Power limit ( 0 to 0xFFF, 4 kW max )
  \item[\textbf{3}] - Filament current limit ( 0 to 0xFFF, 5 amps max )
\end{itemize}

%--------------------

\ \newline
The record fields for the \textit{spellman\_df3\_din} driver are:
\newline\ \newline
\begin{tabular}{|c|c|c|c|p{60mm}|}
\hline
\MxTextFieldName & \MxTextFieldType & \MxTextNumDimensions 
	& \MxTextSizes & \MxTextDescription \\
\hline
\multicolumn{5}{|c|}{\linkdinputfields} \\
\hline
\textit{spellman\_df3\_record} & record & 0 & 0 &
	The Spellman power supply record.\\
\hline
\textit{input\_type} & unsigned long & 0 & 0 &
	The type of input used for this record.\\
\hline
\end{tabular}
\newline\ 

\ \newline
The \textit{input\_type} field can have any of the following values:
%
\begin{itemize}
  \item[\textbf{0}] - kV minimum fault
  \item[\textbf{1}] - overcurrent fault
  \item[\textbf{2}] - overpower fault
  \item[\textbf{3}] - overvoltage fault
  \item[\textbf{4}] - filament current limit fault
  \item[\textbf{5}] - power supply fault
  \item[\textbf{6}] - X-ray on indicator
  \item[\textbf{7}] - interlock status
  \item[\textbf{8}] - control mode indicator
\end{itemize}

%--------------------

\ \newline
The record fields for the \textit{spellman\_df3\_dout} driver are:
\newline\ \newline
\begin{tabular}{|c|c|c|c|p{60mm}|}
\hline
\MxTextFieldName & \MxTextFieldType & \MxTextNumDimensions 
	& \MxTextSizes & \MxTextDescription \\
\hline
\multicolumn{5}{|c|}{\linkdoutputfields} \\
\hline
\textit{spellman\_df3\_record} & record & 0 & 0 &
	The Spellman power supply record.\\
\hline
\textit{output\_type} & unsigned long & 0 & 0 &
	The type of output used for this record.\\
\hline
\end{tabular}
\newline\ 

\ \newline
The \textit{output\_type} field can have any of the following values:
%
\begin{itemize}
  \item[\textbf{0}] - X-rays on (Writing 1 turns them on; 0 turns them off)
  \item[\textbf{1}] - X-rays off (Writing 1 turns them off; 0 turns them on)
  \item[\textbf{2}] - Power supply reset
\end{itemize}

\ \newline

%--------------------

The following is an example database for the Spellman DF3/FF3 power supply:
\begin{verbatim}
spellman_rs232 interface rs232 tty "" "" 9600 8 N 1 N 0x0d 0x0d 1 0x0 /dev/ttyS0
spellman interface controller spellman_df3 "" "" spellman_rs232 1 0x1ff 0x1ff
#
voltage_cmd     device analog_output spellman_df3_aout "" "" 0 0.0146520 0 kV 0x0 spellman 0
current_cmd     device analog_output spellman_df3_aout "" "" 0 0.0195360 0 mA 0x0 spellman 1
#
xrayson_cmd     device digital_output spellman_df3_dout "" "" 0 spellman 0
xraysoff_cmd    device digital_output spellman_df3_dout "" "" 0 spellman 1
power_reset     device digital_output spellman_df3_dout "" "" 0 spellman 2
#
voltage         device analog_input spellman_df3_ain "" "" 0 0.0586510 0 kV 0x0 0 "" spellman 0
current         device analog_input spellman_df3_ain "" "" 0 0.0782014 0 mA 0x0 0 "" spellman 1
filament        device analog_input spellman_df3_ain "" "" 0 0.0782014 0 A 0x0 0 "" spellman 2
#
kv_min_fault    device digital_input spellman_df3_din "" "" 0 spellman 0
ovcurrent_fault device digital_input spellman_df3_din "" "" 0 spellman 1
ovpower_fault   device digital_input spellman_df3_din "" "" 0 spellman 2
ovvoltage_fault device digital_input spellman_df3_din "" "" 0 spellman 3
fil_curr_fault  device digital_input spellman_df3_din "" "" 0 spellman 4
power_sup_fault device digital_input spellman_df3_din "" "" 0 spellman 5
xrays_on        device digital_input spellman_df3_din "" "" 0 spellman 6
interlock_state device digital_input spellman_df3_din "" "" 0 spellman 7
remote_mode     device digital_input spellman_df3_din "" "" 0 spellman 8
\end{verbatim}

