예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Api ch = new Api();
         ch.OpenCommEthernet("192.168.8.18", 701);
         EthercatIo iO = new EthercatIo(ch, 88, 8, 5);
         iO.Setup();
         conveyor = new PickAndPlaceConveyor(iO);
         conveyor.ErrorOccured += Conveyor_ErrorOccured;
         conveyor.Start();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: Yuri1125/Rack
        private void button9_Click(object sender, EventArgs e)
        {
            try
            {
                _ch.OpenCommEthernet("192.168.8.18", 701);
                _ioRobot = new EthercatIo(_ch, 72, 7, 4);
                _ioRobot.Setup();

                GetOutput();

                _inputUpdate = new Thread(InputUpdate)
                {
                    IsBackground = true
                };
                _inputUpdate.Start();

                button9.Enabled = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
 public PickAndPlaceConveyor(EthercatIo ethercatIo)
 {
     _io = ethercatIo;
 }