AP Algorithm Basics



next up previous contents
Next: What a single Up: The MPS Algorithm Language Previous: The mpsl command

AP Algorithm Basics

mpsl algorithms are written to be processed by the MPS `Algorithm Processors' (APs). These APs, (Motorola 68000 microprocessors) are each responsible autonomously for one small sector of the SLC accelerator. One AP, the `Supervisor', is responsible for coordinating all of the others, and, based on their output, decides on a safe repetition rate for the SLC as a whole which it communicates to the MPG. All of the others, the `regular' APs, take as input the states of SLC monitoring devices, and output a safe beam repetition rate for their sector, which they send to the Supervisor. The function between these inputs and outputs is defined in an mpsl algorithm, one algorithm for each AP.

 
Figure 1: Hierarchy of MPS Control

In addition to input from SLC devices, APs get some input from the Supervisor. That input is the current bgrp and the repetition rate of that bgrp - from the last PNET broadcast. From this information, and the current state of stoppers in its sector, the AP chooses an expression to evaluate. These expressions are in the states of SLC devices, as given by their database name and `component' value; and the result of an expression is an SLC repetition rate as defined in the SCP's beam rate control.

Ie, if the accelerator was running on bgrp `BAS2' at `FULLRATE', and no stoppers were in in the AP's sector, then the AP would choose one expression to evaluate, and it will send the result of that evaluation to the Supervisor. If there were any other combination of bgrp, rate and stoppers, another expression would be chosen. To cover all possibilities, all of the combinations of bgrp, rate and stoppers must be covered in an algorithm and an expression for each valid new rate must appear for each. However, the values may be ORed together. An example AP algorithm is in appendix gif.

Figure gif is an example of a single expression as it might appear in an mpsl algorithm file. It would be scoped by a disjunction (ORing) of bgrps, a repetition rate (which is the one associated with the last PNET broadcast) and a stopper configuration.

  
Figure: Example expression, showing 3 possible new rates.

This expression uses the states of five devices to choose one of three repetition rates.





next up previous contents
Next: What a single Up: The MPS Algorithm Language Previous: The mpsl command



SLAC Controls Software
Fri Nov 4 11:47:17 PST 1994