//--------------------------------------------------------------------------- //Update Timer private void fn_tmUpdate(object sender, EventArgs e) { // m_UpdateTimer.Stop(); lbRun.Background = IO.XV[(int)EN_INPUT_ID.xSPD_E3000_RUN] ? Brushes.LimeGreen : Brushes.LightGray; lbRunOk.Background = IO.XV[(int)EN_INPUT_ID.xSPD_E3000_SpeedOK] ? Brushes.LightGreen: Brushes.LightGray; lbWarn.Background = IO.XV[(int)EN_INPUT_ID.xSPD_E3000_Warn] ? Brushes.Yellow : Brushes.LightGray; lbError.Background = !IO.XV[(int)EN_INPUT_ID.xSPD_E3000_State] ? Brushes.Red : Brushes.LightGray; lbRPM.Content = "RPM : " + SEQ_SPIND.fn_GetSpindleSpeed().ToString(); lbDir.Content = SEQ_SPIND.fn_GetSpindleDir() ? "DIRECTION : FWD" : "DIRECTION : BWD"; lbTorque.Content = "TORQUE : " + SEQ_SPIND.fn_GetSpindleTorque(); // m_UpdateTimer.Start(); }
private void fn_tmUpdate(object sender, EventArgs e) { //Timer //m_UpdateTimer.Stop(); m_UpdateTimer.IsEnabled = false; //Update Tool Info DM.STOR[(int)EN_STOR_ID.POLISH].fn_UpdateMap(ref lbStorg); DM.STOR[(int)EN_STOR_ID.CLEAN].fn_UpdateMap(ref lbStorg1); //Plate DM.MAGA[(int)EN_MAGA_ID.POLISH].fn_UpdateMap(ref lbPoliPlate); DM.MAGA[(int)EN_MAGA_ID.CLEAN].fn_UpdateMap(ref lbClenPlate); DM.MAGA[(int)EN_MAGA_ID.LOAD].fn_UpdateMap(ref lbLoadPlate); DM.MAGA[(int)EN_MAGA_ID.TRANS].fn_UpdateMap(ref lbTransPlate); //Magazine DM.MAGA[(int)EN_MAGA_ID.MAGA01].fn_UpdateMap(ref lbMagz01); DM.MAGA[(int)EN_MAGA_ID.MAGA02].fn_UpdateMap(ref lbMagz02); // DM.TOOL.fn_UpdateMap(ref lbSpdlPlate, ref lbSpdlTool, ref lbSpdlToolFce, ref lbNeedCheck); lbCrntRcpName.Text = string.Format("[{0}] {1}", LOT._bLotOpen ? "OPEN" : "", FM._sRecipeName); //lbCrntRcpName.Background = LOT._bLotOpen? Brushes.Lime : Brushes.WhiteSmoke; //SEQ._bRecipeOpen lbRcp.Background = LOT._bLotOpen ? Brushes.LimeGreen : Brushes.WhiteSmoke; lbReqPoli.Background = SEQ_SPIND._bReqUtil_Polish ? Brushes.Lime : Brushes.LightGray; lbReqPoli.Visibility = FM.fn_IsLvlMaster() ? Visibility.Visible : Visibility.Hidden; //JUNG/210113 lbSpdlToolFce.Visibility = FM.fn_IsLvlMaster() ? Visibility.Visible : Visibility.Hidden; lbNeedCheck.Visibility = FM.fn_IsLvlMaster() ? Visibility.Visible : Visibility.Hidden; //LDCBTM._dLoadCellValue * ONEGRAM_TO_NEWTON upLoadCell.UPValue = string.Format($"{LDCBTM.fn_GetBtmLoadCell(true)} N [{LDCBTM.fn_GetBtmLoadCell()} g]"); lbRPM.Content = string.Format("SPINDLE RPM : {0} / {1}", SEQ_SPIND.fn_GetSpindleSpeed(), SEQ_SPIND.fn_GetSpindleDir() ? "DIR : FWD" : "DIR : BWD"); //lbCrntFos.Content = string.Format($"[LOAD CELL] TOP : {IO.fn_GetTopLoadCell(true)} N"); lbCrntFos.Content = string.Format($"[LOAD CELL] TOP : {IO.fn_GetTopLoadCellAsBTM(true)} N"); //JUNG/200910/ lbUTLevel.Content = string.Format($"UTIL LEVEL : {IO.fn_GetUTAvgValue():F1}"); //JUNG/200423/Avg Value //JUNG/201119/Min,Max Reset if (SEQ_SPIND._bReqResetGraph) { SEQ_SPIND._bReqResetGraph = false; fn_SetGraphRange(); } // AddGraph if (nGraphTick > ug_LoadCellTop.UGDataCount) { ug_LoadCellTop.RemoveFirst(); } double dTopLoadCell = IO.fn_GetTopLoadCellAsBTM(true); //IO.fn_GetTopLoadCell(true); ug_LoadCellTop.UGValue = $"{dTopLoadCell} N"; //ug_LoadCellTop.UGMaxValue = 10; ug_LoadCellTop.AddPoint(new Point(nGraphTick++, dTopLoadCell)); ug_LoadCellTop.Refresh(); lbDCOM.Content = string.Format($"[DCOM] SET: {SEQ_SPIND._dForceRatio:F2} / READ: {IO.fn_GetDCOMValue()}"); if (SEQ_SPIND._bDrngPolishing) { lbPoliCnt.Content = string.Format($"POLISHING COUNT : {SEQ_SPIND.fn_GetCurrMillCnt(true)} / CYCLE: {SEQ_SPIND._nPolCycle+1} / STEP : {SEQ_SPIND._nPoliCnt+1}"); } else if (SEQ_SPIND._bDrngCleaning) { lbPoliCnt.Content = string.Format($"CLEANING COUNT : {SEQ_SPIND.fn_GetCurrMillCnt(true)} / CYCLE : {SEQ_SPIND._nClnCycle+1} / STEP : {SEQ_SPIND._nPoliCnt+1}"); } //lbFlowMT1.Content = string.Format($"[FLOW] POLISHING SLURY : {IO.fn_GetFlowMeter(EN_AINPUT_ID.aiPOL_SlurryFlow ):F1}"); //lbFlowMT2.Content = string.Format($"[FLOW] POLISHING DI : {IO.fn_GetFlowMeter(EN_AINPUT_ID.aiPOL_DIWaterFlow):F1}"); //lbFlowMT3.Content = string.Format($"[FLOW] CLEANING DI : {IO.fn_GetFlowMeter(EN_AINPUT_ID.aiCLN_DIWaterFlow):F1}"); lbLotNo.Text = string.Format($"LOT No : {LOT._sLotNo}"); lbStartTime.Content = string.Format($"[TOTAL] START TIME : {SEQ_TRANS._sStartTime}"); lbEndTime.Content = string.Format($"[TOTAL] END TIME : { SEQ_TRANS._sEndTime }"); lbMillStartTime.Content = (SEQ._bFlick3) ? string.Format($"[POL]START TIME : {SEQ_SPIND._sMillStartTime}") : string.Format($"[CLN]START TIME : {SEQ_SPIND._sCleanStartTime}"); lbMillEndTime.Content = (SEQ._bFlick3) ? string.Format($"[POL]END TIME : {SEQ_SPIND._sMillEndTime}") : string.Format($"[CLN]END TIME : { SEQ_SPIND._sCleanEndTime }"); if (SEQ_SPIND._bDrngPolishing) { pbPoli.Visibility = Visibility.Visible; tbPolibar.Visibility = Visibility.Visible; pbPoli.Value = SEQ_SPIND.fn_GetMillPercent(); } else { pbPoli.Visibility = Visibility.Hidden; tbPolibar.Visibility = Visibility.Hidden; } if (SEQ_SPIND._bDrngCleaning) { //pbClen .Visibility = Visibility.Hidden; //삭제 //tbClenbar.Visibility = Visibility.Hidden; //pbClen.Value = ((IO.DATA_ACS_TO_EQ[(int)EN_ACS_TO_EQ.ATE_Milling_Cnt] + (100 * SEQ_SPIND._nCleanCnt)) / 400.0) * 100.0; } else { pbClen.Visibility = Visibility.Hidden; tbClenbar.Visibility = Visibility.Hidden; } // lbSpdlState.Content = SEQ_SPIND.fn_GetSeqMsg(); lbPoliState.Content = SEQ_POLIS.fn_GetSeqMsg(); lbClenState.Content = SEQ_CLEAN.fn_GetSeqMsg(); lbTranState.Content = SEQ_TRANS.fn_GetSeqMsg(); // //m_UpdateTimer.Start(); m_UpdateTimer.IsEnabled = true; }