private void btNeg_MouseDown(object sender, MouseEventArgs e) { string sTemp; string sText = ((Button)sender).Text; bool bRet = true; int iBtnTag = Convert.ToInt32(((Button)sender).Tag); uint uPstnNo = (uint)iBtnTag; //if (!CheckSafe(m_iMotrNo)) return; if (!OM.MstOptn.bDebugMode) { //if (m_eId == mi.PRER_X) bRet = SEQ.PRER.JogCheckSafe((mi)m_eId, EN_JOG_DIRECTION.Neg, (EN_UNIT_TYPE)Para.iUnitType, Para.dUnit); //if (m_eId == mi.PSTR_X) bRet = SEQ.PSTR.JogCheckSafe((mi)m_eId, EN_JOG_DIRECTION.Neg, (EN_UNIT_TYPE)Para.iUnitType, Para.dUnit); //if (m_eId == mi.LDR_X) bRet = SEQ.LDR.JogCheckSafe((mi)m_eId, EN_JOG_DIRECTION.Neg, (EN_UNIT_TYPE)Para.iUnitType, Para.dUnit); //if (m_eId == mi.RPCK_Y) bRet = SEQ.PCKR.JogCheckSafe((mi)m_eId, EN_JOG_DIRECTION.Neg, (EN_UNIT_TYPE)Para.iUnitType, Para.dUnit); //if (m_eId == mi.VSTG_X) bRet = SEQ.VSTG.JogCheckSafe((mi)m_eId, EN_JOG_DIRECTION.Neg, (EN_UNIT_TYPE)Para.iUnitType, Para.dUnit); } if (!bRet) { return; } ML.MT_Stop(m_eId); sTemp = m_eId.ToString(); if (SEQ._iSeqStat == EN_SEQ_STAT.Manual) { Log.ShowMessage("ERROR", "Doing Manual Cycle"); return; } else { Log.Trace("FrameMotr Form_" + sTemp + " " + sText + " Button Clicked", ForContext.Frm); if (!cbSlow.Checked) { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else { return; } } else { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else { return; } } } }
private void btNeg_MouseDown(object sender, MouseEventArgs e) { string sTemp; string sText = ((Button)sender).Text; bool bRet = true; int iBtnTag = Convert.ToInt32(((Button)sender).Tag); uint uPstnNo = (uint)iBtnTag; //if (!CheckSafe(m_iMotrNo)) return; //if (m_iId == (int)mi.IDX_X) bRet = SEQ.IDX.CheckSafe((mi)m_iId, uPstnNo); //if (m_iId == (int)mi.PCK_Y) bRet = SEQ.PCK.CheckSafe((mi)m_iId, uPstnNo); //if (m_iId == (int)mi.PCK_Z) bRet = SEQ.PCK.CheckSafe((mi)m_iId, uPstnNo); if (!bRet) { return; } ML.MT_Stop(m_eId); sTemp = m_eId.ToString(); if (SEQ._iSeqStat == EN_SEQ_STAT.Manual) { Log.ShowMessage("ERROR", "Doing Manual Cycle"); return; } else { Log.Trace("FrameMotr Form_" + sTemp + " " + sText + " Button Clicked", ti.Frm); if (!cbSlow.Checked) { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else { return; } } else { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else { return; } } } }
private void btNeg_MouseDown(object sender, MouseEventArgs e) { string sTemp; string sText = ((Button)sender).Text; bool bRet = true; int iBtnTag = Convert.ToInt32(((Button)sender).Tag); uint uPstnNo = (uint)iBtnTag; //if (!CheckSafe(m_iMotrNo)) return; if (m_eId == mi.LODR_YIndx) { bRet = SEQ.LODR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.LODR_XPshr) { bRet = SEQ.LODR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.TBLE_TTble) { bRet = SEQ.TTBL.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.LODR_XPckr) { bRet = SEQ.LODR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.VISN_ZGrpr) { bRet = SEQ.VISN.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.ULDR_ZPckr) { bRet = SEQ.ULDR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.ULDR_XGrpr) { bRet = SEQ.ULDR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.ULDR_YIndx) { bRet = SEQ.ULDR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.ULDR_ZNzzl) { bRet = SEQ.ULDR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (m_eId == mi.ULDR_XNzzl) { bRet = SEQ.ULDR.CheckSafe((mi)m_eId, (pv)uPstnNo); } if (!bRet) { return; } ML.MT_Stop(m_eId); sTemp = m_eId.ToString(); if (SEQ._iSeqStat == EN_SEQ_STAT.Manual) { Log.ShowMessage("ERROR", "Doing Manual Cycle"); return; } else { Log.Trace("FrameMotr Form_" + sTemp + " " + sText + " Button Clicked", ti.Frm); if (!cbSlow.Checked) { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncMan(m_eId, -(Para.dUnit)); } else { return; } } else { if (Para.iUnitType == (int)EN_UNIT_TYPE.utJog) { ML.MT_JogN(m_eId); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utMove) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else if (Para.iUnitType == (int)EN_UNIT_TYPE.utPitch) { ML.MT_GoIncSlow(m_eId, -(Para.dUnit)); } else { return; } } } }