Exemple #1
0
        private void BscanMotion_Load(object sender, EventArgs e)
        {
            cmbAxis.SelectedIndex = 0;
            axisIndex             = cmbAxis.SelectedIndex + 1;

            NMC.HardwareOpen();
        }
Exemple #2
0
        private void btnMove_Click(object sender, EventArgs e)
        {
            bool flag = false;

            if (nudXv.Text == "" || nudXd.Text == "" || nudYv.Text == "" || nudYd.Text == "" ||
                nudZv.Text == "" || nudZd.Text == "")
            {
                MessageShow.show("Warning:Inputting is null, please input!",
                                 "警告:输入为空,请重新输入!");
                return;
            }

            int    axis1  = 1;
            double speed1 = Convert.ToDouble(nudXv.Value);
            double range1 = Convert.ToDouble(nudXd.Value);

            int    axis2  = 2;
            double speed2 = Convert.ToDouble(nudYv.Value);
            double range2 = Convert.ToDouble(nudYd.Value);

            int    axis3  = 3;
            double speed3 = Convert.ToDouble(nudZv.Value);
            double range3 = Convert.ToDouble(nudZd.Value);

            flag = NMC.HardwareDGo(axis1, range1, speed1);

            flag |= NMC.HardwareDGo(axis2, range2, speed2);

            flag |= NMC.HardwareDGo(axis3, range3, speed3);

            if (!flag)
            {
                MessageShow.show("Move failed, pls check!", "运动失败,请检查!");
            }
        }
Exemple #3
0
        private void btnZero_Click(object sender, EventArgs e)
        {
            bool flag = false;

            flag = NMC.HardwareGoZero();
            if (!flag)
            {
                MessageShow.show("Go zero failed, pls check!", "回零失败,请检查!");
            }
        }
Exemple #4
0
        private void btnCTest_Click(object sender, EventArgs e)
        {
            NMC.HardwareSigStart2Hardware();
            bool flag = NMC.HardwareGo(1, 100, 10);

            if (!flag)
            {
                MessageShow.show("Bscan move failed, pls check!", "B扫运动失败,请检查!");
                return;
            }
            NMC.HardwareSigStop2Hardware();
        }
Exemple #5
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            int    axis1;
            double range1;
            int    axis2;
            double range2;

            bool flag = false;

            if (nudXRange.Text == "" || nudYRange.Text == "" ||
                nudSpeed.Text == "" || nudStep.Text == "")
            {
                MessageShow.show("Warning:Inputting is null, please input!",
                                 "警告:输入为空,请重新输入!");
                return;
            }

            double xRange = Convert.ToDouble(nudXRange.Value);
            double yRange = Convert.ToDouble(nudYRange.Value);
            double speed  = Convert.ToDouble(nudSpeed.Value);
            double step   = Convert.ToDouble(nudStep.Value);

            if (cmbScanAxis.SelectedIndex == 0) //X轴为扫描轴
            {
                axis1  = 1;
                range1 = xRange;
                axis2  = 2;
                range2 = yRange;
            }
            else//y轴为扫描轴
            {
                axis1  = 2;
                range1 = yRange;
                axis2  = 1;
                range2 = xRange;
            }

            NMC.HardwareSigStart2Hardware();
            flag = NMC.HardwareGoPlanar(axis1, range1, axis2, range2, speed, step);
            if (!flag)
            {
                MessageShow.show("Bscan move failed, pls check!", "B扫运动失败,请检查!");
                return;
            }
            NMC.HardwareSigStop2Hardware();
        }
Exemple #6
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            bool flag = false;

            if (nudVelocity.Text == "" || nudRange.Text == "")
            {
                MessageShow.show("Warning:Inputting is null, please input!",
                                 "警告:输入为空,请重新输入!");
                return;
            }

            double speed = Convert.ToDouble(nudVelocity.Value);
            double range = Convert.ToDouble(nudRange.Value);

            NMC.HardwareSigStart2Hardware();
            flag = NMC.HardwareGo(axisIndex, range, speed);
            if (!flag)
            {
                MessageShow.show("Bscan move failed, pls check!", "B扫运动失败,请检查!");
                return;
            }
            NMC.HardwareSigStop2Hardware();
        }
Exemple #7
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     NMC.HardwareEHalt();
 }
Exemple #8
0
 private void UnionMove_Load(object sender, EventArgs e)
 {
     NMC.HardwareOpen();
 }
Exemple #9
0
 private void CscanMotion_Load(object sender, EventArgs e)
 {
     cmbScanAxis.SelectedIndex = 0;
     NMC.HardwareOpen();
 }