EDOC200

EUROGAM PROJECT

NSF DATA ACQUISITION SYSTEM High Voltage server manual

Edition 2.4 January 1995

Nuclear Structure Software Support Group Liverpool University

1 Introduction

This document describes the software in the Eurogam High Voltage Server. It is assumed that the reader has some knowledge of the LeCroy 1440 High Voltage system and the 1445A controller. The High Voltage server is installed in the VME crate eghv which it shares with the Rate Monitor.

This document reflects version 2.4 of the VME server software.

The first two chapters is a general users guide to the server, whilst the rest is technical documentation, meant to aid software development and maintenance.

The Eurogam High Voltage system (phase 2) contains the following main components:

• Four LeCroy 1440 mainframes with 1445A controllers. These provide high voltage to the GE and BGO detectors in the EUROGAM array.

• A VME crate (eghv) with MV147 CPU and a LeCroy 1131 VME-SIB card. The SIB card interfaces between the VME crate and the 1440 mainframes through the LeCroy SIB bus (parallel).

• A SUN workstation for display and control of voltages. This workstation is connected to the VME crate via ethernet and communicates with it by means of the Eurogam Register Server (ERS).

• A SUN file server. This is where the VME crate is booted from. The file server is also used for storage of demand voltages and configuration data.

The 1440 mainframes take their commands over the SIB parallel bus which connects them to the LeCroy VME1131 card in the VME crate via a 60 pin ribbon cable. The HV server in the VME crate is linked to the SUN workstation via ethernet and interpretes commands from these and translates them into the command format recognised by the 1445A controller. The HV server also monitors the LeCroy mainframes and report status changes to the Eurogam message logger. It also continuously displays status information on its console terminal.

2 MAINTENANCE

I M P O R T A N T :

NEVER power the VME crate off or on with the SIB bus connected !!!! Booting by command or by pushbutton is safe in Eurogam phase 2.

2.1 LeCroy 1131 VME-SIB

Make sure that Rate Monitor card addresses do not clash with the address of the VME1131. In phase 2 the base address for the VME1131 is 0xf0e00000.

2.2 SETTING UP FOR COMPUTER CONTROL via SIB BUS

1. Connect the CONSOLE terminal to serial port 1 of the VME crate.

2. Plug the ribbon cable into the SIB ports on mainframes 1, 2, 3 and 4 and into the front of the 1131 VME-SIB card.

3. Make sure that ONE AND ONLY ONLY terminated 1445A is connected to the SIB bus. The termination should be at the end of the chain.

4. Boot the VME crate by pushing the MANUAL SYSTEM RE-SET button.

2.3 REVERTING TO SERIAL OPERATION

1. Halt the High Voltage server by typing HALT at the console 2. Unplug the ribbon cable at the VME end, leave it connected

at the mainframes.

3. Connect the console terminal to the serial port of the mainframe you want to investigate.

2.4 TAKING A MAINFRAME DOWN (from HV console)

1. Type MAINFRAME 1 (2,3 or 4) at the HV console

2. Give command BACKUP; stores demands in battery backed up RAM

3. Give command WRITE (0-15,0-15) 0 ; this ramps the voltages down.

4. Wait until all voltages have ramped down

5. Give the command OFF; this disables High Voltage generation 6. Type Q to return to HV console menue.

7. Halt the server by typing HALT at the console

8. Switch mains power off

9. .......

10. Switch mains power ON again

11. Start the High Voltage server by typing RESTART at the console 12. Type MAINFRAME 1 (2,3 or 4)

13. Give command: COPY; restores demands from battery backup up RAM

14. Give command: ON; enables the High Voltage generation 15. Check that the voltages ramp up

16. Type Q to return to HV console menue.

If the communication between the HV server and the LeCroy mainframes breaks down, the server will halt immediately and the console will display the cause of the error. For instance, if you unplug the SIB ribbon cable without typing halt first this will happen.

2.5 CONSOLE COMMANDS

