IOControls.cs
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class IOControls : UserControl
{
Robot_Config _Config;
public Robot_Config Config
{
get { return _Config; }
set
{
_Config = value;
ioControl1.Config = value;
}
}
public IOControls()
{
InitializeComponent();
}
private void ioControl1_Load(object sender, EventArgs e)
{
}
private void btn_FlipEquip_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.FlipEquip.LiftUp(null);
LogUtil.info("手动点击:FlipEquip.LiftUp");
}
private void button1_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.FlipEquip.LiftDown(null);
LogUtil.info("手动点击:FlipEquip.LiftDown");
}
private void button2_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.RotateEquip.TurnToEnd(true);
LogUtil.info("手动点击:RotateEquip.TurnToEnd 水平");
}
private void button3_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.RotateEquip.TurnToEnd(false);
LogUtil.info("手动点击:RotateEquip.TurnToEnd 垂直");
}
private void button5_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.TPMove.ToLow(null);
}
private void button4_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.TPMove.ToHigh(null);
}
private void button6_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.RotateEquip.TurnDegree(45);
}
private void button7_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.RotateEquip.TurnDegree(-45);
}
private void button8_Click(object sender, EventArgs e)
{
RobotManage.mainMachine.RotateEquip.TurnRound();
}
private void button9_Click(object sender, EventArgs e)
{
for (int i = 1; i < 10;i++) {
Thread.Sleep(300);
RobotManage.RFID.ReadEPC(out byte[] data);
if (data!=null) {
MessageBox.Show(RobotManage.RFID.HexBuff(data));
return;
}
}
MessageBox.Show("no data");
}
}
}