Example #1
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();
        }
Example #2
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();
        }
Example #3
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();
        }