LArTPC DAQ 96 TRICS Modifications --------------------------------------- Original Rev. 27-DEC-2006 Current Rev. 29-DEC-2006 The purpose of this file is to describe the modifications to the standard D-Zero Run IIB L1 Cal Trig TRICS "C++ Engine" code and "gui" code that will be needed to implement the LArTPC DAQ 96 System. The sections of this document are: Modifications to the C++ TRICS Engine Modifications to the GUI List of gui functions (buttons) List of Command Files Division of labor between the main gui code and gui command file code Modifications to the C++ TRICS Engine ===================================== The strong intent in the design of the DAQ 96 System is to require no or very limited modifications to the standard TRICS C++ Engine from the version that is used in the online Run IIB system at D-Zero. At this time the only modification that is anticipated is to change the high order A32 address bits so that the DAQ 96 System can operate without the use of a Vertical Interconnect card pair. The DAQ 96 System is defined to occupy only one crate so there is no point in using a VI card pair. Modifications to the GUI ======================== Although it will retain much of the internal code, the appearance of the gui will be much different for the DAQ 96 application compared to its standard appearance in the Run IIB D-Zero applications. These differences can be described in terms of what buttons and functions are provided by the gui and how the code is divided between the main gui code itself and the various qui command files which are associated with the gui. List of gui functions (buttons) ------------------------------- The following is the list of functions called by buttons that are needed by the DAQ 96 application. Differences in the operation of these functions between the D-Zero and DAQ 96 applications are noted. VME I/O keep this - no changes Register I/O keep this - no changes Configure FPGA keep this - no changes Ped DAC Control keep this - no changes ADF Card keep this - no changes Random Reg Test keep this - no changes ADC Analysis keep this - no changes TAB/GAB and Readout Crate Sections: This could all be removed. System Section: Keep the Control Status, and TCC Command Files buttons with no changes to the associated functions. Can remove the Fake Core Messages if it is useful to reduce the size and complexity of the main gui code. Modify the names and files called by the buttons under GUI Command Files. For DAQ 96 need: Configure all DAQ 96 ADF-2 FPGAs Initialize all DAQ 96 ADF-2 Cards Run Find_DAC on all DAQ 96 ADF-2 Cards Start a New Run Pause the Run Resume the Run End the Run List of Command Files --------------------- Configure all DAQ 96 ADF-2 FPGAs This is a gui command file called from a button under the main menu GUI Cmd Files button. The Configure DAQ 96 ADF-2 FPGAs just calls the standard configure FPGA routine to configure both Data Path FPGAs on all of the ADF-2 cards listed in List_of_DAQ_96_ADF_2_Cards. Initialize all DAQ 96 ADF-2 Cards This is a gui command file called from a button under the main menu GUI Cmd Files button. The Initialize DAQ 96 ADF-2 Cards just calls the standard Initialize ADF-2 Card routine for all of the ADF-2 cards listed in List_of_DAQ_96_ADF_2_Cards. Run Find_DAC on all DAQ 96 ADF-2 Cards This is a gui command file called from a button under the main menu GUI Cmd Files button. Run Find_DAC on all DAQ 96 ADF-2 Cards just calls the standard Find_DAC routine for all of the ADF-2 cards listed in List_of_DAQ_96_ADF_2_Cards. On each ADF-2 card in this list it adjusts the Pedestals DACs to give and ADC output target value of 400 for all channels. Start a New Run This is part gui command file and part main gui code. When you click this button then main gui code presents a menu requesting that the operator enter some information before the main gui code calls the Make_a_Run qui command file. - It will ask you, "Which channels do you want to readout in this run ?". Including/excluding channels is controlled at the ADF-2 card level. The information provided here is used to fill in the Mask_of_Cards_to_be_Read variable. - It will ask you, "Do you want to Auto-Pause ? If you answer YES then the variable Auto_Pause is set to 1 otherwise it is set to 0. - It will ask you, "Do you want a PreScale ?". You may enter a number between 0 and 1000 seconds. The value that you enter is assigned to the variable PreScale_Value. Once the main gui code has obtained this information (and the operator clicks OK-GO) then the main gui code calls the Make_a_Run qui command file: Pause the Run This is main gui code. It just sets the flag that says that the current run is to be Paused. It should also check the variable that indicates whether or not a run is currently underway so that it can issue a warning if the operator tries to Pause when there is no run currently going. The Pause run flag that is Set by this button is picked up by the Make_a_Run gui command file where the actual action happens to Pause the Run. Resume the Run This is main gui code. It just sets the flag that says that the current run is to be Resumed. It should also check the variable that indicates whether or not a run is currently underway so that it can issue a warning if the operator tries to Resume when there is no run currently going. The Pause run flag that is Cleared by this button is picked up by the Make_a_Run gui command file where the actual action happens to Resume the Run. End the Run This is main gui code. It just sets the flag that says that the current run is to be Ended. It should also check the variable that indicates whether or not a run is currently underway so that it can issue a warning if the operator tries to End a Run when there is no run currently going. The End Run flag that is Set by this button is picked up by the Make_a_Run gui command file where the actual action happens to End the Run. Division of labor between the main gui code and gui command file code --------------------------------------------------------------------- The guiding philosophy is: - Don't hack the main gui code more than necessary. - Things that are "universal" to all imagined versions of the DAQ 96 System or things that need a menu type interface with the operator (e.g. getting the setup for a new run) should be handled in the main gui code. - Keeping things in the gui command files makes it easier to manage and modify the DAQ 96 System as needed. - At some level the main gui code should only include the human interface part of things. Once it has gathered up all of the operating parameters it should then call gui command file code or C++ engine code to do the actual "actions".