Beispiel #1
0
 public Main(SerialPort port, AxisXY axisXY, AxisZ axisZ, Taladro taladro)
 {
     Type miTipo = typeof(Main);
     Main.port = port;
     metodos = miTipo.GetMethods();
     data = 0;
     taladro = new Taladro();
     this.axisXY = axisXY;
     this.axisZ = axisZ;
 }
Beispiel #2
0
        public Program()
        {
            x = new Axis(Settings.Default.axisXStepsPercm,
                new byte[]{
                    Settings.Default.axisXStep1,
                    Settings.Default.axisXStep2,
                    Settings.Default.axisXStep3,
                    Settings.Default.axisXStep4
                },
                Settings.Default.axisXMask,
                "x");

            y = new Axis(Settings.Default.axisYStepsPercm,
                new byte[]{
                    Settings.Default.axisYStep1,
                    Settings.Default.axisYStep2,
                    Settings.Default.axisYStep3,
                    Settings.Default.axisYStep4
                },
                Settings.Default.axisYMask,
                "y");

            z = new Axis(Settings.Default.axisZStepsPercm,
                new byte[]{
                    Settings.Default.axisZStep1,
                    Settings.Default.axisZStep2,
                    Settings.Default.axisZStep3,
                    Settings.Default.axisZStep4
                },
                Settings.Default.axisZMask,
                "z");
            port = new SerialPort(
                Settings.Default.portName,
                Settings.Default.baudRate);
            axisXY = new AxisXY(x, y, Settings.Default.xyMasFeedRate);
            axisZ = new AxisZ(z, Settings.Default.zMasFeedRate);
            taladro = new Taladro();

            fresadora = new Main(port,axisXY,axisZ,taladro);
            index = 0;
        }