/// <summary> /// </summary> /// <param name="context"/> public void OnAction_ProcessStep(Mozart.Task.Execution.Persists.IPersistContext context) { InputMart.Instance.ProcessStep.DefaultView.Sort = "SEQUENCE ASC"; foreach (ProcessStep processStep in InputMart.Instance.ProcessStep.DefaultView) { MicronBETestProcess process; if (InputMart.Instance.MicronBETestProcess.TryGetValue(processStep.PROCESS_ID, out process) == false) { process = new MicronBETestProcess(processStep.PROCESS_ID); InputMart.Instance.MicronBETestProcess.Add(process.ProcessID, process); } MicronBETestBEStep step = new MicronBETestBEStep(); step.StepID = processStep.STEP_ID; step.Sequence = Convert.ToInt32(processStep.SEQUENCE); //step.StepType = processStep.STEP_GROUP; StepMaster sm = InputMart.Instance.StepMaster.Rows.FirstOrDefault(p => p.STEP_ID == step.StepID); //if (sm != null) // step.RefStepID = sm.REF_STEP_ID; process.Steps.Add(step); } foreach (MicronBETestProcess process in InputMart.Instance.MicronBETestProcess.Values) { process.LinkSteps(); } }
public static bool IsNeedSetupProfile(WorkEqp weqp, IHandlingBatch hb) { try { MicronBEAssyEqp eqp = null; if (InputMart.Instance.MicronBEAssyEqp.ContainsKey(weqp.Target.EqpID)) { eqp = InputMart.Instance.MicronBEAssyEqp[weqp.Target.EqpID]; } if (eqp == null) { return(false); } MicronBEAssyBELot lot = hb as MicronBEAssyBELot; BEStep step = lot.CurrentStep; StepMaster sm = InputMart.Instance.StepMasterView.FindRows(step.StepID).FirstOrDefault(); if (sm == null) { return(false); } foreach (var info in InputMart.Instance.SetupInfo.DefaultView) { if (info.LINE_ID != eqp.LineID) { continue; } //if (UtilityHelper.StringToEnum(info.STEP_GROUP, StepGroup.NONE) != eqp.StepGroup) // continue; //if (LikeUtility.Like(eqp.EqpModel, info.EQP_MODEL) == false) // continue; SetupType type = SimulationHelper.CheckSetupProfile(weqp, hb); if (type != SetupType.NONE) { return(true); } else { return(false); } } return(false); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(false); } }
public static Time GetSetupTimeProfile(WorkEqp weqp, IHandlingBatch hb) { try { MicronBEAssyEqp eqp = null; if (InputMart.Instance.MicronBEAssyEqp.ContainsKey(weqp.Target.EqpID)) { eqp = InputMart.Instance.MicronBEAssyEqp[weqp.Target.EqpID]; } if (eqp == null) { return(default(Time)); } MicronBEAssyBELot lot = hb as MicronBEAssyBELot; BEStep step = lot.CurrentStep; StepMaster sm = InputMart.Instance.StepMasterView.FindRows(step.StepID).FirstOrDefault(); foreach (var info in InputMart.Instance.SetupInfo.DefaultView) { if (info.LINE_ID != sm.LINE_ID) { continue; } //if (UtilityHelper.StringToEnum(info.STEP_GROUP, StepGroup.NONE) != eqp.StepGroup) // continue; //if (LikeUtility.Like(eqp.EqpModel, info.EQP_MODEL) == false) // continue; double setupTimeBySec = (double)info.SETUP_TIME; return(Time.FromSeconds(setupTimeBySec)); } return(default(Time)); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(Time)); } }
/// <summary> /// Returns true if there is a internal variable with this key /// </summary> public bool HasBoolVariable(string key) { return(StepMaster.ContainsInternalBoolean(key)); }
/// <summary> /// Returns true if there is a internal variable with this key /// </summary> public bool HasIntVariable(string key) { return(StepMaster.ContainsInternalNumeric(key)); }
public ProcessingData() { SfcEntity = new SfcEntity(); StepMaster = new StepMaster(); }
public SfcProgramData(SfcEntity sfcEntity) { SfcEntity = sfcEntity; StepMaster = new StepMaster(); StepMaster.UpdateStepNames(sfcEntity); }