\title{The MSCB bus - a field bus tailored to particle physics experiments}
\author{S.~Ritt$^{1}$, R.~Schmidt$^{1}$ }
% You can optionally add the proposal numer and institutes, e.g.
\collaboration{R-99-05}{PSI$^{1}$}
% \abstract{ put your abstract here, this is optional}
\begin{contribution}
Particle physics experiments require what is commonly referred to as "slow control". This includes the measurement and control of environment variables such as temperature, pressure and humidity as well as the control of high voltages for photomultipliers and wire chambers. While most experiment use an inhomogeneous mix of systems involving RS232, GPIB and PLCs, the MUEGAMMA experiment (R-99-05) will use a new slow control system developed at PSI, called MSCB (Midas Slow Control Bus). This system will be used for the 960 high voltage channels of the experiment, for the control of the liquid xenon calorimeter and for the superconducting solenoid. The integration of all these systems into the central data acquisition and control system is essential for the long-term stability of the experiment.
The MSCB system uses a field bus- like architecture, where a number of "nodes" are connected to a serial bus, which is controlled by a central PC. Each node contains ADCs, DACs and digital I/O for measurement and controlling tasks. For critical installations the control PC can be backed up by a secondary PC for redundancy. The PCs are connected to the Midas DAQ system~\cite{R99-05:midas}, which allows for remote operation through a Web interface, history display, automatic alarm notification and for logging of slow control variables to tape.
The hardware of a MSCB node is designed around a new generation of microcontrollers, which contain a 8051- compatible microcontroller core, ADCs, DACs and digital I/O on a single chip. We currently use the ADuC812~\cite{R99-05:aduc} from Analog Devices and the C8051F000 from Cygnal~\cite{R99-05:cygnal}. The nodes are connected via an RS-485 bus running at 384 kBaud. A segment can contain 256 nodes, and with one layer of repeaters 65536 nodes can be connected and addressed on a single bus. Two versions of MSCB nodes have been developed. A stand-alone module (Fig.~\ref{R99-05:node}) which can be embedded directly on a sensor or on an electronics board is powered from the bus, which uses a 10-wire twisted pair flat ribbon cable for distances up to 500 m. The production cost of such a node is about 50 CHF. A development kit for the Cygnal controller which includes a C compiler costs 99 US\$.
\begin{figure}[htb]
\centering
\includegraphics[width=1.0\linewidth]{R99-05-fig1.eps}
\caption{Stand-alone node with an RS-485 transceiver, eight channel 12-bit ADC, two channel 12-bit DAC, 16-bit digital I/O and a temperature sensor. The right connector is for the MSCB bus, the one at the back for an optional LCD display.}
\label{R99-05:node}
\end{figure}
In addition to the stand-alone module, a 19" rack system which hosts cards containing a MSCB node and signal conditioning, has been designed. Cards were made for voltage, current and temperature measurements as well as to control 220V consumers such as heaters. The MSCB bus runs on the back plane of the crate.
Using the local intelligence of the node controller, regulation loops (PID) and interlock systems can be realized without intervention of the central control PC. The nodes run a simple framework for the communication with the host system, which guarantees real-time behaviour. User routines can be added to implement application- specific logic. The nodes can be reprogrammed over the RS-485 bus.
The MSCB protocol was optimised for minimal overhead. A 16-bit value from a node can be read out by sending a request of three bytes and receiving an reply of four bytes, both including a code (CRC) to avoid data corruption. Depending on the number of nodes, a MSCB system can either use 8-bit or 16-bit addressing. A node can contain up to 256 "channels" for reading and writing and up to 256 "configuration parameters", which are stored in the EEPROM of the node and can for example be used as constants for PID regulation. Each channel and parameter is described by a set of attributes such as name, physical units and status. These attributes are stored in each node and can be queried from the control PC, making the configuration of large networks very simple. A special repeat mode has been defined which allows the readout of a series of nodes in less than 300 $\mu s$ per node.
For the control PC a "C" library has been developed running under Windows and Linux. Based on this library, a LabView driver and a driver for the Midas DAQ system are available. Simple LabView applications such as a data logger with graphical display has been implemented.
A prototype of the MSCB rack system is currently used for the pressure and high voltage control of the new proportional chamber for the SINQ POLDI detector.
The final system will be available from the PSI electronics pool in spring 2002 upon request. It can be concluded that the MSCB system is an attractive alternative to GPIB multimeters and to Programmable Logic Controllers with respect to cost and integration. For more information visit the MSCB home page at http://midas.psi.ch/mscb.
\begin{thebibliography}{9}
\bibitem {R99-05:midas} MIDAS home page http://midas.psi.ch
\bibitem {R99-05:aduc} http://products.analog.com/products/info.asp?product= AduC812
\bibitem {R99-05:cygnal} http://www.cygnal.com/products/C8051F000.htm
\end{thebibliography}
\end{contribution}
|