Example #1
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

            LbStat1.BackColor = SM.MT_GetNLimSnsr(m_eId) ? Color.Lime : Color.Silver;
            LbStat2.BackColor = SM.MT_GetHomeSnsr(m_eId) ? Color.Lime : Color.Silver;
            LbStat3.BackColor = SM.MT_GetPLimSnsr(m_eId) ? Color.Lime : Color.Silver;
            LbStat4.BackColor = SM.MT_GetAlarmSgnl(m_eId) ? Color.Lime : Color.Silver;
            LbStat5.BackColor = SM.MT_GetServo(m_eId) ? Color.Lime : Color.Silver;
            LbStat6.BackColor = SM.MT_GetStop(m_eId) ? Color.Lime : Color.Silver;
            LbStat7.BackColor = SM.MT_GetHomeDone(m_eId) ? Color.Lime : Color.Silver;

            LbCmdPos.Text = string.Format("{0:0.0000}", SM.MT_GetCmdPos(m_eId));
            LbEncPos.Text = string.Format("{0:0.0000}", SM.MT_GetEncPos(m_eId));

            if (SEQ._bRun || MM.GetManNo() != mc.NoneCycle)
            {
                btNeg.Enabled = false;
                btPos.Enabled = false;
            }

            else
            {
                btNeg.Enabled = true;
                btPos.Enabled = true;
            }
            tmUpdate.Enabled = true;
        }