HV Module Test Stand Program

Ryan Roth, LANL
Pager:  (516) 402-4739
Email: rothr@db.erau.edu

The purpose of this page is to detail what will eventually be the standard operating procedure for testing HV modules in the PHENIX Experimental Hall.  A test area, equipped with two mainframes, terminals, and a rack for dummy loads, has be set up in PEH, adjacent to the counting house.    The main testing program, test_stand, and a few supplementary applications are run from this area.  On this page, file names are shown in italics and programs are shown in bold.


PROCEDURE

  1. Determine which type of modules are being tested and acquire the appropriate dummy loads
  2. Install a set of modules and hook them up to the dummy loads
  3. Modify the config_file to match the new parameters
  4. Configure, compile, and run generate.cc to develop a phhv.dat file from the config_file
  5. Move the new phhv.dat to the proper Epics directory, and modify phhv.grp if required
  6. Run gmake in the Epics directory to recompile the medm software
  7. Check the status of the IOC crate controller
  8. Run medm and record HV module statistics
  9. Modify testing_procedures.cc to suit the current HV modules
  10. Run gmake to recompile the changes
  11. Move or delete the old testlog file
  12. Run test_stand to test the modules
  13. After ending the program, log the module test results
  14. If necessary, run oocleanup
  15. Either delete the test database using oodeletedb or merge it into the large database

Determine Module Type

The PHENIX Experiment contains several sub-systems, each of which have different HV requirements.  Several types LeCroy HV modules are going to be used to satisfy these requirements.  The module types LeCroy can provide are listed below; each has positive and negative polarity versions: Since each sub-system has different operation voltages, current draws, etc., each sub-system HV test has to use different dummy loads.  These dummy loads have to be fabricated to closely match the sub-system statistics.  The test rack can hold 16 dummy loads, so no more than 16 need to be fabricated for eack sub-system.  Since most sub-systems have less than 40 modules, fewer than 16 dummy loads will be required.


Install the Modules and Loads

Up to 16 modules can be tested at a time.  These modules can be loaded into either mainframe, as required.  The loads are installed into the smaller rack next to the test stand.  Make sure that the HV is turned off before removing or installing modules.  Be careful not to touch the fans that cool the modules.
  1. When installing modules, make sure that each is firmly pressed into place, and makes the proper electrical connection.  The modules do not need to be screwed into place. The dummy loads are simply slid into one of the smaller rack's slots.
  2. Once the modules are in place, they can be connected to the dummy loads.  Several cables were fabricated to make this connection.
  3. Each module has a Hardware Voltage Limit and a potentiometer that controls the value of this limit.  Using a voltmeter, measure the value of this voltage limit on each module (the mainframe, but not the HV, needs to be on to make this measurement).  If necessary, change the value to match the system requirements.
  4. Finally, note each module's serial number.

Modify the config_file

The config_file is a list of each module's name, type, and serial number.   It is referenced by the test program; it is also used to generate the phhv.dat file that is used by the medm software.

Currently, the module naming scheme uses the format B_hv_CH_#, where # is an ascending number.  This naming schme may can in the future.  The module types follow this format: 14##NMOD, where 14## is the module type, N is either a P (for positive polarity) or an N (for negative), and MOD is a set of three numbers which reference which modification number.  MOD is not present for some of the modules.
The serial numbers are recorded exactly as they appear on the back of the module.

List each module in the mainframe in ascending order, stating with slot 0.   Record the name, type and serial number.  Do not place a blank line at the end of the file.   You may wish to save the older version of the file; otherwise, replace it.


Configure and Run generate.cc

generate.cc is a test-parsing application that reads the config_file and uses its information to generate a phhv.dat file.  For each module type, it has a number of default values,  such as ramp rates, demand voltage, etc.  Before running this program, these defaults have to be checked and changed to suit the current test, if the next test uses different module types or is for a different subsystem.  Also, the program is currently set to direct commands to mainframe 3 (the upper mainframe).  This must be changed to mainframe 2 if the lower mainframe is used.
  1. Open the generate.cc file in an editor and change the default values if necessary.  The default values are located at the beginning of the file; also, locate the section of code (between lines 102 and 326) that corresponds to the module type used and see if changes need to be made there as well.  Save the changes.
  2. Compile the program with the command "CC -o generate generate.cc" if changes have been made.  The program is also compiled when gmake is run.
  3. Run the program by typing "generate".  By default, the program looks for a file called config_file for input, and creates an output file called phhv.dat as output.  Different files can be indicated by using command line arguments:  "generate my.config mydat" looks for a file called my.config for input and outputs to a file called mydat.dat (note that the .dat extension is added by the program -- do not place it in the command line).

Move phhv.dat file to the Epics Directory

The output file has to be moved to the proper Epics directory; currently, this is $EPICSB/app/hvca/db/.  The file will replace the previous one unless the old one is moved or renamed.

In addition, you may want to modify the phhv.grp file.  This is a small list of sub-groupings of the modules.  Currently, the modules all are collected into one group called TEC.  This file only affects the medm program and is not used by the test_stand program.


Run gmake in the Epics Directory

Type "gmake" in the Epics directory to recompile the medm software with the changes made to phhv.dat.


Check the Status of the IOC Crate Controller

The IOC used in the test stand is called "iocondev5".  The controller accesses a certain file when it is rebooted; this file is a soft link to one of several other files.  This allows us to change the boot procedure by simply altering which file this link points to.  Currently, the controller is set to control only one mainframe, the upper one.

