Translation Variables



next up previous contents
Next: Additional MPSL Language Up: Translations Previous: Translations

Translation Variables

A variable name may be used to identify a translation string. In this case the variable must be assigned at the head of the algorithm, before the ALG assignment. A translation variable assignment consist of a variable name, followed by a ':' followed by the translation string in quotes. For example, the following assigns translations for two devices:

bsy_12b1 : "BSY_12B1_IC TRIPPED"
endpic : "BSY_PC99_IC (at end-of-linac) TRIPPED"
The variable name can then be used in place of the quoted literal in a translation. Continuing the example of their use in device operand equalities:
  NEWRATE = "ZERORATE"

    MPS.AB01.20."12IC" == "OK" {bsy_12b1}  &            
    MPS.AB01.20."IC0" == "OK" &            
    MPS.AB01.20."IC99" == "OK" {endpic}
    ;

It is a good idea to put identifier assignments in include files so that algorithms can share them.



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