private void button1_Click(object sender, EventArgs e) { _serialize = new ProtoClass(); UwantAgvDevice _device = new UwantAgvDevice(port, _serialize); _device.SetMonitor(); }
/// <summary> /// 后退 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void bt_agv_houtui_Click(object sender, EventArgs e) { _serialize = new ProtoClass(); UwantAgvDevice _device = new UwantAgvDevice(port, _serialize); _device.SetMotionControl_houtui(); }
private void bt_Output_fan_close_Click(object sender, EventArgs e) { _serialize = new ProtoClass(); UwantAgvDevice _device = new UwantAgvDevice(port, _serialize); byte carnumber = byte.Parse(this.tb_carnumber.Text.ToString().Trim()); _device.SetOutput_fan_close(carnumber); }
private void bt_liuhuadao_Click(object sender, EventArgs e) { IPort portMain = new TcpPort("192.168.10.25:8005"); IPort portVice = new TcpPort("192.168.10.26:8006"); IPort portagv = new TcpPort("192.168.10.43:8000"); _serialize = new ProtoClass(); VulcanizeDevice Vulcanize = new VulcanizeDevice(portMain, _serialize); VulcanizeViceDevice VulcanizeVice = new VulcanizeViceDevice(portVice, _serialize); UwantAgvDevice agv = new UwantAgvDevice(portagv, _serialize); Work(Vulcanize, VulcanizeVice, agv); //Update(Vulcanize, VulcanizeVice); }
protected void Work(VulcanizeDevice Vulcanize, VulcanizeViceDevice VulcanizeVice, UwantAgvDevice agv) { /* bool isBreak = true; * while (isBreak) * { * int data; * agv.NodesTate(out data); * if (data == 6) * { * Vulcanize.AGVExitWaiting(); * bool isAGVCollectDisc = true; * while (isAGVCollectDisc) * { * switch (Vulcanize.AGVCollectDisc) * { * case eVulcanizeWorkState.Y: * agv.GoTo(0); * Logger.LogInfo("节点 6输出参数2" + "------" + "开启"); * isAGVCollectDisc = false; * break; * case eVulcanizeWorkState.N: * break; * } * Thread.Sleep(100); * } * Thread.Sleep(100); * isBreak = false; * } * } * Thread.Sleep(100); * agv.GoTo(1); * Logger.LogInfo("节点 6输出参数2" + "------"+ "关闭");*/ }