The console interface has a display part which at any time shows the state of the HV server and each of the mainframes. It also displays any errors which may occur. You can investigate further using the following commands:

2.5.1 BLANK

Initialises the display.

2.5.2 DEBUG

This commands enables debug output to the console. The type of output is determined by the parameters given.

• 0 - turn off debug output

• 1 - list responses from mainframes

• 2 - list commands sent to mainframes

Executing other commands automatically sets DEBUG to zero.

2.5.3 MAINFRAME

This commands take mainframe address as argument. It allows the user to access each individual mainframe in the manner which it is done from the 1445A serial interface. However three of the 1445A commands are not available: WHO, MAINFRAME and MONITOR. The HV server automatically halts when the MAINFRAME command is given.

You can change mainframe by typing CTRL F. This will connect you to the next mainframe in the chain. See the 1445A users manual for a full guide to the commands here.

WARNING: due to an error in the 1445As, long output sequences get messed up. Be ware of this when giving commands like READ (0-15,0-15). Another 1445A error causes every 256 character sent to it to be corrupted, so from time to time you will get ”UNRECOGNISED COMMMAND” even when you have typed it in correctly. These faults will hopefully be corrected by LeCroy in the next 1445A firmware version.

You return to the main menu by typing Q. This also restarts the High Voltage server.

2.6 MONITOR

Monitor all the voltages in a mainframe. The command takes a mainframe number as argument. The voltages are updated every second. They are displayed slot by slot from left to right. You stop by typing any character. Note that this is NOT the same as the MONITOR command used on the serial line. The command is not available when the server is halted.

2.6.1 HALT

Halt the HV server. All communication with the LeCroy mainframes will cease. This command is intended to be used when you for some reason have to power off the mainframes. It should also be used if you intend to connect the mainframes to a terminal via the serial ports. Note that the server halts automatically whenever a communication problem on the SIB bus occurs.

2.6.2 RESTART

Resumes communication on the SIB bus after the server has been halted. If mainframes have been added or removed since the last boot, the system will reboot automatically.

2.7 REBOOT

Reboots the VME crate. When doing this you also reboot the Rate Monitor so you should take care to chack that nobody is using the Rate Monitor. This does NOT affect the High Voltage supply itself.

2.7.1 ERROR

Lists a summary of errors in the HV server. These are most likely to be DMA errors in the case of lost communication with the mainframes. You will observe this if you switch a mainframe off without halting the server first. Under normal circumstances the reply should be none.

2.7.2 HELP

Prints a brief summary of the commands.

2.7.3 SHELL

Escapes to the VxWorks shell. You return to the console menu by typing Res.

2.7.4 SHOW

SHOW takes MAINFRAME address and parameters type as arguments. Currently only two parameter are available.

Examples:

SHOW 1 VOLTAGES - list all voltages in mainframe 1
SHOW 4 USE      - shows which detectors are connected to which channel in
  mainframe 4.

2.7.5 STATS

Print the following information on a mainframe:

• no. of channels USED (0 if wire list has not been generated)

• no. of channels ON (voltage within tolerance and demand non-zero)

• no. of channels OFF (less than 100 volts, and no demand)

• no. of channels RAMPING

• no. of channels with voltage out of range (default tolerance +-20 volts)

• no. of channels with demands differing from zero

NB! The USED field will show zero if no wire list has been generated.

3 Server startup

The High Voltage server is initialised by the VxWorks startup script startup.cmd. Here the necessary object files are loaded and server is started by calling hvStart.

The following files must be loaded before the High Voltage Server can be started:

"message.o"
"register-server.o"
"vxShare.o"
"hvShare.o"
"hvSib.o"
"hvComm.o"
"hvMain.o"
"hvRegs.o"
"hvConsole.o"

The server is invoked as follows:

hvStart(configfile,VME1131 address)

• Configname is the file where the wire list for the High Voltage system resides.

• The VME address is set to 0xf0e00000 by default.

