[SLAC Controls Software Group [SLAC Controls Department] [SLAC Home Page]

Go to bottom of page



14.1 OVERVIEW . . . . . . . . . . . . . . . . . . . . 14-1

14.2 KLYSTRON TIMING -- HEURISTIC FUDGE FACTORS . . . 14-1

14.2.1 Delay Calculation . . . . . . . . . . . . . . 14-1

14.2.1.1 Delay Register . . . . . . . . . . . . . . . 14-2

14.2.1.2 Sample/Trigger Time . . . . . . . . . . . . 14-2

14.2.1.3 PDUT . . . . . . . . . . . . . . . . . . . . 14-3

14.2.1.4 TERR . . . . . . . . . . . . . . . . . . . . 14-3

14.2.1.5 HERR . . . . . . . . . . . . . . . . . . . . 14-3

14.3 MESSAGE SERVICE PROTOCOL . . . . . . . . . . . . 14-5

14.3.1 VAX-VMS To MICRO Message Structure . . . . . . 14-5

14.3.2 MICRO To VAX-VMS Message Structure . . . . . . 14-6

14.4 KLYSTRON FUNCTION CODES . . . . . . . . . . . . 14-7

14.5 SPECIAL SECRETS OF THE KLYSTRON JOB . . . . . . 14-9

14.5.1 KLYSDATA.INC . . . . . . . . . . . . . . . . . 14-9

14.5.2 KLYSUNITS.INC . . . . . . . . . . . . . . . . 14-9

14.5.3 FUNC2.INC . . . . . . . . . . . . . . . . . . 14-10 CHAPTER 14 KLYSTRON SUPPORT

14.1 OVERVIEW *** Not yet written ***

14.2 KLYSTRON TIMING -- HEURISTIC FUDGE FACTORS The trigger system for SLC is dependent of the propagation of triggers from the PDU's to all devices. The trigger is started from a Fiducial on the main drive line, and software applies a correction TREF to the nominal PDUT time such that time=zero is defined such that a PDUT=0 trigger appears coincident with the "TREF" beam (upstairs!) at the beam-position monitor. The logical reference for klystrons, however, is of the RF as observed at the RF input coupler (downstairs!) as the beam passes. There are two independent correction factors designed to allow the operators to become independent of the various sources of apparent time errors. TERR is described in the database, and is the correction for any environmental errors. HERR is known by the PIOP and is the correction for the channel dependent timing errors. The overall goal of the timing is to present FTP's with time axis' which are with respect to the time=0 defined by the beam entering the waveguide.

14.2.1 Delay Calculation The (sample and modulator) trigger associated with each klystron and subbooster starts with a PDU trigger which occurs approximately 8 microseconds prior the beam-time. The PIOP synchronously delays this trigger by 8, and programs the PAD and MKSU to generate sample delays and the modulator trigger with an intrinsic resolution of 67, 34, and 34 nanoseconds. The following equation describes the calculation of the actual (additional) delay the appropriate hardware delay counter must impose in the PAD/MKSU. As usual, this calculation is done in


KLYSTRON SUPPORT Page 14-2 the micro/piop processors. Delay_register = ! Value loaded into register ( Sample/trigger time ! Requested time wrt Input Coupler - ( (PDUT + TERR) ! Effective trigger time to PIOP ! (calculated by the micro) + HERR ) ) ! Trigger generation delays in MKSU/PAD / (4 or 8) ! Hardware countdown rate in MKSU or PAD As a feature to allow a smooth transition to time-invariance, the old calculation will occur if any of the following exist: o The (PDUT + TERR) has a numeric value of '8181'. o The FTP channel number has the '1000' bit off. In these conditions, the delay will be: Delay_register = ! Value loaded into register ( Sample/trigger time )! Requested time / (4 or 8) ! Hardware countdown rate in MKSU or PAD

14.2.1.1 Delay Register The internal delay register in the MKSU and the PAD counts either half or whole cycles of 14.875 MHz (for MKSU's and PAD's). Beam Phase Units (which look like PAD's in many other respects) have been modified to count in half cycles. The 3 delay registers are reloaded by the interrupt handler in the PIOP for the next pulse if the klystron is expected to fire.

14.875 is derived from the 119 MHz through a re-synchronized divide by 8 chip. The countdown starts at the appearance of the PDU trigger and the divider is reset.

14.2.1.2 Sample/Trigger Time The PIOP is informed of the desired trigger or sample time by the micro as part of the normal action associated with database updates or FTP requests. The data is in PDU ticks. The PIOP massages the start time a) by subtracting the HERR hardware error for the selected channel path, b) by adding the PDUT/TERR correction, and c) (for non-zero step-size FTP requests) by forcing the start delay is to be divisible by 8 so that the resultant FTP is not a victim of integer truncation errors, The actual start time and step size are returned by the PIOP for FTP's, with the best estimate (HERR) of the hardware delay added to the start time in the result block.


