MVD ancillary software




  1. making contact
  2. lv control
  3. custom ADC readout
  4. mvd temperatures
  5. relay board control
  6. spy line switching


The programs are located in phenix14:/usr1/mvdonl/vme/
 

Making contact

In the current configuration, the ancillary systems are controlled by plain C programs that run in the VME processor.

Power up the VME. It goes to phenix14:/usr1/mvdonl/boot/boottest to load various programs described here.

To gain access to the VME, simply telnet to iocondev8, and you should get a -> prompt. If you do not get in, chances are that someone else is already logged in, and this is a one-user system. You can detect this state by pinging the vme crate. If there is a response, the processor likely has not crashed.

If no one is logged in and/or there is no response to a ping, the processor needs to be rebooted. Push the red reset button on the mvme162. This cannot be done remotely, so John Haggerty will connect the console to a terminal server in the area, and a ^x will cause a reboot. (more detail needed here).

If all else fails, cycling the power on the crate will also cause a reset. This can be done using the LV controls via the rack monitor system. (more details)

Once you have logged in, type 'help'. This will show the currently installed programs.

To log out, type 'logout'.

If you type 'help', you'll get this menu:

  +-------------------------------------------------------------+
  |                                                             |
  |                         MVD CONTROLS                        |
  |                                                             |
  +-------------------------------------------------------------+
  |                                                             |
  |              programs available:                            |
  |                                                             |
  |  iotest      read and manipulate the pins on the I/O units  |
  |  lv          control the Low Voltage distribution boards    |
  |  relay       control the relay board (fans, pumps and LV)   |
  |  temps       read the MCM and mother board temperatures     | 
  |  cadc        custom ADC readout                             |
  |                                                             |
  | [spy         control the spy line multiplexer]              |
  | [cooling     read the cooling system temps, flows etc]      |
  |                                                             |
  +-------------------------------------------------------------+
 

LV control

The MVD LV has 4 levels of control: At the top, the whole rack is switched off by the phenix safety systems in case of emergency. Second, the LV console in the CR allows you to switch off LV supply modules one 'brick' at a time. Next the 'relay board' can switch off all supplies for the east half, or the west half of the MVD. Program 'relay' allows you to override this. At the lowest level, you can switch the voltage to individual MCM groups. The sofware described in this section deals with this lowest level

Each of the LV distribution boards serves a group of 6 MCM's (groups 1-7), or delivers power to the motherboard (group 8). There are total of 16 distribution boards. In Year-1, only 8 are used for 2 motherboards. Typing lv gives you the menu:

 
         +---------------------------------------------------+ 
         |  mb n            choose mother board  n (n=1-4)   |
         |  on/off m        turn group m on/off (m=1-8)      |
         |  view mvd/crate  changes display of 'show'        |
         |  show            show current status              |
         |  exit, quit,x,q  exit the program                 | 
         +---------------------------------------------------+ 
 MVD LV>>
command 'show' shows the front of the LV distribution boards:
             slot in the distribution board vme crate     
          1   2   3   4   5  6  7  8   9 10 11 12  13 14 15 16  
         --------------- ------------ ------------ ------------ 
     TOP 1:0 3:0 5:0 7:0  0  0  0  0   0  0  0  0   0  0  0  0
  BOTTOM 2:0 4:0 6:0 8:1  0  0  0  0   0  0  0  0   0  0  0  0
         -------------^- ----------^- ----------^- ----------^-  cards present
         <-----MB1----->  <---MB2-->   <---MB3-->   <---MB4-->  
Each of the boards has an upper and lower output, and they can be switched individually. You choose a motherboard with 'mb 1', and then say 'on 8' or 'off 8'. In the example above, group 8 of mb1 is on, everything else is off. When you enter or quit the program, hardware settings are preserved.

Here is the actual code: lv.c.
 

Custom ADC readout

The custom ADC board reads selected signals from the external sensors. The channel assignments are made on the sensor distribution board, where they can be changed if necessary. The currena assignments are here. To run the program, type 'cadc'. There are only 2 commands, 'read' and 'quit'. Read produces the following, (with nothing physically connected):

 pin    A     B   |   C     D  
 -----------------+-----------
 16   4099  4099  | 4099  4099  
 15   4099  4099  | 4099  4099  
 14   4099  4099  | 4099  4099  
 13   4099  4099  | 4099  4099  
 12   4099  4099  | 4099  4099  
 11   4099  4099  | 4099  4099  
 10   4099  4099  | 4099  4099  
  9   4099  4099  | 4099  4099  
  8   4099  4099  | 4099  4099  
  7   4099  4099  | 4099  4099  
  6   4099  4099  | 4099  4099  
  5   4099  4099  | 4099  4099  
  4   4099  4099  | 4099  4099  
  3   4099  4099  | 4099  4099  
  2   4099  4099  | 4099  4099  
  1   4099  4099  | 4099  4099  
 -----------------+-----------

 Custom ADC >> 