When the server starts, it first checks that the register server is running. Then it will initialise the HV server, check for presence of a VME1131 card and 1445A mainframes, read the current state of these to ensure that the VME and 1445A states are consistent, and then enter the main loop.

Simultaneously the ”CONSOLE” task is started. This controls input and output to the console (serial port 1), and incorporates some commands for monitoring and debugging. The console will ALWAYS display status for the server and each of the connected mainframes.

The server main loop carries out the following:

• Checks the status of all the mainframes.

• Reads HV measurements into local memory (DMA)

• Checks if any values have been changed by register server, and writes the changes through to the 1440 mainframes.

• Checks if voltages are within limits.

• Sends messages to the Eurogam message logger when appropriate

Each mainframe is assigned a task to take care of the SIB communication.

Another task, hvSuper checks the others tasks for unexpected deletions and suspensions (bus errors etc).

4 SOFTWARE MAINTENANCE

The code resides in the directory /eg/highVoltage/src on the machine nsa at Liverpool. Copies of the code can be found at Daresbury (nnsa and Strasbourg (orchidee.

The system is generated by typing make in /eg/highVoltage/src. First the environment must be set by sourcing the file make env.

The code is found in subdirectories as follows:

• vxshare - General purpose code (shared)

• vxlib - General purpose code (not shared)

• share - Shared HV server code

• regs - Registers for the EG register server

• console - Console user task

• main - Interface between the register server and the 1445A commands Supervision and control.

• comm - 1445A command level code

• sib - SIB bus level code

If need to make individual directories, you type makeit as on the top level.

The object files are:

hvComm.o hvMain.o hvRegs.o hvSib.o
hvConsole.o hvShare.o vxShare.o

5 EUROGAM REGISTERS

The register names and attributes are automatically set up during initialisation of the HV server. The SIB bus is scanned for presence of LeCroy High Voltage modules and the appropriate registers are defined for each individual mainframe, card and HV channel in the system. The wirelist is a number of aliases which binds an array position to a specific channel in the HV system.

The REGISTERS are grouped according to four functional levels in the HV server. They are as follows:

• Server level (classes: sysSwrev, sysState, sysPrmap, control, wire)

• Mainframe level (classes: mfControl, mfCurlim, mfModmap, mf-State, mfStats)

• 1444 Card level (class: gecardValue)

• 1443/1444 Channel level (classes: gechanValue, bgchanValue)

Here are some attributes which are commonly used for the High Voltage Server registers:

• mainframe address 0 .. 15

• slot number 0 .. 15

• channel number 0 .. 15 (1443P)

• channel number 0 .. 7 (1444N)

• register subclass eg. ”ramp”, ”voltage”

5.1 HV server references

These register have no attributes.

5.1.1 System state

Class sysState Access Read only Data ”uninitialised”,”running”, ”initialising”, ”halted”, ”down”,

”configuring”, ”no vme1131” Description The value is one of the above, describing the state of the High Voltage Server software. Note that these values are mutually exclusive. If the state differs from running, the contents of the registers below server level will reflect the situation at the moment the system state changed from running. level are unavailable.

Example:

ersread hv.state
hv.state                      : running

5.1.2 Mainframe presence map

Class sysPrmap

Data a list of the mainframe addresses present.

Example:

ersread hv.prmap
hv.prmap                      : 1 2 3 4

5.1.3 Software revision status

Class sysSwrev Access Read only Data Revision number of the High Voltage server

Example:

ersread hv.swrev
hv.swrev                      : Revision 2.4 - Dec 15 1994

5.1.4 Error information

Class sysError Access Read write Data String indicating the latest error in the server.

Example:

ersread hv.error
hv.error                      : illegal demand voltage : (2,03,00): 4480
erswrite hv.error -a 0
Writing anything will clear the error.

5.1.5 1131 VME-SIB address

Class sysVmeadr Access Read only Data VME address of 1131 card

Example:

ersread hv.vmead
hv.vmead                      : 0xf0e00000

5.1.6 Wire list status

Class wire

Access Read only Data OK or ERROR

Example:

ersread hv.wirel
hv.wirel                      : OK

5.1.7 Crate control

Class control

Data name of VxWorks function

Access Read Write

Description Executes a VxWorks function (no arguments).

Example:

erswrite vx.control -a reboot
written to vx.control

5.1.8 Application list

Class aplist

Data string of application ids

Access Read

Description Read codes for aplications present in the crate

Example:

ersread vx.aplist
vx.aplist                     : rt hv

5.1.9 Available memory

Class aplist

Data size of largest memory block (decimal)

Access Read

Example:

ersread vx.memsize
vx.memsize                    : 1091008

5.1.10 Reboot info

Class rbinfo

Data Date and time of last reboot

Access Read

Example:

ersread vx.rbinfo
vx.rbinfo                     : 03/01/95 16:46:23

5.1.11 VxWorks version

Class version

Data VxWorks version string

Access Read

Example:

ersread vx.version
vx.version                    : 5.1

5.2 MAINFRAME REFERENCES

All these registers have mainframe address as their attribute:

Example:

ersrda "*(1)"
control(1)                    : 1
curlim(1)                     : 1
fwrev(1)                      : 1
modmap(1)                     : 1
state(1)                      : 1
stats(1)                      : 1

5.2.1 Mainframe control commands

Class mfControl Access Write only Data – ”backup” – ”copy”

– ”on”

– ”off”

– ”set reboot cold”

– ”set reboot warm”

– ”set reboot hot”

– ”clear” Description These commands correspond directly to commands

accepted by the 1445A controller.

Example:

erswrite "control(1)" -a on
written to "control(1)"
erswrite "control(1)" -a set reboot warm
written to "control(1)"

5.2.2 Mainframe state

Class mfState Access Read only Data – ”ramping”

– ”on” (high voltage on)

– ”off” (high voltage off)

– ”reboot cold” (reboot parameter cold)

– ”reboot warm” (reboot parameter warm)

– ”reboot hot” (reboot parameter hot)

– ”uncalibrated”

– ”tripped”

– ”disabled” (inhibit by HV enable button on mainframe)

– ”sib fault” (communication fault)

– ”error” (voltage out of range) Description This is the status for a single mainframe. The val-

ues are not mutually exclusive. However, when a ”sib fault” occurs real state of the mainframe is not known, so the other fields carry meaningless information.

Example:

ersread "state(1)"
state(1)                      : on reboot_warm

5.2.3 Current limit BGO

Class mfCurlim Access Read Write Data current limit in uAmpere (range 0 .. 2550). Unit uA (micro

ampere) Description The current limit for all the 1443P-cards in the main-

frame.

Example:

ersread "curlim(1)"
curlim(1)                     : 2550

5.2.4 Firmware version number

Class mfFwrev Access Read only Description Returns the revision number of the firmware running

in the 1445A controller.

Example:

ersread "fwrev(1)"
fwrev(1)                      : LeCroy 1445A Version 3.07

5.2.5 Mainframe statistics

Class mfStats Access Read only Description Returns the number of channels that are

– BGOs Used (wired)

– BGOs On

– BGOs Off

– BGOs Ramping

– BGOs Out of range

– BGO Demands other than zero – GEs Used (wired)

– GEs On

– GEs Off

– GEs Ramping

– GEs Out of range the 1445A controller.

Example:

ersread "stats(?)"
stats(1)                      : {256 256 0 0 0 256 } {0 0 0 0 0 0 }
stats(2)                      : {178 178 14 0 0 178 } {0 0 0 0 0 0 }
stats(3)                      : {250 250 6 0 0 250 } {0 0 0 0 0 0 }
stats(4)                      : {0 0 0 0 0 0 } {54 46 18 0 0 46 }

5.2.6 Module map

Class mfModmap Access Read only Description The card-types in each slot are listed from slot 0 to

16 with empty slots marked ”-”.

– ”-” (empty)

– 1443P

– 1444N Example:

ersread "modmap(4)"
modmap(4)                     :  -   -  1444P 1444P 1444P  -   -   -   -  1444N
                                 1444N 1444N 1444N 1444N  -   -

5.3 HV card references

These registers all have attributes mainframe address, slot number and subclass.

Example:

ersrda "*(4,02)"
curtrip(4,02)                 : 4 2 curtrip
hwramp(4,02)                  : 4 2 hwramp

Only one register class is defined at this level:

5.3.1 1444N card specific value

Class gecardValue

Access see individual subclasses

Subclasses – ”hwramp” hardware ramp (rw). Unit: raw decimal. – ”curtrip” current trip (rw). Unit: raw decimal. Description Returns the value of a card-specific parameter.

Example:

ersread "*(4,02)"
curtrip(4,02)                 : 1023
hwramp(4,02)                  : 16383

5.4 HV channel references

These registers have attributes mainframe address, slot number, channel number and subclass.

Example (1443):

ersrda "*(1,02,00)"
demand(1,02,00)               : 1 2 0 demand
name(1,02,00)                 : 1 2 0 name
ramp(1,02,00)                 : 1 2 0 ramp
state(1,02,00)                : 1 2 0 state
tol(1,02,00)                  : 1 2 0 tol
vlimit(1,02,00)               : 1 2 0 vlimit
voltage(1,02,00)              : 1 2 0 voltage

Example (1444):

ersrda "*(4,11,00)"
actrip(4,11,00)               : 4 11 0 actrip
demand(4,11,00)               : 4 11 0 demand
name(4,11,00)                 : 4 11 0 name
ramp(4,11,00)                 : 4 11 0 ramp
state(4,11,00)                : 4 11 0 state
tol(4,11,00)                  : 4 11 0 tol
vlimit(4,11,00)               : 4 11 0 vlimit
voltage(4,11,00)              : 4 11 0 voltage

5.4.1 HV channel value

Class gechanValue or bgchanValue

Access see subclasses

Subclasses – ”demand”, (rw), volts – ”ramp”, (rw), volts/second

– ”vlimit”, (rw), volts

– ”ac trip”, (rw), raw decimal, 1444 only

– ”tol”, (rw), volts

– ”voltage”, (r), volts

– ”state”, (r), text message: on,off,ramping, error

– ”name”, (r), text message: occupation info

Description Reads and writes values of channel specific parameters. Note that two adjacent channels share the ACTRIP value (eg. ch 0 and 1).

Examples:

ersread "*(4,11,00)"
actrip(4,11,00)               : 16383
demand(4,11,00)               : 0
name(4,11,00)                 : ge17
ramp(4,11,00)                 : 10
state(4,11,00)                : off
tol(4,11,00)                  : 30
vlimit(4,11,00)               : 4500
voltage(4,11,00)              : -9

6 APPENDIX

# ======================================================
#    Startup for Eurogam High Voltage & Rate Monitor
# ======================================================
< /eg/boot/startup.cmd
#
_hvDebug= 2;
_rmDebug= 0;
objpath= "/eg/obj";
workpath= "/eg/highVoltage/work";
cd (objpath);
ld (0,0,"message.o");
ld (0,0,"register-server.o");
ld (0,0,"vxShare.o");
#
setServer(server);
setRloginHost(server);
setRshellHost(server);
setObjPath(objpath);
rdate();
#
ld (0,0,"hvShare.o");
ld (0,0,"hvSib.o");
ld (0,0,"hvComm.o");
ld (0,0,"hvMain.o");
ld (0,0,"hvRegs.o");
ld (0,0,"hvConsole.o");
ld (0,0,"rateMonitor.o");
#
cd (workpath);
ersStart();
rtStart ("/eg/config/eghv/rtconfig.d");
hvStart ("/eg/config/eghv/hvconfig.d",0xf0e00000);

Jomar Hønsi Liverpool, 10th of January 1995

E-mail: jh@ns.ph.liv.ac.uk Telephone: int + 51 794 3398