Added NCR barcode verification
This commit is contained in:
parent
9f4a3f94b5
commit
bff81f70c4
2102
LSL2/OIWIN/NDW_VERIFY_BARCODE.json
Normal file
2102
LSL2/OIWIN/NDW_VERIFY_BARCODE.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -607,6 +607,8 @@ RejMat:
|
||||
ncrParms := '':@RM ;* Placeholder for RejWaferIDs
|
||||
ncrParms := SlotNCRs
|
||||
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, WMIKey, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
errCode = ''
|
||||
@ -675,6 +677,7 @@ RejMat:
|
||||
RetPos = 1:@FM:1
|
||||
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
End
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1369,6 +1369,8 @@ RejMat:
|
||||
ncrParms := MUCassIDs:@RM
|
||||
ncrParms := MUSlotNos
|
||||
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, WMOKey, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
|
||||
@ -1447,6 +1449,7 @@ RejMat:
|
||||
RetPos = 1:@FM:1
|
||||
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
End
|
||||
end else
|
||||
// Cassette is on hold so material cannot be rejected.
|
||||
ErrorMessage = 'Create NCR denied!. The cassette must be taken off hold before rejecting material.'
|
||||
|
@ -483,6 +483,8 @@ RejMat:
|
||||
ncrParms := RejWaferIDs:@RM ;* Rejected Wafer ID's
|
||||
ncrParms := PrevNCRNos ;* Previous NCR No's
|
||||
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, RDSNo, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
@ -552,6 +554,7 @@ RejMat:
|
||||
Set_Property(@WINDOW, 'SAVEWARN', False$)
|
||||
rv = Dialog_Box('NCR', @WINDOW, NCRNo)
|
||||
Send_Event(@WINDOW, 'READ')
|
||||
end
|
||||
end else
|
||||
// Cassette is on hold so material cannot be rejected.
|
||||
ErrorMessage = 'Create NCR denied!. The cassette must be taken off hold before rejecting material.'
|
||||
|
@ -179,7 +179,7 @@ Display_Message:
|
||||
If LongLen EQ TitleLen then
|
||||
PixMult = 5.9 ; // Title is bold so it requires more pixels
|
||||
end else
|
||||
PixMult = 5.2 ; // 5.1 wasn't quite enough for some lines
|
||||
PixMult = 6 ; // 5.2 wasn't quite enough for some lines
|
||||
end
|
||||
|
||||
ItemWidth = PixMult * LongLen
|
||||
@ -356,3 +356,4 @@ Display_Message:
|
||||
|
||||
Done = True$
|
||||
return
|
||||
|
||||
|
@ -1,12 +1,58 @@
|
||||
Compile function NCR_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Declare subroutine Set_Status, Logging_Services, Error_Services
|
||||
Declare function Environment_Services, Logging_Services, SRP_Datetime, Utility
|
||||
Name : NCR_Services
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU TAB$ TO CHAR(9)
|
||||
Description : Handler program for all NCR services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/29/24 djm Add ProcessScanData service and Service header.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
$insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
|
||||
Declare subroutine Set_Status, Logging_Services, Error_Services, Obj_Notes, Set_Property, Obj_Wo_Mat, Hold_Services
|
||||
Declare function Environment_Services, Logging_Services, SRP_Datetime, Utility, Scan_Services, Error_Services
|
||||
Declare function Database_Services, Signature_Services, Epipro_Services, Rds_Services, Memberof, Datetime
|
||||
Declare function Get_Property
|
||||
|
||||
EQU COL$RDS_NO TO 1
|
||||
EQU COL$REACTOR TO 2
|
||||
@ -16,9 +62,357 @@ GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options SCAN_TYPES = 'CASSETTE_1', 'CASSETTE_2', 'WM_IN_1', 'WM_IN_2'
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// ProcessScanData
|
||||
//
|
||||
// ScanData - [Required]
|
||||
// ScanType - [Required]
|
||||
// FirstCassID - [Required]
|
||||
// OperatorID - [Required]
|
||||
//
|
||||
// Returns the current stage of a lot. Replaces CURR_STAGE calculated column.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, FirstCassID, OperatorID)
|
||||
|
||||
If (ScanData NE '') then
|
||||
// Code 3of9 encodes the asterisk and underscore characters. These need to be decoded.
|
||||
ScanData = Scan_Services('DecodeScanData', ScanData)
|
||||
|
||||
If Error_Services('NoError') then
|
||||
|
||||
ColumnIndex = ''
|
||||
ColumnValue = ''
|
||||
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
|
||||
// type of cassette ID (i.e., RDS or WMO).
|
||||
Begin Case
|
||||
|
||||
Case ScanType EQ 'WM_IN_1'
|
||||
ValidCassID = False$
|
||||
cnt = Count(ScanData, '|')
|
||||
if cnt NE 0 then
|
||||
Error_Services('Add', 'Wrong label - Scan 2D Top Label')
|
||||
return
|
||||
end else
|
||||
CassetteID = ScanData
|
||||
Swap 'FDI' with '' in CassetteID
|
||||
Swap '^FS' with '' in CassetteID
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMIRow = Database_Services('ReadDataRow', 'WM_IN', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
ScanData = CassetteID
|
||||
If ScanData NE FirstCassID then
|
||||
Error_Services('Add', 'Lot Label does not match the expected lot in OI. | Please correct this issue and then retry.')
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'WM_IN_2'
|
||||
ValidCassID = False$
|
||||
ScanMismatch = False$
|
||||
cnt = Count(ScanData, '|')
|
||||
if cnt NE 0 then
|
||||
Error_Services('Add', 'Wrong label – Scan 2D Bottom Label')
|
||||
return
|
||||
end else
|
||||
CassetteID = ScanData
|
||||
Swap 'FDI' with '' in CassetteID
|
||||
Swap '^FS' with '' in CassetteID
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMIRow = Database_Services('ReadDataRow', 'WM_IN', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
ScanData = CassetteID
|
||||
If ScanData NE FirstCassID then
|
||||
ScanMismatch = True$
|
||||
end
|
||||
end
|
||||
|
||||
If ScanMismatch EQ True$ then
|
||||
ValidCassID = False$
|
||||
If (RowExists('WM_IN', FirstCassID) EQ True$) And (RowExists('WM_IN', CassetteID) EQ True$) then
|
||||
// Place first cassette on hold
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
HoldEntityID = FirstCassID
|
||||
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
|
||||
// Place Second cassette on hold
|
||||
WONo = Field(CassetteID, '*', 1, 1)
|
||||
CassNo = Field(CassetteID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
HoldEntityID = CassetteID
|
||||
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
Message = 'NCR Label verification failed due to mismatched barcodes. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
|
||||
: 'WM_IN Label #1: ':FirstCassID:CRLF$ |
|
||||
: 'WM_IN Label #2: ':CassetteID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'CASSETTE_1'
|
||||
|
||||
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
|
||||
// non-existent carrier will the scan data be considered invalid.
|
||||
|
||||
cnt = DCount(ScanData, '|')
|
||||
if cnt NE 8 then
|
||||
CassetteID = 0
|
||||
Error_Services('Add', 'Wrong label - Scan 2D Top Label')
|
||||
return
|
||||
end else
|
||||
// RDS should be 3rd position
|
||||
CassetteID = Field(ScanData, '|', 3)
|
||||
Seq1 = Field(ScanData, '|', 8)
|
||||
end
|
||||
|
||||
|
||||
// Strip '1T', 'I', and 'O' prefixes.
|
||||
If CassetteID[1, 2] EQ '1T' then
|
||||
CassetteID[1, 2] = ''
|
||||
If ((CassetteID[1, 1] EQ 'O') or (CassetteID[1, 1] EQ 'I')) then CassetteID[1, 1] = ''
|
||||
end
|
||||
If ( (CassetteID[1, 1] EQ 'O') or (CassetteID[1, 1] EQ 'I') ) then CassetteID[1, 1] = ''
|
||||
|
||||
ValidCassID = False$ ; // Assume Cassette ID is not valid for now.
|
||||
RDSCass = Count(CassetteID, '.') EQ 0 AND Num(CassetteID)
|
||||
GaNCass = Count(CassetteID, '.') EQ 1 AND not(RDSCass)
|
||||
EPPCass = Count(CassetteID, '.') EQ 2 AND not(RDSCass) AND not(GaNCass)
|
||||
|
||||
Begin Case
|
||||
Case GaNCass
|
||||
Convert '.' to '*' in CassetteID
|
||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
Case EPPCass
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
Case RDSCass
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
End Case
|
||||
|
||||
If ( (Seq1 EQ 'SEQ1') or (Seq1 EQ 'SEQ2') ) then
|
||||
Set_Property(@Window, '@SEQ1', Seq1)
|
||||
end else
|
||||
Error_Services('Add', 'Error reading sequence information')
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
|
||||
ScanData = CassetteID
|
||||
If ScanData NE FirstCassID then
|
||||
Error_Services('Add', 'Lot Label does not match the expected lot in OI. | Please correct this issue and then retry.')
|
||||
end
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'CASSETTE_2'
|
||||
|
||||
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
|
||||
// non-existent carrier will the scan data be considered invalid.
|
||||
cnt = DCount(ScanData, '|')
|
||||
if cnt NE 8 then
|
||||
CassetteID = 0
|
||||
Error_Services('Add', 'Wrong label – Scan 2D Bottom Label')
|
||||
return
|
||||
end else
|
||||
// RDS should be 3rd position
|
||||
SecondCassID = Field(ScanData, '|', 3)
|
||||
Seq2 = Field(ScanData, '|', 8)
|
||||
end
|
||||
|
||||
// Strip '1T', 'I', and 'O' prefixes.
|
||||
If SecondCassID[1, 2] EQ '1T' then
|
||||
SecondCassID[1, 2] = ''
|
||||
If ( (SecondCassID[1, 1] EQ 'O') or (SecondCassID[1, 1] EQ 'I') ) then SecondCassID[1, 1] = ''
|
||||
end
|
||||
If ( (SecondCassID[1, 1] EQ 'O') or (SecondCassID[1, 1] EQ 'I') ) then SecondCassID[1, 1] = ''
|
||||
|
||||
ValidCassID = False$ ; // Assume Cassette ID is not valid for now.
|
||||
ScanMismatch = False$
|
||||
SeqMismatch = False$
|
||||
SeqError = False$
|
||||
Convert '*' to '.' in FirstCassID
|
||||
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
If (SecondCassID NE FirstCassID) then
|
||||
ScanMismatch = True$
|
||||
end else
|
||||
Seq1 = Get_Property(@Window, '@SEQ1')
|
||||
Begin Case
|
||||
Case ( (Seq2 NE 'SEQ1') and (Seq2 NE 'SEQ2') )
|
||||
SeqError = True$
|
||||
Case (Seq2 EQ Seq1)
|
||||
SeqMismatch = True$
|
||||
End Case
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
|
||||
If (ScanMismatch EQ True$) AND (ValidCassID EQ True$) then
|
||||
// Check if first cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in FirstCassID
|
||||
ValidCassID = False$
|
||||
Begin Case
|
||||
Case ( RowExists('RDS', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Xlate('RDS', FirstCassID, 'WO', 'X')
|
||||
CassNo = Xlate('RDS', FirstCassID, 'CASS_NO', 'X')
|
||||
HoldEntity = 'RDS'
|
||||
Case ( RowExists('WM_OUT', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_OUT'
|
||||
Case ( RowExists('WM_IN', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
Case ( RowExists('WO_MAT', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 2, 1)
|
||||
HoldEntity = 'WO_MAT'
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
HoldEntityID = FirstCassID
|
||||
// Place first cassette on hold
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
|
||||
// Check if second cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in SecondCassID
|
||||
ValidCassID = False$
|
||||
Begin Case
|
||||
Case ( RowExists('RDS', SecondCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Xlate('RDS', SecondCassID, 'WO', 'X')
|
||||
CassNo = Xlate('RDS', SecondCassID, 'CASS_NO', 'X')
|
||||
HoldEntity = 'RDS'
|
||||
ValidCassID = True$
|
||||
Case ( RowExists('WM_OUT', SecondCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_OUT'
|
||||
Case ( RowExists('WM_IN', SecondCassID) EQ True$ )
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
ValidCassID = True$
|
||||
Case ( RowExists('WO_MAT', SecondCassID) EQ True$ )
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 2, 1)
|
||||
HoldEntity = 'WO_MAT'
|
||||
ValidCassID = True$
|
||||
Case Otherwise$
|
||||
Null
|
||||
|
||||
End Case
|
||||
If ValidCassID EQ True$ then
|
||||
HoldEntityID = SecondCassID
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
// Place second cassette on hold
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
end
|
||||
Message = 'NCR Label verification failed due to mismatched barcodes. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
|
||||
: 'Cassette Label #1: ':FirstCassID:CRLF$ |
|
||||
: 'Cassette Label #2: ':SecondCassID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else if (SeqMismatch EQ True$) then
|
||||
//do sequence mismatch stuff here
|
||||
Message = 'NCR Label verification failed due to operator double-scanning barcode.':CRLF$ |
|
||||
: 'Cassette: ':FirstCassID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else if (SeqError EQ True$) then
|
||||
Error_Services('Add', 'Error reading sequence information')
|
||||
end
|
||||
|
||||
ScanData = ''
|
||||
ScanData = SecondCassID
|
||||
Response = ScanData
|
||||
|
||||
End Case
|
||||
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'ScanData argument was missing in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SendToSPC(NCRNo, RDSList, ReactorType, PSNo, DeptResp, LossCode, LossDesc, LossStage, LossBy, ACCode, ACDesc)
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Level' : @FM : 'Log'
|
||||
@ -187,9 +581,6 @@ Service SendToSPC(NCRNo, RDSList, ReactorType, PSNo, DeptResp, LossCode, LossDes
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
201
LSL2/STPROC/NDW_VERIFY_BARCODE_EVENTS.txt
Normal file
201
LSL2/STPROC/NDW_VERIFY_BARCODE_EVENTS.txt
Normal file
@ -0,0 +1,201 @@
|
||||
Compile function NDW_VERIFY_BARCODE_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_NDW_VERIFY_BARCODE_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)
|
||||
08/29/2024 djm Created initial commuter module. Adapted from NDW_PACKAGING_EVENTS.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_VERIFY_BARCODE
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
$insert MSG_EQUATES
|
||||
$insert LSL_USERS_EQUATES
|
||||
$insert MESSAGE_BOX_EQUATES
|
||||
$insert SRP_POPUP_EQUATES
|
||||
$INSERT LOGICAL
|
||||
|
||||
Equ MSG_WIDTH$ to 600
|
||||
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, PlaceDialog
|
||||
Declare function Database_Services, Security_Services, MemberOf, Form_Services, Scan_Services
|
||||
Declare function Message_Box, SRP_Get_Window_Rect, GetTickCount, Ncr_Services
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// 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
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Gosub GetLotID
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'FOCUS', True$)
|
||||
PlaceDialog(-2, -2)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event EDL_CASS_SCAN_1.LOSTFOCUS(Flag, FocusID)
|
||||
|
||||
If Flag EQ 1 then
|
||||
ScanData = Get_Property(CtrlEntID, 'TEXT')
|
||||
ExpectedLot = Get_Property(@Window:'.EDL_LOT_ID', 'TEXT')
|
||||
OperatorID = @User4
|
||||
If ScanData NE '' then
|
||||
|
||||
If Parent EQ 'WM_IN' then
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'WM_IN_1', ExpectedLot, OperatorID)
|
||||
end else
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'CASSETTE_1', ExpectedLot, OperatorID)
|
||||
End
|
||||
If Error_Services('NoError') then
|
||||
Set_Property(CtrlEntID, 'TEXT', ScanData)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'FOCUS', True$)
|
||||
Set_Property(CtrlEntID, 'ENABLED', False$)
|
||||
end else
|
||||
GoSub ClearForm
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
Set_Property(CtrlEntId, 'FOCUS', True$)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event EDL_CASS_SCAN_2.LOSTFOCUS(Flag, FocusID)
|
||||
|
||||
If Flag EQ 1 then
|
||||
|
||||
ScanData = Get_Property(CtrlEntID, 'TEXT')
|
||||
If ScanData NE '' then
|
||||
FirstCassID = Get_Property(@Window:'.EDL_CASS_SCAN_1', 'TEXT')
|
||||
OperatorID = @User4
|
||||
|
||||
If Parent EQ 'WM_IN' then
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'WM_IN_2', FirstCassID, OperatorID)
|
||||
end else
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'CASSETTE_2', FirstCassID, OperatorID)
|
||||
End
|
||||
If Error_Services('NoError') then
|
||||
Set_Property(CtrlEntID, 'TEXT', ScanData)
|
||||
SuccessMessage = 'NCR verification complete!'
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_COMPLETE', '', SuccessMessage)
|
||||
End_Dialog(@Window, True$)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
If IndexC(ErrorMessage, 'Unrecognized scan data:', 1) or IndexC(ErrorMessage, 'Error reading sequence information', 1) then
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'TEXT', '')
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
Set_Property(CtrlEntId, 'FOCUS', True$)
|
||||
end else
|
||||
GoSub ClearForm
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
If Count(ErrorMessage, 'NCR Label verification failed due to mismatched barcodes.') NE 0 then
|
||||
End_Dialog(@Window, False$)
|
||||
End else
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'FOCUS', True$)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_ENG_OVERRIDE.CLICK()
|
||||
|
||||
VerifyParams = @USER4 : @FM : 'ENGINEERING':@VM:'ENG_TECH' : @FM : '' : @FM : 'Override required by a member of ENGINEERING or ENG_TECH groups'
|
||||
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, VerifyParams)
|
||||
Valid = Response<1>
|
||||
OverrideUser = Response<2>
|
||||
|
||||
If Valid then
|
||||
End_Dialog(@Window, True$)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
End_Dialog(@Window, False$)
|
||||
|
||||
end event
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearForm:
|
||||
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1' , 'TEXT' , '')
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2' , 'TEXT' , '')
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1' , 'ENABLED', 1)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2' , 'ENABLED', -1)
|
||||
Set_Property(@Window:'.EDL_LOT_ID' , 'ENABLED', -1)
|
||||
|
||||
return
|
||||
|
||||
GetLotID:
|
||||
|
||||
LotID = Param1
|
||||
Set_Property(@Window:'.EDL_LOT_ID', 'TEXT', LotID)
|
||||
|
||||
return
|
||||
|
||||
|
@ -66,11 +66,11 @@ If Event EQ 'OLE' then
|
||||
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 Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
@ -218,9 +218,9 @@ Event PUB_OK.CLICK()
|
||||
NumGroups = DCount(Groups, @VM)
|
||||
If NumGroups GT 1 then
|
||||
Swap @VM with ' or ' in Groups
|
||||
Message = 'User is not a member of the ' : Groups : ' groups.'
|
||||
Message = 'User is not a member of ':@TM:'the ' : Groups : ' groups.'
|
||||
end else
|
||||
Message = 'User is not a member of the ' : Group : ' group.'
|
||||
Message = 'User is not a member of ':@TM:'the ' : Group : ' group.'
|
||||
end
|
||||
Form_Services('DisplayControlMessage', Message, 'Incorrect Group', @Window : '.EDL_USERNAME', 'VALIDATION', 'RGB(229,20,0)')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user