Go to bottom of page
8.1 PRESENT SOFTWARE . . . . . . . . . . . . . . . . . 8-1
8.2 PROPOSED MODIFICATIONS . . . . . . . . . . . . . . 8-3
8.3 PROBLEMS AND COMMENTS . . . . . . . . . . . . . . 8-5 CHAPTER 8 SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS The SLC system will need a facility to control a number of different analog devices using a Transiac DAC channel to output a voltage and a SAM channel to monitor the setting. In general, these devices look like magnets with the following exceptions: o They do not need to be calibrated, and should not be. o They are not standardized. o When trimmed, the DAC should be set but no attempt should be made to improve the setting by iteration. Since the necessary functions are properly a subset of the magnet control functions, it will be possible to use the existing magnet control software to control these analog channels with only minor modifications.
8.1 PRESENT SOFTWARE In the present magnet control software, there are five possible control functions:
SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS Page 8-2 o CALIBRATE The Calibrate function sets the DAC to specified high and low values and recalculates a linear fit to the DAC vs I transfer function. o CHECK The Check function reads the appropriate SAM channel and calculates the present value of current and B field, BACT. It then compares BACT with the desired field, BDES, and sets status bits to indicate if the reading is within tolerance. o PERTURB The Perturb function sets a new value of BDES by extrapolating from the present DAC setting. There is no readback or checking. o TRIM The Trim function takes the desired field, BDES, calculates the appropriate DAC setting, and sets the DAC. It then reads back the field, BACT, compares it with BDES, and iterates up to 10 times with new DAC settings to get BDES within tolerance of BACT. o STANDARDIZE The Standardize function cycles the magnet from full high to full low current a specified number of times, NSCY, to reproduce the cycle used by the magnetic measurements group to give the magnet amnesia. If NSCY is 0, a magnet is not
SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS Page 8-3 standardized. The present software requires a magnet to be calibrated before it can be Perturbed, Trimmed, or Standardized as all three functions use the DAC vs I transfer function from the calibration to calculate desired DAC settings. The present software has reserved two hardware status, HSTA, bits to indicate that a magnet is not capable of full control. These bits are: o HSTA_NOCTRL to indicate that the magnet can be read but not controlled. If this bit is set, all functions except Check are disabled. o HSTA_NOTRIM to indicate that the magnet can be controlled but not trimmed independently. This has been used in cases where multiple magnets share a common DAC and ADC channel. If this bit is set, the Trim function is disabled.
8.2 PROPOSED MODIFICATIONS The new devices may be controlled using the existing routines in the Micros and the existing control routines in the VAX. They can use the existing magnet displays, but they will not be included when the ALL magnet button is selected.
SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS Page 8-4 It is suggested that the 2 HSTA bits currently in use be expanded to 4 disable bits, one for each actual control function. o HSTA_NOCALB to indicate that calibrate is disabled for this device o HSTA_NOPTRB to indicate that perturb is disabled for this device o HSTA_NOTRIM to indicate that trim is disabled for this device o HSTA_NOSTDZ to indicate that standardize is disabled for this device In addition, one extra bit is needed to indicate that the device can be trimmed, but that no attempt should be made to iterate to improve the setting. o HSTA_NORETRY to indicate no iterations on trim The standard bit configurations would then be as follows: o NO BITS SET for normal magnets with full control available. o HSTA_NOCALB+HSTA_NOPTRB+HSTA_NOTRIM+HSTA_NOSTDZ for extra magnets sharing a single DAC and ADC channel. o HSTA_NOCALB for malfunctioning magnets which will not calibrate but are still needed by the system in a limited capacity.
SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS Page 8-5 o HSTA_NOCALB+HSTA_NOSTDZ+HSTA_NORETRY for the new analog devices. It is also necessary, to allow devices with the HSTA_NOCALB bit on to be perturbed, trimmed or standardized using the test DAC vs I transfer function instead of the calibrated transfer function.
8.3 PROBLEMS AND COMMENTS Problem: These devices will be grouped under a new database Primary name or names, e.g. :PHAS:. As the present set of primary definitions have used all the available primary definition space, the database will need to be modified before these devices can be defined. Problem: After the addition of the 5 bits described above, there remain only 2 unassigned bits in the Hardware status word. This is not much growing room. Comment: For present applications, the HSTA_NOSTDZ bit is unnecessary as magnets which should not be standardized have the number of cycles, NSCY, set to 0. In addition, HSTA_NOTRIM and HSTA_NOPTRB are probably redundant and could be combined. This may be necessary if more status bits are needed. Comment: Since the HSTA word is in the database supertype 2, and hence modifiable by the VAX, software could be written to turn these bits ON and OFF dynamically. This may be more dangerous than useful.
SOFTWARE TO CONTROL GENERALIZED ANALOG KNOBS Page 8-6 Problem: Since the new devices will be controlled by the same routines in the micros as the magnets, there is a possible problem arising from the fact that all devices with the Trim command bit set will be Trimmed whenever the magnets in that sector are Trimmed. Other functions will not be used, except check and perturb, and will not be likely to cause problems. Comment: Care will have to be taken to define tight Trim tolerances and loose Check tolerances for the new devices so that they will be trimmed whenever their BDES is changed but they will not fail Check due to the inaccuracy of the readback.