In order to start the test program, the IOC must be booted and operating properly.  Once gmake has been run in the Epics directory, the IOC should be rebooted.  It is important that the mainframe be finished with its start-up sequence before the IOC is booted; otherwise the IOC becomes unpredictable.  Correct IOC operation can be checked by loging into the controller (using rsh) and checking to see that the mainframe control thread has been spawned.

If the IOC is having problems, it may be necessary to reboot it.  To reboot the IOC, either type Control-X from the rsh, or hit the reset switch on the controller.  The IOC should begin a boot procedure -- this can be viewed from the VT220 terminal (input channel B).  When it is finished, rsh back into the controller and type 'iocInit "sample.def"'.  Wait until you see that the mainframe process has been spawned.


Run medm

The medm program is used to monitor the HV modules during the test, to turn on the HV, and to give the modules an initial "shake-down" prior to starting the test program.
 
  1. Run medm by typing "medm -x phhv.adl"
  2. Check out the module settings, making sure that the values were intialized correctly.
  3. Enable some of the channels.
  4. After verifying that the mainframe coolant fans are on, turn on the HV.
  5. Ramp up a few channels to operating voltage, and record the measured current.
  6. Experiment, at your discretion, with a few of the medm features to make sure everything is operating properly.  One idea is to check that the channels can ramp down to zero when the HV is on and the channels are enabled.
  7. The program should running, with the HV on, while the test_stand program is running.  Some test procedures in test_stand will fail if the HV is off when they are run.

Modify testing_procedures.cc

There are several values in testing_procedures.cc that should be changed to suit the current test.  They are static, double variables, called dMaxVoltage, dDVoltage, dTCSet and dRange; there are also integer variables called iLimit and iLTsleep.  They are located at the top of the file.

dMaxVoltage is the absolute value of the operating voltage of the test program.  The program holds the modules at this voltage during its long-term test.  This variable should be set to the expected operating voltage of the sub-system.  Do not include a negative if the system has negative polarity.

dDVoltage is a small (5-10% of full yield) voltage used in the Demand Voltage test.  That porcedure verifies that it can set the demand voltage to diferent values by setting each channel's demand voltage to this value and then setting each to twice this value.  This variable should be kept small (100 to 500 V).  Do not include a negative if the system has negative polarity.  Sometimes a channel will trip a voltage error if they try to ramp to a very low voltage -- such errors should be recorded as they are found.  The bad channels can continue to be tested by raising this variable beyond their trip level.

dTCSet is a variable used to reset the trip currents.  One procedure of the test program forces all the channels to have a current trip, to test the trip process.  This is done by setting the trip current below the normal current produced when the modules are connected to the dummy loads.  This variable should be set to less than 2/3 of the current measured previously.  Do not include a negative if using a negative polarity module.

dRange is the range of volts around the demand voltage that the program will accept as valid.  I.e., the program will not raise an error if the read voltage from a channel is between (Demand Voltage - dRange) and (Demand Voltage + dRange).  The default value is now 3 volts.

iLimit is the number of times a channel can trip during the long-term test before the program gives up trying to re-enable it.  Its default is 20.

iLTsleep is the number of seconds the program waits before re-examining the channels during the long-term test.  Its defualt is 600 (10 minutes).


Run gmake in the Test Program Directory

Type "gmake" in the test program directory (...../oncs_distribution/hv/src) to recompile the changes to testing_procedures.cc.


Move the testlog File

The testing procedures of test_stand record the bulk of their output to a file called testlog.  As each procedure is started, its output is appended to the end of this file.  When starting a new test run, this file should be removed or renamed.


Run test_stand and Start the Test

NOTE:  Currently, the test program only works correctly for 1461N104 modules -- the other modules will be added to its functionality shortly.

Start the program by typing "test_stand config_file" (note:  the command might be slightly different, if the test program executable directory is not included in your path environment variable).  The program should be run in the same directory where the config_file is located.  When the program starts, it creates a new database in /export/software/oncs/db/; the federated database is held in /export/software/oncs/db/hv/.

At the "->" prompt, type "help" to get a list of available commands.  You can examine and change module variables from here.

At the "->" prompt, type "test" to enter the test routine sub-menu.  You can run a test procedure individually, or you can type "all" to run each procedure, one after the other.  If all the procedures are run, the program will execute each in order, and will stop if any of them raises an error.  The last procedure, testLongTerm, does not end until the user Control-C's out of it and ends the program.  The long-term test should be run for several hours (we have been using a minimum of four so far).


Log the Test Results

After running the test successfully, examine testlog and record the details in the test stand paper log.  Also record the results in the electronic version of the test log.  Note the date and time of the test,  the module names and serial numbers, any errors detected, and which modules were set aside for further testing.  Save the testlog file if it is deemed necessary.


Run oocleanup

If the test program is exited with a Control-C, a number of transactions in the Objectivity database may be left unresolved.  These should be dealt with as soon as possible.  Remove them by typing "oocleanup -local".


Deal with the Test Database

Each time the test_stand program is run, it creates a new database, with a file name made up of the month, day, hour, minute and second that the database is created.  The idea is to take all of the valid test databases and eventually merge them into one large database.  However, sometimes it is necessary to run the program without testing modules -- this creates an extra, needless database that should be removed.

Remove a database by typing "oodeletedb -db databasename". Do not include the .TheDB.DB extension in the database name.  You can add the option "-force" to prevent  the program from asking you verify the deletion.  If the database file has be accidentally deleted, you can correct the catalog in the Federated database by typing "oodeletedb -catalogonly -db databasename".

The program that will merge the databases is under development, and will be part of the oodb_mgr utility.


Last Updated: 12 October, 1998