void ScriptMain() { Console.WriteLine("Script begins..."); //string l_baseDir = "G:/TEMP/AIDA/HW_TEST/"; string l_baseDir = "V:/Projects/BabyMind/Production/FEB-V2/"; const int _NB_CH = 4; const int _NB_ASIC = 3; int[] _ch = {0,5,25,31}; //channels to be tested string[] _ch_connector={"Lower(CH0-31)", "Middle(CH32-63)", "Upper(CH63-95]"}; string l_sn = Dialog.ShowInputDialog("Enter the serial number (eg. SN01), must correspond to a created directory"); int l_start = Dialog.ShowInputDialog("Enter the starting index for DAQ between 0 and " + (_NB_CH*_NB_ASIC-1) ); Sync.LogFileName = l_baseDir + "LOG_HW2/" + l_sn; for (int l_asic=l_start/_NB_CH; l_asic<_NB_ASIC; l_asic++) { Dialog.ShowDialog("Switch OFF the board, connect DPNC377 on " + _ch_connector[l_asic] + ", re-switch ON, WAIT FOR BOARD detected and click OK"); for (int l_ch=l_start%_NB_CH; l_ch<_NB_CH; l_ch++) { string l_suffix = "A" + l_asic.ToString() + "-CH" + _ch[l_ch].ToString(); // Open a config file (path is relative to this file) BoardLib.OpenConfigFile(l_baseDir + "CFG/PDdiscri-" + l_suffix); // Configure the board BoardLib.BoardConfigure(); Sync.Sleep(50); //Sync.SleepUntil(BoardLib.IsConfigSent()); // Set direct parameters BoardLib.SetDirectParameters(); Sync.Sleep(10); string l_daqFile = "a" + l_asic.ToString() + "-ch" + _ch[l_ch].ToString(); // Run the acquistion (it'll wait for the transfer to finish) BoardLib.StartAcquisition(l_baseDir + "HW2/" + l_sn + "/" + l_daqFile); } } BoardLib.SetVariable("Board.DirectParam.HvOn", false); BoardLib.SetDirectParameters(); // We're done! Console.WriteLine("Script ended"); }