Specs for new TLG

Dated Material -- These are early design notes and should not be used as program help.

 

Changes from original documentation will be shown in red with the date of the update. As of March 1998, it was agreed that the term used to replace the old idea of a supercycle would be "timeline". The documentation previous to this used the term "sequence" for this idea. The term "sequence" has been replaced by "timeline" throughout this document without noting the change with color or date.

General requirements:

There will be short 'modules' that are atomic clusters of events that are downloaded in the TLG. An application page (new D69) will provide a means for defining these modules.

There will be sequences of modules that are joined by rules to make the operating time lines. Construction of these timelines will also be possible from the replacement for the D69 application program.

There are two views of how timelines might be constructed. 1) Modules are objects with attributes such as "maximum rep rate", "time for injection", etc. These attributes influence the timing of event broadcast. 2) The alternative is that the attributes are contained in the rules for stringing modules together. In either case, the rules/attributes must be available at the application program level so programs can construct the actual time lines that will play.

Example modules:

$12, $14

$29

$80

called stacking

 

$12, $15

$2B

$4D

called Tev Proton injection

 

$12, $19, $19, $19, $19, $19, $14

$2x

______________________________$80

$T14

called NuMI with stacking

 

$9A

called Unstack Pbars.

 

$41

called Tevatron Ramping

 

$12, $12, $16

$2E

called Temp 1 MI studies

 

$11$11$11$11$11$11$11$11$11$11$11$11$11$11$11

called Pause 1 second

 

Example timelines downloaded in the TLG:

Tev Protons injection + (20) stacking

Unstack Pbars + fixed delay(150) + Tev Pbar Injection

Tevatron ramping + Tev Proton injection + (#) stacking

 

All of the above modules and timelines are identified by a unique name.

 

Example of module rules:

include 2 prepulses (event $12)

inject as late as allowable

Example of timeline rules:

stacking cycles as fast as allowable

Interval is filled with NuMI cycles + 1 stacking

Maximum NuMI rep rate is 1/5 seconds.

When a module is built, an NTF flag can be set so that the booster resets can be suppressed when there is an NTF beam request.

 

When a time line is requested, an argument goes with the request that indicates whether the new timeline should be played once only, or replace the current timeline in a repetitive manner. If a one shot is requested, a single execution of the new timeline will occur, and then the previously playing timeline will be reactivated.

Cycles and timelines may change length when the ramp profiles are changed. When a ramp profile is changed, the ramp generator program sets a length of cycle parameter that the TLG module can use to generate events.

A request for Booster study pulses will be requested at a desired frequency. The TLG will place these events on the time line as close as possible to the requested frequency. These Booster studies modules do not have to be built specifically into the timelines, but are handled separately by the TLG.

At one time it was mentioned that we would like to designate certain resets as truncation events. This would denote places where the cycle could be truncated to begin a new super cycle. This feature is not being requested at this time.

A rep rate parameter (or rule) can be set (or defined) for each module which will determine the frequency the module is played when the rule is "repeat as fast as allowed".

When a ramp is constructed from an application, that application must set certain parameters for the TLG to use. Among those parameters are: 1) length of cycle, and 2) latest possible booster reset with beam for that cycle.

The Main Injector resets can be shifted in time in 720 Hz increments. This is to better control the injection time into the MI and to allow increased repitition rates. When this feature is used, the MI reset is shifted from the beginning of the module by a number (less than 720) of 720 Hz ticks. When the MI reset is shifted, Pbar, Recycler, and Tev beam resets also need to be shifted by the same amount. The Booster resets, and Tevatron ramp resets do not get shifted. A single parameter will be used to shift all resets listed above. A complication may arise later if a direct Booster to Recycler transfer becomes possible without a Main Injector reset. This operation would have beam being injected into the Recycler at an indeterminate time relative to the Recycler reset. 9/8/97

The idea of the 720 Hz delay for MI resets has been put on hold as a possible future improvement. It has proven to be a complicated issue to implement, and it is not needed in the near future. 7/30/98

There will need to be a switch in the TLG module to synchronize the cycle with CHL harmonics. This switch is turned on and off via TLG ACNET parameter.

