Download Programmer`s Manual Digital Gamma Finder (DGF)
Transcript
Table 5: File Names in All_Files. All_Files All_Files[0] All_Files[1] All_Files[2] All_Files[3] All_Files[4] All_Files[5] All_Files[6] File Name C:\XIA\DGF4C\Firmware\dgf4c.bin C:\XIA\DGF4C\DSP\DGFcodeE.bin C:\XIA\DGF4C\Configuration\test.itx C:\XIA\DGF4C\DSP\DGFcodeE.var C:\XIA\DGF4C\DSP\DGFcodeE.lst C:\XIA\DGF4C\Firmware\fdgf4c4d.bin C:\XIA\DGF4C\Firmware\fdgf4c4e.bin The global variable array, Module_Global_Values, also needs to be initialized before C Library functions can be called to start the initialization. Table 6: Initialization of Module_Global_Values. Module_Global_Names Module_Global_Values NUMBER_MODULES CONTROLLER_ID SCSI_BUS CRATE_ID CAMAC_MASTER FAST_CAMAC LAM_ENABLE SLOT_WAVE[0] SLOT_WAVE[1] SLOT_WAVE[2] 2 0 (0: J73A, 1: CC32, 2: offline) 0 1 1 (1: enable, 0: disable) 0 (1: enable, 0: disable) 0 (1: enable, 0: disable) 24 (CAMAC MASTER CONTROLLER) 1 (Module #1 sits in slot #1) 2 (Module #2 sits in slot #2) 3.1.2 Boot DGF4C Modules The boot procedure for DGF-4C modules includes the following steps. First, all the global parameter names should be downloaded by calling function C_Dgf4c_Hand_Down_Names. Then function C_Dgf4c_User_Par_IO should be called to initialize the global variable array Module_Global_Values. After that, function C_Dgf4c_Hand_Down_Names should be called to download the file name array All_Files. Finally, function C_Dgf4c_Boot_System should be called to boot the modules. The following code is an example of how to boot the DGF-4C modules using the C Library functions. Table 7: An Example Code Illustrating How to Boot DGF-4C Modules. // download module global names C_Dgf4c_Hand_Down_Names(Module_Global_Names, "MODULE_GLOBAL_NAMES"); // download global data names C_Dgf4c_Hand_Down_Names(Global_Data_Names, "GLOBAL_DATA_NAMES"); // download user variable names C_Dgf4c_Hand_Down_Names(User_Var_Names, "USER_VAR_NAMES"); // initialize module global values C_Dgf4c_User_Par_IO(Module_Global_Values, "MODULE_GLOBAL_VALUES", 0); C_Dgf4c_Hand_Down_Names(All_Files, "ALL_FILES"); // download file names C_Dgf4c_Boot_System(0x1F); // boot DGF-4C modules C_Dgf4c_Set_Current_ModChan(1,0); // set current module and channel number 9