In the current state, it reads a voltage on each of the 4 connectors, 16 channels each. The program outputs have to be labeled and grouped to reflect the current channel assignments. Also, the binary number has to be translated to meaningful units. For binary to voltage look here. For temperature, look here. For humidity look here.

Here is the code: cadc.c.
 

MCM and MB temperatures and voltages

This program reads the multiplexing ADC's on the motherboard. These encode temperatures on the MCM's, one temperature on each power-comm board, and a few on the motherboard. In addition, some MB voltages are monitored. The mapping of these readings onto the ADC channels is here, and an inverse map here.
To enter the program, type 'temps', and a small menu appears:
         +-----------------------------------------------------+
         |  temps       read the temperatures on the MCM's,    |
         |              power-comm boards and motherboards     |
         |  volts       read the MB voltages                   |
         |  quit, exit  exit the program                       |
         +-----------------------------------------------------+
 MVD temps>>
Command 'temps' gives the following display (with no inputs connected):

 +--------------+------------------------------------+----------------+
 |              |                MCM                 |                |
 |   group where|   6     5     4     3     2     1  |  pads          |
     -----------+------------------------------------+---------   
       6     OT |   -     -     -     -     -     -  |  6  4095   
       1     IT |  4095  4095  4095   -     -     -  |  5  4095   
  WEST 5     OM |   -     -     -     -     -     -  |  4  4095   
 (MB1) 2     IM |  4095  4095  4095   -     -     -  |  3  4095   
       4     OB |  4095  4095  4095  4095  4095   -  |  2  4095   
       3     IB |  4095  4095  4095  4095  4095   -  |  1  4095   
 
       3     IB |  4095  4095  4095  4095   -     -  |  1  4095   
       4     OB |  4095  4095  4095  4095   -     -  |  2  4095   
       2     IM |  4095  4095  4095   -     -     -  |  3  4095   
  EAST 5     OM |   -     -     -     -     -     -  |  4  4095   
 (MB2) 1     IT |  4095  4095   -     -     -     -  |  5  4095   
       6     OT |   -     -     -     -     -     -  |  6  4095   
    ------------+------------------------------------+---------   
     group where|   6     5     4     3     2     1  |  pads      

 MVD temps>>

You can see which of the MCM's are installed. On the left, we could add a column with the power-comm temperatures, and maybe on the bottom list the MB voltages, rather than make a separate command for them.

temps.c
 

Controlling the relay board

         +----------------------------------------------+ 
         |  COMMANDS:                        status:    |
         |  -----------------------------------------   |
         |  east / west                      East       |
         |  reset                                       |
         |  chiller1 on/auto                  on        |
         |  chiller2 on/auto                  on        |
         |  fan on/off/auto                   ??        |
         |  pump on/off/auto                  ??        |
         |  lv on/off/auto                    ??        |
         |  show, status, help, menu: show status       |
         |  exit, quit, x, q:   exit the program        | 
         +----------------------------------------------+ 
 MVD RELAY>>

relay.c
 

rs232 to the chillers

The chillers can communicate via rs232 ribbons to our crate. The software for this has not yet been written. There is a program //phenix14/mvdonl/vme/chil.c which is taken from the Greenspring quickstart pamphlet but it does not work. Working software for this module is at an Epics site, a tip I got from Lars Ewell: look for 'Octal Serial Driver'. Somewhere there is the code we want.

Here is the program: chillers.c.
 

Spy line switching

Not yet written. The code will be derived from the test program that used to do exactly this at Los Alamos, just as we did with the MCM temperature readout.

Here is the program: spy.c.


To be done in general: We need to make a GUI, written in a language which is used around Phenix. Epics is not really being used, and would necessitate a large investment in money and time. Java, Root, Tcl-TK are all used. Once we have a GUI, we need to integrate all programs, and add features like interrupts, regular polling, alarms and archiving.
Last update 2 Feb 2001 - HvH
back