> MCP2 mscb008:(1,43) NHQ 204M PHVR400_1 mscb008:(400,1) pos. NHV400 PHVR400_2 mscb008:(400,5)   PHVR400_3 mscb008:(400,9)   PHVR400_4 mscb008:(400,13)   PHVR400_5 mscb008:(400,17)   NHVR400_1 mscb008:(400,21) neg. NHV400 NHVR400_2 mscb008:(400,25)   NHVR400_3 mscb008:(400,29)   NHVR400_4 mscb008:(400,33)   NHVR400_5 mscb008:(400,37)   \section mscb MIDAS Slowcontrol Bus (MSCB)

The MSCB is development at PSI (http://www.psi.ch/) driven by Stefan Ritt (stefan.ritt@psi.ch) and Reinhard Schmidt (reinhard.schmidt@psi.ch). Their very sparse documentation page is found under http://midas.psi.ch.

This bus is a kind of "poor man's" version of a field bus with less flexibility, but on the other hand it is optimized for experiment environments and much cheaper (typical 20US$ per node). Although this bus is integrated into the MIDAS data acquisition system, it can be used independently from Midas.

The MSCB bus uses the RS-485 standard for commication. This standard is similar to the well-known RS-232, but uses differential signals for superior noise immunity. The bus is controlled from a PC using an parallel port to RS-485 converter. On each bus segment, up to 256 nodes can be connected in parallel. Using one layer of repeaters, 65536 nodes can be operated on a single bus, which makes the MSCB bus suitable for large experiments typically found in high energy physics. The bus protocol uses an addressing scheme to talk to individual nodes. Multi-master operation is possible using a token-ring scheme. \subsection mscb_device_list MSCB Devices used in the Nemu Experiment

Here comes the list of the MSCB modules/devices used in the Nemu experiment: - \ref scs250 - \ref scs210 - \ref scs400 - \ref scs900 \subsubsection scs250 MSCB USB submaster

The scs250 is a USB computer interface to the MSCB bus. The detailed description how to get it running under linux is found here http://pc3159:8000/Computing/63. There are two versions of the scs250 available: - USB powered, i.e. the scs250 and the MSCB bus are than powered via the USB port. This is quite limited but nice for testing. - MSCB powered. There must be somewhere in the MSCB network a power supply feeding the MSCB bus. Do not try to mix them! If there is a power supply feeding the MSCB network (e.g. SCS crate), the USB powered scs250 unit needs to be reconfigured (jumper inside the box ... detials to come ...) in order to be fed by the bus and NOT by the USB port. \subsubsection scs210 MSCB RS232 interface module

The scs210 is a RS232 interface to the MSCB bus. \subsubsection scs400 MSCB Thermo Coupler Card

8 channel thermo coupler card with digital output to control a power thyristor box. \subsubsection scs900 MSCB ADC/DAC card

8 cannel ADC/DAC card. ADC channels -10 to„n="center">  SCS1001_PUMP 52 mscb007:(1,1) (Group, Node) SCS400 60 mscb006:(1,10)   SampleCryo 70 (2)   ModCryo 71 (3)   HV 72 psts04:4015 FUG's HV Detectors 73 (4)   Danfysik 81 psts04:4029   Bruker 82 psts04:4021   LEMVAC 100 lemvacuum:2000  

(1)
Name Port Comment
SCS900_1 mscb006:(1,1) (Group, Node)
SCS900_2 mscb006:(1,2)  
SCS900_3 mscb006:(1,3)  
SCS900_4 mscb006:(1,4)  
(2)
Name Port Comment
LS340_Sample psts04:4019  
Bronkhorst psts04:4022  
(3)
Name Port Comment
LS340_CF psts04:4017  
LS340_Shield psts04:4018  
XTC psts04:4023  
LN2 psts04:4024 Twickenham
West6100 psts04:4028  
(4)
Name Port Comment
TD1 mscb008:(1,41) (Group, Node)
NHQ 205M
TD2 mscb008:(1,42) NHQ 205M
MCP1 mscb008:(1,43) NHQ 204MThe FUG's are the high volatge source for the low energy muon beamline (tertiary beamline). There are at the moment 12 such HV devices with different maximal high voltage. Since these devices have only an analog inputs to control the high voltage and the current limit, an additional hardware interface is used, in order to enable a computer controlled operation. This hardware interface consists of field point modules from 'National Instruments'. \subsection hvr400 MSCB HVR400 High Voltage Modules

To be written yet ... \subsection k2700 Keithley 2700 Multimeter

The Keithley 2700 multimeter, including a 7700 scanner card, is misused for multiple purposes. It is measuring the valve positions of the UHV system of the apparatus, measuring the LN2 level of the 'DeMaCo' LN2 system, measuring the current sent through the electromagnet via zero flux meter, monitors thermoelements, ... \subsection ls340 LakeShore Temperature Controller (Type 340)

The temperature controller are used to monitor and control the temperature of the sample cryostates as well as to monitor the temperature of the moderation cryostate. \subsection lemvacDD Vacuum Control Interface

The vacuum controller device driver (lemvac) handles the communication between the Nemu Siemens SPS vacuum control unit and MIDAS. There is a Qt GUI (\ref lemvac) available which presents the informations in an user friendly way. \subsection ltc21 Neocera LTC-21 Temperature Controller

We use this temperature controller for our moderation cryostat. It is mainly used as a monitor device. \subsection mirror Mirror Controller

The mirror controller can change/read the angular setting of the mirror of the tertiary beamline. The mirror is used to separate the low energy muons from the high energy ones. The mirror controller is a home build MONSTER with an RS232 interface programmed in some BASIC dialect, which is slow and errorsome. \subsection scs400DD MSCB SCS400 Thermo Coupler Card

8 channel thermo coupler card with digital output to control a power thyristor box. \subsection scs900DD MSCB SCS900 ADC/DAC Card

8 cannel ADC/DAC card. ADC channels -10 to 10V, 16 bit. DAC -10 to 10V, 12bit. \subsection twickenham LN2 Level Meter, Twickenham

The twickenham LN2 level meter is used to monitor the LN2 level in one of our 200l LN2 dewars. \subsection west6100 Needle Valve Controller 'West 6100' for the moderation cryostat 'Moddy'

The multi purpose PID controller 'West 6100' is used in our experiment as a needle valve controller for the moderation cryostate (called 'Moddy'). The needle valve is tuning the amount of LHe the cold finger region of Moddy can enter. \subsection xtc Microbalance Controller, XTC

The XTC is a microbalance controller connect to a crystal oscillator which is used to measure the deposition rate/thickness of the Van der Waals gases used to grow the moderator. \section nemu_midas_event_ids Nemu MIDAS Event ID's List

MIDAS handles events via envent id's (EID). The EID are used to handle the events also in the history system (mlogger).

In order to put some logic into the system we decided that the EID will have the following general structure.
EID Purpose
<50 Fast hardware related events
>50 Slow controll related events

Here is the table of the Nemu experiment EID.
Name Event ID Port Info Comment
SCS900 51 (1) class driver default names for the labels in the ODB of the different chanels. \subsection cmd_get CMD_GET

Linked to this tag, an get routine of the DD is called. This get routine has the following purpose: It reads a measured value from the device with the help of the bus driver. The bus driver binding is done via macros (which is not the most beautiful approach.) \subsection cmd_set CMD_SET

Linked to this tag, an set routine of the DD is called. This set routine has the following purpose: It sends a demand value to the device with the help of the bus driver. The bus driver binding is done via macros (which is not the most beautiful approach.) \subsection cmd_set_label CMD_SET_LABEL

Linked to this tag, an set label routine of the DD is called. Have no idea what the meaning of this label is. It is not used in any of our DD. \subsection cmd_get_demand CMD_GET_DEMAND (gerneric, hv)

Linked to this tag, an get demand routine of the DD is called. This get demand routine has the following purpose: It reads the demand value from the device back, this with the help of the bus driver. The bus driver binding is done via macros (which is not the most beautiful approach.) \subsection cmd_get_default_threshold CMD_GET_DEFAULT_THRESHOLD (gerneric)

This command tag is not used in any of our DD. \subsection cmd_get_all CMD_GET_ALL (hv)

Linked to this tag is a routine which reads back all the high voltage values of all the channels of the HV device. \subsection cmd_get_current CMD_GET_CURRENT (hv)

Linked to this tag is a routine which reads back all the measured current value of a specific channel of the HV device. \subsection cmd_get_current_all CMD_GET_CURRENT_ALL (hv)

Linked to this tag is a routine which reads back all the measured current values of all the channels of the HV device. \subsection cmd_set_all CMD_SET_ALL (hv)

Linked to this tag is a routine which sets all the demand high voltage values of all the channels of the HV device. \subsection cmd_set_current_limit CMD_SET_CURRENT_LIMIT (hv)

Linked to this tag is a routine which sets the current limit of a specific channel of the HV device. \subsection cmd_set_current_limit_all CMD_SET_CURRENT_LIMIT_ALL (hv)

Linked to this tag is a routine which sets the current limits of all the channels of the HV device. \section list List of the device drivers (DD) used in the LE-uSR experiment - \ref bronkhorst Mass Flow Meter (bronkhorst.h, bronkhorst.c) - \ref bruker (bruker.h, bruker.c) - \ref fug (hv_fug.h, hv_fug.c) - \ref hvr400 (hvr400.h, hvr400.c) - \ref ls340 LakeShore 340 (LakeShore340.h, LakeShore340.c) - \ref lemvacDD (lemvac.h, lemvac.c) - \ref mirror (mirror.h, mirror.c) - \ref scs400DD (scs400.h, scs400.c) - \ref scs900DD (scs900.h, scs900.c) - \ref twickenham (twickenham.h, twickenham.c) - \ref west6100 (west6100.h, west6100.c) - \ref xtc (xtc.h, xtc.c) \subsection bronkhorst Bronkhorst

The bronkhorst mass flow meter for He gas is used together with the 'BS Cryovac' (temperature range 4.5K - 300K) and the 'Mango Cryo' (temperature range 2K - 300K). For the 'BS Cryovac' it is placed between the cryo and the alcatel try pump and is regulating the He gas flow (for details regarding the operatrion of the bronkhorst flow meter see the operation manual for the 'BS Cryovac'). In case of the 'Mango Cryo' the bronkhorst is regulating the He gas flow at the phase separator. \subsection bruker Bruker Power Supply

The bruker power supply (0..500A, max. 75V) is used as the current source for the electromagnets generating the magnetic field for TF-uSR ex„p>Every DD has an entry function which looks something like:

INT bruker(INT cmd, ...)
{
va_list argptr;
HNDLE   hKey;
INT     channel, status;
float   value, *pvalue;
void    *info, *bd;
char    *name;
DWORD   flags;

  va_start(argptr, cmd);
  status = FE_SUCCESS;

  switch (cmd) {
    case CMD_INIT:
      hKey = va_arg(argptr, HNDLE);
      info = va_arg(argptr, void *);
      channel = va_arg(argptr, INT);
      flags = va_arg(argptr, DWORD);
      bd = va_arg(argptr, void *);
      status = bruker_init(hKey, info, channel, bd);
      break;

    case CMD_EXIT:
      info = va_arg(argptr, void *);
      status = bruker_exit(info);
      break;

    case CMD_GET:
      info = va_arg(argptr, void *);
      channel = va_arg(argptr, INT);
      pvalue  = va_arg(argptr, float*);
      status = bruker_get(info, channel, pvalue);
      break;

    case CMD_GET_DEFAULT_NAME:
      info    = va_arg(argptr, void *);
      channel = va_arg(argptr, INT);
      name    = va_arg(argptr, char *);
      status  = bruker_get_default_name(info, channel, name);
      break;

    case CMD_SET:
      info = va_arg(argptr, void *);
      channel = va_arg(argptr, INT);
      value   = (float) va_arg(argptr, double);
      status = bruker_set(info, channel, value);
      break