The TLG should be able to run a simulated time line. In this mode a time line would be broadcast to requester but not actually to the clock system. The TLG should be capable of a multicast, and be able broadcast events before they are played. There should be a deep history buffer that contains previously encoded events.

 

Comments after meeting 8/20/96

The rigid idea of fixed super cycles as we now know it will be gone. Will this cause problems for anyone? Do we need to make a strict definition of a super cycle?

TLG Specifications and definition

Module = A atomic group or cluster of events that defines one complete ramp or beam cycle.

Timeline = A series of modules that will play beginning to end and then either repeat or terminate depending on the command that triggered the timeline. If the timeline is requested to only play one time, at its termination the previously playing timeline will resume.

Packed = Modules are "packed" into the timeline as tight as they will fit without violating any rules. The inputs needed to calculate the packing are (T0, Tf).

Fixed = User defines the placement of modules and the FSM places resets as close as possible to those times without violating any rules. Inputs (T0, Dt, # times)

Even = FSM calculates placement of modules in timeline so that they are as evenly spaced as possible between a given start and stop time. Required inputs(T0, Tf , # times)

Below is a key that shows what parameters are inputs and what is calculated for a given type of module placement.

 

 

start time

Delta time

# times

end time

total time

fixed

O/C

O/C/V

O

C

C

pack

O/C

C/V

C

O

C

even

0/C

C/V

O/C

O

C

 

O = Operator selection

C = Calculated and fixed

E = calculated and then editable (in one direction)

V = may vary throughout the cycle

O/C = Operator selects, but TLG calculates nearest allowable value

Below is a suggested page image that would be used to view, edit, etc. timelines.

 

The following is an explanation of how the calculations are done for module placement. For all three types of module placement, it must be realized that the timeline construction is based on a priority system. The modules listed at the top of the list on the application page has the highest priority in module placement. These modules will take up available time slots so subsequent module placement will be restricted by the placement of the high priority modules.

Fixed: The operator will select a start time (t0), a delta time ( Dt), and a number of times (# times). The FSM will first determine if t0 is a valid time to place a module. If it is not, the first valid time after the selected t0 will be used for the first module placement. The FSM then adds Dt to the actual start time of the first module. If this time is available for the requested module, it is place here. If the requested module is not allowed at that time, the FSM searches for the next allowable time to place the module. This process continues until [# times] modules are placed in the timeline. Finally, the total time is calculated by adding the module length to the start time of the final module in the timeline.

Pack: The operator will select a start time and an end time for the string of modules to be played. The FSM will find the first allowable tick following the t0 selected. The FSM will then find the first allowable tick after the end of the first module and place the second module there. This process will go on until a module would extend past the end time (that module would not be placed). The FSM then calculates the number of modules placed in the timeline.

Even: The operator chooses a start time, and end time, and a number of times. The FSM will then calculate the available times that most evenly spaces the [# times] modules between t0 and tf.

 

It is possible that the list of modules in a timeline can all be requested to start at time = 0. Because of the priority then, the top listed module would actually occur at 0. The next module would then begin as soon as allowed after the first module was finished. Modules listed further down the list would actually start later as allowed by the higher priority modules. If multiple modules were requested to start at time 0, the module actually allowed to start there would be shown in Blue on Cyan background (see later section on color convention). The subsequent modules on the list would have calculated numbers returned and be shown in Magenta on Cyan. The number that actually gets stored in the database would be the 0 because this is what goes into calculating the actual timeline times. There is a place in the timeline window that allows the user to toggle between the stored numbers (that make up the rules), and the actual values that calculated based on the current conditions.

There will be restrictions on the parameters that the operator is entering for the above calculations. The FSM will determine when the operator is entering an illegal value, and return the nearest valid parameter value. Example 1) Each module has a maximum rep rate that depends on the attributes of the module, and the length of the ramps involved. If the operator selects a value of Dt that is less than this rep rate, the FSM would return the smallest allowable Dt (= to max rep rate).

Example 2) If the operator selects a start time of 1 sec, and there is already a higher priority module that starts at 0 sec and is 5 seconds long, the value of t0 returned will be 5.

Example 3) If the operator asks to evenly space 10 module between t0 and tf, but only 7 will fit within the constraints of the timeline, a value of 7 will be returned for [# times].

The above table contains the symbol O/C where the FSM will take operators inputs and calculate the "best" allowable value.

Color Convention:

For timeline construction, the editable parameters will be shown in inverse video (cyan background). If the values are read back from the FSM or have been downloaded (to either database or FSM) the foreground color will be blue. If the number is edited by the operator, but not yet sent, the foreground color will be black. If the FSM calculates a number that is editable, the foreground color will be magenta. Numbers that are strictly calculated and not editable by the operator are shown in cyan foreground with a black background.

 

There will be a special module called the Booster study module, that is editable at the module level. This special module would only contain Booster reset $17 and a number of prepulses. This module however does not have to be explicitly listed in any timeline. Its occurrence on the clock is done strictly by a calculation based on an Acnet parameter. If the parameter is turned on, Booster studies are considered on. The value of the parameter is the requested rep rate. If the value was set to 5, the FSM would attempt to play the Booster module every 5 seconds. The actual occurrence of the module would vary based on other events in the timeline, but they would be spaced as close to every 5 seconds as possible (the occurrence of the modules would never be less than the value of the Acnet parameter).

NTF Considerations:

Modules possess a flag that determines whether NTF is allowed to steal the Booster cycle. The intent is that cycles like stacking cycles that can dominate the duty cycle of the timeline will allow NTF to steal resets; but cycles that are more rarely used, like MI study cycles or Tev injection cycles will not allow NTF to steal resets. An Acnet parameter (i.e. G:TLGNTF) will then exist and is set to the percent of the interruptable modules that NTF is allowed to steal. To make calculations easier, and the TLG operation more deterministic, there will only be 10 allowable values for G:TLGNTF {0, 20, 25, 33, 40, 50, 60, 67, 80, 100}, and the units will be %. Each individual type of interruptable module will separately give up that percentage of their Booster resets. Example: The active timeline consists of only two modules called stacking, and stacking + NUMI. Both types of cycles are NTF interruptable. If G:TLGNTF is set to 50%, half of the stacking resets will be taken, and half of the stacking + NUMI resets will be taken. This separate accounting eliminates the possibility that all of one type of resets will be taken and none of the other.

Also it should be remembered that interruptable resets are only inhibited when NTF is actively requesting beam. Also, NTF will get DC beam when the master beam switch is in the OFF position and NTF is requesting beam.

Multiple or single play of timelines:

When a timeline is triggered, it is triggered with a flag that requests repetitive play or a single shot. If a single shot is requested, the previously playing repetitive timeline will again start up at the termination of the single shot timeline. If two single shot requests come into the TLG at about the same time, the first received request will be honored first. It will play to its completion and then the previously playing repetitive timeline will resume. The TLG will return an error to the second request noting that a single shot is pending. An Acnet parameter will also be set to "TRUE" if a single shot request is pending or playing. Library routines that request single shots will then have a method allowing requesters to wait for an opening to make a request. If a single shot request is made followed directly by a request for a repetitive cycle, the single shot will play, and the new repetitive cycle can start at the termination of the single shot cycle. If a repetitive cycle is requested followed directly by a single shot request, the repetitive cycle must play once and then the single shot is allowed to play. At the end of the single shot timeline, the new repetitive timeline resumes.

Implementation time for changed parameters:

When a parameter gets changed that will affect the timing of the TLG cycle, the change will not be implemented until the next "super cycle" reset. Here is an example of how a change of a Main Injector ramp would be handled. The operator builds a new ramp for the $29 cycle that is longer than the present waveform. When requesting to download the ramp, the application program must first communicate with the TLG. The ramp building program requests a change to the length of cycle parameter. The TLG acknowledges the request, but indicates that the change is pending. The following super cycle the resets in the timeline are shifted to their new times, and the length of cycle parameter is no longer pending. The ramp building program is then able to download the new ramp. One way to handle this would be for the setting of the length of cycle parameter to update as soon as the TLG processes the setting. The readback for the parameter would not change until the new super cycle started. Of course if the operator shortened the waveform, or changed it in a way that did not require a time line modification, no wait would be necessary before downloading to MECAR.

The following is a suggestion for a page image which would be used when building, viewing, etc. modules.

Some specifics about Modules, timelines, and rules are listed below.

 

Rules (or attributes) for Modules:

Building modules including all of their rules and attributes will be broken up into # categories consisting of clock events, module length, injection time, and miscellaneous attributes.

1) CLOCK EVENTS: Each module can contain clock events that are resets of up to 8 different types. Modules can consist of only a single clock event, but most will contain more. The first type of reset will be the Booster reset event. This is only the clock event, and not the number of resets. The number of batches will be addressed later. The second type of reset is the Booster II reset. This is for modules in which a single Main Injector cycle is used to supply beam to two different users (like to the production target and to NUMI). The third type of reset would be the Main Injector reset. The Accumulator, Debuncher, and Recycler are all separate types of resets. A Tevatron injection (or beam) reset is one type of reset, while a Tevatron ramp reset is a separate category.

2) MODULE LENGTH: The length of the module can be determined by a number of things. The Main Injector ramp waveform is one, while a Recycler RF manipulation may be another. Other modules, however, may be able to play before the first module has completed. An obvious example is that many Main Injector stacking cycles can occur during a single Tevatron ramp cycle. One of the attributes used to determine where modules can be place relative to each other will be called "reset hold off" times. Each type of reset in a module (except Booster II) will have a hold off time that is set for that particular module. Another module that contains a reset of the same type must be placed in time such that the second reset does not occur until the hold off time has passed. In order to obey this rule, there will also need to be a "time into" module value for every reset. This will allow Main Injector cycles to be placed as close together as there ramp waveforms will allow. Booster resets of a MI cycle can be occurring before the previous MI cycle has completed as long as the next MI rest occurs late enough in the module that the previous ramp has finished.

 

 

