diff --git a/.gitmodules b/.gitmodules index 681ddf4..385ff94 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,7 +5,7 @@ [submodule "icicle"] path = icicle url = https://gitlab.cern.ch/icicle/icicle.git - branch = new_adc_board_v2 + branch = 1.3.0-RC [submodule "InnerTrackerTests"] path = InnerTrackerTests url = https://gitlab.cern.ch/cms_tk_ph2/inner-tracker-tests.git diff --git a/Configuration/XMLUtil.py b/Configuration/XMLUtil.py index 9ea7a36..a2b13f3 100644 --- a/Configuration/XMLUtil.py +++ b/Configuration/XMLUtil.py @@ -170,7 +170,8 @@ class FE(): def __init__(self): self.Id="0" self.Enabled = "0" - self.Lane="0" + self.Lane="0" + self.EfuseID = "0" self.configfile="CMSIT_RD53.txt" self.settingList = {} self.laneConfigList = {} @@ -314,7 +315,7 @@ def GenerateHWDescriptionXML(HWDescription,outputFile = "CMSIT_gen.xml", boardty BeBoard.boardType = boardtype print("This is the board type: ", BeBoard.boardType) Node_FE = ET.SubElement(Node_HyBrid, BeBoard.boardType) - Node_FE = SetNodeAttribute(Node_FE,{'Id':FE.Id, 'enable':FE.Enabled,'Lane':FE.Lane,'configFile':FE.configfile,'RxGroups':FE.RxGroups,'RxPolarity':FE.RxPolarities,'TxGroup':FE.TxGroups,'TxChannel':FE.TxChannels,'TxPolarity':FE.TxPolarities,'Comment':boardtype}) + Node_FE = SetNodeAttribute(Node_FE,{'Id':FE.Id, 'enable':FE.Enabled,'Lane':FE.Lane, 'eFuseCode':FE.EfuseID,'configFile':FE.configfile,'RxGroups':FE.RxGroups,'RxPolarity':FE.RxPolarities,'TxGroup':FE.TxGroups,'TxChannel':FE.TxChannels,'TxPolarity':FE.TxPolarities,'Comment':boardtype}) if 'RD53B' in boardtype: Node_FELaneConfig = ET.SubElement(Node_FE,"LaneConfig") Node_FELaneConfig = SetNodeAttribute(Node_FELaneConfig,FE.laneConfigList) diff --git a/Gui/CMSIT_RD53B.xml b/Gui/CMSIT_RD53B.xml index c692969..8d2e1e5 100644 --- a/Gui/CMSIT_RD53B.xml +++ b/Gui/CMSIT_RD53B.xml @@ -25,7 +25,7 @@ - + None: Currents_Down = [res[5] for res in data_down] - for index, pin in self.PIN_MAPPINGS[self.moduleType].items(): + for index, pin in self.PIN_MAPPINGS[self.moduleType.split(" ")[-1].replace("1x2","DOUBLE").upper()].items(): ADC_Voltage_Up = [res[6][index] for res in data_up] result_up = np.array([Currents_Up, LV_Voltage_Up, ADC_Voltage_Up]) @@ -180,7 +180,7 @@ def runWithRelayDMM(self) -> None: self.instruments.lv_off() self.multimeter.set("SYSTEM_MODE","REM") logger.info('turned off the lv and hv') - for key in self.relayboard.PIN_MAP[self.moduleType].keys(): + for key in self.relayboard.PIN_MAP[self.moduleType.split(" ")[-1].replace("1x2","DOUBLE").upper()].keys(): if "VDD" in key: self.pin_list.append(key) print('adding {0} to pin_list'.format(key)) @@ -204,7 +204,6 @@ def runWithRelayDMM(self) -> None: measure_args={}, set_property="current", ) - self.determineLVIndex(results) results = results[self.LV_index][1] diff --git a/Gui/python/SimplifiedMainWidget.py b/Gui/python/SimplifiedMainWidget.py index 6a3780b..e27aab8 100644 --- a/Gui/python/SimplifiedMainWidget.py +++ b/Gui/python/SimplifiedMainWidget.py @@ -29,7 +29,7 @@ from Gui.python.Peltier import PeltierSignalGenerator from Gui.python.logging_config import logger import Gui.siteSettings as site_settings -from icicle.icicle.multiment_cluster import InstrumentCluster, InstrumentNotInstantiated +from icicle.icicle.instrument_cluster import InstrumentCluster, InstrumentNotInstantiated @@ -217,11 +217,11 @@ def setupUI(self): self.StartLayout = QHBoxLayout() self.TestGroup = QGroupBox() self.TestGroupLayout = QVBoxLayout() - self.ProductionButton = QRadioButton("&Full Test") - self.QuickButton = QRadioButton("&Quick Test") - self.QuickButton.setChecked(True) - self.TestGroupLayout.addWidget(self.QuickButton) - self.TestGroupLayout.addWidget(self.ProductionButton) + self.FunctionTestButton = QRadioButton("&Functional Test") + self.AssemblyTestButton = QRadioButton("&Assembly QC Test") + self.AssemblyTestButton.setChecked(True) + self.TestGroupLayout.addWidget(self.AssemblyTestButton) + self.TestGroupLayout.addWidget(self.FunctionTestButton) self.TestGroup.setLayout(self.TestGroupLayout) logger.debug("Added Boxes/Layouts to Simplified GUI") @@ -352,10 +352,10 @@ def runNewTest(self): ) return - if self.ProductionButton.isChecked(): - self.info = "ROCTune" - else: - self.info = "QuickTest" + if self.FunctionTestButton.isChecked(): + self.info = "TFPX_Functional_Test" + elif self.AssemblyTestButton.isChecked(): + self.info = "TFPX_Assembly_QC" self.runFlag = True self.RunTest = QtRunWindow(self.master, self.info, self.firmwareDescription) self.RunButton.setDisabled(True) diff --git a/Gui/python/TestHandler.py b/Gui/python/TestHandler.py index 894f774..7f21df7 100644 --- a/Gui/python/TestHandler.py +++ b/Gui/python/TestHandler.py @@ -462,14 +462,22 @@ def runSingleTest(self, testName): self.info_process.setWorkingDirectory( os.environ.get("PH2ACF_BASE_DIR") + "/test/" ) - self.info_process.start( - "echo", - [ - "Running COMMAND: CMSITminiDAQ -f CMSIT.xml -c {}".format( - Test_to_Ph2ACF_Map[self.currentTest] - ) - ], - ) + if self.currentTest == "CommunicationTest": + self.info_process.start( + "echo", + [ + "Running COMMAND: CMSITminiDAQ -f CMSIT.xml -p" + ], + ) + else: + self.info_process.start( + "echo", + [ + "Running COMMAND: CMSITminiDAQ -f CMSIT.xml -c {}".format( + Test_to_Ph2ACF_Map[self.currentTest] + ) + ], + ) self.info_process.waitForFinished() self.run_process.setProcessChannelMode(QtCore.QProcess.MergedChannels) @@ -527,10 +535,21 @@ def runSingleTest(self, testName): "{0}/test/CMSIT.xml".format(os.environ.get("PH2ACF_BASE_DIR")), "DoNSteps" ) - self.run_process.start( - "CMSITminiDAQ", - ["-f", "CMSIT.xml", "-c", "{}".format(Test_to_Ph2ACF_Map[self.currentTest])], - ) + if self.currentTest == "CommunicationTest": + self.run_process.start( + "CMSITminiDAQ", + ["-f", "CMSIT.xml", "-p"], + ) + else: + self.run_process.start( + "CMSITminiDAQ", + ["-f", "CMSIT.xml", "-c", "{}".format(Test_to_Ph2ACF_Map[self.currentTest])], + ) + + #self.run_process.start( + # "CMSITminiDAQ", + # ["-f", "CMSIT.xml", "-c", "{}".format(Test_to_Ph2ACF_Map[self.currentTest])], + #) if Test_to_Ph2ACF_Map[self.currentTest] == "threqu": self.isTDACtuned = True @@ -717,7 +736,8 @@ def on_readyReadStandardOutput(self): except Exception as err: logger.info("Error occures while parsing running time, {0}".format(err)) - + if '@@@ End of CMSIT miniDAQ @@@' in textStr: + self.ProgressingMode = "Summary" if self.ProgressingMode == "Perform": if "Progress:" in textStr: try: @@ -854,6 +874,8 @@ def check_for_end_of_test(self, textStr): return True elif "New injection delay" in textStr: return True + elif "CommunicationTest" == self.currentTest: + return True return False # Reads data that is normally printed to the terminal and saves it to the output file diff --git a/Gui/python/TestValidator.py b/Gui/python/TestValidator.py index 6ea7e92..acff1bc 100644 --- a/Gui/python/TestValidator.py +++ b/Gui/python/TestValidator.py @@ -11,8 +11,8 @@ def ResultGrader(felis, outputDir, testName, testIndexInSequence, runNumber, mod module_name = module_data['module'].getModuleName() module_type = module_data['module'].getModuleType() module_version = module_data['module'].getModuleVersion() - if 'IVCurve' in testName or 'SLDOScan' in testName: - explanation = 'No grading currently available for IVCurve or SLDOScan.' + if 'IVCurve' in testName or 'SLDOScan' in testName or 'CommunicationTest' in testName: + explanation = 'No grading currently available for IVCurve, SLDOScan, or CommunicationTest.' return {module_name:(True, explanation)} root_file_name = testName.split('_')[0] diff --git a/Gui/siteConfig.py b/Gui/siteConfig.py index c6f0a05..dc93a98 100644 --- a/Gui/siteConfig.py +++ b/Gui/siteConfig.py @@ -40,6 +40,12 @@ defaultPeltierWarningTemp = 40 ################################# +# Temperature Chamber Variables +# Only UIC and OSU should be setting this variable. This is to control +# the f4t thermal chamber (this is NOT the same as the UIC coldbox used for standard +# module testing!) +#temp_chamber_resource = "TCPIP::128.146.33.179::5025::SOCKET" + # Icicle variables # Set this variable to use your powersupplies manually diff --git a/InnerTrackerTests b/InnerTrackerTests index 240fd71..1df224a 160000 --- a/InnerTrackerTests +++ b/InnerTrackerTests @@ -1 +1 @@ -Subproject commit 240fd71e294833579c44085d2386a450d181e996 +Subproject commit 1df224a56039f554e8e2548b9c5bc71c4ed529ba diff --git a/Ph2_ACF b/Ph2_ACF index 0f4c67c..8b212c9 160000 --- a/Ph2_ACF +++ b/Ph2_ACF @@ -1 +1 @@ -Subproject commit 0f4c67c58f9f6a0d9673f460fc0dc22643852298 +Subproject commit 8b212c979177d0541ff8d7e545e1bf317343925f diff --git a/README.md b/README.md index f2a42ca..7d7dcee 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,23 @@ In Gui/jsonFiles, there are example files written that may be modified to suit y Returning to Gui/siteConfig.py, you should also scroll down to the "FC7List" and edit the fc7.board.* listed there to match the IP addresses of your FC7 device(s). If you scroll down a little further, you will see a dictionary titled "CableMapping." This serves as a mapping of the cable ID you see when adding modules in the simplified GUI to a physical port on your FC7(s). Each cable ID is associated with a dictionary detailing the path to a port. The first key, "FC7," specifies which FC7 that you want that cable ID to be connected to. The FC7 you list should be in the FC7List above. Next, you can name the "FMCID," representing which FMC on the FC7 you wish to use. The possible values for this are "L8" if the FMC is on the left or "L12" if the FMC is on the right. Finally, you can specify which port on that FMC you want to connect to. The leftmost port is "0" and the rightmost port is "3." - +#### Temperature Chamber +This section only applies to UIC and OSU who have the f4t thermal +chamber for thermal cycling of the modules (This is NOT the same thing +as the UIC coldbox used for standard module testing!). You can add +control of the thermal chamber to the GUI by adding in +temp_chamber_resource to the siteConfig.py file. + +``` python +temp_chamber_resource = "TCPIP::::SOCKET" +``` +where ip_address is the ip address of your thermal chamber which can + be obtained through the settings menu on the f4t controller on the + thermal chamber. This will allow you to select your thermal profile + from the GUI and to stop the running of the profile from the GUI as + well. A thermal profile must be loaded on the thermal chamber prior + to using it with the GUI. + 3. Start the docker container: ``` cd .. @@ -99,7 +115,7 @@ bash run_Docker.sh dev 5. Set up Ph2_ACF and open GUI: When you first open the container you should run ``` -source prepare_Ph2_ACF +source prepare_Ph2ACF.sh ``` This will set up the Ph2_ACF environment variables in the container and open the GUI. If you exit the GUI, it will take you back to the Gui directory. If you want to open the GUI again while still inside the container, you can just run ``` @@ -259,4 +275,7 @@ The F4T Temperature Controller can transfer its data logs via USB, Samba, or Tri Remote IP Address: TFTP Server host's IPv4 (same as Remote Host Name) -4. You can test your setup with "Transfer Files Now By" section and selecting "TFTP" \ No newline at end of file +4. You can test your setup with "Transfer Files Now By" section and selecting "TFTP" + +* If the GUI doens't launch and an error stating a QT plugin could not be used even though it was found, reboot your computer. This seems to be an issue with the QT framework that the GUI is written with and we have yet to determine a fix. + diff --git a/icicle b/icicle index 703c073..2dc0fab 160000 --- a/icicle +++ b/icicle @@ -1 +1 @@ -Subproject commit 703c07325d6ce52fdfb645c40302a8a551b4b697 +Subproject commit 2dc0fab82b680f985dcbb1942dca777be544df97 diff --git a/requirements.txt b/requirements.txt index 465facd..cbb6b84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,4 +13,6 @@ PyUSB requests tqdm fasteners -requests_toolbelt \ No newline at end of file +requests_toolbelt +bs4 +ilock \ No newline at end of file diff --git a/run_Docker.sh b/run_Docker.sh index 60f96de..4046eec 100644 --- a/run_Docker.sh +++ b/run_Docker.sh @@ -59,9 +59,9 @@ else -v ${PWD}/Gui/siteConfig.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/siteSettings.py\ -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test\ -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data\ - -v ${PWD}/Gui/jsonFiles:/home/cmsTkUser/Ph2_ACF_GUI/Gui/jsonFiles\ + -v ${PWD}/Gui/jsonFiles:/home/cmsTkUser/Ph2_ACF_GUI/Gui/jsonFiles\ -v ${PWD}/Gui/QtGUIutils/PeltierCoolingApp.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/QtGUIutils/PeltierCoolingApp.py\ - -v ${PWD}/Gui/python/Peltier.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/python/Peltier.py\ + -v ${PWD}/Gui/python/Peltier.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/python/Peltier.py\ -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH\ -e XAUTHORITY=$XAUTH --net host majoyce2/ph2_acf_gui_user:latest #local/testimagejuly30user -fi +fi \ No newline at end of file