Exemplo n.º 1
0
 private void PB_Stop_Click(object sender, EventArgs e)
 {
     MCCLManager.ServoOff();
     MCCLManager.SpindleOff();
     ServerStatus_Picture = false;
     ServerStatus();
 }
Exemplo n.º 2
0
 private void JogMouseUp()
 {
     if (CBox_JOG.SelectedIndex == 0)
     {
         MCCLManager.MCC_AbortMotionEx();
     }
 }
Exemplo n.º 3
0
 private void PB_ToolRelease_Click(object sender, EventArgs e)
 {
     MCCLManager.UnClampTool();
     //鬆開刀具
     ToolStatus_Picture = false;
     StatusDisplay();
 }
Exemplo n.º 4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            CBox_JOG.SelectedIndex = 0;
            MCCL.MCC_EnableLimitSwitchCheck(0);

            //連線EMP-Z
            MCCLManager.ConnectEMPZ();
            PB_PowerLight.Image = Image.FromFile(Application.StartupPath + "\\Picture\\Power_Light2.png");

            //執行緒
            bgwThred.RunWorkerAsync();

            //將所有分頁加載入MainPanel
            MainPanel.Controls.Add(coordinate);
            MainPanel.Controls.Add(gCode);
            MainPanel.Controls.Add(information);
            MainPanel.Controls.Add(monitor);
            MainPanel.Controls.Add(tool);

            //顯示所有分頁
            coordinate.Show();
            gCode.Show();
            information.Show();
            monitor.Show();
            tool.Show();

            //僅先顯示coordinate頁面
            coordinate.Visible  = true;
            gCode.Visible       = false;
            information.Visible = false;
            monitor.Visible     = false;
            tool.Visible        = false;
        }
Exemplo n.º 5
0
 private void PB_ToolClamp_Click(object sender, EventArgs e)
 {
     MCCLManager.ClampTool();
     //夾緊刀具
     ToolStatus_Picture = true;
     StatusDisplay();
 }
Exemplo n.º 6
0
        private void PB_JogZ2_Click(object sender, EventArgs e)
        {
            sbyte axis = 2, direction = -1;

            if (CBox_JOG.SelectedIndex == 1)
            {
                MCCLManager.JogSpace(axis, direction);
            }
        }
Exemplo n.º 7
0
 private void PB_Start_Click(object sender, EventArgs e)
 {
     MCCLManager.ConnectEMPZ();
     MCCLManager.SetMachineParameter();
     MCCLManager.StartEMPZ();
     MCCLManager.ServoOn();
     ServerStatus_Picture = true;
     ServerStatus();
     PB_PowerLight.Image = Image.FromFile(Application.StartupPath + "\\Picture\\Power_Light2.png");
 }
Exemplo n.º 8
0
        private void PB_JogZ2_MouseDown(object sender, MouseEventArgs e)
        {
            sbyte axis = 2, direction = -1;

            if (CBox_JOG.SelectedIndex == 0)
            {
                MCCLManager.JogConti(axis, direction);
            }
            PB_JogZ2.Image = Image.FromFile(Application.StartupPath + "\\Picture\\REDUCE2.png");
        }
Exemplo n.º 9
0
 private void BtnEGS_Click(object sender, EventArgs e)
 {
     MCCLManager.ServoOff();
     MCCLManager.EndEMPZ();
     MCCLManager.DisConnectEMPZ();
     MCCLManager.SpindleOff();
     ServerStatus_Picture = false;
     ServerStatus();
     PB_PowerLight.Image = Image.FromFile(Application.StartupPath + "\\Picture\\Power_Light.png");
 }
Exemplo n.º 10
0
        private void PB_JogX1_MouseDown(object sender, MouseEventArgs e)
        {
            sbyte axis = 0, direction = 1;

            if (CBox_JOG.SelectedIndex == 0)
            {
                MCCLManager.JogConti(axis, direction);
            }
            //更換圖片
            PB_JogX1.Image = Image.FromFile(Application.StartupPath + "\\Picture\\ADD2.png");
        }
Exemplo n.º 11
0
 private void Btn_SpindleStop_Click(object sender, EventArgs e)
 {
     if (MCCLManager.isSpindleOn == true)
     {
         MCCLManager.SpindleOff();
         SpeedValue = 0;
     }
     else
     {
         MessageBox.Show("Have off");
     }
 }
Exemplo n.º 12
0
 private void Btn_SpindleRun_Click(object sender, EventArgs e)
 {
     if (MCCLManager.isSpindleOn == false)
     {
         MCCLManager.SpindleOn();
         SpeedValue = 5000;
     }
     else
     {
         MessageBox.Show("Have on");
     }
 }
Exemplo n.º 13
0
        private void bgwThred_DoWork(object sender, DoWorkEventArgs e)
        {
            //Reciev work here
            while (true)
            {
                Thread.Sleep(10);
                if (bgwThred.CancellationPending)
                {
                    e.Cancel = true;
                    break;
                }
                else
                {
                    //dowork here
                    MCCLManager.GetMCCLData();

                    DateTime.Now.ToShortDateString();
                    DateTime.Now.ToString("HH:mm:ss");

                    bgwThred.ReportProgress(1);
                }
            }
        }
Exemplo n.º 14
0
 private void btnSpeed_Click(object sender, EventArgs e)
 {
     MCCLManager.ToolRPMChange(Convert.ToInt32(Txt_Speed.Text) / 5000);
     SpeedValue = Convert.ToInt32(Txt_Speed.Text);
 }
Exemplo n.º 15
0
 private void Lb_Speed_TextChanged(object sender, EventArgs e)
 {
     MCCLManager.ToolRPMChange(SpeedValue / 5000);
 }
Exemplo n.º 16
0
 private void Btn_DefineMachining_Click(object sender, EventArgs e)
 {
     MCCLManager.MCC_DefineMachining();
 }
Exemplo n.º 17
0
 private void Btn_GoHome_Click(object sender, EventArgs e)
 {
     MCCLManager.MCC_GoHome();
 }