KLYSTRON SUPPORT Page 14-3

14.2.1.3 PDUT The timing support software uses this database secondary as part of the normal computation of the PDU's delay from the fiducial. The operation of the klystron station is independent of the actual choice of PDUT if the following conditions are met: o The PDUT is sufficiently negative to allow enough trigger time for long-pulse modulators. o The PDUT is sufficiently positive to allow the MKSU to delay the modulator trigger such that the Beam Voltage does not significantly overlap the RF Drive. o Whatever value is also used in the computation of the reuse-type standby trigger.

14.2.1.4 TERR The "TREF" time which is used as the invariant reference aligns the observed beam signal and the PDU outputs (upstairs!). There are three errors (which contribute in the same direction) involved in klystron timing: o The beam passed downstairs one standard BPM cable length ago. o The RF downstairs at the input coupler was started upstairs 60 feet of waveguide ago. o There might be an appreciable cable run between the PIOP and the MKSU. Note that cables are never run directly, but rather on cable trays. All of these factors suggest that the computed PAD/MKSU delay should be shorter than originally predicted. Therefore: TERR is positive. TERR is of order 300 nanoseconds. (40 ticks).

14.2.1.5 HERR The MKSU trigger, MKSU sample, MKSU/PAD sample and PAD-only samples all follow the trigger by different times. Since TERR compensates (in the micro) for cable etc errors, HERR (in the PIOP) must cope with the hardware dependent errors. The values of HERR are measured in a test sector (such as LI31), where the cables are all "short" (ten feet), and there are no waveguide considerations.


KLYSTRON SUPPORT Page 14-4 There are several separate affects which contribute to the HERR. o The sample gate used in the PAD and MKSU each have a "generation time" which is the delay from the upper backplane to the actual sample and hold chip (neglecting cable delays, which are accounted for in TERR). Additionally, the sample networks have a finite (order 100nS) switch opening time. o The actual signal in question is delayed by the amplifier network. o There is a timing repeater delay (32 nS) for the PAD sample gate if there is a MKSU involved. Using a PDU trigger, activate to provide a pre-trigger to the signal source in question, and enter TDES such that the mid-point (50 %) is at coincident with a trigger programmed at the TDES=0 time. The FTP facility is used to observe the pulse, and the 50% point should be at t=zero. If the time observed is negative, HERR for that path should be increased. Values for HERR were measured in March 1986, and were found to be: Signal name Path Leading Trailing Average Amplitude piop/mksu/pad 248. 181. 214 Forward RF piop/mksu 117. 91. 104 Beam Current piop/mksu 168. 168. 168 Beam Voltage * piop/mksu 168. --- Beam Voltage + piop/mksu 134. 134 134 Mod Trigger piop/mksu 246. 246 PAD sample gate piop/mksu/pad 311. (not used) * high voltage test + low voltage test The following values were chosen, and implemented in the PIOP: FTP Flavor Correction ----------- ---------- Amplitude, Phase 25 ticks (22 without MKSU) FE, RE, Drive 12 Beam Voltage 16 Beam Current 20 Trigger ----------- Modulator Trigger 29 ticks
KLYSTRON SUPPORT Page 14-5

14.3 MESSAGE SERVICE PROTOCOL

