!------------------------------------------------------------------------------ ! This file holds a list of CBusIO requests ! Comments start with an exclamation mark ("!") anywhere on a line. ! See end of file for more syntax information. !------------------------------------------------------------------------------ ! Revision: 31-Jul-03 ! This file is a template ! and list of the syntax rules for CBus IO Command Files $unused= 0 ! unused value for Seek_CAT2/CAT3_Output Keyword CBus_MBA: 169 CBus_CA: 33 CBus_FA: 0 Write_Value: 0b1111 CBus_FA: 1 Write_Verify: 0x57 Read_FA: 3 Read_FA: 4 Write_Verify: 35 Read_CAT2_Operand: 0 ! 12 bit operand #0-7 Read_CAT3_Operand: 0 ! 16 bit operand #0-5 Read_FMLN_Operand: 0 ! 9 bit Operand #0 = Px, or Operand #1 = Py Seek_CAT2_Output: $unused ! 16 bit output Seek_CAT3_Output: $unused ! 19 bit output Read_FMLN_Output: $unused ! 8 bit output Call_File: \users\default\another.cio !------------------------------------------------------------------------------ ! 31-Jul-03 ! * Recommended file extension is ".CIO" (but not required). ! ! Syntax rules: ! ! - Blank lines are ignored. ! ! - Comments start after an exclamation mark ("!") anywhere on a line. ! ! * Recognized Keywords are (with colon required) ! CBus_MBA: (CBus Motherboard Address; Range: 0-255) ! CBus_CA: (CBus Card Address; Range: 0-63) ! CBus_FA: (CBus Function Address; Range: 0-255) ! Read_FA: (Function Address of register to read; Range 0-511) ! Write_Value: (Value to write in specified register; Range 0-0xffff) ! Write_Verify: (Value to write, then read register and compare) ! Read_CAT2_Operand:(Operand Number of CAT2; Range: 0-7) ! Read_CAT3_Operand:(Operand Number of CAT3; Range: 0-5) ! Read_FMLN_Operand:(Operand Number of FMLN; Range: 0=Px 1=Py) ! Seek_CAT2_Output: (Hunt for CAT2 Output; still needs a dummy/unused value) ! Seek_CAT3_Output: (Hunt for CAT3 Output; still needs a dummy/unused value) ! Read_FMLN_Output: (Read FMLN comparator output) ! Call_File: (Recursive call to another file) ! MilliSecond_Sleep:(Suspend execution of the command file) ! ! - Keywords are NOT case-sensitive. ! ! - Each Keyword must be followed by one and only one positive integer Value ! (with the exception of the Called_File Keyword using a character string) ! ! - One or more Keyword/Value pair may appear on the same line. ! ! - a Keyword and its matching Value may be separated by any number of spaces, ! and/or Tabs, but must appear on the same line. ! ! - Successive Keyword/Value pairs may be separated by any number of spaces, ! Tabs and/or Carriage_Returns (blank lines), or comments. ! ! * A Register will be accessed when the "Write_Value", the "Write_verify", ! or the "Read_FA" Keyword is encountered (or a "Read_xxxx_Operand" Keyword). ! ! Several registers will be read for the "Read_CAT2/CAT3/FMLN_Operand" ! keywords as the requested value needs to be assembled from several ! bitfields. ! ! Several registers will be written and read for the "Seek_CAT2/CAT3_Ouput" ! keywords. ! ! One register will be read for the "Read_FMLN_Output" keyword. ! ! - All other CBus Address Keywords must have been specified before a ! "Write_Valu"e, "Write_Verify" or "Read_FA" Keyword may be ! specified (or a "Read_xxxx_Operand" Keyword). ! ! * The "Write_Value" keyword causes the specified register to be written with ! the specified value. ! The "Write_Verify" keyword causes the specified register to be written ! with the specified value, then read back and report any value mismatch. ! The "Read_FA" keyword causes the specified register to be read, and the ! value read is reported. ! ! The "Read_CAT2/CAT3/FMLN_Operand" keywords cause the input registers ! corresponding to the operand specified in the associated value to be read, ! the relevant bits are extracted and the reconstructed value is displayed. ! The value is reported as a decimal, hex, and binary number. ! ! The "Seek_CAT2/CAT3_Ouput" keywords cause the host computer to start a ! binary search for the Card ouput value. CAT2/3 cards do not have a register ! to direclty read the card output sum, but the card's comparator output ! bits are accessible. The computer will use the threshold comparator#0 to ! hunt for the card's output, which is only useful and successful when the ! output is reasonably static. The value is reported as a decimal, hex, and ! binary number. The compartor #0 threshold registers which are used to seek ! the card output value will be returned to their orginal programming ! at the end of the execution of the command. This command is non-destructive ! but may cause temporary abnormal triggering and should thus NOT be used ! during beam. ! ! The "Read_FMLN_Output" keyword causes the FMLN output register to be read ! and the value is reported as a decimal, hex, and binary number. ! ! - The "Write_Value" specifies the Data to Write. This value may be specified ! in Decimal (e.g. 15), Hexadecimal (e.g. 0xff), or Binary (.e.g. 0b1111). ! ! - Decimal, Hex, and Binary values may use commas to help readability. ! These commas will be removed during parsing (e.g. 0b,1000,0100,0111,0000). ! No spaces are allowed within any Value string. ! ! - Keyword/Values specified for a previous Register Address are still active ! for subsequent Register Selection until they are explicitly overwritten. ! ! * The "Read_FA" keyword also updates the Register ! context, so that a Write_Value or Write_Verify keyword appearing right ! after a "Read_FA" keyword will write to the register that ! was just read. ! ! - The "MilliSecond_Sleep:" Keyword causes the execution of the command file ! to be suspended for the number of milliseconds specified in the associated ! value (integer values only). ! ! - The "Call_File" Keyword causes a recursive call to read the specified file. ! ! - Full local Keyword/Value context present before the Call_File Keyword ! is still valid after. i.e. Context changes made in the Called file are ! NOT propagated back to the Calling file. ! ! - The syntax rules within a called file are the same as described here. ! The local Keyword/Value context present before the Call_File Keyword ! is imported into the Called File. i.e. You can define some Keyword Values ! in the Calling File which will be valid inside the Called File. !------------------------------------------------------------------------------ ! - Symbol usage in command files: ! ! Symbols may be defined and used in command files. ! A symbol name must start with a dollar sign "$". ! ! A symbol is defined by giving it a numeric value. ! A symbol is defined using a Keyword/Value syntax where the Keyword is ! the symbol's name, starting with its own dollar sign but with an additional ! equal character appended to the end of the symbol name, while the value ! is the desired symbol value. ! e.g. To define a symbol named "$Slot_AONM" and give it a value "5" ! enter the following: ! $Slot_AONM= 5 ! The equal sign "=" is required and must appear directly after the last ! character of the symbol name, with no space or tab in-between. ! Any number of spaces, or tabs may appear between the symbol definition and ! its value, but the symbol and its value must appear on the same line. ! Previously defined symbols can be re-defined to change their value. ! Previously defined symbols cannot be un-defined. ! ! A symbol may be used anywhere a value is required, i.e. in any Keyword/Value ! pair and the symbol value will be substituted. e.g. ! Slot: $Slot_AONM ! A symbol must have been defined before it can be used. ! There are no predefined symbols. ! Symbols are NOT case sensitive. ! Symbol names may include any alpha numeric characters (e.g. _[(}./$< ), ! (but no space, tabs, or end of line). For clarity one should avoid ! using embedded quotation marks, equal signs, colon. ! A symbol value may be used to define another new symbol. ! ! All symbols defined before a "Call_File" Keyword are propagated into ! the Called File. i.e. You can define symbols in the Calling File ! and use those symbols (or modify them) inside the Called File. ! Symbols created or modified inside a Called File are NOT propagated ! back to the Calling file. !------------------------------------------------------------------------------