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); } }
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); } }
public PickAndPlaceConveyor(EthercatIo ethercatIo) { _io = ethercatIo; }