247 lines
8.8 KiB
Plaintext
247 lines
8.8 KiB
Plaintext
function wo_daily_sched_all_comm(Branch,CurrParm)
|
|
/***********************************************************************************************************************
|
|
|
|
Name : wo_daily_sched_all_comm
|
|
|
|
History : (Date, Initials, Notes)
|
|
04/20/21 djs Updated Form_Create GoSub to use PickPlace instead of Dedicated and Non-Dedicated
|
|
reactor assignments for form color purposes.
|
|
|
|
***********************************************************************************************************************/
|
|
#pragma precomp SRP_PreCompiler
|
|
|
|
declare function set_property, fieldcount, get_property, msg, dialog_box, security_check
|
|
declare function send_message, utility, key_sort, start_window, entid, repository
|
|
declare function relational_call, memberof, get_mode_icon, Database_Services, Reactor_Services
|
|
declare subroutine extract_si_keys, end_dialog, make.list, security_err_msg, Set_Property, SRP_Stopwatch, Dialog_Box
|
|
|
|
|
|
$INSERT APPCOLORS
|
|
$INSERT MSG_EQUATES
|
|
$INSERT LSL_USERS_EQU
|
|
$INSERT RDS_EQU
|
|
$INSERT SECURITY_RIGHTS_EQU
|
|
$INSERT LOGICAL
|
|
$INSERT POPUP_EQUATES
|
|
$INSERT REACT_MODE_EQU
|
|
$INSERT WO_LOG_EQUATES
|
|
$INSERT WO_DAILY_SCHED_EQU
|
|
$INSERT WO_MASTER_SCHED_EQU
|
|
$INSERT REACTOR_EQUATES
|
|
$INSERT REACT_MODE_EQUATES
|
|
$INSERT REACT_STATUS_EQUATES
|
|
$INSERT REACT_LL_EQUATES
|
|
|
|
EQU APPBRED$ TO 255 + ( 0*256) + ( 0*65536)
|
|
EQU APPRED$ TO 220 + (192*256) + (192*65536)
|
|
EQU APPPINK$ TO 220 + (192*256) + (192*65536)
|
|
EQU APPGREEN$ TO 192 + (220*256) + (192*65536)
|
|
EQU APPGREY$ TO 192 + (192*256) + (192*65536)
|
|
EQU APPYELLOW$ TO 255 + (255*256) + (202*65536)
|
|
EQU APPDKRED$ TO 128 + ( 0*256) + ( 0*65536)
|
|
EQU APPBLUE$ TO 0 + ( 0*256) + (255*65536)
|
|
EQU APPGANBLUE$ TO 181 + (235*256) + (251*65536) ;* Added GaN blue background to ID GaN reactors - dkk 6/6/16
|
|
|
|
ForceModeChange = FALSE$ ;* flag set to true when changing work order stamp
|
|
ReturnVar = 0
|
|
Branches = 'FORM_CREATE,REACT_DETAIL'
|
|
|
|
CONVERT ',' TO @FM IN Branches
|
|
|
|
LOCATE Branch IN Branches USING @FM SETTING Bpos THEN
|
|
ON Bpos gosub FORM_CREATE, REACT_DETAIL
|
|
END ELSE
|
|
Void = msg( '', 'Invalid Branch ':Bpos:' passed to wo_daily_sched_comm' )
|
|
END
|
|
|
|
RETURN ReturnVar
|
|
|
|
*===============================================================================================*
|
|
FORM_CREATE:
|
|
|
|
CurSize = Get_Property(@Window, "SIZE")
|
|
MinW = CurSize<3>
|
|
MinH = CurSize<4>
|
|
MaxW = CurSize<3>
|
|
MaxH = CurSize<4>
|
|
Set_Property(@Window,"TRACKINGSIZE",MinW:@FM:MinH:@FM:MaxW:@FM:MaxH)
|
|
|
|
IF Assigned(CurrParm) AND CurrParm NE '' THEN
|
|
Window = CurrParm
|
|
END ELSE
|
|
Window = @WINDOW
|
|
END
|
|
|
|
IF Window = 'WO_DAILY_SCHED_ALL' OR Window = 'REACT_STATUS_ODD' THEN
|
|
StartReact = 21
|
|
EndReact = 79
|
|
END ELSE
|
|
StartReact = 20
|
|
EndReact = 78
|
|
END
|
|
|
|
*SRP_Stopwatch('Reset')
|
|
*SRP_Stopwatch('Start', Window)
|
|
|
|
FOR I = StartReact TO EndReact STEP 2
|
|
*SRP_Stopwatch('Start', 'Stage 1')
|
|
ReactRec = Xlate('REACTOR',I,'','X')
|
|
LLDisabled = ReactRec<REACTOR_LL_DISABLED$>
|
|
ReactAssign = ReactRec<REACTOR_REACT_ASSIGNMENT$>
|
|
PickPlace = ReactRec<REACTOR_PICK_PLACE$>
|
|
ReactType = ReactRec<REACTOR_REACT_TYPE$>
|
|
NotRepairable = ReactRec<REACTOR_NOT_REPAIRABLE$>
|
|
EpiPro = (ReactType EQ 'EPP')
|
|
EscElapsedTime = OCONV(XLATE('REACTOR',I,'ACT_ESC_HRS','X'),'MD2')
|
|
OutOfProdDTM = Xlate('REACT_STATUS',I,REACT_STATUS_OUT_OF_PROD_DTM$,'X')
|
|
CurrModeKey = XLATE('REACTOR',I,'CURR_MODE_KEY','X')<1,1> ;* This should never be an MV but during implementation it is having some issues
|
|
CurrModeStartDTM = FIELD(CurrModeKey,'*',2)
|
|
|
|
|
|
|
|
BEGIN CASE
|
|
CASE EscElapsedTime NE '' ; BackColor = APPYELLOW$ ;* Reactor in escalation
|
|
CASE ReactAssign = 'G' ; BackColor = APPGANBLUE$ ;* Added GaN blue background to ID GaN reactors - dkk 6/6/16
|
|
CASE ReactAssign = 'O' ; BackColor = APPGREY$ ;* Out of service
|
|
* CASE ReactAssign = 'C' ; BackColor = APPGREEN$ ;* C = Non-Dedicated
|
|
CASE Not(NotRepairable)
|
|
|
|
ReactorLoaded = Reactor_Services('IsReactorLoaded', I)
|
|
TimeSinceLastUnload = Reactor_Services('GetReactorTimeSinceUnload', I)
|
|
CurrMode = Reactor_Services('GetReactCurrModeName', I)
|
|
E10State = Xlate('REACTOR_MODES', CurrMode, 'E10_STATE', 'X')
|
|
Productive = (E10State EQ 'Productive')
|
|
If Productive and Not(ReactorLoaded) and TimeSinceLastUnload GE 30 then
|
|
BackColor = APPRED$
|
|
end else
|
|
BackColor = APPGREEN$
|
|
end
|
|
* CASE ReactAssign = 'M' ; BackColor = APPRED$ ;* M = Dedicated
|
|
CASE NotRepairable ; BackColor = LTORANGE$
|
|
CASE 1 ; BackColor = APPGREY$
|
|
END CASE
|
|
*SRP_Stopwatch('Stop', 'Stage 1')
|
|
*SRP_Stopwatch('Start', 'Stage 2')
|
|
Set_Property(Window:'.RPANEL':I,'BACKCOLOR',BackColor)
|
|
Set_Property(Window:'.RWO':I,'BACKCOLOR',BackColor)
|
|
Set_Property(Window:'.RCUST':I,'BACKCOLOR',BackColor)
|
|
Set_Property(Window:'.TIM':I,'BACKCOLOR',BackColor)
|
|
Set_Property(Window:'.ESC':I,'BACKCOLOR',BackColor)
|
|
|
|
RMId = 'REACT_MODE':I
|
|
|
|
CurrDTM = ICONV(OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTHS'),'DT') ;* Current Date-Time in internal format
|
|
|
|
CurrModeRec = XLATE('CONFIG',RMId,'','X')
|
|
CurrMode = CurrModeRec<Mode$>
|
|
|
|
ModeStartDt = CurrModeRec<Date$>
|
|
ModeStartTm = CurrModeRec<Time$>
|
|
|
|
StartDTM = ICONV(ModeStartDt:' ':ModeStartTm,'DT')
|
|
|
|
TimeInMode = OCONV(ICONV((CurrDTM - StartDTM)*24,'MD1'),'MD1')
|
|
TimeOutOfProd = OCONV(ICONV((CurrDTM - OutOfProdDTM)*24,'MD1'),'MD1')
|
|
*SRP_Stopwatch('Stop', 'Stage 2')
|
|
*SRP_Stopwatch('Start', 'Stage 3')
|
|
IF CurrMode THEN
|
|
Icon = Get_Mode_Icon( CurrMode, Mode$ )
|
|
Extension = '.BMP'
|
|
DosBmp = 'BMPS\':Icon:Extension
|
|
Void = Set_Property( Window:'.RMODE':I, 'BITMAP', DosBmp )
|
|
END
|
|
|
|
DailySchedName = 'WO_DAILY_SCHED':I
|
|
DSR = XLATE( 'CONFIG', DailySchedName, '', 'X' )
|
|
WOCust = DSR<WOCust$>
|
|
WO = FIELD( WOCust, ' ', 1 )
|
|
Cust = FIELD( WOCust, ' ', 2, 999 )
|
|
Size = DSR<Size$>
|
|
|
|
CONVERT ' ' TO '' IN Size
|
|
|
|
WONo = WO[1,'.']
|
|
|
|
ActiveReactLLKey = XLATE('REACTOR',I, REACTOR_ACTIVE_LL_DISABLED$, 'X' ) ;* Drive asterisk from new field ACTIVE_LL_DISABLED
|
|
*SRP_Stopwatch('Stop', 'Stage 3')
|
|
*SRP_Stopwatch('Start', 'Stage 4')
|
|
|
|
IF ActiveReactLLKey NE '' THEN
|
|
LLDisabled = XLATE('REACT_LL',ActiveReactLLKey,REACT_LL_DISABLED$,'X')
|
|
|
|
IF LLDisabled = 'L' THEN WO = '* ':WO
|
|
IF LLDisabled = 'R' THEN WO = WO:' *'
|
|
END
|
|
|
|
RPanelTitle = 'R':I:' - ':Size
|
|
If PickPlace = 1 Then
|
|
RPanelTitle := ' - PP'
|
|
END
|
|
|
|
Status_0311 = XLATE('REACTOR', I, REACTOR_0311_ACTIVE$, 'X')
|
|
|
|
IF Status_0311 EQ '' THEN
|
|
Status_0311 = FALSE$
|
|
END
|
|
|
|
Set_Property(Window:'.RPANEL':I, 'TEXT', RpanelTitle ) ;* Display Wafer Size in inches
|
|
Set_Property(Window:'.RWO':I, 'TEXT', WO ) ;* Display WO #
|
|
Set_Property(Window:'.RCUST':I, 'TEXT', Cust ) ;* Display Customer Name
|
|
|
|
Set_Property(Window:'.OLE_PIC_':I,'VISIBLE',Status_0311) ;* Display Timer
|
|
|
|
*SRP_Stopwatch('Start', 'Stage 4.1')
|
|
* HotLot = XLATE('WO_LOG',WONo,'HOT_LOT','X')
|
|
WOLogRow = Database_Services('ReadDataRow', 'WO_LOG', WONo)
|
|
HotLot = WOLogRow<WO_LOG_HOT_FLAG$>
|
|
*SRP_Stopwatch('Stop', 'Stage 4.1')
|
|
|
|
IF HotLot THEN
|
|
Set_Property(Window:'.RWO':I, 'FORECOLOR',APPBRED$) ;* Hot Lots font is red
|
|
END ELSE
|
|
Set_Property(Window:'.RWO':I, 'FORECOLOR',APPBLUE$)
|
|
END
|
|
|
|
*SRP_Stopwatch('Stop', 'Stage 4')
|
|
*SRP_Stopwatch('Start', 'Stage 5')
|
|
ProdModes = 'Production':@VM
|
|
ProdModes := 'Production (incr sampling)':@VM
|
|
ProdModes := 'UP_WITH_RESTRICTIONS':@VM
|
|
ProdModes := 'UP':@VM
|
|
ProdModes := 'UP_WITH_INCREASED_SAMPLING':@VM
|
|
ProdModes := 'UP_WITH_INCREASED_SAMPLING_SURFACE':@VM
|
|
ProdModes := 'UP_WITH_INCREASED_SAMPLING_METROLOGY':@VM
|
|
ProdModes := 'UP_NOT_RUNNING'
|
|
|
|
LOCATE CurrMode IN ProdModes USING @VM SETTING DUMMY THEN
|
|
Set_Property(Window:'.TIM':I,'TEXT',TimeInMode)
|
|
Set_Property(Window:'.TIM':I,'FORECOLOR',APPBLUE$)
|
|
END ELSE
|
|
IF TimeOutOfProd > '99999.0' THEN TimeOutOfProd = '****'
|
|
Set_Property(Window:'.TIM':I,'TEXT',TimeOutOfProd)
|
|
Set_Property(Window:'.TIM':I,'FORECOLOR',APPDKRED$)
|
|
END
|
|
*SRP_Stopwatch('Stop', 'Stage 5')
|
|
Skip:
|
|
NEXT I
|
|
|
|
*SRP_Stopwatch('Stop', Window)
|
|
* If @UserName EQ 'DAN_CR' then SRP_Stopwatch('ShowAll')
|
|
|
|
RETURN
|
|
|
|
*===============================================================================================*
|
|
REACT_DETAIL:
|
|
*CurrParm = THE REACTOR NUMBER
|
|
|
|
* If @User4 EQ 'DANIEL_ST' or @User4 EQ 'DAN_CR' then
|
|
* Dialog_Box('WO_DAILY_SCHED_SINGLE', @Window, CurrParm:'*CENTER')
|
|
* end else
|
|
Void = start_window( 'WO_DAILY_SCHED_SINGLE', @window, CurrParm:'*CENTER', '', '' )
|
|
* end
|
|
return
|
|
*===============================================================================================*
|
|
|
|
|
|
|