\section{EPICS MCS}
%
\textit{Module: \textbf{epics.mxo}}
\newline

The MX \textit{epics\_mcs} driver is used to operate a multichannel scaler
controlled by the EPICS MCA record provided by the University of Chicago.

MX support for EPICS-controlled multichannel scalers
optionally can make use of globally visible
dark current values.  This is done by loading an additional 
EPICS analog output record per MCS channel which is used to store
the dark current value.  This is most easily described by giving
an example.

Suppose you have a set of MCS records loaded in the EPICS ``st.cmd'' script
that look like
\begin{verbatim}

dbLoadRecords("mcaApp/Db/mca.db","P=s10id:,M=mcs1,CARD=0,SIGNAL=0,DTYPE=Struck STR7201 MCS,NCHAN=2000", share)
dbLoadRecords("mcaApp/Db/mca.db","P=s10id:,M=mcs2,CARD=0,SIGNAL=1,DTYPE=Struck STR7201 MCS,NCHAN=2000", share)
dbLoadRecords("mcaApp/Db/mca.db","P=s10id:,M=mcs3,CARD=0,SIGNAL=2,DTYPE=Struck STR7201 MCS,NCHAN=2000", share)
dbLoadRecords("mcaApp/Db/mca.db","P=s10id:,M=mcs4,CARD=0,SIGNAL=3,DTYPE=Struck STR7201 MCS,NCHAN=2000", share)

\end{verbatim}

Then, all that you need to add to support dark currents for these
channels is to add something like the following lines to ``st.cmd''.
\begin{verbatim}

dbLoadRecords("iocBoot/ioc1/mcs_dark.db","P=s10id:,M=mcs1", top)
dbLoadRecords("iocBoot/ioc1/mcs_dark.db","P=s10id:,M=mcs2", top)
dbLoadRecords("iocBoot/ioc1/mcs_dark.db","P=s10id:,M=mcs3", top)
dbLoadRecords("iocBoot/ioc1/mcs_dark.db","P=s10id:,M=mcs4", top)

\end{verbatim}

The \textit{mcs\_dark.db} database file is extremely simple.
The entire contents of the file is:
\begin{verbatim}

grecord(ao,"$(P)$(M)_Dark") {
        field(PREC,"3")
	}

\end{verbatim}

A copy of this file may be found in the MX base source distribution in
the file \textit{mx/driver\_info/epics\_mcs/mcs\_dark.db}.

\ \newline
\MxEpicsZmcsDriverFields
\newline