This example shows that the module length is longer than the Main Injector ramp cycle. This is because the Main Injector ramp is offset from the start of the module by six Booster cycles. In this example, the MI holdoff time is the same as the module length. We see that the next module with a MI reset can start at t0 + (MI hold off - MI time into module). In this way the modules actually overlap in time. The MI time into module value will be calculated when the injection rules are established. Also, for the above example, at least the first six Booster resets shown must be prepulses ($12s) because Booster beam resets can only come after the MI reset has occurred. In this example, the Booster holdoff time would be ten Booster cycles or 660 msec. The following diagram shows how the "packing" modules (placing together as close as possible) is done. The shaded regions show the types of resents in the modules. The shaded box begins at the "time into module", and end at the "hold off time". The second and third modules in this example are identical, and the first is different.

 


The length of the first module is determined by the Tevatron ramp cycle. This type of reset does not occur in the other module, so it does not affect where the other modules can be placed. The type of reset that does determine where the second module can be placed is the Main injector cycle. The second module has to occur late enough that the Main Injector hold off time from the firs module has expired before Main Injector reset occurs in the second module. The placement of the third module is determined by the Accumulator cycles.

3) INJECTION TIME: The injection time here refers to the injections into the Main Injector. This time is determined by which Booster cycles have beam, and how much the MI reset is shifted from the beginning of the module. The operator can select the Main Injector injection time in one of two ways. The first way is to specify the number of batches, the number of pre-pulses, and the the number of null pulses. This is all equivalent to the previous version of the time line generator. The additional parameter that the operator can specify is the 720 Hz delay. This value detemines how much the Main Injector reset is delayed from the start of the module. The delay can have a maximum value of 47. It has been agreed to that the 720 Hz delay will be set up by experts early in the life of the Main Injector, and then it will not be changed without deep consideration of consequences. 9/17/97

