Modified ship label printing routine to use the epi part number instead of the customer part number. Modified UpdateFailedWafers service to use the transaction queue to avoid clobbering WO_MAT records.

This commit is contained in:
Infineon\StieberD
2025-07-21 15:23:52 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 2aaed8944e
commit 490bfe21d4
3 changed files with 801 additions and 810 deletions

View File

@ -41,62 +41,63 @@ EQU PI$WIDTH TO 5
EQU PI$HEIGHT TO 6 EQU PI$HEIGHT TO 6
EQU PI$SIZE TO 7 EQU PI$SIZE TO 7
ErrorMsg = '' Main:
IF NOT(ASSIGNED(WONo)) THEN ErrorMsg = 'Unassigned parameter "WONo" passed to PRINT_CASS_SHIP_LABEL routine.' ErrorMsg = ''
IF NOT(ASSIGNED(WOSteps)) THEN ErrorMsg = 'Unassigned parameter "WOSteps" passed to PRINT_CASS_SHIP_LABEL routine.'
IF NOT(ASSIGNED(CassNos)) THEN ErrorMsg = 'Unassigned parameter "CassNos" passed to PRINT_CASS_SHIP_LABEL routine.'
IF NOT(ASSIGNED(RDSNos)) THEN ErrorMsg = 'Unassigned parameter "RDSNos" passed to PRINT_CASS_SHIP_LABEL routine.'
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Zebra' IF NOT(ASSIGNED(WONo)) THEN ErrorMsg = 'Unassigned parameter "WONo" passed to PRINT_CASS_SHIP_LABEL routine.'
LogDate = Oconv(Date(), 'D4/') IF NOT(ASSIGNED(WOSteps)) THEN ErrorMsg = 'Unassigned parameter "WOSteps" passed to PRINT_CASS_SHIP_LABEL routine.'
LogTime = Oconv(Time(), 'MTS') IF NOT(ASSIGNED(CassNos)) THEN ErrorMsg = 'Unassigned parameter "CassNos" passed to PRINT_CASS_SHIP_LABEL routine.'
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '.csv' IF NOT(ASSIGNED(RDSNos)) THEN ErrorMsg = 'Unassigned parameter "RDSNos" passed to PRINT_CASS_SHIP_LABEL routine.'
Headers = 'Logging DTM' : @FM : 'Description'
ColumnWidths = 20 : @FM : 300
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Spectrum' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Zebra'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '.csv' LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '.csv'
Headers = 'Logging DTM' : @FM : 'Description' Headers = 'Logging DTM' : @FM : 'Description'
ColumnWidths = 20 : @FM : 300 ColumnWidths = 20 : @FM : 300
objSpectrumLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$) objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Spectrum'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '.csv'
Headers = 'Logging DTM' : @FM : 'Description'
ColumnWidths = 20 : @FM : 300
objSpectrumLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
IF ErrorMsg NE '' THEN LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
IF ErrorMsg NE '' THEN
ErrMsg(ErrorMsg) ErrMsg(ErrorMsg)
RETURN RETURN
END END
PrinterID = '' PrinterID = ''
* PrinterID = 'MESZBRPRT004' ;*default to the shipping printer, which is the only printer with 4x4 label stock
* Initialize the printer * Initialize the printer
FileName = "Printing Label" FileName = "Printing Label"
Title = "Printing Label" ;* Initialize Printing Title = "Printing Label" ;* Initialize Printing
PageInfo = '' PageInfo = ''
PageInfo<PI$LEFT> = 0.1 PageInfo<PI$LEFT> = 0.1
PageInfo<PI$TOP> = 0.1 PageInfo<PI$TOP> = 0.1
PageInfo<PI$RIGHT> = 0.1 PageInfo<PI$RIGHT> = 0.1
PageInfo<PI$BOTTOM> = 0.1 PageInfo<PI$BOTTOM> = 0.1
PageSetup = '1' ;* Landscape PageSetup = '1' ;* Landscape
PrintSetup = '0' ;* Print to specific location PrintSetup = '0' ;* Print to specific location
PrintPath = Printer_Select(PrinterID);* Select printer - Displays popup if PrinterPort not found PrintPath = Printer_Select(PrinterID);* Select printer - Displays popup if PrinterPort not found
PrintPathLog = PrintPath PrintPathLog = PrintPath
Swap @FM with '@FM' in PrintPathLog Swap @FM with '@FM' in PrintPathLog
Swap @VM with '@VM' in PrintPathLog Swap @VM with '@VM' in PrintPathLog
Swap @SVM with '@SVM' in PrintPathLog Swap @SVM with '@SVM' in PrintPathLog
Swap @TM with '@TM' in PrintPathLog Swap @TM with '@TM' in PrintPathLog
Swap @STM with '@STM' in PrintPathLog Swap @STM with '@STM' in PrintPathLog
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : @User4 : ' - PrintPath = ' : PrintPathLog, @RM, @FM) Logging_Services('AppendLog', objLog, LoggingDTM : @FM : @User4 : ' - PrintPath = ' : PrintPathLog, @RM, @FM)
IF PrintPath = '' THEN IF PrintPath = '' THEN
Def = "" Def = ""
Def<MTYPE$> = "TA3" Def<MTYPE$> = "TA3"
Def<MTEXT$> = 'Destination Printer not Selected..' Def<MTEXT$> = 'Destination Printer not Selected..'
@ -104,43 +105,43 @@ IF PrintPath = '' THEN
Def<MICON$> = '*' Def<MICON$> = '*'
Msg(@WINDOW, Def, '') Msg(@WINDOW, Def, '')
RETURN RETURN
END END
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath) stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath)
end else end else
stat = Direct_Print('START', PrintPath<1>, '', '') stat = Direct_Print('START', PrintPath<1>, '', '')
end end
IF stat < 0 THEN GOSUB OIPrint_Err ;* Bail = couldn't initialize the printer IF stat < 0 THEN GOSUB OIPrint_Err ;* Bail = couldn't initialize the printer
If Unassigned(RDSType) then RDSType = '' If Unassigned(RDSType) then RDSType = ''
IF RDSType EQ '' then IF RDSType EQ '' then
ReactNos = XLATE('REACT_RUN',RDSNos,REACT_RUN_REACTOR$,'X') ;* Added 12/16/2008 - JCH - Adding Reactor Type codes to cassette labels ReactNos = XLATE('REACT_RUN',RDSNos,REACT_RUN_REACTOR$,'X') ;* Added 12/16/2008 - JCH - Adding Reactor Type codes to cassette labels
ReactTypes = OCONV(XLATE('REACTOR',ReactNos,REACTOR_REACT_TYPE$,'X'),'[REACT_TYPE_CONV,OPSREF]') ;* Added 12/16/2008 - JCH - Adding Reactor Type codes to cassette labels ReactTypes = OCONV(XLATE('REACTOR',ReactNos,REACTOR_REACT_TYPE$,'X'),'[REACT_TYPE_CONV,OPSREF]') ;* Added 12/16/2008 - JCH - Adding Reactor Type codes to cassette labels
end else end else
ReactTypes = RDSType ReactTypes = RDSType
end end
WORec = XLATE('WO_LOG',WONo,'','X') WORec = XLATE('WO_LOG',WONo,'','X')
WoLogReqShipDt = OCONV( WORec<WO_LOG_PROMISE_SHIP_DT$>, 'D2/' ) WoLogReqShipDt = OCONV( WORec<WO_LOG_PROMISE_SHIP_DT$>, 'D2/' )
WoLogDMShipDt = OCONV( WORec<WO_LOG_PROMISE_SHIP_DT$>, 'DE' ) WoLogDMShipDt = OCONV( WORec<WO_LOG_PROMISE_SHIP_DT$>, 'DE' )
WoLogCustPONo = WORec<WO_LOG_CUST_PO_NO$> WoLogCustPONo = WORec<WO_LOG_CUST_PO_NO$>
WoLogEpiPartNo = WORec<WO_LOG_EPI_PART_NO$> WoLogEpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
WoLogCustNo = WORec<WO_LOG_CUST_NO$> WoLogCustNo = WORec<WO_LOG_CUST_NO$>
ProdOrdNo = WORec<WO_LOG_PROD_ORD_NO$> ProdOrdNo = WORec<WO_LOG_PROD_ORD_NO$>
ProdVerNo = WORec<WO_LOG_PROD_VER_NO$> ProdVerNo = WORec<WO_LOG_PROD_VER_NO$>
ProdVerRec = XLATE('PROD_VER',ProdVerNo,'','X') ProdVerRec = XLATE('PROD_VER',ProdVerNo,'','X')
CompRec = XLATE('COMPANY',WoLogCustNo,'','X') CompRec = XLATE('COMPANY',WoLogCustNo,'','X')
Captive = CompRec<COMPANY_CAPTIVE$> Captive = CompRec<COMPANY_CAPTIVE$>
VendCd = CompRec<COMPANY_VEND_CD$> VendCd = CompRec<COMPANY_VEND_CD$>
CustName = CompRec<COMPANY_CO_NAME$> CustName = CompRec<COMPANY_CO_NAME$>
IF ProdOrdNo NE '' THEN IF ProdOrdNo NE '' THEN
IF WoLogCustPONo = 'NA' OR WoLogCustPONo = '' THEN IF WoLogCustPONo = 'NA' OR WoLogCustPONo = '' THEN
PONo = ProdOrdNo PONo = ProdOrdNo
END ELSE END ELSE
@ -149,11 +150,11 @@ IF ProdOrdNo NE '' THEN
OrderItems = '' OrderItems = ''
VisionOrderNo = '' VisionOrderNo = ''
VisionLineNos = '' VisionLineNos = ''
END END
CassCnt = COUNT(CassNos,@VM) + (CassNos NE '') CassCnt = COUNT(CassNos,@VM) + (CassNos NE '')
FOR I = 1 TO CassCnt FOR I = 1 TO CassCnt
WOStep = WOSteps<1,I> WOStep = WOSteps<1,I>
ProdSpecID = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X') ProdSpecID = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X')
@ -197,7 +198,7 @@ FOR I = 1 TO CassCnt
END ELSE END ELSE
PONo = CustPONo PONo = CustPONo
END END
ReShipCustPartNo = WOMatRec<WO_MAT_RESHIP_CUST_PART_NO$> ReShipEpiPartNo = WOMatRec<WO_MAT_RESHIP_CUST_EPI_PART_NO$>
SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$> SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
SubSupplier = obj_Vendor_Code('SemiToEpi',WOMatRec<WO_MAT_SUB_VEND_CD$>) SubSupplier = obj_Vendor_Code('SemiToEpi',WOMatRec<WO_MAT_SUB_VEND_CD$>)
@ -212,9 +213,9 @@ FOR I = 1 TO CassCnt
ReactType = ReactTypes<1,I> ReactType = ReactTypes<1,I>
MakeupBox = WOMatRec<WO_MAT_MAKEUP_BOX$> MakeupBox = WOMatRec<WO_MAT_MAKEUP_BOX$>
PartNo = XLATE('WO_LOG',WONo,WO_LOG_CUST_PART_NO$,'X') PartNo = XLATE('WO_LOG',WONo,WO_LOG_EPI_PART_NO$,'X')
If ReShipCustPartNo NE '' then If ReShipEpiPartNo NE '' then
PartNo = ReShipCustPartNo PartNo = ReShipEpiPartNo
end end
LotNo = WOMatRec<WO_MAT_LOT_NO$> LotNo = WOMatRec<WO_MAT_LOT_NO$>
SubstrPartNo = WOMatRec<WO_MAT_SUB_PART_NO$> SubstrPartNo = WOMatRec<WO_MAT_SUB_PART_NO$>
@ -358,8 +359,8 @@ FOR I = 1 TO CassCnt
END END
END END
If ReShipCustPartNo NE '' then If ReShipEpiPartNo NE '' then
PartNo = ReShipCustPartNo PartNo = ReShipEpiPartNo
end end
WfrsOut = XLATE('WM_OUT',WMOutKey,'WFRS_OUT','X') WfrsOut = XLATE('WM_OUT',WMOutKey,'WFRS_OUT','X')
MUWfrsRemQty = '' MUWfrsRemQty = ''
@ -435,21 +436,21 @@ FOR I = 1 TO CassCnt
IF InCassNo1 NE '' THEN IF InCassNo1 NE '' THEN
WOMatRec = XLATE('WO_MAT',WONo:'*':InCassNo1,'','X') WOMatRec = XLATE('WO_MAT',WONo:'*':InCassNo1,'','X')
PartNo = XLATE('WO_LOG',WONo,WO_LOG_CUST_PART_NO$,'X') PartNo = XLATE('WO_LOG',WONo,WO_LOG_EPI_PART_NO$,'X')
LotNo = WOMatRec<WO_MAT_LOT_NO$> LotNo = WOMatRec<WO_MAT_LOT_NO$>
SubstrPartNo = WOMatRec<WO_MAT_SUB_PART_NO$> SubstrPartNo = WOMatRec<WO_MAT_SUB_PART_NO$>
END ELSE END ELSE
IF MUWoNo1 NE '' AND MUCassNo1 NE '' THEN IF MUWoNo1 NE '' AND MUCassNo1 NE '' THEN
MUWOMatRec = XLATE('WO_MAT',MUWoNo1:'*':MUCassNo1,'','X') MUWOMatRec = XLATE('WO_MAT',MUWoNo1:'*':MUCassNo1,'','X')
PartNo = XLATE('WO_LOG',MUWoNo1,WO_LOG_CUST_PART_NO$,'X') PartNo = XLATE('WO_LOG',MUWoNo1,WO_LOG_EPI_PART_NO$,'X')
LotNo = MUWOMatRec<WO_MAT_LOT_NO$> LotNo = MUWOMatRec<WO_MAT_LOT_NO$>
SubstrPartNo = MUWOMatRec<WO_MAT_SUB_PART_NO$> SubstrPartNo = MUWOMatRec<WO_MAT_SUB_PART_NO$>
END END
END END
If ReShipCustPartNo NE '' then If ReShipEpiPartNo NE '' then
PartNo = ReShipCustPartNo PartNo = ReShipEpiPartNo
end end
//WfrsOut = Count(Xlate('WO_MAT_WFR', WOMatKey, 'OUT_WFR_ID', 'X'), @VM) //WfrsOut = Count(Xlate('WO_MAT_WFR', WOMatKey, 'OUT_WFR_ID', 'X'), @VM)
@ -539,23 +540,20 @@ FOR I = 1 TO CassCnt
Logging_Services('AppendLog', objSpectrumLog, LogData, @FM, @VM) Logging_Services('AppendLog', objSpectrumLog, LogData, @FM, @VM)
end end
end end
NEXT I
NEXT I
* * * * * * * * * * * * * *
OIPrint_Err: OIPrint_Err:
* * * * * * * * * * * * * *
* Local method to kill the OIPI engine * Local method to kill the OIPI engine
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
*IF stat < 0 THEN DEBUG ;*********
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer("TERM") stat = Set_Printer("TERM")
end else end else
stat = Direct_Print('STOP') stat = Direct_Print('STOP')
end end
RETURN RETURN
@ -564,23 +562,23 @@ RETURN
PrintLabel: PrintLabel:
* * * * * * * * * * * * * * * *
Convert '*' to '.' in CassID Convert '*' to '.' in CassID
MULabel = '' MULabel = ''
IF MakeupBox = 1 THEN MULabel = '** Makeup Box **' IF MakeupBox = 1 THEN MULabel = '** Makeup Box **'
IF MUWfrsAddQty > 0 THEN MULabel = 'Merged Lot' IF MUWfrsAddQty > 0 THEN MULabel = 'Merged Lot'
SuppCd = SubSupplier SuppCd = SubSupplier
ErrorMsg = '' ErrorMsg = ''
IF LEN(PartNo) > 18 THEN ErrorMsg = 'CustPartNo parameter exceeds 18 characters.' IF LEN(PartNo) > 18 THEN ErrorMsg = 'CustPartNo parameter exceeds 18 characters.'
IF LEN(RevLvl) > 3 THEN ErrorMsg = 'RevLvl parameter exceeds 3 characters.' IF LEN(RevLvl) > 3 THEN ErrorMsg = 'RevLvl parameter exceeds 3 characters.'
IF LEN(WfrsOut) > 6 THEN ErrorMsg = 'PartQty parameter exceeds 6 characters.' IF LEN(WfrsOut) > 6 THEN ErrorMsg = 'PartQty parameter exceeds 6 characters.'
IF NOT(NUM(WfrsOut)) THEN ErrorMsg = 'PartQty parameter is not a number.' IF NOT(NUM(WfrsOut)) THEN ErrorMsg = 'PartQty parameter is not a number.'
IF ErrorMsg THEN IF ErrorMsg THEN
ErrMsg(ErrorMsg) ErrMsg(ErrorMsg)
END ELSE END ELSE
* Good to go on the label print * Good to go on the label print
If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then If Environment_Services('GetLabelPrintMethod') _EQC 'OIPI' then
stat = Set_Printer('TEXT',ImageData) ;* Download bitmap image to the printer stat = Set_Printer('TEXT',ImageData) ;* Download bitmap image to the printer
@ -733,12 +731,7 @@ END ELSE
end else end else
stat = Direct_Print('PRINT', LabelString) stat = Direct_Print('PRINT', LabelString)
end end
END ;* End of Check for good label data END ;* End of Check for good label data
RETURN RETURN