14.3.1 VAX-VMS To MICRO Message Structure The VAX to Micro message format is of one of the following forms: This form is used for the "Check Status" command only. Primary Unit is ALL* ALL*. Word # Item +-------+----------+ | -10 | MSG | + ... + Service | | -1 | Header | +-------+----------+ The historic form allows a single list item for control. The Primary Unit may contain wild cards. Word # Item +-------+----------+ | -10 | MSG | + ... + Service | | -1 | Header | +-------+----------+ | 0 | | One of the set of +-------+ PRIMARY | 'KLYS', 'SBST', | 1 | | 'DKLY', or 'ALL*' +-------+----------+ | 2 | | ASCII or Numeric values. ie: +-------+ UNIT | ' 21', 21, or 'ALL*' | 3 | | +-------+----------+ | 4 | Function | As required for function +-------+ Specific | code in msg_header for | ... | Data | single unit above +-------+----------+ The "LIST" form of a klystron command. Any number of Primary Unit elements may be supplied, but service for a specific Primary/Unit may only be requested once. Word # Item +-------+----------+ | -10 | MSG | + ... + Service | | -1 | Header | +-------+----------+ | 0 | | +-------+ 'LIST' | Special value | 1 | | +-------+----------+ | 2 | N_ITEMS | Number of Primary/Unit that follow +-------+----------+


KLYSTRON SUPPORT Page 14-6 | 3 | DATA_LEN | Length of function specific data in +-------+----------+ I*2 words +-------+----------+<---Assumed to be long word aligned Number| | | +-------+ PRIMARY | One of the set of 'KLYS', 'SBST', as | | | 'DKLY', or 'ALL*' +-------+----------+ Needed| | | ASCII or Numeric values. ie: +-------+ UNIT | ' 21', 21, or 'ALL*' for | | | +-------+----------+ Prior | | Function | As required for this +-------+ Specific | item or item list Item | ... | Data | +-------+----------+ | ? | filler | Present if Function Specific Data is +-------+----------+ not an even number of I*2 words long.

14.3.2 MICRO To VAX-VMS Message Structure The Micro to VAX message format is of one of the following two forms: The check status and non-list requests only return a summary status. Fast Time Plot data is returned for a single unit. Word # Item +-------+----------+ | -10 | MSG | + ... + Service | | -1 | Header | +-------+----------+ | 0 | STAT | +-------+ | | 1 | Summary | +-------+----------+ | 2 | Function | As required for the single unit +-------+ Specific | for single unit function request. | ... | Data | +-------+----------+ "LIST" based requests return individual status information as well as an expanded Primary/Unit list. Word # Item +-------+----------+ | -10 | MSG | + ... + Service | | -1 | Header | +-------+----------+ | 0 | STAT | +-------+ |


KLYSTRON SUPPORT Page 14-7 | 1 | Summary | +-------+----------+ | 2 | | +-------+ 'LIST' | Special value | 3 | | +-------+----------+ | 4 | N_ITEMS | Number of Primary/Unit that follow +-------+----------+ | 5 | DATA_LEN | Length of function specific data +-------+----------+ +-------+----------+<---Assumed to be long word aligned Number| | | +-------+ PRIMARY | One of the set of 'KLYS', 'SBST', as | | | 'DKLY', or 'ALL*' +-------+----------+ Needed| | | ASCII value of single unit. +-------+ UNIT | ie: ' 21' for | | | +-------+----------+ | | Single | Status of the transaction for +-------+ Summary | this Primary/Unit | | | +-------+----------+ Prior | | Function | Data for the single unit in this +-------+ Specific | element Item | ... | Data | +-------+----------+ | ? | filler | Present if Function Specific Data is +-------+----------+ not an even number of I*2 words long.

14.4 KLYSTRON FUNCTION CODES o KLYS_CHCK_STATUS -- Check PIOP's in micro. Two forms are supported, the terse form, which updates only a small set of the digital status information, and a verbose form which updates the entire database. o KLYS_CRATE_RESET, KLYS_CRATE_RESET_Z -- Message from the Crate Watch service of the micro. Function service data is the crate number, and all units in the affected crate are (perhaps) IPL'ed, and always updated with a fresh set of DataBase values. o KLYS_FOXHOME -- Request that the PIOP move the Fox phase shifter until the "pin" is found, and return to the same electrical phase position. DataBase value is updated. o KLYS_FTP -- Do a FTP on the selected unit/units. Function specific command data is:


