re-order the error checking
This commit is contained in:
committed by
Ouellette Jonathan (CSC FI SPS MESLEO)
parent
ba2faa8c9f
commit
2fbf41d528
@ -281,58 +281,58 @@ Event PUB_SIGN.CLICK()
|
|||||||
If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then
|
If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then
|
||||||
If ( (WONo NE '') and (CassNo NE '') ) then
|
If ( (WONo NE '') and (CassNo NE '') ) then
|
||||||
WoMatKey = WONo:'*':CassNo
|
WoMatKey = WONo:'*':CassNo
|
||||||
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
|
|
||||||
If RowExists('WO_MAT', WOMatKey) then
|
If RowExists('WO_MAT', WOMatKey) then
|
||||||
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
|
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
If IsLastCassetteInWo then
|
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
|
||||||
NextEventScheduled = False$
|
If Error_Services('NoError') then
|
||||||
NextEventHasSamePsn = True$
|
If IsLastCassetteInWo then
|
||||||
NextEventIsBlock = False$
|
NextEventScheduled = False$
|
||||||
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
|
NextEventHasSamePsn = True$
|
||||||
If Error_Services('NoError') then
|
NextEventIsBlock = False$
|
||||||
NextEventScheduled = True$
|
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
|
||||||
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
|
If Error_Services('NoError') then
|
||||||
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
|
NextEventScheduled = True$
|
||||||
end
|
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
|
||||||
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
|
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
|
||||||
If Error_Services('NoError') then
|
end
|
||||||
If WOMatRecord NE '' then
|
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
|
||||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
|
If WOMatRecord NE '' then
|
||||||
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
|
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
|
||||||
If TestWaferRanSinceLoad NE True$ then
|
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
|
||||||
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
|
If TestWaferRanSinceLoad NE True$ then
|
||||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
|
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
|
||||||
If TestWaferRanSinceLoad NE True$ then
|
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
|
||||||
Message = ''
|
If TestWaferRanSinceLoad NE True$ then
|
||||||
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
|
Message = ''
|
||||||
Message = 'No material scheduled. Test wafer required.'
|
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
|
||||||
end else if NextEventHasSamePsn EQ False$ then
|
Message = 'No material scheduled. Test wafer required.'
|
||||||
Message = 'Next work order is a NEW PSN number. Test wafer required.'
|
end else if NextEventHasSamePsn EQ False$ then
|
||||||
end
|
Message = 'Next work order is a NEW PSN number. Test wafer required.'
|
||||||
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
|
end
|
||||||
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
|
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
|
||||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
|
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
|
||||||
If TWLogResult NE True$ then
|
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
|
||||||
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
|
If TWLogResult NE True$ then
|
||||||
end
|
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
|
||||||
If ErrMsg NE '' then
|
end
|
||||||
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
|
If ErrMsg NE '' then
|
||||||
|
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
|
||||||
If Error_Services('HasError') then
|
If Error_Services('HasError') then
|
||||||
ErrMsg = Error_Services('GetMessage')
|
ErrMsg = Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrMsg = 'WO_MAT record for ':WOMatKey:' is null!'
|
ErrMsg = 'WO_MAT record for ':WOMatKey:' is null!'
|
||||||
end
|
end
|
||||||
end else
|
end
|
||||||
ErrMsg = Error_Services('GetMessage')
|
end
|
||||||
end
|
end
|
||||||
end
|
end else
|
||||||
end
|
ErrMsg = Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrMsg = 'WO_MAT ':WOMatKey:' does not exist!'
|
ErrMsg = 'WO_MAT ':WOMatKey:' does not exist!'
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user