"HVD" (High Voltage Display) Program for the PC
by
Robert Angstadt
Version 2.36 January 7,1993
(Please refer to "HVD.VER" for version synopsis.)
Introduction 1
Flavors 1
Non-Polling Flavor 1
Polling Flavor 1
Token Ring Flavor 2
Program Initialization 2
Special Mention 3
Status Bits 4
"PE" = Power Enable 4
"ON" = Supply Setting On (on/off setting) 4
"OC" = Over Current Trip 4
"OV" = Over Voltage Trip 4
"CE" = Channel External 5
"ME" = Module External (External Interlock) 5
"WD" = Watch Dog Timer 5
"IN" = Interlock 5
Readings Field 5
"setVDAC" 6
"VDACref" 6
"HV_read" 6
"HVMAX" 6
"setIDAC" 6
"IDACref" 6
"I_read" 6
"+5Volt" 6
"+12Volt" 6
"-12Volt" 6
"Temp" 6
"+12Vpwr" 6
"-12Vpwr" 6
Main Menu 6
"Node=" 6
"Vi offset=" 7
"Add. mod=" 7
"Bit3=" (24 or 32 bit addressing) 8
"Times poll" 8
"File (setup)" 9
"Save to above" 9
"Restore from above" 9
"Init i set" 9
"Kick (boot) VME crate via Bit3 board" 9
"init bit 3 & find all" 9
"hElp" 9
"Grnd rd=" 9
"Hex on/off" 10
"Dvm in/out." 10
"pLot menu." 10
"Print" 10
"INS/DEL to group plot" 10
"4 i step F7,F8=" 10
"+/- ramp v/sec f5,f6" 10
"5 loop ms delay f5,f6" 10
"6 loop v step f5,f6" 11
"7 v by step f5,f6" 11
"a/d poll" 11
"Mode for function keys ..." 11
"X repeat read=" 12
"# ms. message delay" 12
"F1 reset trip" 12
"F2 intlk mod togl" 12
"F3 hv off" 12
"F4 hv on" 12
"F5 step ramp V-" 12
"F6 step ramp V+" 12
"F7 i down" 13
"F8 i up" 13
"F9 wdt module toggle" 13
"F10 Quit" 13
"F11 goto target v" 13
"F12 target=..." 13
High Voltage Scaling Setup Menu Detailed Help Notes 13
"Help" 13
"Print this screen to lpt1" 13
"Jump (goto) sub-menu for main menu display setup." 13
"Dir of offset files" 14
"Filename of offset file" 14
"Save current offsets to file" 14
"Restore offsets from file" 14
"Zero offset memory array" 14
"Times (number of) to read for average" 14
"Auto offset determine (turns off all supplies first!)" 14
"Enable/disable auto-offset using f4" 14
"Voltage offset (toggle)" 14
"Current offset (toggle)" 15
"Open a door to dos" 15
"Global diagnostics." 15
"Menu for curve fitting." 15
Curve Fit Menu Detailed Help Notes 15
"hElp" 15
"Open a door to dos" 16
"Print this screen to lpt1" 16
"List of fit data files." 16
"Filename of fit file" 16
"Record (toggle) fit file on/off" 16
"Kurrent/voltage fit" 16
"Milliseconds before reading averages" 16
"Number of times to read for average" 17
"How many steps to take" 17
"Terms in polynomial fit" 17
"Voltage to ramp to" 17
"Slot" 17
"0,1,2,3,4,5,6,7" 17
"x,Y swapped as indep.,depend. vars" 17
"Quadratic scale correction (toggle) " 18
"Join coef. from 'C" to 'PODx.DAT' to file" 18
"Curve fit test" 18
"Browse fit file" 18
" 9 resist. val for cur calc =" 19
"Append present coefficients to pod file." 19
"Use last coefficients for present scaling." 19
"Differences (dvm-hv_read) fit test." 19
"Z add algebraically present coefficients to current scaling." 19
"Iterate automatically to find coefficients (takes two times)" 19
"anneX present memory coeffecients to "PODM*.DAT" file." 20
"Write all present memory coefficients to "hvscaleq.ini" 20
"Goto special average test menu. Warning: sets current supply to 0!" 20
GENERAL INFORMATION ABOUT THE FITTING SOFTWARE 20
Special Test Average Menu Detailed Help Notes 21
"hElp" 21
"Print this screen to lpt1" 21
"Delay (milliseconds) between target voltage & reading averages" 21
"Number of times to read for average" 21
"Target voltage for average" 21
"Voltage after average to go to" 21
"Run test" 21
HVD pLot sub-menu help notes 21
"hElp" 21
"Print this screen to lpt1." 22
"Choose a value to plot." 22
"pick something to plot or 'Enter' to use def=... 22
"Histogram plot" 22
"pLot reading vs time." 23
"Group plot mode (of above) of selected channels." 23
"Adc linear regression for 1 channel: ..." and 23
"Dvm linear regression for 1 channel: ..." 23
"Settling time (milli-sec.) for dvm linear regres..." 23
"Ibm/epson mode for printing." 23
"Re-calibrate the ADC/CS5016" 24
"Timing calibration" 24
Introduction
HVD is an aid for builders and users of the D0 high voltage power supply system. The system's complexity necessitates computer aided control, testing, and diagnosis. It is written and compiled in Turbo Pascal V6.0 and operates under MS-DOS 3.3. It is built on "hvd5", a program originally written by Ming-Yen Yang.
HVD is written such that essentially the same body of source code produces several executable programs using different interfaces. These different program flavors include one to run over the Token Ring Network to communicate with any VME node on the Network or over the Bit3 in the lab for testing.
Flavors
HVD comes in three flavors depending on which compile switch is thrown in "io.inc". The flavor is indicated at run-time in the upper left corner following the program name "HVD" by "Token Ring", "Polling", or "Non-Polling".
Non-Polling Flavor
This uses the Bit3 board in the easiest way. It has a limitation in that the VME bus signal, "DTACK", must be returned in ~15 micro-seconds or an error, "*VME TIMEOUT*" will occur. This is a limitation of the Bit3 board set in conjunction with the PC bus. This error is misleading since the VME bus arbitration can take as long as ~120 micro-seconds depending on what kind of VME board is arbitrating the bus.
Polling Flavor
This one operates the Bit3 board in a mode where the PC polls the Bit3 until VME "DTACK" is returned or has timed out to address the HV Module in VME address space. It then checks the other Bit3 status bits and reports any other errors before going on in the program. This method will allow the Bit3 board to be placed in the D0 Control Crate and access different HV Crates via the Vertical Interconnects without physically moving the VME Bit3 board.
If the VME Bus arbitrator hangs and does not return a "*BUS ERROR*" signal, the program will give up polling the Bit3 and generate a "*POLL TIMEOUT*". The operator may set this timeout as desired via the "Times poll" menu option which only appears on this flavor. A good value is normally about 100 when going over the Vertical Interconnect. A value two low (e.g. 1) may force a "*POLL TIMEOUT*"when everything is o.k. with the hardware.
For both Bit3 versions be sure to read the notes under "Bit3=" (24 or 32 bit addressing). In short the user must make sure the program is using 32 bit addressing when trying to go over the Vertical Interconnect and the P.C. is connected to Bit3 model #406 VME board and not a model #403. The #406 adapter is easily distinguished because it has LED's on it and the #403 does not. Also, be sure to set the high nibble of the "Add. mod=" to 0 when trying to go over the Vertical Interconnect.
In both Bit3 versions if the program is in hex mode and there are Bit3 errors (timeouts and bus errors, etc.) then typically one would get $FFFF or $FF18 depending on the clone and bus timing and things. (Usually not 0.) However for the Token Ring Flavor one usually gets 0's when that channel is not there or not responding. This is typical of an empty slot or of the crate not being powered.
Token Ring Flavor
This one uses the Token Ring Network instead of the Bit3 boards. It sends and receives D0 control messages (Bob Goodwin's S1 messages) over the Token Ring to a D0 Control Crate.
When talking to hardware known to exist, if a screen full of "*NET ERROR*" occurs, this is an indication that the node you are talking to is not responding. Also if all 0's are returned then that channel is not there or not responding. This is typical of an empty slot or of the crate not being powered. If you are sure everything is set correctly and it is still not working it is possible that the Node you are addressing has crashed. Pause the program for a minute to re-boot itself and attempt to come back on the air. In some cases a manual (done locally) re-boot may be necessary. If there is a bridge between your location and the node, that could be a problem as well. If the bridge is down, it must be powered down locally and re-started. A "*NET ERROR*" may also occur if the message was somehow garbled while traversing the Token Ring. This may happen when a Token Ring node is taken off or inserted onto the Ring. It means that the message protocol was violated in some manner and could not be correctly decoded. It could have been a checksum error or an invalid message type.
Program Initialization
When HVD is first run, it looks for "HVD.INI" which is a human readable ASCII file. HVD.INI contains the default address and program mode settings that HVD will initially have. This is a mechanism whereby the user can customize the program to their environment without recompiling. If the file is not found the program will warn the user that it did not find its initialization file.
If "HVD.INI" is not found and the Token Ring flavor is being run the program will exit at this point because "HVD.INI" should contain a unique Token Ring node number (SAP) number managed by the network administrators. Currently this is myself, Bob Angstadt, in conjunction with Bob Florian.
For the Bit3 flavors the program will use the internal compiled defaults and continue on. The user may then generate a default "HVD.INI" file with the "Save" menu option. This file must be edited to change the Node number of the P.C. before it is used by the Token Ring flavor.
All flavors of the program next look for two files containing scaling numbers, "hvscaleq.ini" and "d0hvps.dat". This files are human readable ASCII and are editable by the user. The columns are labeled for the user. Each row corresponds to one of 16 (counting from 0 to 15) possible pod types. Different pod types require different scale factors. The program uses these values to convert the A/D count to a voltage or current based on the pod type. The current pod types are:
|
type no. |
type |
max v. |
R9 ohms |
Max uamp |
|
0 |
Reserved |
5501 |
4640 |
1078.6 |
|
1 |
+5.5@2ma |
5501 |
2200 |
2273.7 |
|
2 |
-5.5@2ma |
5501 |
2200 |
2273.7 |
|
3 |
+5.5@1ma |
5501 |
4640 |
1078.6 |
|
4 |
+2@3ma |
2001 |
1540 |
3247.8 |
|
5 |
-2.@3ma |
2001 |
1540 |
3247.8 |
|
6 |
-5.5@1ma |
5501 |
4640 |
1078.6 |
|
7 |
+5.5@ 0.1ma |
5501 |
49900 |
101.2 |
|
8 |
-5.5@ 0.1ma |
5501 |
49900 |
101.2 |
|
9 |
+12V@1ma |
13 |
5000 |
1001.0 |
|
10 |
Undefined |
5501 |
4640 |
1078.6 |
|
11 |
Undefined |
5501 |
4640 |
1078.6 |
|
12 |
Undefined |
5501 |
4640 |
1078.6 |
|
13 |
Undefined |
5501 |
4640 |
1078.6 |
|
14 |
Undefined |
5501 |
4640 |
1078.6 |
|
15 |
Reserved |
5501 |
4640 |
1078.6 |
Decimal type 15=hexadecimal type "F" is indicated when no pod is present or it is an undefined pod type. These pod types are displayed in the third column on lines 5 through 11 inclusive on the main menu of hvd. If "hvscaleq.ini" and/or "d0hvps.dat" are not found at program load time the user is warned that the file(s) were not found. This means that the converted read back will most likely be of use only in a relative sense and not at all accurate but that the hex values will still be valid.
Next the program tries to read the serial number of all possible modules in the default crate (the default crate is whatever was last saved in "hvd.ini".) If no I/O error (Bit3 or Network depending on which flavor of the program is in use) is detected then an internal array of flags set to reflect the detected state of that crate: true indicating that a channel is present.
After HVD has initialized itself and the main screen comes up, the user may activate any of the sub-functions including the "pLot" sub-menu. (The yellow "L" means that is the key to press to cause that action to take place which in this case is to call up another menu.) To get back to the previous menu or cancel pending input press the "Esc" key. The function keys and the "Esc" are "hot", i.e., they take relatively immediate action when a key is pressed with-out necessitating going back up to the main menu. (In some cases it may be necessary to hit the "ESC" key more than one time to exit nested loops.) If HVD is being run with a monochrome monitor, hot-keys are signified by them being a single number or a capitalized letter "A..Z". The arrow keys control which module and channel the program has currently selected when the main menu "Mode .." selection is set to "CHANNEL" or for a plot. Pressing down and holding the Control key and then pressing either the right or left arrows keys will scroll the read back field to show more columns.
Special Mention
"P" (for "Print") dumps the text or graphic screen image to an Epson or IBM 9 pin dot-matrix (compatible) printer. (The "Print Screen" key will probably waste a lot of paper on the main menu or on the graphic plots.)
"E" for "hElp" allows the user to view this file one screen at a time!
"H" for "Hex" controls whether the program displays values in scaled form or in a raw hex form. This switch works for user input as well. (If in hex mode the program is expecting a 16 bit value that is in base 10 (decimal) unless preceded by a "$" in which case the user can input it in hex.) If not in hex mode then the program will accept a real number (decimal point).
A note about the DAC is in order here: the DACs are all 12 bit with the MSB not used. The 12 bits are shifted left so that 1 dac count=8 when it is read back. This means that when incrementing the DAC in hex 1 bit at a time the count goes $8, $10, $18, $20, $28..$7FF8. The low three bits are not used and are masked off on input so that comparison to what is read back will agree with the 16 bit A/D when it is read back. All read backs should be positive even if the pod is a type 5 which really produces a negative voltage!
"Mode for function keys..." is very important to pay attention to. It controls whether user menu picks are operating on a "channel", "module", or the whole "crate". This applies to menu picks F3, F4, F5, F6, F7, F8 and F11. For menu picks F2 and F9 the word "module" on the menu is a reminder that the smallest unit of control is a module due to hardware. If "Mode..="crate" then F2 and F9 will work on all of the modules as above.
"Control scaling" is a new sub-menu that allows control of various read back options including an offset to "HV_read" and "I_read". It also can turn on and off a quadratic scaling correction function and has the ability to determine new coefficients for the quadratic. Also it can save and restore different offset files for different crates. Please read the help notes for this page. A new sub-menu has been added that allows the user to change how many decimal places are displayed for the readbacks. This is also saved and restored with "hvd.ini" on the main page.
Status Bits
Eight status bits are given for each channel. Two letters written vertically label each bit. The Bits are as follows:
P O O O C M W I
E N C V E E D N
"PE" = Power Enable
This is a read back of whether the supply is truly on. The "ON" bit is a read/write bit telling the supply what state it should go to if there are no trips. If the "ON" bit=1 and there are no trips then the PE bit should be 1 or the supply is broken. "There are no trips" is the operative phrase here. See below.
"ON" = Supply Setting On (on/off setting)
This is the command status switch of the power supply. This is the state that the supply will try to go to. Over-voltage and Over-Current trips are latched so that the channel must be explicitly reset before it will go on. The External, Interlock, and Watch Dog Timer trips are transient trips so that when they are cleared the supply will immediately go back on if the "ON" bit is set to 1. If the "PE" bit = 1 then the supply really went on.
"OC" = Over Current Trip
This is a latching trip condition caused by a channel's current exceeding the value set by the current limit reference displayed in the "setIDAC" field. This trip condition will be latched until it is cleared by F1 in this program or another computer.
"OV" = Over Voltage Trip
This is a latching trip condition caused when a channel's voltage exceeds a voltage limit,"HVMAX", set by a trim-potentiometer located at the front panel of the power supply. This trip condition may be reset by F1 in this program or another computer.
"CE" = Channel External
This non-latching bit goes low due to conditions generated externally, the power supply will be inhibited and the PE bit will = 0. Note that if the fault clears and the supply was not given an off command from a computer then the supply will immediately be enabled so that the PE bit will read back 1.
The CE bit can be used to tie a number of power supplies together to form a trip group so that when any member of the group becomes faulty the entire group of power supplies will go down together almost instantly.
"ME" = Module External (External Interlock)
The non-latching Module External signal goes low either because of the Interlock trip, the Watch-Dog-Timer trip, or the fault condition of other power supplies within the trip group. This non-latching signal reflects the current hardware condition. When Module external signal goes low it forces the external signals of all eight on-board power supply channels to go low and thus turns them all off. This signal can and should be used, instead of individual external signals, if all of the channels on a module belong to the same group.
"WD" = Watch Dog Timer
The Watch Dog Timer monitors the VME bus activity. If there
is not bus I/O after a certain length of time the WDT trip condition is set. This is used as a safety precaution against possible hang-up of the monitor software processes. As in the case of the "IN" bit the Watch-Dog-Timer trip can be enabled or disabled via the computer (F9 in this program toggles the WDT) to force Module External to go low. The length of time before a Watch-Dog-Timer trip condition is generated is settable by a 3-position jumper and can be a fraction of a second or up to two minutes or completely disabled. This trip is cleared by F1 or another computer.
The F9 key in this program toggles "WD" between red and white. If "WD" is in red then this bit will trip the module if the jumpers are set correctly. If "WD" is in white then the WDT will not trip the module.
"IN" = Interlock
This is a latching trip until cleared by F1 or another computer program. The Interlock signal should be set at TTL high for normal operation. If it is low a trip condition is set. This signal provides a quick way to shut down the entire system because of any emergency situation. The signal can come either from the HV module front panel LEMO or from the special P2 backplane used for the D0HV system. As of 7/15/91 "IN" may be enabled and disabled with the F2 key. If "IN" is in red then this bit is enabled. If "IN" is in white then this bit is disabled.
Readings Field
The program always comes up with the "setVDAC" column in the left. The user may view hidden column by pressing and holding down the "Ctrl" key while pressing the right arrow key several times to see other read backs or the left arrow key to get back to the original state. The control plus arrow keys do not wrap.
"setVDAC"
This is the digital setting of the High Voltage. It should always read back exactly what was written to it. It may be displayed in Hex with the software "Hex" option. See the "SPECIAL MENTION" "H" section at the beginning of this document for an explanation of how to interpret the hex readings.
"VDACref"
This is a read back (A/D) of the analogue output of the High Voltage Setting (analogue side of the DAC) of the reference of "setVDAC". "VDACref should track very closely to "setVDAC".
"HV_read"
This is an A/D of the high voltage itself through a resistor divider network that is not as accurate as an external DVM although various options exist on the "Control scaling" menu to increase the accuracy. See the help notes on that sub-menu.
"HVMAX"
This is the value that the supply will trip on Over Voltage.
"setIDAC"
This is the DAC value that the supply will trip on Over Current.
"IDACref"
This is an A/D of the output of the DAC that the supply will trip on Over Current.
"I_read"
This is an A/D of the supply current. Please see the "Control scaling" help notes on that sub-menu.
"+5Volt"
A/D of the VME crate supply voltage on this board.
"+12Volt"
A/D of the VME crate supply voltage on this board.
"-12Volt"
A/D of the VME crate supply voltage on this board.
"Temp"
A/D of a temperature sensor on this board.
"+12Vpwr"
A/D of the power this board is using.
"-12Vpwr"
A/D of the power this board is using.
Main Menu
"Node="
{ Token Ring Flavor only. }
This is the node number of the D0 VME Control Crate that the program will use to communicate too. The High Voltage Crate to be controlled must be attached to this node through the Vertical Interconnect. The node number is always displayed in hex to prevent communication confusion between users and LAN managers.
"Vi offset="
Is the base address of the HV crate you wish to address. If using the Bit3 directly in with the H.V. crate you wish to address then this should be $00FF0000.
The most significant character (nibble) of this address determines which Vertical Interconnect card the program has selected. Each card has an eight bit dip switch that corresponds to the high byte of the cards beginning 16 megabyte address space. This switch is in hex with the MSB at the top of the Vertical Interconnect card. The next most significant character determines which crate is being addressed which is determined by how the crates are cabled.
When using the Bit3 in a master crate over the first Vertical Interconnect or using the Token Ring flavor over the Vertical Interconnect then the following addresses are currently in vogue:
HV CRATE ADDRESS
1 $10FF0000
2 $11FF0000
3 $12FF0000
4 $13FF0000
where HV crate 1 is the upper most crate. The program internally knows the layout of the crate for the low 16 bits so use zeros unless you want to intentionally change the internal addressing of the program making the lower 16 bit word something other than zero. The "FF" tells the hardware that this is address is in VME I/O space which is the way the High Voltage cards are designed.
As of Version 2.23 and higher "Page Down" and "Page Up" now move the second highest nibble up and down by one. They do not wrap but are clamped between 0 and 3. To change racks or to set the address so that the Bit3 is in the crate with the High Voltage hardware set the address to $00FF0000. There is now internal logic that changes the "Add. mod" and the "Bit3" switch appropriately to the address. This logic may be over-ridden by the user by setting the "Add. mod" and "Bit3" after the "Vi offset" menu pick.
"Add. mod="
{ Both Bit3 flavors only }
Remember to set the address "Add. mod=" to $0D when using the #406 in a D0 control crate with the Vertical Interconnect. Don't forget to set it back to $2D when the Bit3 is directly in the same physical crate as the High Voltage Modules and is not using the Vertical Interconnect. (Whenever using the Vertical Interconnect make sure that a 0 is in the high nibble.)
( This is to allow one body of source code software to work with both adapters. The problem occurs when the high byte of a 32 bit address is sent to the #403 in software. Some #403 adapters always return some sort of VME bus error from valid working VME address hardware. The converse is not true: the #406 seems to do the right thing when the highest byte (of 32 bits) is not sent to it. This software switch enables or disables sending the highest byte of the 32 bit address to the Bit3 board set so that one flavor of software will work with either Bit3 adapter.) The state of this software switch is saved in "hvd.ini". The default is to use the #403 as it is cheaper and more common then the #406.
One last trick to get either the #406 or the #403 working in a D0 control crate. The 1553 Controller (used as the interface between the 68K processor in the D0 Control Crate and the Rack Monitors) does not carry VME Bus Grant level 3 across them internally. A jumper must be placed on the VME backplane if the Bit 3 adapter is to the right of the 1553 Controller! (Remember that Bus Grant level 3 is the fourth pair of vertical pins on the VME backplane as they start counting from 0. Get help if you don't know what I'm talking about.) There may be other VME cards with this problem as well.
"Bit3=" (24 or 32 bit addressing)
{ Both Bit3 flavors only. }
Tells the program which VME Bit3 interface board is currently attached to the Bit3 cable from the P.C. The model #406 has 3 LED's on the front panel and features 32 bit addressing. The model #403 has a plain panel with no LED's on it. According to Bit3 it does not matter what board is in the P.C. See "Polling Flavor" above.
"Times poll"
This is an upper limit of how many times the program will try to poll the Bit3 before giving up and returning a "*POLL TIMEOUT*" error. The current internal program default is set to 100 decimal (this is only displayed in decimal no matter how the program output switch "Hex..." is set.)
How to set this? My experience is the following. With a Motorola MV133 card as VME bus arbitrator that is not doing anything but arbitrating, and the Bit 3 card sitting next to it in the same crate, using an AST Premium 286 running at 10Mhz, then VME memory cards seem to return in 1 or 2 polls. The user may be able to force "*POLL TIMEOUT*" errors to appear by setting this number to 1. If this number is set high, say >= 1000 and if the VME bus arbitrator goes out to lunch (latches up) or if the Bit3 is being used as a VME Bus Arbiter, and doesn't return a bus error to the Bit 3 then some times it can take the PC an unduly long time to return from some operations e.,g., "init bit 3 & find all". Ten seems to be nice when not going over the Vertical Interconnect. 100-200 seems to work so far when going over the Vertical Interconnect which really involves arbitrating for two physical VME buses for one logical bus operation. (Remember you can have the program come up with any number you want by changing this and then using the "Save" option.
If another card such as an MV133 card is bus arbitrator and this number is set high enough, (but not too high,) one rarely sees "*POLL TIMEOUT*" because the MV133 card times out after ~55-80 micro-seconds when it does not see DTACK. When this happens the Bit 3 returns that it is done so the software stops polling before it has reached this software limit, and goes on to check Bit 3 error status registers. In this case the VME bus error bit is set and HVD reports a "*VME BUS ERROR*". For this version if *VME BUS ERROR*" occurs without "*POLL TIMEOUT*" then that translates into a VME NO DTACK!
If the Bit3 is the VME bus arbitrator then this indirectly determines the DTACK timeout period! The PC will keep trying until DTACK or the loop count is exceeded.
"File (setup)"
Allows the user to change the name of the file to save or restore from (below). When the "F" key is pressed the current filename will be displayed. If the "Enter", "Esc", or Function key is hit next then the name will be unchanged. If the "Backspace" key is hit then the last character will be deleted; then if another character key is pressed it will be appended to the prior string. The first time the filename is displayed if any key other than the "Backspace" or "Enter" is hit then the whole string will be deleted and whatever key was first hit will be the first letter of the new string. The arrow keys and other IBM editing keys are not implemented as editing keys, they delete the old string and display whichever key was pressed. See the DOS manual "dir" command for further valid filespec information.
"Save to above"
Saves the present state of the program variables and addresses to the file specification as determined by the "File.." menu pick.
"Restore from above"
Restores the present state of the program variables and addresses to the file specification as determined by the "File.." menu pick.
"Init i set"
This sets all of the channel voltages to 0 and the current trip to $6000. The read back will be different for each pod type depending on the scale factor used for the pod type in the "d0hvps.dat" file.
"Kick (boot) VME crate via Bit3 board"
{ Both Bit3 flavors only. }
Re-boots the VME crate that the Bit3 card is plugged into if the VME Bit3 model #406 card has the proper jumper installed. The #403 is always active.
"init bit 3 & find all"
A "3" re-initializes the Bit3 board set if the polling or non-polling versions are being run. Next the internal program flags are all initialized to an empty crate and then the crate is checked for any modules that may be present and the pods are checked for their type.
"hElp"
Displays this file to the screen one screen at a time. A new screen is displayed until a key is pressed and then the next screen is displayed. This continues until the end of the file is reached or the user presses the "ESC" key.
"Grnd rd="
If this is set to "on" then the mux is set to ground and the A/D is read at ground before setting reading the next mux channel as a means to reduce the effect of stored charge between readings. With this set to "off" the next channel is read without reading ground in between . This in conjunction with "X repeat read" below gives the user an interactive way to test some of the possible combinations for eliminating multiplexer affects.
Note that having this "off" can actually produce more noise on the output of the supply due to mux switching when the mux switches from +12Vpwr to -12Vpwr. Previous to version 2.31 this switch was always "off". From 2.31 to 2.35 it was always "on" for the change between +12Vpwr to -12Vpwr. From version 2.35 to the present it is now user defined and reads ground between every mux channel only if this is "on". If it is "off" ground is not read in between any mux channel. The program default is for this to be "on" but the state is saved in "hvd.ini".
"Hex on/off"
Controls whether the program displays values in scaled form or in a raw hex form. This switch works for user input as well. On input in hex mode the program is expecting a 16 bit value that is in base 10 (decimal) unless preceded by a "$" in which case the input is in hex. If not in hex mode then the program will accept a real number (decimal point) for kv or micro-amps.
"Dvm in/out."
If there is an "IOtech Micro 488" RS232 to GPIB adapter hooked up to the PC's "Com1" with a Fluke 8620A Digital Multimeter hooked to that then this software switch will turn on and off reading the Fluke and displaying the reading on the screen.
"pLot menu."
A sub-menu is called up which has different plotting options on it. This page has it's own help file, "hvplot.hlp" and it's own "hElp" menu pick to display the file.
"Print"
If there is an Epson or IBM compatible dot matrix printer hooked up to LPT1 then the screen image will be printed on it. Note that on the main page and any of the graphics plots the "Print Screen" key will not work correctly.
"INS/DEL to group plot"
This is a means where channels may be added or deleted from a group that may be plotted as a function of time on the "pLot" sub-menu when the "Group ..." menu pick on the same sub-menu is on. If a channel is a member of the group an "X" will appear in column 2 next to the channel number. A maximum!of 8 channels may be plotted. Note that they do not have to all be on the same card.
"4 i step F7,F8="
Every time F7 or F8 is pressed the current trip will be changed by this amount. There are no loops, increments, or delays associated with this menu pick.
"+/- ramp v/sec f5,f6"
Provides an easy way for the user to quickly change the ramp rate which is a function of a loop delay, "5", and a loop step, "6". This will change menu pick "5" and "6" according to a preselected array of 15 internal default values. These values may be over-ridden manually using menu picks "5" and "6". This displays and controls the rate the high voltage will be changed by. Internally this consists of two arrays; a delay array and an increment array. This rate is the fastest that voltage will be changed when menu selections F5 and F6 are used. (It is probably pretty accurate in the Bit3 flavors but the Token Ring flavor is not guaranteed at the faster rates.)
"5 loop ms delay f5,f6"
After the voltage is incremented by the amount displayed in menu pick "6" the P.C. will always wait this many milli-seconds before either exiting the loop (if "7" is reached) or incrementing the voltage the next step (and then waiting again...). This does not take effect until F5 or F6 is pressed.
"6 loop v step f5,f6"
When F5 or F6 is pressed this is the amount the high voltage will be changed by before pausing for the time displayed in "5" before the channel is again incremented. This continues until the step size is reached. The approximate rate is displayed in the menu pick "+/- ramp v/sec f5,f6". If the value for menu pick "7" is smaller than menu pick "6" then the value for menu-pick "6" will be automatically used in which case the value in "+/- ramp v/sec f5,f6" will not be close. Also when approaching the end of a step the last loop step will only be the amount necessary to reach the step.
"7 v by step f5,f6"
Every time F5 or F6 is pressed the high voltage will be changed by this amount. This amount will take place in increments according to menu pick "6" and delayed by menu pick "5" to give an approximate average rate change displayed in "+/- ramp v/sec f5,f6".
"a/d poll"
After the Analog to Digital (a/d) chip is told to convert the software will check to see that the a/d is done this many times before an error message is generated to the screen informing the user that the a/d did not generated an End Of Convert, EOC. If an EOC is generated before this number is reached the loop will be exited. Previous to Version 2.30 this number was fixed at 1000 tries. As of Version 2.30 and above the user may set how many times to poll. With the Polling Flavor on a very fast machine (GATEWAY 2000 ISA bus 486 @33Mhz with 64k secondary cache in addition to the 8k in the CPU) both bits may be made to fail by setting this to 0. Somewhere between 1 and 2 Bit 0 fails but not Bit 6 (usually). How this is set is up to the user and his equipment and what tests are being performed on the hardware.
Additionally, the a/d checkdone routine has been modified to look at both bit 0, EOC, and bit 6, "converting", of the a/d status register and report all combinations of them not going low. This was done because the 68k high voltage software was looking at bit 0 (the official End Of Convert,EOC,) while HVD only looked at bit 6, "converting". Both go low when done. Originally HVD only looked at bit 6 because it returned slightly faster than EOC and because by the time the P.C. really got to reading the A/D EOC would normally be done. The 68k goes a lot faster then the P.C. so EOC was used for it's code. This program now checks for both to get to the VME bus. This value is saved in "hvd.ini".
"Mode for function keys ..."
Where the "..." is above should read "channel", "module", or "crate". This is the state that the program is currently in. If "channel" is selected then any of this pages operations will operate on the currently selected channel only. If "module" is selected then the user is operating on all of the channels of the currently displayed module. If "crate" is displayed then the user is operating on all the channels in a crate. This applies to menu picks F1, F3, F4, F5, F6, F7, F8 and F11. For menu picks F2 and F9 the word "module" on the menu is a reminder that the smallest unit of control is a module due to hardware. If "Mode..="crate" then F2 and F9 will work on all of the modules as above. Note that the function keys are active in the main menu and when the plots are not busy plotting; however the function keys are not active in the "pLot" sub-menu.
"X repeat read="
Controls how many times the same channel is read before the result is used to be displayed to the user. Only the last reading is displayed, the previous ones (if any) are ignored. E.g., if this is set to one then this reading is used. If this is set to two then the
first reading is discarded and the second one is used. This in conjunction with "Grnd rd=" (on/off) above gives the user an interactive way to test some of the possible combinations for eliminating multiplexer affects.
"# ms. message delay"
Controls how long the program will pause after an error message is displayed in red. Previous to Version 2.30 this number was fixed at 1200 milliseconds. As of Version 2.30 and above this is initialized to 1 second. although the user may set this to small values for scope loops. This value is not saved in "hvd.ini".
"F1 reset trip"
Resets all latching trips for a channel, module or crate according to "Mode...".
"F2 intlk mod togl"
Masks and unmasks in hardware the "IN" bit for a module or a whole crate of modules depending on the "Mode..." menu pick. If the "IN" is in red then the interlock for the module is enabled. If "IN" is white then it is disabled.
"F3 hv off"
Sets the "HV" bit off for a channel, module, or crate depending on the "Mode..." program menu pick.
"F4 hv on"
If the "Enable/disable auto-offset using f4" is "ON" on the "Control scale" sub-menu and the channel(s) (according to mode) are really off then the program will take an average of the current reading of "HV_read" and "I_read" and store them in an array which the program will use to correct for any DC offsets in the read back if those features are enabled on the "Control scale" sub menu.
Next the "HV" bit is set on=1 for a channel, module, or crate depending on the "Mode..." program menu pick. It will not actually go on until all the trips are good and the latching trips have been reset with F1. When the supply is really on then "PE" will be 1.
"F5 step ramp V-"
Sets a channel, module, or crate's SetVDAC down by the step size shown in menu pick "7" in increments shown in "6" with a delay shown in "5" for a channel, module, or crate depending on the "Mode..." program menu pick.
"F6 step ramp V+"
Sets a channel, module, or crate's SetVDAC up by the step size shown in menu pick "7" in increments shown in "6" with a delay shown in "5" for a channel, module, or crate depending on the "Mode..." program menu pick.
"F7 i down"
Sets a channel, module, or crate's SetIDAC down by the current step size in menu pick "4" for a channel, module, or crate depending on the "Mode..." program menu pick.
"F8 i up"
Sets a channel, module, or crate's SetIDAC up by the current step size in menu pick "4" for a channel, module, or crate depending on the "Mode..." program menu pick.
"F9 wdt module toggle"
Masks and unmasks in hardware the "WD" bit for a module or a whole crate of modules depending on the "Mode..." menu pick. If the "WD" is in red then the interlock for the module is enabled. If "WD" is white then it is disabled.
"F10 Quit"
Exit program without changing anything in the HV crate. Pressing and holding down the control key and then pressing the "End" key will turn off all of the High Voltage modules in the crate before the program exits the same as "hvd5" does.
"F11 goto target v"
When this is selected the channel, module, or crate as determined by "Mode..." will ramp to the value selected and displayed by F12. It will ramp the channel(s) in step sizes using the same routines that F5 or F6 does according to the settings in menu picks "5" , "6", and "7". If the program is in "module" or "crate" mode it will change all of the channels by one step size ("7") before starting over again to do the next step. Also before it ramps that channel it makes sure that is has not tripped ("PE"=1) before stepping that channel. If it has the user is informed and the loop is exited. The value that is read back and displayed while this is going on is "setVDAC" and not "HV_read". No checking is done to see that all of the channels are within some range before or during the program changing them.
"F12 target=..."
Allows the user to enter a new target voltage that the channel, module or crate as determined by "Mode..." will ramp to when F12 is pressed.
High Voltage Scaling Setup Menu Detailed Help Notes
"Help"
Prints this file one screen at a time.
"Print this screen to lpt1"
Copies this screen to the printer. (Don't do this if a printer is not there or the program might bomb!)
"Jump (goto) sub-menu for main menu display setup."
This calls up another sub-menu which allows one to control the number of digits displayed for the fractional part of the values displayed on the main page.
"Dir of offset files"
Allows the user to do a directory of available files with two keystrokes: "D", and when the mask is displayed edit it as described below in "Filename..." or "Enter" to use the current mask.
"Filename of offset file"
Allows the user to change the file name and/or file specification that the voltage, "HV_read", and current, "I_read", offsets will be either saved or restored from with the menu picks below. When the program is first started it will always look for and read whatever was last saved in "default.off". When this menu pick is made the current filename will be displayed. If the "Enter", "Esc", or Function key is hit next then the name will be unchanged. If the "Backspace" key is hit then the last character will be deleted; then if another character key is pressed it will be appended to the prior string. The first time the filename is displayed if any key other than the "Backspace" or "Enter" is hit then the whole string will be deleted and whatever key was first hit will be the first letter of the new string. The arrow keys and other IBM editing keys are not implemented as editing keys, they delete the old string and display whichever key was pressed. See the DOS manual "dir" command for further valid filespec information.
"Save current offsets to file"
Writes the current offsets in computer memory to the file.
"Restore offsets from file"
Reads the specified file offsets into the computer memory.
"Zero offset memory array"
Sets all element of both the voltage and current offset arrays to 0.0.
"Times (number of) to read for average"
This controls how many times the program will read a channel before it does the averaging.
"Auto offset determine (turns off all supplies first!)"
This turns off all of the supplies in the crate; waits 5 seconds for the voltage to decay to 0.0; and then determines the offsets for the voltage and the current read backs: "HV_read" and "I_read" on the main page for all of the channels currently responding in the present crate.
"Enable/disable auto-offset using f4"
With this switch on every time the "on" key, "F4", is pressed the program will automatically determine the offset for "HV_read" and "I_read" on the main page and store it program memory for the channel(s) that were turned on. These value(s) will be lost when the program is exited unless this page is called up and the offset values are written to a file with the "Save..." option above. As of Version 2.20 and higher this correction now works with the plots as well.
"Voltage offset (toggle)"
With this "ON" then each channels' voltage offset will be subtracted from "HV_read" before it is displayed. With it "OFF" nothing is subtracted.
"Current offset (toggle)"
With this "ON" then each channels' current offset will be subtracted from "I_read" before it is displayed. With it "OFF" nothing is subtracted.
"Quadratic scale correction (toggle) "
Is the same as the "Quadratic scale correction (toggle).." on the previous sub-menu:. With this switch "OFF" the "HV_read" scaling will be linear according to the H.V. Pod Supply Type (0..15) and its scaling in "d0hvps.dat". (The supply type corresponds to the row.) With this switch "ON" then an additional correction will be done according to the quadratic equation:
HV_read = a + bx + cx 2
where a,b, and c are constants entered in the first three columns of "hvscaleq.ini" of the appropriate Pod type and x is the previously linear scaled A/D with any offset already algebraically subtracted according to the "Voltage offset" menu pick above.
"Open a door to dos"
Allows the user to interact with DOS while HVD is still loaded into memory. (If there is enough memory in the machine you are running in HVD may even be invoked again! The third time there will probably not be enough memory.)
"Global diagnostics."
This is an internal software switch that is used for debugging purposes. Normally it should be off. If it is on then various (obscure) messages may be printed to the screen at various times that is probably of meaning only to the programmer(s) and/or engineers. If any averaging of the read backs is done then each reading will be displayed along with other junk.
"Menu for curve fitting."
This page has it's own help notes. It should not be called up with chambers connected to the pods because menu picks "1", "2", "I" and "G" on it's sub-menu will change the setting of only one channel. This has the ability to automatically find the coefficients of the quadratic that will correct for any scaling in the read back to within a volt out of 5000 (0.02%). It will do this to either an external reference: a Fluke DVM attached via an IOtech GPIB to RS232 adapter or scale the read back to match the setting. It can also archive the results to a file. Presently this scaling correction will be applied to all supplies of the same type. No provision exists to correct on an individual channel level at present.
Curve Fit Menu Detailed Help Notes
"hElp"
Prints this file one screen at a time.
"Open a door to dos"
Allows the user to interact with DOS while HVD is still loaded into memory. (If there is enough memory in the machine you are running in HVD may even be invoked again! The third time there will probably not be enough memory.)
"Print this screen to lpt1"
Copies this screen to the printer. (Don't do this if a printer is not there or the program might bomb!)
"List of fit data files."
Allows the user to do a directory of available data files with two keystrokes: "L", and when the mask is displayed edit it as described below in "Filename..." or "Enter" to use the current mask. The '*.dat' is a reminder of a default recommended extension for a data file. The mask may be any legitimate DOS file specification up to 79 characters and represents the last mask that was used. (Remember you can have the program come up with whatever you want by changing this and then doing a "Save ..." on the main menu.)
"Filename of fit file"
Allows the user to change the file name and/or file specification that menu picks "Curve fit..", "Difference..fit test", or "Iterate automatically.." below will write (echo) their data to when they are run. When this selection is made a file name will be displayed. If the "Enter", "Esc", or Function key is hit next then the name will be unchanged. If the "Backspace" key is hit then the last character will be deleted; then if another character key is pressed it will be appended to the prior string. The first time the name is displayed if any key other than the "Backspace" or "Enter" is hit then the whole string will be deleted and whatever key was first hit will be the first letter of the new string. The arrow keys and other IBM editing keys are not implemented as editing keys, they delete the old string and display whichever key was pressed. See the DOS manual "dir" command for further valid filespec information.
"Record (toggle) fit file on/off"
It this is "ON" then the user may record the results of "Curve fit..", "Difference..fit test", or "Iterate automatically.." to a file.
"Kurrent/voltage fit"
If this is set to "HV_read" then this is what will be used in "a/d" in the all of the program output else "I_read" will be what is used instead. The "Curve fit ..." menu below is the only place below that is meaningful to use with "I_read". This feature was added later and does not make any sense when used with "Difference.." or "Iterate..." If this is in "I_read" mode then an additional menu pick will appear below which will allow the user to tell the program what resistor is being used for the DVM reading. If the DVM is present and being read and the user enters a value <> 0 then the program DVM reading will display the DVM value scaled to current. If a value of 0 is entered by the user then the DVM reading will be in voltage.
"Milliseconds before reading averages"
This is a user settable delay between after the next ramp increment and when the readings are taken. It is to allow the voltage to track the D/A and settle down.
"Number of times to read for average"
This tells the program how many times to take samples before averaging for that point on the ramp.
"How many steps to take"
Determines the number of times the program will pause for a sample before reaching the target voltage. This is how many points will be taken to fit too.
"Terms in polynomial fit"
This is how many terms the program will use in the polynomial to try to fit the data. (The number of terms is always one more than the order of the polynomial.) Currently the limit of the fit portion of the program is 30 due to the size of the static array. However the curve fitting software will probably bomb with run time errors (e.g., #205 which is floating point overflow ) when trying for too many terms in the polynomial. With 20 samples this occurred when the number of terms was set to 7 or 8. Although you can readily change the number of terms in the polynomial, the program always uses three terms to scale HV_read when the previous menu's "Quadratic scaling.." is set to ON". Thus for some options on this page there is a check for this to be 3 before the option is executed.
The curve fitting software routines from Miller (see below) are not robust in the sense that they do not do any checking for reasonable input. E.g., checking to make sure numbers are not negative before taking the square root of them. If "HVD" does blow up it is best to reboot the computer to restore the interrupt vectors this program used but was not able to restore because it did not run to completion.
"Voltage to ramp to"
This is the maximum voltage that will be ramped to in taking the data.
"Slot"
Allows the user to change the current active slot to take data on and do a curve fit without going back to the main page.
"0,1,2,3,4,5,6,7"
Allows the user to change the current active channel to take data on and do a curve fit without going back to the main page.
"x,Y swapped as indep.,depend. vars"
This controls which is on the x-axis (independent variable) and which is on the y-axis (dependent variable) for all of the curve fit items: "Curve fit..", "Differences..", and "I". If this is "OFF" then the help notes that follow are correct as they are written else swap them. E.g., with this off and the DVM in use in "Curve fit.." then the DVM is the x-axis (independent) value and HV_read for the y-axis (dependent) variable ; with this "ON" then HV_ read is the x-axis and DVM is the y-axis. The quickest way to find the coefficients is to have this "ON" and do select "Curve fit.." below for a good fit. To check the fit turn "x,Y.." "OFF" and set "Quadratic scale correction..." to "ON" and do "Difference..fit test". If the resulting Correlation Coefficient is low (poor fit) with very small differences then the current scaling coefficients of the polynomial are probably close to being as good as a correction as is possible to make.
If "Difference..fit test" or "Iterate automatically.." are run with this "ON" the third term grows large very quickly and may cause a floating point overflow, run time 205 error. With it off then the comments under "Difference..fit test" and "Iterate automatically.." are appropriate.
"Quadratic scale correction (toggle) "
Is the same as the "Quadratic scale correction (toggle).." on the previous sub-menu:. With this switch "OFF" the "HV_read" scaling will be linear according to the H.V. Pod Supply Type (0..15) and its scaling in "d0hvps.dat". (The supply type corresponds to the row.) With this switch "ON" then an additional correction will be done according to the quadratic equation:
HV_read = a + bx + cx 2
where a,b, and c are constants entered in the first three columns of "hvscaleq.ini" of the appropriate Pod type and x is the previously linear scaled A/D with any offset already algebraically subtracted according to the "Voltage offset" menu pick above.
"Join coef. from 'C" to 'PODx.DAT' to file"
With this set to "ON" the coefficients from men pick "Curve fit.." will automatically be appended to the appropriate pod file.
"Curve fit test"
The following description is with "x,Y.." set to "OFF". This test sets the currently selected channel to 0. It then waits five seconds for the voltage to decay to 0. If the program is set to use the DVM, "Dvm in/out" on the main menu, then it takes the average of that reading for the x-axis (independent) value and the HV_read for the y-axis (dependent) variable for that point; else it will take the DAC setting, "setVDAC", for the x-axis (independent) value and the HV_read for the y-axis (dependent) variable for that point. The channel is incremented and the next reading is taken until the target voltage is reached. The program then tries to find the best fit with the number of terms specified for the polynomial and displays the results. The intent here is that the software switch "Quadratic scaling.." should be "OFF". If the "x,Y swapped.." menu pick is "OFF" the coefficients will be close but not very good and will need adjustment. Although this can be done with the process described under "I" below it is quicker to run "Curve fit test" with "x,Y swapped.."set "ON" for one-pass good correction.
If the DVM is not being used and the "Kurrent.." option is set to "I_read" then with "x,Y" swapped ..."= "OFF" then the x-axis is the voltage read back and the y-axis is the current .
"Browse fit file"
Calls an external program "browse" and passes to it the name in "Filename ...". above. This allows the user to leisurely view the results of "Curve fit..", "Difference..fit test", or "Iterate automatically..". For this to work the external program "browse" must be available in the DOS path. If it is not available the user is free to print the file out or to type it to the screen or use any other utility they wish. "ESC" must be used to exit this program because it is an external program.
" 9 resist. val for cur calc ="
If the "Kurrent..." menu pick is set to "I_read" mode then this menu pick will appear. If the DVM is present and being read and the user set this <> 0 then the program DVM reading will display the DVM value scaled to current. If a value of 0 is entered by the user then the DVM reading will be in voltage. This makes it possible to do a curve fit of an external current reading (the DVM) verses what the program reads from the hardware.
"Append present coefficients to pod file."
Whenever this is selected the last coefficients will be appended to a file, "PODx.DAT" where "x" is a pod type 0 to 15. If the file does not exist in the current sub-directory then a new file will be created. This button would be pressed after "Curve fit.." or "Difference..fit test" or "Iterate automatically.." has been run. Data from "Curve fit.." and "Difference..fit test" or "Iterate automatically.." will be quite diffent so be sure not to mix different types of data in the same file. Use DOS to "delete","rename",or "copy" the previous pod file before archiving the results of a different test. Please read carefully beginning from "Y" on down. The "anneX..." option below would be run after doing an "Iterate automatically..". Note also that if "A" is pressed when the "Join..." option is "ON" in combination with running "Curve fit.." that the same data will be entered twice.
"Use last coefficients for present scaling."
This will move the last coefficients into the program memory and use these new coefficients for all scaling of supplies of this pod type for HV_read.
"Differences (dvm-hv_read) fit test."
This was developed and meant to be used with "x,Y swapped.." meant to be "OFF". The following description is with "x,Y.." set to "OFF". "Differences.." is the same as "Curve fit.." above except that the y-axis (dependent) variable is the (DVM minus HV_read) if the DVM is being used or the (DAC setting, "setVDAC", minus HV_read) if the DVM is not being used. The intent here is that the software switch "Quadratic scaling.." should be "ON" when this is run. If this is the case then if the coefficients obtained in this way are (algebraically) added to the coefficients obtained in "Curve fit.." above then the sums of the coefficients will correct for that channel to within less than 1 volt throughout the 5,000 volt range of the supply!
"Z add algebraically present coefficients to current scaling."
This will add the coefficients from the last run to the present scaling. This is useful if you want to make a correction to the presently used coefficients. For example if one just did "Difference.." with "x,Y swapped.." set "OFF" and "Quad.." set "ON" then one might improve on the presently used coefficients if the last run had a very good correlation factor (1.0 = perfect correlation).
"Iterate automatically to find coefficients (takes two times)"
This was developed and meant to be used with "x,Y swapped.." set "OFF". "Iterate.." consists of the following combination of the above menu picks:
(1) "Quadratic scaling correction" set to "OFF".
(2) Hitting "Curve fit..",and then "U" on this menu.
(3) "Quadratic scaling correction" set to "ON"
(4) Hitting "Difference..fit test", and then "L" on this menu.
(Note that the "Quadratic scaling.." is left on.)
Also note that at the end of this procedure the "coefficients" contain only the corrections and that the present memory scale (coefficients) are now being used by the program to scale all pods of this type in the program. This leads us to our next menu pick.
"anneX present memory coeffecients to "PODM*.DAT" file."
This takes the present memory scale (coefficients) now being used by the program for the type of pod just measured and appends them to the appropriate memory pod file. If you want to get back the original memory scale factors the only way to do it is to exit the program and then re-enter the program again. The old scale factors will be read in from "hvscaleq.ini" or you can make the current ones the future one with the option below. The pod file name is of the form "PODMx.DAT" where "M" stands for memory and the "x" is a number 0-15 representing the pod type under measurement.
"Write all present memory coefficients to "hvscaleq.ini"
Will write the present memory scale factor (coefficients) to "hvscaleq.ini". Thus what is now current will be used the next time the program is run as well.
"Goto special average test menu. Warning: sets current supply to 0!"
This takes the current setting of the supply and saves it in memory for restoration when this menu is exited. It then sets the supply to a resting voltage (probably 0 but whatever it was the last time "hvd.ini" was made). Then the test menu is displayed and the user is again in control. This menu has it's own help detailed notes.
GENERAL INFORMATION ABOUT THE FITTING SOFTWARE
The routines that do the fitting software were typed in and adapted from "Pascal Programs for Scientists and Engineers" by Alan R. Miller. The code is mostly from Chapter 7 and is a polynomial Least-Squares Fit Using Gauss-Jordan Elimination. Once typos were corrected results were checked against his examples. A restriction of this technique is that the coefficients must be linear. A Correlation Coefficient of 1.0 indicates that the fit was perfect. "Errors" refer to "standard errors and are derived from the square roots of the diagonal elements of the inverted matrix. Large differences in these elements suggest ill conditioning. Therefore, if the square of the errors are many orders apart, then ill conditioning may be present. " (pg. 203).
On page 104 he states, "A singular matrix has a determinant of zero. The corresponding set of equations has either no solution or many solutions. An ill-conditioned matrix, by comparison, is one that is nearly singular. It produces incorrect or inaccurate answers. A small change in the input data can cause great changes in the answer. " E.g., as two lines become increasing more parallel the point of intersection becomes increasing uncertain. "Various tests for ill conditioning have been suggested. One of these is to compare the values of the inverted matrix to those of the original matrix. If there are differences of several orders of magnitude, then it is likely that ill conditioning is present. Another test is to take the inverse of the inverse of the coefficient matrix and compare the result to the original matrix. They should of course, be the same. This will test the inversion algorithm and the computer arithmetic at the same time. Yet another test is to compare the magnitudes of values along the major diagonal. They should not be too far apart."
Special Test Average Menu Detailed Help Notes
Note: this page is dependent on settings of previous menu. For normal use of this sub-menu, "K" on the curve fit menu should be set to "hv_read".
"hElp"
Prints this file one screen at a time.
"Print this screen to lpt1"
Copies this screen to the printer. (Don't do this if a printer is not there or the program might bomb!)
"Delay (milliseconds) between target voltage & reading averages"
This is the same internal variable as "Milliseconds before reading averages" on the previous menu. It is a user settable delay between the "Target voltage..." below and when the readings are taken. It is to allow the voltage to track the D/A and settle down.
"Number of times to read for average"
This tells the program how many times to take samples before averaging for that point on the ramp. It is the same internal variable repeated here for convenience.
"Target voltage for average"
This is the same internal program variable as "Voltage to ramp to" on the previous menu. The difference is that this menu just sets it to this voltage without any steps in between. This is the voltage that the data will be taken.
"Voltage after average to go to"
This is the resting voltage that the program will set the channel to when this menu is called up and when not running the test below.
"Run test"
Ramps the supply to the target voltage; waits the specified delay; reads the specified number of times and displays the average; and then ramps it back down to the resting voltage.
HVD pLot sub-menu help notes
"hElp"
Displays this file to the screen one screen at a time. A new screen is displayed until a key is pressed and then the next screen is displayed. This continues until the end of the file is reached or the user presses the "ESC" key.
"Print this screen to lpt1."
Dumps the text or graphic screen image to an Epson or IBM 9 pin dot-matrix (compatible) printer. (The "Print Screen" key will probably waste a lot of paper on the main menu or on the graphic plots but will work on this sub-menu!)
"Choose a value to plot."
(Note: In this version this is no longer a separate menu option but always comes up whenever the user plots something.) It allows the user to select what is to be plotted. If the "Enter" key is pressed then the last item selected will be plotted. The following menu is presented to the user:
"pick something to plot or 'Enter' to use def=...
Enter a hex number which corresponds to the following as below:
0 setVdac is a d/a and cannot be plotted
1 VDACref (a/d of HV analogue setting)
2 HV_read (a/d of HV)
3 HVMAX (a/d of HV OV trip reference)
4 setIDAC is a d/a and cannot be plotted
5 IDACref (a/d of analog over-current trip reference )
6 I_Read (a/d of supply current)
7 +5 Volt
8 +12 Volt
9 -12 Volt
A Temp
B +12V pwr
C -12V pwr
or ESC to Quit"
These options are the same as the read backs on the main page and are explained in the "Readings Field" above and in the main help notes, "hvd.hlp".
"Histogram plot"
When this is selected the user will be asked to enter a range to bin and how many bins to use. Then it will begin reading the channel and binning the results and plotting the result as binning is taking place. To suspend binning hit "S". To continue hit "C". One may hit "M" to see a menu of other active options while the plot is going on. To keep the binning from overwriting the menu hit "S" first. This menu should be pretty obvious. "Data dump" writes the data to a file. The function keys do the same thing as on the main menu so see "hvd.hlp" for an explanation of them. Remember that the "Mode..." control still applies to this page so while you are only plotting one channel you may be changing the whole crate with the function keys. Binning and plotting is suspended while ramping is going on: there is no window that opens so you can see what is happening as on the main menu. (This is because it would require a lot of new software to do this kind of windowing in a graphic mode or to come up with a new scheme.)
Note: as of Version 2.20 and higher all the plots have been re-written to carry the new offset and quadratic correction scaling throughout the plots. This required quite a bit of re-writing the histogram plot including changing from integer binning to real binning. The cursor still moves around in integer binning on all the plots.
"pLot reading vs time."
After the user has input the upper and lower limits of the plot (y axis-value) and a delay in micro-seconds between each sample point there is a pause while the computer reads the data into it's memory and then plots it.
CAUTION:
I have not tested this plot for X-axis (timing) accuracy with all of the new flavors of "HVD". The original version, "HVD5" was written using the Bit3 interface board set which probably could read or write at least once every 10 micro - seconds. Since each data point requires one write and one read to VME the fastest data could be collected would be on the order of ~20 micro-seconds. (This is not counting whatever time the A/D needs to do a conversion.) The Bit 3 flavors for "HVD" will definitely not be faster and will probably be slower than this because they make function calls. I have not done any bench marks lately but whatever benchmarks I do will be machine dependent.
Using the Token Ring flavor the fastest that I can write is about once every 2.5 milli-seconds. The fastest I can read is ~5 milli-seconds. This is with no Token Ring bridges between the D0 ring and the Accelerator Ring in which case a read is ~8 milli-seconds. Please keep all of this in mind when looking at the plots and when entering the delay between points. There are no limit checks on input for reasonable parameters because I am not sure what they are.
"Group plot mode (of above) of selected channels."
If this is on and there are channels selected in the group on the main page (indicated by an "X" next to the channel number) then when this pages "pLot reading vs time." menu pick is selected all the members of the group will be plotted instead of just one. If no channels are selected in the group the program may appear to hang. Press the "ESC" key to exit. Select some channels and try again or turn this software switch off. One to eight channels may be in a group. The program loops are such that all the channels are sampled for the first point, the second...500.
"Adc linear regression for 1 channel: ..." and
"Dvm linear regression for 1 channel: ..."
Both of these work the same way except that one uses the DVM to read back whatever is plugged into it (presumably the high voltage) instead of the A/D for that channel. The channel is set to 0, then 20 samples are taken, the channel is incremented and 20 more samples are taken for the number of sample intervals the user specified. The channel is put back to it's original value and a chi-squared plot is displayed.
"Settling time (milli-sec.) for dvm linear regres..."
This is how long to wait after incrementing the DAC before taking the 20 samples for that data point above.
"Ibm/epson mode for printing."
If "current= epson..." then this program is set to work with an Epson FX (9 pin) dot matrix printer with Epson DIP switch set to Epson mode. (If you have an Epson clone printer see your printer manual as they vary.)
Otherwise this program is set to work with the IBM Professional and Graphics 9 pin dot matrix printer or compatible (including Epson set to IBM compatible mode).
The easiest thing to do if you have either one of these printers is to try printing a plot and if it works then this is o.k. If there are horizontal lines or spaces in the plot borders then set this software switch the other way and try it again. The state of this switch is saved in the "File " menu pick on the main menu.
"Re-calibrate the ADC/CS5016"
This does the same thing that pressing and holding down the "Alt" key and then pressing down the "A" key did on "HVD5" in text mode. According to the "HVD5" help file: "{Alt-A} : Causes the ADC to do the same calibration procedure it does at power up. After an extended period of time there may be need for re-calibration. It should be noted that while performing the ADC Reset, the HV module control board stops all clock signals for all the power supply channels and will cause the outputs of the power supplies to drop sharply.
"Timing calibration"
This does the same thing as pressing and holding down the "Alt" key and then pressing down the "T" key did on "HVD5". According to the help notes for "HVD5" does "...timing calibration for time_plot mode display." which in this program is "pLot reading vs time."