diff --git a/LSL2/STPROC/RDS_UNLOAD_EVENTS.txt b/LSL2/STPROC/RDS_UNLOAD_EVENTS.txt index 6f52d91..1644910 100644 --- a/LSL2/STPROC/RDS_UNLOAD_EVENTS.txt +++ b/LSL2/STPROC/RDS_UNLOAD_EVENTS.txt @@ -281,6 +281,7 @@ Event PUB_SIGN.CLICK() If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then If ( (WONo NE '') and (CassNo NE '') ) then WoMatKey = WONo:'*':CassNo + WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey) If RowExists('WO_MAT', WOMatKey) then IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey) If Error_Services('NoError') then @@ -295,7 +296,6 @@ Event PUB_SIGN.CLICK() NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor) end If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then - WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey) If Error_Services('NoError') then If WOMatRecord NE '' then WoMatRecord = True$ @@ -316,8 +316,14 @@ Event PUB_SIGN.CLICK() If TWLogResult NE True$ then ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload' end + If ErrMsg NE '' then + Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$) + If Error_Services('HasError') then + ErrMsg = Error_Services('GetMessage') + end + end end - end + end end else ErrMsg = 'WO_MAT record for ':WOMatKey:' is null!' end @@ -325,7 +331,6 @@ Event PUB_SIGN.CLICK() ErrMsg = Error_Services('GetMessage') end end - Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$) end end end else @@ -468,3 +473,4 @@ Setup_OLE_Controls: return +