The second way the operator chooses an injection time is to specifically select the time into the Main Injector cycle (T inj ) that the last batch will be injected. Also specified are the number of batches, and pre-pulses. The following is an explanation of how the resets are placed based on the MI injection time.

i) Last batch (Booster reset) comes at (Tinj - 33 msec). (It takes 33 msec for the booster to accelerate beam.)

ii) If the Booster reset is not on a 15 Hz tick mark, (Tinj is moved earlier until the Booster reset lands on a 15 Hz tick.

iii) Place the other batches in front of the last batch on the 15 Hz tick marks.

iv) Place the pre-pulses in front of the beam cycles. If 66 msec * (the number of batches + pre pulses) is greater than (Tinj , some Booster resets occur before the MI reset. When this type of module is "packed" in a timeline, the modules overlap in time, and the pre-pulses can occur before the last MI cycle has completed. 9/17/97

Since the MI reset, and Tev beam resets, can be shifted, and the Tevatron ramp reset can not, care will have to be taken so that injection into the Tevatron is not attempted at an illegal time. The Tevatron ramp generator program will have to set a TLG parameter that indicates the allowable injection window. The TLG will then have to evaluate if the transfer trigger occurs within that allowable window. The transfer trigger occurs at [(720 Hz delay) + (377 timer)].

4) MISCELLANEOUS ATTRIBUTES: The first attribute attached to a module would be the number of Booster batches. The module can either explicitly contain the number of batches, or the module can contain a variable name that is then set to the desired number of batches.

