added reactor label printing form

This commit is contained in:
Infineon\StieberD 2025-01-13 15:09:08 -07:00
parent 860cab9f68
commit 59ee7c83fc
4 changed files with 2525 additions and 1323 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,17 +18,21 @@ LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] :
Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Username' : @FM : 'PrinterID' : @FM : 'Message' Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Username' : @FM : 'PrinterID' : @FM : 'Message'
objTWLabelPrinting = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$) objTWLabelPrinting = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
GoToService GoToService
Return Response or "" Return Response or ""
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Service Parameter Options
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Options LOAD_LOCK_SIDE = 'Left', 'Right', 'Both'
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// SERVICES // SERVICES
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Service PrintLabel(ZPLString, PrinterId) Service PrintLabel(ZPLString, PrinterId)
SuccessfulPrint = False$ SuccessfulPrint = False$
ErrorMessage = '' ErrorMessage = ''
If PrinterId EQ '' then If PrinterId EQ '' then
@ -68,9 +72,12 @@ Service PrintLabel(ZPLString, PrinterId)
If ErrorMessage NE '' then If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage) Error_Services('Add', ErrorMessage)
end end
end service end service
Service PrintTestWaferLotLabel(LotId, Username, PrinterId) Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
ErrorMessage = '' ErrorMessage = ''
If Username EQ '' then If Username EQ '' then
Username = @User4 Username = @User4
@ -121,9 +128,12 @@ Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
end else end else
Error_Services('Add', ErrorMessage) Error_Services('Add', ErrorMessage)
end end
End Service End Service
Service GetTestWaferLotZPL(LotId, Username) Service GetTestWaferLotZPL(LotId, Username)
ZPLStringLabel = '' ZPLStringLabel = ''
LotRec = Database_Services('ReadDataRow', 'LOT', LotId) LotRec = Database_Services('ReadDataRow', 'LOT', LotId)
PartNoId = LotRec<LOT_PROD_ID$> PartNoId = LotRec<LOT_PROD_ID$>
@ -150,9 +160,12 @@ Service GetTestWaferLotZPL(LotId, Username)
ZPLStringLabel := '^XZ' ZPLStringLabel := '^XZ'
Next LabelCnt Next LabelCnt
Response = ZPLStringLabel Response = ZPLStringLabel
end service end service
Service GetAllZebraPrinters() Service GetAllZebraPrinters()
Server = Environment_Services('GetServer') Server = Environment_Services('GetServer')
ZebraPrinterList = '' ZebraPrinterList = ''
ZebraPrinterList<1> = 'MESZBRPRT002' : @VM : '10.95.30.247' : @VM : 9100 ZebraPrinterList<1> = 'MESZBRPRT002' : @VM : '10.95.30.247' : @VM : 9100
@ -167,10 +180,38 @@ Service GetAllZebraPrinters()
If Server EQ 'MESTSA01EC' OR Server EQ 'MESSA01EC' then If Server EQ 'MESTSA01EC' OR Server EQ 'MESSA01EC' then
ZebraPrinterList<10> = 'JONATHAN_HOME_TEST' : @VM : '192.168.0.123' : @VM : 9100 ZebraPrinterList<10> = 'JONATHAN_HOME_TEST' : @VM : '192.168.0.123' : @VM : 9100
end end
Response = ZebraPrinterList Response = ZebraPrinterList
end service end service
Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
If ( (ReactNo NE '') and (LoadLockSide NE '') ) then
BaseZpl = '^XA^LH10,10^FO70,20^BY2^B3N,,80,N^FD10SR{ReactNo}.{LoadLockSidePrefix}^FS^FO10,120^A045,90^FB400,1,,C^FDR{ReactNo} {LoadLockSide}^FS^XZ'
Convert 'R' to '' in ReactNo
If LoadLockSide _EQC 'Both' then
LoadLockSidePrefix = 'L'
ZplLeft = BaseZpl
Swap '{ReactNo}' with ReactNo in ZplLeft
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplLeft
Swap '{LoadLockSide}' with LoadLockSide in ZplLeft
ZplRight = BaseZpl
LoadLockSidePrefix = 'R'
Swap '{ReactNo}' with ReactNo in ZplRight
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplRight
Swap '{LoadLockSide}' with LoadLockSide in ZplRight
Zpl = ZplLeft:ZplRight
end else
LoadLockSidePrefix = LoadLockSide[1, 1]
Zpl = BaseZpl
Swap '{ReactNo}' with ReactNo in Zpl
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in Zpl
Swap '{LoadLockSide}' with LoadLockSide in Zpl
end
Labeling_Services('PrintLabel', Zpl, '\\messp1003.infineon.com\MESZBRPRT008')
end
end service

View File

@ -0,0 +1,97 @@
Compile function NDW_PRINT_REACTOR_LABELS_EVENTS(CtrlEntId, Event, @PARAMS)
/***********************************************************************************************************************
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
permission from Infineon.
Name : NDW_Print_Reactor_Labels_Events
Description : This function acts as a commuter module for all events related to this window.
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
execute Basic+ logic without having use the Form Designer to make the association, although this is
limited to the events which are currently promoted.
If the form needs to call the commuter module directly then the QuickEvent parameters should be
formatted like this:
'@SELF','@EVENT',['@PARAM1','@PARAMx']
Parameters :
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
Param1-15 [in] -- Additional event parameter holders
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
EVENT_SETUP insert
History : (Date, Initials, Notes)
01/13/25 djs Created initial commuter module.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
#window NDW_PRINT_REACTOR_LABELS
$Insert APP_INSERTS
$Insert EVENT_SETUP
Declare function Reactor_Services
Declare subroutine PlaceDialog, Labeling_Services
GoToEvent Event for CtrlEntId else
// Event not implemented
end
Return EventFlow or 1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Events
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Event WINDOW.CREATE(CreateParam)
ReactNos = Reactor_Services('GetReactorNumbers')
Set_Property(@Window:'.COB_REACTOR', 'LIST', ReactNos)
LoadLockSides = 'Left,Right,Both'
Convert ',' to @FM in LoadLockSides
Set_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'LIST', LoadLockSides)
PlaceDialog(-2, -2)
End Event
Event COB_REACTOR.CHANGED(NewData)
GoSub EnablePrintButton
end event
Event COB_LOAD_LOCK_SIDE.CHANGED(NewData)
GoSub EnablePrintButton
end event
Event PUB_PRINT.CLICK()
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
Labeling_Services('PrintReactorLabel', ReactNo, LoadLockSide)
If Error_Services('HasError') then Error_Services('DisplayError')
end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
EnablePrintButton:
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
Set_Property(@Window:'.PUB_PRINT', 'ENABLED', ( (ReactNo NE '') and (LLSide NE '') ) )
return