KLYSTRON SUPPORT Page 14-8 SLEEP -- milli-seconds between polls for data (8 tries max). PIOP_Command -- PIOP_CBLK_FTP. PIOP_Channel -- ie: PIOP_MK2_FTP. FTP_Delay -- Start value for dependent variable. FTP_Step -- Step size for dependent variable. FTP_TSPP -- (PPYY??) TS = 0-35 or 'FF'X for any. PP = 1-254 or 'FF'X for any. Function specific returned data is: FTP_Return -- I*2 success code. FTP_Delay -- Actual Start for dependent variable. FTP_Step -- Step Size for dependent variable. DATA -- 64 I*2 words of data. o KLYS_IPL_START -- IPL the indicated PIOP's, and update with a current copy of DataBase parameters. o KLYS_PTRB_PHASE -- Perturb the phase of the selected units. o KLYS_SEND_IMG -- Message service data field contains the "next" block of the PIOP image. All PIOP's with their IPL pending bit set are loaded following receipt of last block. o KLYS_TRIM_PHASE -- Move the Fox phase shifter of the selected units so that PHAS is within +- PMET/2.0 of PDES. o KLYS_TRIM_SLED -- Send the command to the PIOP to move the SLED needles to the state indicated in the HSTA of the DataBase. o KLYS_UPDATE_PIOP, ...PIOP_PADONLY, ...PIOP_MK2ONLY -- Update both, or one of the buffers of the selected units from the DataBase.
KLYSTRON SUPPORT Page 14-9

14.5 SPECIAL SECRETS OF THE KLYSTRON JOB The KLYS subjob uses a number of special buffers and include files to allow intraprocess communication. Some of the includes contain commons with such common information as the current PRIM/UNIT and friendly constants such as "ALL*" and "KLYS", while others contain information lists used by subroutines which process several units in an ensemble manner.

14.5.1 KLYSDATA.INC Most of the unit specific information, including: o PRIM_NAME, PRIMARY o UNIT, UNIT_NAME o PLOC o STATUS_SUMMARY, LSTATUS_SUMMARY o HSTA o STAT o SWRD o Hollerith Constants: SELF, ALL, KLYS, SBST, DKLY, READ, WRIT, FTPB, CBLK, SBLK, RESP, NONE, LIST

14.5.2 KLYSUNITS.INC Contains list-directed information. Supertype 1, 2, 3, 4, and 5 (5 is micro-only!) data lists, including values updated in KLYSDATA above. o MAX_UNITS, MAX_KLYSTRONS, MAX_SUBBOOSTERS, MAX_DKLYSTRONS. o NUM_UNITS, NUM_KLYSTRONS, NUM_SUBBOOSTERS, NUM_DKLYSTRONS. o KSD_ENTRY -- Entry number for following lists. maintained by SEQUENCER routines. o KSD_PRIMS(MAX_UNITS) o KSD_PRIM_NAME(MAX_UNITS) o KSD_UNITS(MAX_UNITS)


KLYSTRON SUPPORT Page 14-10 o KSD_UNIT_NAME(MAX_UNITS) o KSD_PLOC(MAX_UNITS) o KSD_OLDPDES(MAX_UNITS) o KSD_OLDGOLDMSTR(MAX_UNITS) o KSD_HSTA(MAX_UNITS), o KSD_STAT(MAX_UNITS), o KSD_SWRD(MAX_UNITS)

14.5.3 FUNC2.INC A variety of items required by some of the routines taking special advantage of the features of SEQUENCER. o TRY, TRY_TOTAL -- Indicating how many passes are to be done, and the pass number. Useful in masking errors except on the last pass. o SEQ_STAGE, SEQ_STAGE_TOTAL -- Is this the first part, or the second? Used by the FTP and UPDATING routines. o SEQ_IN_POINTER, SEQ_OUT_POINTER -- Routines which require input or output data use these. The pointers index into this element's data space in: I2_MSGDATA(n) or I4_MSGDATA(m) -- input I2_MMSGDATA(n) or I4_MMSGDATA(m) -- output Where n = SEQ_xxx_POINTER, and m = (n+1)/2. The user of the output data may always assume that the 8 bytes preceding his data area is available for his own use. (for camac status, for example.) Mail buffers are found in MSGMAIL.INC and KLYSMAIL.INC, which are both required, and in that order.


 
Go to top of page
Contact (until Aug. 15, 1996): Jeffrey Miller
Owner: Bob Sass

Converted from VAX Runoff output using doc2webset.pl