Another attribute would be the number of pre-pulses or $12 resets. This number will be explicitly set for the module.

The module builder can select a min module repeat period. This attribute will serve a function similar to the ramp length variable set by MECAR. The difference will be that the operator can set this to serve miscellaneous needs (such as beam power/operating envelop concerns).

Each module will have an edit protection level. This is meant to allow some modules to have a semi-permanence which will be needed for timelines that are required to be reproducible (such as for shot setups). Even the most "permanent" modules can be edited, but may require a password.

Each module will contain an attributes that determines whether NTF can steal its Booster resets.

For an example, I will go through the construction of a single module to illustrate the order that the TLG will have to make calculations. Then I will string two modules together in a timeline to illustrate the same for timeline construction.

 

Construction of Module:

From the command menu, the operator selects "build new module". When this choice is selected, the default module will have no events, and the counts column will default to zero, For this example we will build a Tev fixed target injection module. The operator then interrupt in the Booster menu (in the events window), and select event $13 from the list of possible Booster events. There will be no Booster II reset, so this line is left blank. Main Injector reset $21 and Tev beam reset $4D are chosen from the appropriate menus. The Accumulator, Debuncher and Recycler resets are left blank because these machines are not used for this module. We will want a Tevatron ramp to go with this reset, so we will select $41 to go on this line. We could have chosen to leave the Tev ramp reset out of this module, and put in a separate module when building the timeline, but in fixed target, it is likely that we will include the ramp with the injection module. The operator can then select the way the number of batches will be chosen. A value of 1 through 6 can be chosen, or a variable name. Since 4 events have been selected to be in this module, 4 possible variables can be chosen from the menu (G:BATxx where xx is any of the events entered into this module). For this example, G:BAT4D is selected, so the actual number of batches selected is control by this parameter. The count of Booster II reset must be left at zero since there is no reset attached here. At this time, the operator can click on *save, and after being prompted for a title, the module will be written to the database, and downloaded to the TLG.

At this time all of the default attributes are attached to this module. Editing the attributes is straight forward. Most attributes are menu selections. Some of the menu choices then allow the operator to enter values that go with the choice. An example of this would be the number of Booster pre-pulses. A choice would be fixed, and then a number would be entered. The number would appear in a field that is blue on cyan.

List of parameters, attribute, and default fault values:

PARAMETERS:

G:BAT20 = 1

G:BAT21 = 1

G:BAT29 = 1

G:BAT2A = 1

G:BAT2B = 1

G:BAT2D = 1

G:BAT2E = 1

G:BAT4D = 1

G:BAT49 = 1

G:PREP20 = 2

G:PREP21 = 2

G:PREP29 = 2

G:PREP2A = 2

G:PREP2B = 2

G:PREP2D = 2

G:PREP2E = 2

G:PREP4D = 2

G:PREP49 = 2

G:BSTUDY = 20 off

G:NTF% = 0

G:TLGEXT = 0

T:TLGCHL = 0 or off

 

MODULE ATTRIBUTES (defaults are shown):

MI 720 Hz Delay = 0 {any integer up to 719 is allowable}

Min Module repeat period = 0 { any positive integer is allowable}

MI injection time = as late as possible {times entered in secs (floats) are

allowable}

Number of Pre pulses = 2 { values up to 14 or above parameters G:PREPnn

are allowable}

Edit protection = minimum { "shot setup", "sequencer", "crew chief" are

allowable}

NTF inhibits allowed = no { yes is other choice}

All reset hold off times = 0

click here to view comments on the development of the application page.

Mail comments to annala@fnal.gov

minor mods 31-may-02