diff --git a/LSL2/STPROC/METROLOGY_SERVICES.txt b/LSL2/STPROC/METROLOGY_SERVICES.txt index fa29042..ce073f0 100644 --- a/LSL2/STPROC/METROLOGY_SERVICES.txt +++ b/LSL2/STPROC/METROLOGY_SERVICES.txt @@ -677,7 +677,12 @@ Service ImportMetrologyRunData(Machine, DataPath, FileName, RunData) Begin Case Case Machine _EQC 'Stratus' PSN = RunData<9> - Metrology_Services('ImportStratusData', RunData, ResourceID, PSN) + QualFile = ( (PSN EQ 'T-Low') or (PSN EQ 'T-Mid') or (PSN EQ 'T-High') or (PSN EQ 'T_LOW') or (PSN EQ 'T_MID') or (PSN EQ 'T_HIGH') ) + IF QualFile THEN + Metrology_Services('ImportStratusQualData', RunData, ResourceID, PSN) + END ELSE + Metrology_Services('ImportStratusData', RunData, ResourceID, PSN) + END MachineType@ = 'Stratus' Case Machine _EQC 'Biorad' @@ -738,6 +743,43 @@ Service ImportMetrologyRunData(Machine, DataPath, FileName, RunData) end service +Service ImportStratusQualData(RunData, ResourceID, PSN) + + Machine = 'BioRad' + URL = "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/":ResourceID:"/header" + TimeoutDuration = HTTPClient_Services('GetTimeoutDuration') + If TimeoutDuration NE 30 then Httpclient_Services('SetTimeoutDuration', 30) + Response = Httpclient_Services('SendHTTPRequest', 'GET', URL, '', '', '', '', '', '', '') + If Response NE '' then + objJSON = '' + If SRP_JSON(objJSON, 'Parse', Response) EQ '' then + SumOOS = SRP_JSON(objJSON, 'GetValue', 'Results[1].iq_sum') + ToolID = RunData<7> + TimeStamp = RunData<2> + If SumOOS NE '' then + Swap 'T_LOW' with 'T-Low' in PSN + Swap 'T_MID' with 'T-Mid' in PSN + Swap 'T_HIGH' with 'T-High' in PSN + Pass = (SumOOS EQ 0) + QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass) + StatusCode = QualResponse<1> + Message = QualResponse<2> + Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message) + end else + LogMessage = 'IQS response missing Results[1].iq_sum. Error message: ':SRP_JSON(objJSON, 'GetValue', 'message') + Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : LogMessage) + end + SRP_JSON(objJSON, 'Release') + end else + Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Failed to parse IQS JSON response') + end + end else + Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Null response from IQS API.') + end + +end service + + Service ImportStratusData(RunData, ResourceID, PSN) Machine = 'Stratus' @@ -3639,7 +3681,3 @@ LoadRunDataToDatabase: end return - - - -