AP Algorithm Elements



next up previous contents
Next: Supervisory AP Algorithms Up: The MPS Algorithm Language Previous: Structure of an

AP Algorithm Elements

This section describes each element that may appear in an mpsl algorithm, as outlined in figure 2.

In this description, articles in angle-brackets are to be replaced by expressions. Articles in square brackets are optional.

Where an expression is a -list, the list elements are disjuncted, that is, they are ORed together.

Where an expression is a conjunction the elements are ANDed together. The word `configuration' is used interchangeably with `conjunction', since it describes the simultaneous states of 1 or more devices. Most expressions, such as <device-configuration-list>, permit both disjunction and conjunction. Wherever this is the case, conjunction has higher precedence than disjunction.

A `state' is described as a device operand equality. An example of a device operand equality is PROF.AB01.10."TARGET"=="OUT". This name is used to emphasize that a state description requires some component of a device be equal to some value, and that the equality as whole (a == b) is to be used as an operand in an expression. The following is an example of an expression in device operand equalities, it contains a conjunction and a disjunction.

MISC.AB01.5413."52ST1_T2" == "OK" &
PROF.AB01.1."TARGET" == "OUT"  |
MPS.AB01.21."3IC1" =="OK"

A `literal' is a quoted character string. It may contain upper and lower case letters, and the case will not be changed by the compile. Similarly, if the case is important, for instance in beam code names, make sure the correct case is used in the literal. In character strings outside quotes case is not significant.

<ap-identifier>The MPS Ap micro name. An example of this is AP = AP01.

``Algorithm identification literal"A quoted string of up to 60 characters that succinctly describes the algorithm. For instance ALG = ``The MPS test algorithm for commissioning AP01''. This element is optional.

<global-machine-mode-list>A disjuncted list of global machine mode name literals. For instance MODE = ``ESNPI" | ``POL_ESA". This element is optional.

<bgrp-name-list>An ORed list of quoted literals - each being the name of one `bgrp' as defined in the SCP Beam Group Control Panel. For instance BEAM = ``SLCSLD'' | ``BAS2" | ``FFTB".

<repetition-rate-literal-list>An ORed list of quoted literals - each being the name of one repetition rate. At the time of writing these repetition rates may be one of FULLRATE, LIMHI_FS, LIMHI_FN, LIMHI_FF, LIMIT_HI, LIMIT_LO, ZERORATE. However, these rate names may change to conform to the Regional Beamcodes names for beam code modifiers. For instance RATE = ``FULLRATE'' | ``LIMHI_FN''.

<stopper-configuration-list>A stopper configuration list is a disjunction of stopper state conjunctions; that is, a number of stopper states ANDed and/or ORed together. Alternatively, the <stopper-configuration-list> may be the single keyword ``NONE", meaning that there are no stoppers on this AP.

A stopper state is expressed like any other device state in an algorithm, that is, as a device operand equality, where;

  1. the primary is always MPST
  2. the micro is always AP92
  3. the unit number is that of the stopper whose state is being established. Note that any SLC stopper's value can be examined by any AP's algorithm, though only the stopper's in the AP's immediate vicinity are probably relevant to it.
  4. the component name is always PROT
  5. the component name may only be one of PROTECTD or UNPRTCTD.

The != operator cannot be used in stopper device operand equalities. Also, the UNPRTCTD case includes the situation in which the stopper is moving.

Two syntactically valid examples are;

    STOPCNF = MPST.AP92.1."PROT" == "PROTECTD" &
              MPST.AP92.2."PROT" == "PROTECTD" |
              MPST.AP92.3."PROT" == "UNPRTCTD"

    STOPCNF = "NONE"

"repetition rate literal"This a single quoted literal. In a supervisor's algorithm it may be one from the list ``ZERORATE'', ``LIMIT_HI'', ``LIMIT_LO'', ``LIMHI_FS'', ``LIMHI_FN'', ``LIMHI_FF'', ``FULLRATE''. For a regular AP's algorithm the list of permitted rates is different depending on the value of the \limhi_from_ap qualifier. By default this qualifier is positive meaning that the AP can recommend the LIMHI_ rates, so the complete list of rates it may recommend is the same as that for the Supervisor. However, if the \nolim_hi_from_ap qualifier has been given the list of rate-limiting types that may be used is ``ZERORATE", ``LIMIT_HI", ``LIMIT_LO" or ``FULLRATE".

<device-configuration-list>This is an expression in device operand equalities. If the AP finds this expression to be true, it concludes that at least the repetition rate specified in the immediately following repetition rate literal is safe, and it proceeds to evaluate the expression for the next higher repetition rate. However, if the expression is false, it concludes that only the repetition rate specified in the immediately preceeding repetition rate literal is safe and the evaluation for this pulse stops.

See section gif for a complete description of operand equalities.

"No transgressives repetition rate literal"Since if the AP finds the <device-configuration-list> expression to be true, it concludes that the repetition rate specified in the immediately following repetition rate literal is safe, there must be one final repetition rate literal.



next up previous contents
Next: Supervisory AP Algorithms Up: The MPS Algorithm Language Previous: Structure of an



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