View File

@ -146,13 +146,14 @@ Declare subroutine Set_Status, Sleepery, Winyield, Yield, SRP_COM, QA_Services,
Declare subroutine Validate, obj_WO_Mat, obj_WO_Mat_Log, obj_React_Status, Record_Lock, obj_React_State, obj_Post_Log Declare subroutine Validate, obj_WO_Mat, obj_WO_Mat_Log, obj_React_Status, Record_Lock, obj_React_State, obj_Post_Log
Declare subroutine RDS_Services, obj_WO_React, RDS_React_Run, Signature_Services, SQL_Services, SRP_Stopwatch Declare subroutine RDS_Services, obj_WO_React, RDS_React_Run, Signature_Services, SQL_Services, SRP_Stopwatch
Declare subroutine Override_Services, Reactor_Services, Lot_Services, Obj_Notes, Mona_Services, Service_Services Declare subroutine Override_Services, Reactor_Services, Lot_Services, Obj_Notes, Mona_Services, Service_Services
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services, Wafer_Counter_Services Declare subroutine Transaction_Services
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services
Declare function Min, Max, SRPSendMail, Btree.Extract, GetTickCount, HTTPClient_Services, Obj_RDS, SQL_Services Declare function Min, Max, SRPSendMail, Btree.Extract, GetTickCount, HTTPClient_Services, Obj_RDS, SQL_Services
Declare function SRP_Encode, SRP_Decode, SRP_COM, QA_Services, RDS_Services, Obj_NCR, Logging_Services, Obj_Reactor Declare function SRP_Encode, SRP_Decode, SRP_COM, QA_Services, RDS_Services, Obj_NCR, Logging_Services, Obj_Reactor
Declare function Get_Status, Set_Status, obj_WO_Mat, NextKey, MemberOf, FieldCount, obj_React_Status, Obj_Clean_Insp Declare function Get_Status, Set_Status, obj_WO_Mat, NextKey, MemberOf, FieldCount, obj_React_Status, Obj_Clean_Insp
Declare function Schedule_Services, Signature_Services, Date, Time, Datetime, Date_Services, SRP_Array, Math_Services Declare function Schedule_Services, Signature_Services, Date, Time, Datetime, Date_Services, SRP_Array, Math_Services
Declare function Supplement_Services, Reactor_Services, Lot_Services Declare function Supplement_Services, Reactor_Services, Lot_Services, Wafer_Counter_Services
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
@ -3169,12 +3170,10 @@ Service UpdateFailedWafers(WOMatKey)
AllFailedWafers<0, WfrIndex> = (PreFailedWafers<0, WfrIndex> OR FWIFailedWafers<0, WfrIndex> OR LWIFailedWafers<0, WfrIndex> OR PostFailedWafers<0, WfrIndex>) AllFailedWafers<0, WfrIndex> = (PreFailedWafers<0, WfrIndex> OR FWIFailedWafers<0, WfrIndex> OR LWIFailedWafers<0, WfrIndex> OR PostFailedWafers<0, WfrIndex>)
Next WfrIndex Next WfrIndex
end end
WOMatRec<WO_MAT_FAILED_WAFERS$> = AllFailedWafers Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_FAILED_WAFERS$, AllFailedWafers)
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
end else end else
Error_Services('Add', 'Error in ':Service:' service. RDSNo is null') Error_Services('Add', 'Error in ':Service:' service. RDSNo is null')
end end
End Case End Case
end else end else
Error_Services('Add', 'Error in ':Service:' service. ReactorType is null') Error_Services('Add', 'Error in ':Service:' service. ReactorType is null')
@ -3183,7 +3182,6 @@ Service UpdateFailedWafers(WOMatKey)
Error_Services('Add', 'Error in ':Service:' service. PSNo is null') Error_Services('Add', 'Error in ':Service:' service. PSNo is null')
end end
end service end service