Modified WM_IN ZPL label generation to include a 2D datamatrix

barcode. Implemented 2D barcode verification in PTI and FQA Label Check
Operations.

Bug fixes

Changed WMI 2D barcode to have 8 fields to keep code base simpler

minor changes to error message verbiage

Refactored code to use post log. Refactored code to not use multiple returns. Modfield input form fields to force upper case only.

changed LSL password verification to be case insensitive to avoid barcode scanning issues when caps lock is on

temporary change to allow 1D WMI scans at PTI while we exhaust current supply
This commit is contained in:
Infineon\Mitchem
2025-05-28 12:58:56 -07:00
committed by Stieber Daniel (CSC FI SPS MESLEO)
parent 2f6b376ece
commit b2c9e500f8
16 changed files with 5621 additions and 2639 deletions

View File

@ -36,40 +36,37 @@ $insert WO_MAT_EQUATES
$insert APPCOLORS
$insert MESSAGE_BOX_EQUATES
Equ CRLF$ to \0D0A\
Equ CRLF$ to \0D0A\
Equ MSG_WIDTH$ to 600
Equ EditTable$ to @Window:'.OLE_EDT_SCANDATA'
Equ Cassette1$ to @Window:'.EDL_CASSETTE1_SCAN'
Equ Cassette2$ to @Window:'.EDL_CASSETTE2_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Equ Supplier$ to @Window:'.EDL_SUPPLIER_SCAN'
Declare subroutine Set_Property, Send_Event, Post_Event, Send_Message, SendMessage, Error_Services
Declare subroutine Obj_Wo_Mat_Log, Errmsg, Utility, SRP_Show_Window, Material_Movement_Services, Set_Status
Declare function Get_Property, Send_Message, SendMessage, Material_Movement_Services, Error_Services,
Declare function Popup, obj_WO_Mat, Database_Services, Utility, Rds_Services, Message_Box
*Subclass = @Window : '.OLE_SUBCLASS'
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntId else
// Event not implemented
// Event not implemented
end
Return EventFlow or 1
*global
ScanField = ''
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -77,33 +74,24 @@ ScanField = ''
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Event WINDOW.CREATE(CreateParam)
* CurrVer = Xlate('APP_INFO', 'LSL2_VERSION', '', 'X')
* UserVer = Xlate('LSL_USERS', @User4, 'LSL2_VERSION', 'X')
* If UserVer NE CurrVer then
* // Error message and close form
* ErrMsg = 'OpenInsight Version Error':@FM:'You are running an outdated version of OpenInsight and cannot release material until you restart your session.'
* Msg(@Window, '', 'OK', '', ErrMsg)
* Post_Event(@Window, 'CLOSE')
* end else
GoSub SetupOLEControls
GoSub ResetForm
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
* end
GoSub SetupOLEControls
GoSub ResetForm
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
end event
Event OLE_BTN_CLEAR.OnClick(Point, Button, Shift, Ctrl)
*get count of unprocessed records
allCompleted = True$
resp = ''
Data = Get_Property(EditTable$, "OLE.ARRAY")
cnt = count(Data<1>, @VM) + (Data<1># '')
for i = 1 to cnt while allCompleted EQ True$
cntProc = 0
status = Data<4,i>
@ -120,105 +108,117 @@ Event OLE_BTN_CLEAR.OnClick(Point, Button, Shift, Ctrl)
GoSub ResetForm
end
end
end event
Event OLE_BTN_SAVE.OnClick(Point, Button, Shift, Ctrl)
*check for unfinished scan
F1 = Get_Property(Cassette1$, 'TEXT')
F2 = Get_Property(Cassette2$, 'TEXT')
F3 = Get_Property(Supplier$, 'TEXT')
resp = True$
If F1 NE '' OR F2 NE '' OR F3 NE '' then
If F1 NE '' OR F2 NE '' OR F3 NE '' then
resp = Message_Box(@Window, 'You have an unfinished scan (not in grid) - continue?', 'Confirm Save', MSG_BTN_OKCAN$ + MSG_DEFAULT2$)
end
if resp EQ True$ Then
end
if resp EQ True$ Then
Warehouse = '1K'
Location = 'PTI'
Gosub SaveRecords
end
end event
Event EDL_CASSETTE1_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Cassette1'
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE1')
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Cassette2$, 'ENABLED', True$)
Set_Property(Cassette2$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE1')
If Error_Services('NoError') then
RDSNo = ScanData<1>
SeqNo = ScanData<2>
Set_Property(Cassette1$, '@SEQNO', SeqNo)
Set_Property(CtrlEntID, 'TEXT', RDSNo)
Set_Property(Cassette2$, 'ENABLED', True$)
Set_Property(Cassette2$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
Event EDL_CASSETTE2_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Cassette2'
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
Cass1 = Get_Property(Cassette1$, 'TEXT')
retVal = Set_Property(@window, '@IsEpp', False$)
If ScanData[1,1] = 'O' OR ScanData[1,3] = '1TO' then
retVal = Set_Property(@window, '@IsEpp', True$)
end
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE2', Cass1)
If Error_Services('NoError') then
* IF EPP, prepopulate lot and just validate
If Get_Property(@window, '@IsEpp') EQ True$ then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Supplier$, 'TEXT', 'EpiPRO')
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
Cass1 = Get_Property(Cassette1$, 'TEXT')
Seq1No = Get_Property(Cassette1$, '@SEQNO')
retVal = Set_Property(@window, '@IsEpp', False$)
If Index(ScanData, '.', 1) then
retVal = Set_Property(@window, '@IsEpp', True$)
end
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'CASSETTE2', Cass1, Seq1No)
If Error_Services('NoError') then
* IF EPP, prepopulate lot and just validate
If Get_Property(@window, '@IsEpp') EQ True$ then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(Supplier$, 'TEXT', 'EpiPRO')
Gosub ValidateGrid
Set_Property(Supplier$, 'ENABLED', False$)
Set_Property(Cassette1$, 'FOCUS', True$)
Gosub ValidateGrid
end else
end else
Set_Property(CtrlEntID, 'TEXT', ScanData)
Gosub ValidateGrid
Set_Property(Supplier$, 'ENABLED', True$)
Set_Property(Supplier$, 'FOCUS', True$)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
Event EDL_SUPPLIER_SCAN.LOSTFOCUS(Flag, FocusID)
ScanField = 'Lot'
If Flag EQ 1 then
Cassette1 = Get_Property(Cassette1$, 'TEXT')
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'SUPPLIER', Cassette1)
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
If Flag EQ 1 then
Cassette1 = Get_Property(Cassette1$, 'TEXT')
ScanData = Get_Property(CtrlEntID, 'TEXT')
If ScanData NE '' then
ScanData = Material_Movement_Services('ProcessFQAScanData', ScanData, 'SUPPLIER', Cassette1)
If Error_Services('NoError') then
Set_Property(CtrlEntID, 'TEXT', ScanData)
Set_Property(CtrlEntID, 'ENABLED', False$)
Gosub ValidateGrid
end else
GoSub ResetForm
ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
end
end
end event
@ -227,6 +227,7 @@ end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SaveRecords:
*iterate thround all records in the grid, saving them and updating the status and location
Data = Get_Property(EditTable$, "OLE.ARRAY")
cnt = count(Data<1>, @VM) + (Data<1># '')
@ -243,12 +244,12 @@ SaveRecords:
Loc = '1K*PTI'
Set_Property(EditTable$, 'OLE.CellColors[ALL;':i:']', 'Auto':@FM:'Auto')
cntProc += 1
end else
Status = 'Error'
end else
Status = 'Error'
Set_Property(EditTable$, 'OLE.CellColors[ALL;':i:']', 'Auto':@FM:'Red')
end
Set_Property(EditTable$, 'OLE.CELLTEXT[4;':i:']', Status)
end
Set_Property(EditTable$, 'OLE.CELLTEXT[4;':i:']', Status)
Set_Property(EditTable$, 'OLE.CELLTEXT[5;':i:']', Loc)
end
Next i
@ -269,11 +270,12 @@ SaveRecords:
end
Gosub DisableFormControls
return
ValidateGrid:
F1 = Get_Property(Cassette1$, 'TEXT')
F2 = Get_Property(Cassette2$, 'TEXT')
F3 = Get_Property(Supplier$, 'TEXT')
@ -285,11 +287,6 @@ ValidateGrid:
result = 1
end
end
* if ScanField = 'Lot' then ; * do not look for duplicates
* result = 0
* end else
* result = InList(Data, ScanData, @VM) OR InList(Data, ScanData, @FM)
* end
If INDEX(F1,'.',2) then
RDSType = 'EPP'
@ -308,76 +305,78 @@ ValidateGrid:
Case RDSType EQ 'EPP'
WOMatKey = FIELD(F1,'*',1):'*':FIELD(F1,'*',3)
Location = XLATE('WO_MAT', WOMatKey, 'CURR_LOCATION', '', '')
End Case
if result EQ 1 then
ErrorMessage = 'Value already exists in grid: ':ScanData
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Gosub ResetForm
end else if F1 NE '' AND F2 NE '' AND F3 NE '' then
// Add Material Log Entry
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
UserID = @USER4
LogFile = 'WO_MAT' ;* Changed so all scans are logged in the WO_MAT table 12/3/2006
Action = 'LBLCHK' ;* Final label check for same top and bottom and correct Lot Number on WO_MAT record
WHCd = 'CR' ;* Clean room @ final QA
LocCd = 'PKO' ;* QA wants this to "place" the cassette into the outbound passthrough
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WOMatKey, '*', 2)
Set_Status(0)
obj_WO_Mat_Log('Create',LogFile:@RM:CurrDTM:@RM:Action:@RM:WhCd:@RM:LocCd:@RM:WONo:@RM:CassNo:@RM:UserID:@RM:'Match')
IF Get_Status(errCode) THEN
Errmsg(errCode)
END else
// Insert row into OLE edit table to provide user feedback.
Data = ''
Data<1> = F1:@VM:F2:@VM:F3:@VM:'Completed':@VM:Location:@VM
Send_Message(EditTable$, 'OLE.INSERT', 1, Data)
GoSub ResetForm
end
// Add Material Log Entry
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
UserID = @USER4
LogFile = 'WO_MAT' ;* Changed so all scans are logged in the WO_MAT table 12/3/2006
Action = 'LBLCHK' ;* Final label check for same top and bottom and correct Lot Number on WO_MAT record
WHCd = 'CR' ;* Clean room @ final QA
LocCd = 'PKO' ;* QA wants this to "place" the cassette into the outbound passthrough
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WOMatKey, '*', 2)
Set_Status(0)
obj_WO_Mat_Log('Create',LogFile:@RM:CurrDTM:@RM:Action:@RM:WhCd:@RM:LocCd:@RM:WONo:@RM:CassNo:@RM:UserID:@RM:'Match')
IF Get_Status(errCode) THEN
Errmsg(errCode)
END else
// Insert row into OLE edit table to provide user feedback.
Data = ''
Data<1> = F1:@VM:F2:@VM:F3:@VM:'Completed':@VM:Location:@VM
Send_Message(EditTable$, 'OLE.INSERT', 1, Data)
GoSub ResetForm
end
end
return
DisableFormControls:
Set_Property(@Window:'.EDL_CASSETTE1_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_CASSETTE2_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_SUPPLIER_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_CASSETTE1_SCAN', 'ENABLED', False$)
Set_Property(@Window:'.EDL_CASSETTE2_SCAN', 'ENABLED', False$)
Set_Property(@Window:'.EDL_SUPPLIER_SCAN', 'ENABLED', False$)
return
SetupOLEControls:
// Qualify OLE events that we want to intercept
Qualifier = ''
Qualifier<1> = 1
Qualifier<3> = ''
Qualifier<4> = 0 ; * process synchronously
NumCols = 4
NumRows = 150
Ctrl = @Window:'.OLE_BTN_CLEAR'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
Ctrl = @Window:'.OLE_BTN_SAVE'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
DimensionArray = NumCols:@FM:NumRows
Set_Property(EditTable$, "OLE.Dimension", DimensionArray)
Titles = "Top Label":@VM:"Bottom Label":@VM:"Sub Lot":@VM:"Scan Status"
Set_Property(EditTable$, "OLE.TitleList", Titles)
Set_Property(EditTable$, "OLE.DataColumn[1-2]", '85')
Set_Property(EditTable$, "OLE.DataColumn[3]", '80')
Set_Property(EditTable$, "OLE.DataColumn[4]", '90')
// Qualify OLE events that we want to intercept
Qualifier = ''
Qualifier<1> = 1
Qualifier<3> = ''
Qualifier<4> = 0 ; * process synchronously
NumCols = 4
NumRows = 150
Ctrl = @Window:'.OLE_BTN_CLEAR'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
Ctrl = @Window:'.OLE_BTN_SAVE'
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnClick', Qualifier)
DimensionArray = NumCols:@FM:NumRows
Set_Property(EditTable$, "OLE.Dimension", DimensionArray)
Titles = "Top Label":@VM:"Bottom Label":@VM:"Sub Lot":@VM:"Scan Status"
Set_Property(EditTable$, "OLE.TitleList", Titles)
Set_Property(EditTable$, "OLE.DataColumn[1-2]", '85')
Set_Property(EditTable$, "OLE.DataColumn[3]", '80')
Set_Property(EditTable$, "OLE.DataColumn[4]", '90')
AlignArray = 'C':@FM:'C':@FM:'L'
Set_Property(EditTable$, "OLE.CellAlignment[All; All]", AlignArray)
@ -391,11 +390,13 @@ SetupOLEControls:
AutoNumArray<1, 1> = 'I' ; // Integers
AutoNumArray<1, 2> = 1 ; // Starting integer
Set_Property(EditTable$, "OLE.AutoNumbers", AutoNumArray)
Set_Property(EditTable$, "OLE.CellProtection[All; All]", 'SEL')
SelStyleArray = 'Black' : @VM : OI_HOT_BLUE$ : ' L=70' : @FM : 'Black' : @VM : OI_HOT_BLUE$
Set_Property(EditTable$, 'OLE.SelectionStyle', SelStyleArray) ; // Automatically highlight the current row with one color and highlight the current row with another color.
Set_Property(@Window:'.OLE_BTN_CLEAR', 'OLE.Style', 'STD')
return
@ -414,5 +415,7 @@ ResetForm:
cnt = count(Data<1>, @VM) + (Data<1># '')
Set_Property(@Window:'.OLE_BTN_SAVE', 'ENABLED', cnt GE 1)
Set_Property(EditTable$, 'OLE.CellColors[ALL;All]', 'Auto':@FM:'Auto')
Set_Property(Cassette1$, '@SEQNO', '')
return