Commit 115ebfb3 刘韬

1

1 个父辈 cd2c32e9
...@@ -45,7 +45,7 @@ namespace DeviceLibrary ...@@ -45,7 +45,7 @@ namespace DeviceLibrary
public void LiftUp(MoveInfo moveInfo) { public void LiftUp(MoveInfo moveInfo) {
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo(crc.GetString("Res0154","界面"),false); moveInfo = new MoveInfo("Motor",false);
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) { if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) {
moveInfo.log($"{axisBean.AxisName},已在位置,无需上升"); moveInfo.log($"{axisBean.AxisName},已在位置,无需上升");
return; return;
...@@ -84,7 +84,7 @@ namespace DeviceLibrary ...@@ -84,7 +84,7 @@ namespace DeviceLibrary
public void LiftDown(MoveInfo moveInfo) public void LiftDown(MoveInfo moveInfo)
{ {
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo(crc.GetString("Res0154","界面"), false); moveInfo = new MoveInfo("Motor", false);
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH))
{ {
moveInfo.log($"{axisBean.AxisName},已在位置,无需下降"); moveInfo.log($"{axisBean.AxisName},已在位置,无需下降");
......
...@@ -19,16 +19,65 @@ namespace DeviceLibrary ...@@ -19,16 +19,65 @@ namespace DeviceLibrary
/// <param name="trayInfo"></param> /// <param name="trayInfo"></param>
/// <returns>是否放行 放行true, 拦截false</returns> /// <returns>是否放行 放行true, 拦截false</returns>
public static bool Process(string rfid, int addr, out TrayInfo trayInfo) { public static bool Process(string rfid, int addr, out TrayInfo trayInfo) {
if (!Traylist.ContainsKey(rfid)) { lock (Traylist)
Traylist.Add(rfid, new TrayInfo()); {
Traylist[rfid].RFID = rfid; LogUtil.info($"处理RFID:{rfid},地址{addr},设备:{AddrDesc[addr]}");
} if (!Traylist.ContainsKey(rfid))
Traylist[rfid].LastUpdateTime = DateTime.Now; {
Traylist[rfid].LastAddr = addr; Traylist.Add(rfid, new TrayInfo());
Traylist[rfid].RFID = rfid;
}
Traylist[rfid].LastUpdateTime = DateTime.Now;
Traylist[rfid].LastAddr = addr;
Traylist[rfid].Destination = TrayManager.AddrDesc[Traylist[rfid].DestinationAddr];
Traylist[rfid].LastPosition = TrayManager.AddrDesc[Traylist[rfid].LastAddr];
trayInfo = Traylist[rfid]; trayInfo = Traylist[rfid];
Statistics();
}
return true; return true;
} }
/// <summary>
/// 空托盘数量
/// </summary>
public static int EmptyCount;
/// <summary>
/// 入库托盘数量
/// </summary>
public static int InStoreCount;
/// <summary>
/// 出库托盘数量
/// </summary>
public static int OutStoreCount;
/// <summary>
/// 离线托盘数量
/// </summary>
public static int OfflineCount;
public static int TotalCount{ get => EmptyCount + InStoreCount + OutStoreCount; }
static DateTime lastrefresh;
public static void Statistics() {
EmptyCount = 0;
InStoreCount = 0;
OutStoreCount = 0;
OfflineCount = 0;
lastrefresh = DateTime.Now;
Traylist.Values.ToList().ForEach(ti=> {
if ((lastrefresh - ti.LastUpdateTime).TotalSeconds > 10)
{
ti.isOnline = false;
OfflineCount++;
}
if (ti.HasLoad) {
if (ti.Direction == DirectionE.In)
InStoreCount++;
else
OutStoreCount++;
} else {
EmptyCount++;
}
});
}
} }
public class TrayInfo { public class TrayInfo {
...@@ -46,13 +95,16 @@ namespace DeviceLibrary ...@@ -46,13 +95,16 @@ namespace DeviceLibrary
} }
} }
public string Destination; public string Destination;
public int DestinationAddr; public int DestinationAddr=-1;
public int LastAddr; public int LastAddr=-1;
public bool HasLoad; public string LastPosition;
public LoadTypeE LoadType; public bool HasLoad { get => LoadType == LoadTypeE.None; }
public LoadTypeE LoadType = LoadTypeE.None;
public TrayTypeE TrayType; public TrayTypeE TrayType;
public DateTime LastUpdateTime; public DateTime LastUpdateTime;
public ReelParam ReelParam; public ReelParam ReelParam;
public DirectionE Direction { get => (Destination == "AMH-ML5-1" || Destination == "AMH-ML5-2") ? DirectionE.Out : DirectionE.In; }
public bool isOnline = true;
} }
public enum LoadTypeE { public enum LoadTypeE {
None, None,
...@@ -71,6 +123,10 @@ namespace DeviceLibrary ...@@ -71,6 +123,10 @@ namespace DeviceLibrary
C03, //Tray治具 C03, //Tray治具
C04, //ShoeBOX治具 C04, //ShoeBOX治具
} }
public enum DirectionE
{
In,Out
}
public partial class TrayManager public partial class TrayManager
{ {
public static Dictionary<LoadTypeE, string> LoadTypeDesc = new Dictionary<LoadTypeE, string>(); public static Dictionary<LoadTypeE, string> LoadTypeDesc = new Dictionary<LoadTypeE, string>();
...@@ -93,6 +149,7 @@ namespace DeviceLibrary ...@@ -93,6 +149,7 @@ namespace DeviceLibrary
} }
public static void Init(Dictionary<string, DeviceGroup> deviceGroup) { public static void Init(Dictionary<string, DeviceGroup> deviceGroup) {
foreach (var dg in deviceGroup) { foreach (var dg in deviceGroup) {
AddrDesc.Add(-1, "未知");
if (dg.Value.addr_2 >= 0) if (dg.Value.addr_2 >= 0)
{ {
AddrDesc.Add(dg.Value.addr_1, dg.Value.GroupName + "-1"); AddrDesc.Add(dg.Value.addr_1, dg.Value.GroupName + "-1");
......
...@@ -28,8 +28,9 @@ namespace DeviceLibrary ...@@ -28,8 +28,9 @@ namespace DeviceLibrary
MoveInfo LSBMoveInfo; MoveInfo LSBMoveInfo;
CylinderManger Location_A = null; CylinderManger Location_A = null;
CylinderManger Location_B = null; CylinderManger Location_B = null;
PuYueRFID_C2S RFID_1 = null; public PuYueRFID_C2S RFID_1 = null;
PuYueRFID_C2S RFID_2 = null; public PuYueRFID_C2S RFID_2 = null;
MsgService Msg;
public LineRunMonitor Line; public LineRunMonitor Line;
LS_TypeE LS_Type = LS_TypeE.NoRfid; LS_TypeE LS_Type = LS_TypeE.NoRfid;
public SideMove(DeviceGroup device,out string msg) { public SideMove(DeviceGroup device,out string msg) {
...@@ -232,8 +233,9 @@ namespace DeviceLibrary ...@@ -232,8 +233,9 @@ namespace DeviceLibrary
return; return;
} }
if (RFID.TryRead(out string rfid, out _) == 1) if (RFID.ReadByte(0x20,16,out byte[] data))
{ {
var rfid = Encoding.ASCII.GetString(data).Trim();
var through = TrayManager.Process(rfid, addr, out TrayInfo trayInfo); var through = TrayManager.Process(rfid, addr, out TrayInfo trayInfo);
if (through) if (through)
Minfo.NextMoveStep(MoveStep.SideMove_04); Minfo.NextMoveStep(MoveStep.SideMove_04);
......
...@@ -26,8 +26,7 @@ namespace DeviceLibrary ...@@ -26,8 +26,7 @@ namespace DeviceLibrary
DeviceGroup DeviceGroup; DeviceGroup DeviceGroup;
MoveInfo MoveInfo; MoveInfo MoveInfo;
MoveInfo MoveInfo2; MoveInfo MoveInfo2;
MsgService Msg; public PuYueRFID_C2S RFID_1 = null;
PuYueRFID_C2S RFID_1 = null;
AxisBean axis; AxisBean axis;
CylinderManger Location; CylinderManger Location;
CylinderManger Transplant; CylinderManger Transplant;
...@@ -103,8 +102,9 @@ namespace DeviceLibrary ...@@ -103,8 +102,9 @@ namespace DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check, IO_VALUE.HIGH));
break; break;
case MoveStep.TransplantMove_02: case MoveStep.TransplantMove_02:
if (RFID_1.TryRead(out string rfid, out _) == 1) if (RFID_1.ReadByte(0x20, 16, out byte[] data))
{ {
var rfid = Encoding.ASCII.GetString(data).Trim();
var through = TrayManager.Process(rfid, DeviceGroup.addr_1, out TrayInfo trayInfo); var through = TrayManager.Process(rfid, DeviceGroup.addr_1, out TrayInfo trayInfo);
if (through) if (through)
MoveInfo.NextMoveStep(MoveStep.TransplantMove_03); MoveInfo.NextMoveStep(MoveStep.TransplantMove_03);
......
...@@ -24,8 +24,7 @@ namespace DeviceLibrary ...@@ -24,8 +24,7 @@ namespace DeviceLibrary
} }
DeviceGroup DeviceGroup; DeviceGroup DeviceGroup;
MoveInfo MoveInfo; MoveInfo MoveInfo;
MsgService Msg; public PuYueRFID_C2S RFID_1 = null;
PuYueRFID_C2S RFID_1 = null;
CylinderManger Location; CylinderManger Location;
AxisBean axis; AxisBean axis;
AxisBean axis2; AxisBean axis2;
...@@ -102,8 +101,9 @@ namespace DeviceLibrary ...@@ -102,8 +101,9 @@ namespace DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MI_In_Check, IO_VALUE.HIGH));
break; break;
case MoveStep.TrayStop_02: case MoveStep.TrayStop_02:
if (RFID_1.TryRead(out string rfid, out _) == 1) if (RFID_1.ReadByte(0x20, 16, out byte[] data))
{ {
var rfid = Encoding.ASCII.GetString(data).Trim();
var through = TrayManager.Process(rfid, DeviceGroup.addr_1, out TrayInfo trayInfo); var through = TrayManager.Process(rfid, DeviceGroup.addr_1, out TrayInfo trayInfo);
if (through) if (through)
MoveInfo.NextMoveStep(MoveStep.TrayStop_03); MoveInfo.NextMoveStep(MoveStep.TrayStop_03);
......
...@@ -29,9 +29,15 @@ namespace TheMachine ...@@ -29,9 +29,15 @@ namespace TheMachine
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.stateView = new TheMachine.DoubleBufferListView();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabControl1 // tabControl1
...@@ -46,14 +52,42 @@ namespace TheMachine ...@@ -46,14 +52,42 @@ namespace TheMachine
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupBox1);
this.tabPage2.Location = new System.Drawing.Point(4, 26); this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(594, 489); this.tabPage2.Size = new System.Drawing.Size(594, 489);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2"; this.tabPage2.Text = "信息";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// groupBox1
//
this.groupBox1.Controls.Add(this.stateView);
this.groupBox1.Location = new System.Drawing.Point(45, 57);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(598, 244);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "运行状态";
//
// stateView
//
this.stateView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.stateView.Dock = System.Windows.Forms.DockStyle.Fill;
this.stateView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.stateView.HideSelection = false;
this.stateView.Location = new System.Drawing.Point(3, 22);
this.stateView.MultiSelect = false;
this.stateView.Name = "stateView";
this.stateView.Size = new System.Drawing.Size(592, 219);
this.stateView.TabIndex = 0;
this.stateView.UseCompatibleStateImageBehavior = false;
//
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// CycleHYControl // CycleHYControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -62,6 +96,8 @@ namespace TheMachine ...@@ -62,6 +96,8 @@ namespace TheMachine
this.Name = "CycleHYControl"; this.Name = "CycleHYControl";
this.Size = new System.Drawing.Size(602, 519); this.Size = new System.Drawing.Size(602, 519);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -70,5 +106,8 @@ namespace TheMachine ...@@ -70,5 +106,8 @@ namespace TheMachine
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox1;
private DoubleBufferListView stateView;
private System.Windows.Forms.Timer timer1;
} }
} }
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -16,11 +17,20 @@ namespace TheMachine ...@@ -16,11 +17,20 @@ namespace TheMachine
public CycleHYControl() public CycleHYControl()
{ {
InitializeComponent(); InitializeComponent();
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
stateView.Columns[1].Text = crc.GetString("Res0198", "模块");
stateView.Columns[2].Text = crc.GetString("Res0199", "步骤");
stateView.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text", "信息");
}
List<T1> hYControls = new List<T1>(); List<T1> hYControls = new List<T1>();
public string DeviceName = ""; public string DeviceName = "";
public void Init(string devicegroup) { public void Init(string devicegroup) {
tabControl1.TabPages.Clear(); //tabControl1.TabPages.Clear();
foreach (var dg in RobotManage.DeviceGroup.Values) { foreach (var dg in RobotManage.DeviceGroup.Values) {
if (dg.DeviceType != devicegroup) if (dg.DeviceType != devicegroup)
continue; continue;
...@@ -33,6 +43,29 @@ namespace TheMachine ...@@ -33,6 +43,29 @@ namespace TheMachine
hYControls.Add(hy); hYControls.Add(hy);
AddForm(dg.GroupName, dg.GroupName, hy); AddForm(dg.GroupName, dg.GroupName, hy);
} }
#region 状态信息listview初始化
stateView.View = View.Details;
ColumnHeader c1 = new ColumnHeader();
c1.Text = "";
c1.Width = 0;
ColumnHeader c2 = new ColumnHeader();
c2.Text = crc.GetString("Res0198", "模块");
c2.Width = 120;
ColumnHeader c3 = new ColumnHeader();
c3.Text = crc.GetString("Res0199", "步骤");
c3.Width = 120;
ColumnHeader c4 = new ColumnHeader();
c4.Text = crc.GetString("Form1_tabc_tabP1_Text", "信息");
c4.Width = 470;
stateView.Columns.Add(c1);
stateView.Columns.Add(c2);
stateView.Columns.Add(c3);
stateView.Columns.Add(c4);
#endregion
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
} }
private void AddForm(string id, string text, UserControl form) private void AddForm(string id, string text, UserControl form)
...@@ -59,5 +92,27 @@ namespace TheMachine ...@@ -59,5 +92,27 @@ namespace TheMachine
form.Show(); form.Show();
tabControl1.TabPages.Add(lineTabPage); tabControl1.TabPages.Add(lineTabPage);
} }
void SetState(List<MoveInfo> moveInfoList)
{
if (RobotManage.mainMachine == null)
return;
this.SuspendLayout();
stateView.Items.Clear();
foreach (MoveInfo moveInfo in moveInfoList)
{
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), moveInfo.GetStateStr() });
stateView.Items.Add(lvi);
}
this.ResumeLayout(true);
}
private void timer1_Tick(object sender, EventArgs e)
{
if (Visible)
SetState(MoveInfo.List);
}
} }
} }
...@@ -117,4 +117,7 @@ ...@@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -198,11 +198,11 @@ namespace TheMachine ...@@ -198,11 +198,11 @@ namespace TheMachine
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.listView1.HideSelection = false; this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(8, 52); this.listView1.Location = new System.Drawing.Point(8, 3);
this.listView1.MultiSelect = false; this.listView1.MultiSelect = false;
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
this.listView1.ShowGroups = false; this.listView1.ShowGroups = false;
this.listView1.Size = new System.Drawing.Size(825, 364); this.listView1.Size = new System.Drawing.Size(989, 327);
this.listView1.TabIndex = 2; this.listView1.TabIndex = 2;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
// //
...@@ -220,7 +220,7 @@ namespace TheMachine ...@@ -220,7 +220,7 @@ namespace TheMachine
// btn_PauseBuzzer // btn_PauseBuzzer
// //
this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed; this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed;
this.btn_PauseBuzzer.Location = new System.Drawing.Point(547, 51); this.btn_PauseBuzzer.Location = new System.Drawing.Point(551, 51);
this.btn_PauseBuzzer.Name = "btn_PauseBuzzer"; this.btn_PauseBuzzer.Name = "btn_PauseBuzzer";
this.btn_PauseBuzzer.Size = new System.Drawing.Size(301, 40); this.btn_PauseBuzzer.Size = new System.Drawing.Size(301, 40);
this.btn_PauseBuzzer.TabIndex = 6; this.btn_PauseBuzzer.TabIndex = 6;
......
...@@ -108,27 +108,7 @@ namespace TheMachine ...@@ -108,27 +108,7 @@ namespace TheMachine
listView1.ColumnWidthChanging += listView_ColumnWidthChanging; listView1.ColumnWidthChanging += listView_ColumnWidthChanging;
#endregion #endregion
#region 状态信息listview初始化
stateView.View = View.Details;
ColumnHeader c1 = new ColumnHeader();
c1.Text = "";
c1.Width = 0;
ColumnHeader c2 = new ColumnHeader();
c2.Text = crc.GetString("Res0198","模块");
c2.Width = 120;
ColumnHeader c3 = new ColumnHeader();
c3.Text = crc.GetString("Res0199","步骤");
c3.Width = 120;
ColumnHeader c4 = new ColumnHeader();
c4.Text = crc.GetString("Form1_tabc_tabP1_Text","信息");
c4.Width = 370;
stateView.Columns.Add(c1);
stateView.Columns.Add(c2);
stateView.Columns.Add(c3);
stateView.Columns.Add(c4);
stateView.ColumnWidthChanging += listView_ColumnWidthChanging;
#endregion
LogUtil.info("开始初始化"); LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer; cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
...@@ -181,21 +161,7 @@ namespace TheMachine ...@@ -181,21 +161,7 @@ namespace TheMachine
{ {
//SetState(MoveInfo.List); //SetState(MoveInfo.List);
} }
void SetState(List<MoveInfo> moveInfoList)
{
if (RobotManage.mainMachine == null)
return;
this.SuspendLayout();
stateView.Items.Clear();
foreach (MoveInfo moveInfo in moveInfoList)
{
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(),moveInfo.GetStateStr() });
stateView.Items.Add(lvi);
}
this.ResumeLayout(true);
}
private void AddForm(string id, string text, UserControl form) private void AddForm(string id, string text, UserControl form)
{ {
foreach (TabPage tp in tabc.TabPages) foreach (TabPage tp in tabc.TabPages)
...@@ -547,9 +513,7 @@ namespace TheMachine ...@@ -547,9 +513,7 @@ namespace TheMachine
listView1.Columns[2].Text = "模块"; listView1.Columns[2].Text = "模块";
listView1.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text","信息"); listView1.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text","信息");
stateView.Columns[1].Text = crc.GetString("Res0198","模块");
stateView.Columns[2].Text = crc.GetString("Res0199","步骤");
stateView.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text","信息");
启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? crc.GetString("Res0201","启用配置模式") : crc.GetString("Res0202","停用配置模式"); 启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? crc.GetString("Res0201","启用配置模式") : crc.GetString("Res0202","停用配置模式");
......
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\PrintLabel\PrintLabel\bin\Debug\Asa.PrintLabel.dll</HintPath> <HintPath>..\..\PrintLabel\PrintLabel\bin\Debug\Asa.PrintLabel.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.RFID.PuYue, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\RFID\RFID_PuYue\bin\Debug\Asa.RFID.PuYue.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary, Version=1.0.7703.30209, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="CodeLibrary, Version=1.0.7703.30209, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath> <HintPath>..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
...@@ -150,6 +154,12 @@ ...@@ -150,6 +154,12 @@
<Compile Include="UC\DoubleBufferListView.cs"> <Compile Include="UC\DoubleBufferListView.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="UC\RfidControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\RfidControl.Designer.cs">
<DependentUpon>RfidControl.cs</DependentUpon>
</Compile>
<Compile Include="UC\StorePosControl.cs"> <Compile Include="UC\StorePosControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -218,6 +228,9 @@ ...@@ -218,6 +228,9 @@
<EmbeddedResource Include="TrayManagerControl.resx"> <EmbeddedResource Include="TrayManagerControl.resx">
<DependentUpon>TrayManagerControl.cs</DependentUpon> <DependentUpon>TrayManagerControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\RfidControl.resx">
<DependentUpon>RfidControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\StorePosControl.resx"> <EmbeddedResource Include="UC\StorePosControl.resx">
<DependentUpon>StorePosControl.cs</DependentUpon> <DependentUpon>StorePosControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -32,6 +32,7 @@ namespace TheMachine ...@@ -32,6 +32,7 @@ namespace TheMachine
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.listView1 = new TheMachine.DoubleBufferListView(); this.listView1 = new TheMachine.DoubleBufferListView();
this.label_Statistics = new System.Windows.Forms.Label();
this.SuspendLayout(); this.SuspendLayout();
// //
// timer1 // timer1
...@@ -47,20 +48,31 @@ namespace TheMachine ...@@ -47,20 +48,31 @@ namespace TheMachine
this.listView1.HideSelection = false; this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(3, 34); this.listView1.Location = new System.Drawing.Point(3, 34);
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(706, 412); this.listView1.Size = new System.Drawing.Size(683, 412);
this.listView1.TabIndex = 0; this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
// //
// label_Statistics
//
this.label_Statistics.AutoSize = true;
this.label_Statistics.Location = new System.Drawing.Point(706, 34);
this.label_Statistics.Name = "label_Statistics";
this.label_Statistics.Size = new System.Drawing.Size(49, 14);
this.label_Statistics.TabIndex = 1;
this.label_Statistics.Text = "label1";
//
// TrayManagerControl // TrayManagerControl
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label_Statistics);
this.Controls.Add(this.listView1); this.Controls.Add(this.listView1);
this.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "TrayManagerControl"; this.Name = "TrayManagerControl";
this.Size = new System.Drawing.Size(846, 449); this.Size = new System.Drawing.Size(846, 449);
this.Load += new System.EventHandler(this.TrayManagerControl_Load); this.Load += new System.EventHandler(this.TrayManagerControl_Load);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
...@@ -68,5 +80,6 @@ namespace TheMachine ...@@ -68,5 +80,6 @@ namespace TheMachine
private DoubleBufferListView listView1; private DoubleBufferListView listView1;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label label_Statistics;
} }
} }
...@@ -78,6 +78,12 @@ namespace TheMachine ...@@ -78,6 +78,12 @@ namespace TheMachine
listviewitem.SubItems.AddRange(items); listviewitem.SubItems.AddRange(items);
} }
label_Statistics.Text = "托盘统计"+":" + "\n"
+ "离线总数" + ": " + TrayManager.OfflineCount + "\n"
+ "在线总数" + ": " + TrayManager.TotalCount + "\n"
+ "空托盘" + ": " + TrayManager.EmptyCount + "\n"
+ "入库托盘" + ": " + TrayManager.InStoreCount + "\n"
+ "出库托盘" + ": " + TrayManager.OutStoreCount + "\n";
} }
} }
} }

namespace TheMachine.UC
{
partial class RfidControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox_rfid = new System.Windows.Forms.GroupBox();
this.textBox_rfidlabel = new System.Windows.Forms.TextBox();
this.button_read = new System.Windows.Forms.Button();
this.groupBox_rfid.SuspendLayout();
this.SuspendLayout();
//
// groupBox_rfid
//
this.groupBox_rfid.Controls.Add(this.button_read);
this.groupBox_rfid.Controls.Add(this.textBox_rfidlabel);
this.groupBox_rfid.Location = new System.Drawing.Point(0, 0);
this.groupBox_rfid.Name = "groupBox_rfid";
this.groupBox_rfid.Size = new System.Drawing.Size(183, 95);
this.groupBox_rfid.TabIndex = 0;
this.groupBox_rfid.TabStop = false;
this.groupBox_rfid.Text = "Rfid";
//
// textBox_rfidlabel
//
this.textBox_rfidlabel.Location = new System.Drawing.Point(6, 25);
this.textBox_rfidlabel.Name = "textBox_rfidlabel";
this.textBox_rfidlabel.Size = new System.Drawing.Size(171, 26);
this.textBox_rfidlabel.TabIndex = 0;
//
// button_read
//
this.button_read.Location = new System.Drawing.Point(6, 57);
this.button_read.Name = "button_read";
this.button_read.Size = new System.Drawing.Size(171, 25);
this.button_read.TabIndex = 1;
this.button_read.Text = "读取";
this.button_read.UseVisualStyleBackColor = true;
this.button_read.Click += new System.EventHandler(this.button_read_Click);
//
// RfidControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupBox_rfid);
this.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "RfidControl";
this.Size = new System.Drawing.Size(291, 162);
this.groupBox_rfid.ResumeLayout(false);
this.groupBox_rfid.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox_rfid;
private System.Windows.Forms.Button button_read;
private System.Windows.Forms.TextBox textBox_rfidlabel;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine.UC
{
public partial class RfidControl : UserControl
{
public RfidControl()
{
InitializeComponent();
this.Visible = false;
}
PuYueRFID_C2S rFID_C2S1;
public void Init(string name,PuYueRFID_C2S _rFID_C2S) {
rFID_C2S1 = _rFID_C2S;
groupBox_rfid.Text = name;
Visible = true;
}
private void button_read_Click(object sender, EventArgs e)
{
if (rFID_C2S1.ReadByte(0x20, 16, out byte[] data)) {
textBox_rfidlabel.Text = Encoding.ASCII.GetString(data).Trim();
} else {
textBox_rfidlabel.Text = "读取失败";
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -41,6 +41,8 @@ namespace TheMachine ...@@ -41,6 +41,8 @@ namespace TheMachine
this.cylinderButton5 = new TheMachine.CylinderButton(); this.cylinderButton5 = new TheMachine.CylinderButton();
this.cylinderButton1 = new TheMachine.CylinderButton(); this.cylinderButton1 = new TheMachine.CylinderButton();
this.ioControl1 = new TheMachine.IOControl(); this.ioControl1 = new TheMachine.IOControl();
this.rfidControl1 = new TheMachine.UC.RfidControl();
this.rfidControl2 = new TheMachine.UC.RfidControl();
this.SuspendLayout(); this.SuspendLayout();
// //
// btn_linerun // btn_linerun
...@@ -201,10 +203,30 @@ namespace TheMachine ...@@ -201,10 +203,30 @@ namespace TheMachine
this.ioControl1.TabIndex = 0; this.ioControl1.TabIndex = 0;
this.ioControl1.Tag = "not"; this.ioControl1.Tag = "not";
// //
// rfidControl1
//
this.rfidControl1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rfidControl1.Location = new System.Drawing.Point(20, 367);
this.rfidControl1.Name = "rfidControl1";
this.rfidControl1.Size = new System.Drawing.Size(207, 109);
this.rfidControl1.TabIndex = 3;
this.rfidControl1.Visible = false;
//
// rfidControl2
//
this.rfidControl2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rfidControl2.Location = new System.Drawing.Point(285, 367);
this.rfidControl2.Name = "rfidControl2";
this.rfidControl2.Size = new System.Drawing.Size(207, 109);
this.rfidControl2.TabIndex = 3;
this.rfidControl2.Visible = false;
//
// HYControl // HYControl
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.rfidControl2);
this.Controls.Add(this.rfidControl1);
this.Controls.Add(this.btn_linestop); this.Controls.Add(this.btn_linestop);
this.Controls.Add(this.btn_linerev); this.Controls.Add(this.btn_linerev);
this.Controls.Add(this.btn_linerun); this.Controls.Add(this.btn_linerun);
...@@ -238,5 +260,7 @@ namespace TheMachine ...@@ -238,5 +260,7 @@ namespace TheMachine
private System.Windows.Forms.Button btn_linerun; private System.Windows.Forms.Button btn_linerun;
private System.Windows.Forms.Button btn_linerev; private System.Windows.Forms.Button btn_linerev;
private System.Windows.Forms.Button btn_linestop; private System.Windows.Forms.Button btn_linestop;
private UC.RfidControl rfidControl1;
private UC.RfidControl rfidControl2;
} }
} }
...@@ -49,6 +49,13 @@ namespace TheMachine ...@@ -49,6 +49,13 @@ namespace TheMachine
{ {
btn_linerev.Visible = false; btn_linerev.Visible = false;
} }
if (SideMove.DeviceList[deviceGroup].RFID_2 != null)
{
rfidControl1.Init(deviceGroup+"-1", SideMove.DeviceList[deviceGroup].RFID_1);
rfidControl2.Init(deviceGroup + "-2", SideMove.DeviceList[deviceGroup].RFID_2);
}
else if (SideMove.DeviceList[deviceGroup].RFID_1 != null)
rfidControl1.Init(deviceGroup, SideMove.DeviceList[deviceGroup].RFID_1);
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
string deviceGroup; string deviceGroup;
......
...@@ -43,12 +43,13 @@ namespace TheMachine ...@@ -43,12 +43,13 @@ namespace TheMachine
this.cylinderButton1 = new TheMachine.CylinderButton(); this.cylinderButton1 = new TheMachine.CylinderButton();
this.ioControl1 = new TheMachine.IOControl(); this.ioControl1 = new TheMachine.IOControl();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.rfidControl1 = new TheMachine.UC.RfidControl();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// axisMoveControl1 // axisMoveControl1
// //
this.axisMoveControl1.Location = new System.Drawing.Point(3, 227); this.axisMoveControl1.Location = new System.Drawing.Point(3, 245);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(558, 402); this.axisMoveControl1.Size = new System.Drawing.Size(558, 402);
this.axisMoveControl1.TabIndex = 6; this.axisMoveControl1.TabIndex = 6;
...@@ -56,7 +57,7 @@ namespace TheMachine ...@@ -56,7 +57,7 @@ namespace TheMachine
// //
// button_save // button_save
// //
this.button_save.Location = new System.Drawing.Point(758, 571); this.button_save.Location = new System.Drawing.Point(758, 589);
this.button_save.Name = "button_save"; this.button_save.Name = "button_save";
this.button_save.Size = new System.Drawing.Size(100, 23); this.button_save.Size = new System.Drawing.Size(100, 23);
this.button_save.TabIndex = 7; this.button_save.TabIndex = 7;
...@@ -66,21 +67,21 @@ namespace TheMachine ...@@ -66,21 +67,21 @@ namespace TheMachine
// //
// textBox_p2 // textBox_p2
// //
this.textBox_p2.Location = new System.Drawing.Point(761, 492); this.textBox_p2.Location = new System.Drawing.Point(761, 510);
this.textBox_p2.Name = "textBox_p2"; this.textBox_p2.Name = "textBox_p2";
this.textBox_p2.Size = new System.Drawing.Size(100, 21); this.textBox_p2.Size = new System.Drawing.Size(100, 21);
this.textBox_p2.TabIndex = 8; this.textBox_p2.TabIndex = 8;
// //
// textBox_p3 // textBox_p3
// //
this.textBox_p3.Location = new System.Drawing.Point(758, 535); this.textBox_p3.Location = new System.Drawing.Point(758, 553);
this.textBox_p3.Name = "textBox_p3"; this.textBox_p3.Name = "textBox_p3";
this.textBox_p3.Size = new System.Drawing.Size(100, 21); this.textBox_p3.Size = new System.Drawing.Size(100, 21);
this.textBox_p3.TabIndex = 8; this.textBox_p3.TabIndex = 8;
// //
// button_p2 // button_p2
// //
this.button_p2.Location = new System.Drawing.Point(584, 490); this.button_p2.Location = new System.Drawing.Point(584, 508);
this.button_p2.Name = "button_p2"; this.button_p2.Name = "button_p2";
this.button_p2.Size = new System.Drawing.Size(162, 23); this.button_p2.Size = new System.Drawing.Size(162, 23);
this.button_p2.TabIndex = 9; this.button_p2.TabIndex = 9;
...@@ -90,7 +91,7 @@ namespace TheMachine ...@@ -90,7 +91,7 @@ namespace TheMachine
// //
// button_p3 // button_p3
// //
this.button_p3.Location = new System.Drawing.Point(581, 533); this.button_p3.Location = new System.Drawing.Point(581, 551);
this.button_p3.Name = "button_p3"; this.button_p3.Name = "button_p3";
this.button_p3.Size = new System.Drawing.Size(162, 23); this.button_p3.Size = new System.Drawing.Size(162, 23);
this.button_p3.TabIndex = 9; this.button_p3.TabIndex = 9;
...@@ -100,7 +101,7 @@ namespace TheMachine ...@@ -100,7 +101,7 @@ namespace TheMachine
// //
// button_p1 // button_p1
// //
this.button_p1.Location = new System.Drawing.Point(584, 461); this.button_p1.Location = new System.Drawing.Point(584, 479);
this.button_p1.Name = "button_p1"; this.button_p1.Name = "button_p1";
this.button_p1.Size = new System.Drawing.Size(162, 23); this.button_p1.Size = new System.Drawing.Size(162, 23);
this.button_p1.TabIndex = 9; this.button_p1.TabIndex = 9;
...@@ -115,7 +116,7 @@ namespace TheMachine ...@@ -115,7 +116,7 @@ namespace TheMachine
this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton8.IO_HIGH = "AMH_Front_Stop"; this.cylinderButton8.IO_HIGH = "AMH_Front_Stop";
this.cylinderButton8.IO_LOW = ""; this.cylinderButton8.IO_LOW = "";
this.cylinderButton8.Location = new System.Drawing.Point(618, 360); this.cylinderButton8.Location = new System.Drawing.Point(618, 378);
this.cylinderButton8.Name = "cylinderButton8"; this.cylinderButton8.Name = "cylinderButton8";
this.cylinderButton8.Size = new System.Drawing.Size(181, 38); this.cylinderButton8.Size = new System.Drawing.Size(181, 38);
this.cylinderButton8.TabIndex = 2; this.cylinderButton8.TabIndex = 2;
...@@ -130,7 +131,7 @@ namespace TheMachine ...@@ -130,7 +131,7 @@ namespace TheMachine
this.cylinderButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton2.IO_HIGH = "AMH_Tray_Stop"; this.cylinderButton2.IO_HIGH = "AMH_Tray_Stop";
this.cylinderButton2.IO_LOW = ""; this.cylinderButton2.IO_LOW = "";
this.cylinderButton2.Location = new System.Drawing.Point(618, 404); this.cylinderButton2.Location = new System.Drawing.Point(618, 422);
this.cylinderButton2.Name = "cylinderButton2"; this.cylinderButton2.Name = "cylinderButton2";
this.cylinderButton2.Size = new System.Drawing.Size(181, 38); this.cylinderButton2.Size = new System.Drawing.Size(181, 38);
this.cylinderButton2.TabIndex = 3; this.cylinderButton2.TabIndex = 3;
...@@ -145,7 +146,7 @@ namespace TheMachine ...@@ -145,7 +146,7 @@ namespace TheMachine
this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton7.IO_HIGH = "AMH_Sucker"; this.cylinderButton7.IO_HIGH = "AMH_Sucker";
this.cylinderButton7.IO_LOW = ""; this.cylinderButton7.IO_LOW = "";
this.cylinderButton7.Location = new System.Drawing.Point(618, 319); this.cylinderButton7.Location = new System.Drawing.Point(618, 337);
this.cylinderButton7.Name = "cylinderButton7"; this.cylinderButton7.Name = "cylinderButton7";
this.cylinderButton7.Size = new System.Drawing.Size(181, 38); this.cylinderButton7.Size = new System.Drawing.Size(181, 38);
this.cylinderButton7.TabIndex = 3; this.cylinderButton7.TabIndex = 3;
...@@ -160,7 +161,7 @@ namespace TheMachine ...@@ -160,7 +161,7 @@ namespace TheMachine
this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton6.IO_HIGH = "AMH_Trans_Fwd"; this.cylinderButton6.IO_HIGH = "AMH_Trans_Fwd";
this.cylinderButton6.IO_LOW = "AMH_Trans_Bwd"; this.cylinderButton6.IO_LOW = "AMH_Trans_Bwd";
this.cylinderButton6.Location = new System.Drawing.Point(618, 275); this.cylinderButton6.Location = new System.Drawing.Point(618, 293);
this.cylinderButton6.Name = "cylinderButton6"; this.cylinderButton6.Name = "cylinderButton6";
this.cylinderButton6.Size = new System.Drawing.Size(181, 38); this.cylinderButton6.Size = new System.Drawing.Size(181, 38);
this.cylinderButton6.TabIndex = 4; this.cylinderButton6.TabIndex = 4;
...@@ -175,7 +176,7 @@ namespace TheMachine ...@@ -175,7 +176,7 @@ namespace TheMachine
this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton1.IO_HIGH = "AMH_Location_Up"; this.cylinderButton1.IO_HIGH = "AMH_Location_Up";
this.cylinderButton1.IO_LOW = "AMH_Location_Down"; this.cylinderButton1.IO_LOW = "AMH_Location_Down";
this.cylinderButton1.Location = new System.Drawing.Point(618, 231); this.cylinderButton1.Location = new System.Drawing.Point(618, 249);
this.cylinderButton1.Name = "cylinderButton1"; this.cylinderButton1.Name = "cylinderButton1";
this.cylinderButton1.Size = new System.Drawing.Size(181, 38); this.cylinderButton1.Size = new System.Drawing.Size(181, 38);
this.cylinderButton1.TabIndex = 5; this.cylinderButton1.TabIndex = 5;
...@@ -187,13 +188,14 @@ namespace TheMachine ...@@ -187,13 +188,14 @@ namespace TheMachine
// //
this.ioControl1.Location = new System.Drawing.Point(3, -1); this.ioControl1.Location = new System.Drawing.Point(3, -1);
this.ioControl1.Name = "ioControl1"; this.ioControl1.Name = "ioControl1";
this.ioControl1.Size = new System.Drawing.Size(936, 228); this.ioControl1.Size = new System.Drawing.Size(936, 240);
this.ioControl1.TabIndex = 1; this.ioControl1.TabIndex = 1;
this.ioControl1.Tag = "not"; this.ioControl1.Tag = "not";
// //
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.rfidControl1);
this.panel1.Controls.Add(this.button_p3); this.panel1.Controls.Add(this.button_p3);
this.panel1.Controls.Add(this.ioControl1); this.panel1.Controls.Add(this.ioControl1);
this.panel1.Controls.Add(this.button_p1); this.panel1.Controls.Add(this.button_p1);
...@@ -210,16 +212,25 @@ namespace TheMachine ...@@ -210,16 +212,25 @@ namespace TheMachine
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1021, 621); this.panel1.Size = new System.Drawing.Size(1021, 741);
this.panel1.TabIndex = 10; this.panel1.TabIndex = 10;
// //
// rfidControl1
//
this.rfidControl1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rfidControl1.Location = new System.Drawing.Point(547, 129);
this.rfidControl1.Name = "rfidControl1";
this.rfidControl1.Size = new System.Drawing.Size(196, 99);
this.rfidControl1.TabIndex = 10;
this.rfidControl1.Visible = false;
//
// TransplantControl // TransplantControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "TransplantControl"; this.Name = "TransplantControl";
this.Size = new System.Drawing.Size(1021, 621); this.Size = new System.Drawing.Size(1021, 741);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
...@@ -242,5 +253,6 @@ namespace TheMachine ...@@ -242,5 +253,6 @@ namespace TheMachine
private System.Windows.Forms.Button button_p3; private System.Windows.Forms.Button button_p3;
private System.Windows.Forms.Button button_p1; private System.Windows.Forms.Button button_p1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private UC.RfidControl rfidControl1;
} }
} }
...@@ -43,6 +43,9 @@ namespace TheMachine ...@@ -43,6 +43,9 @@ namespace TheMachine
axisMoveControl1.LoadData(AxisBean.List[deviceGroupName]); axisMoveControl1.LoadData(AxisBean.List[deviceGroupName]);
textBox_p2.Text = RobotManage.DeviceGroup[DeviceGroupName].p2.ToString(); textBox_p2.Text = RobotManage.DeviceGroup[DeviceGroupName].p2.ToString();
textBox_p3.Text = RobotManage.DeviceGroup[DeviceGroupName].p3.ToString(); textBox_p3.Text = RobotManage.DeviceGroup[DeviceGroupName].p3.ToString();
if (TransplantMove.DeviceList[deviceGroupName].RFID_1 != null)
rfidControl1.Init(deviceGroupName, TransplantMove.DeviceList[deviceGroupName].RFID_1);
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
string DeviceGroupName = "root"; string DeviceGroupName = "root";
......
...@@ -40,6 +40,7 @@ namespace TheMachine ...@@ -40,6 +40,7 @@ namespace TheMachine
this.button_p3 = new System.Windows.Forms.Button(); this.button_p3 = new System.Windows.Forms.Button();
this.button_p1 = new System.Windows.Forms.Button(); this.button_p1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.rfidControl1 = new TheMachine.UC.RfidControl();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -50,7 +51,7 @@ namespace TheMachine ...@@ -50,7 +51,7 @@ namespace TheMachine
this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton8.IO_HIGH = "MI_Robot_Light"; this.cylinderButton8.IO_HIGH = "MI_Robot_Light";
this.cylinderButton8.IO_LOW = ""; this.cylinderButton8.IO_LOW = "";
this.cylinderButton8.Location = new System.Drawing.Point(624, 375); this.cylinderButton8.Location = new System.Drawing.Point(624, 401);
this.cylinderButton8.Name = "cylinderButton8"; this.cylinderButton8.Name = "cylinderButton8";
this.cylinderButton8.Size = new System.Drawing.Size(181, 38); this.cylinderButton8.Size = new System.Drawing.Size(181, 38);
this.cylinderButton8.TabIndex = 2; this.cylinderButton8.TabIndex = 2;
...@@ -65,7 +66,7 @@ namespace TheMachine ...@@ -65,7 +66,7 @@ namespace TheMachine
this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton7.IO_HIGH = "AMH_Tray_Stop"; this.cylinderButton7.IO_HIGH = "AMH_Tray_Stop";
this.cylinderButton7.IO_LOW = ""; this.cylinderButton7.IO_LOW = "";
this.cylinderButton7.Location = new System.Drawing.Point(624, 334); this.cylinderButton7.Location = new System.Drawing.Point(624, 360);
this.cylinderButton7.Name = "cylinderButton7"; this.cylinderButton7.Name = "cylinderButton7";
this.cylinderButton7.Size = new System.Drawing.Size(181, 38); this.cylinderButton7.Size = new System.Drawing.Size(181, 38);
this.cylinderButton7.TabIndex = 3; this.cylinderButton7.TabIndex = 3;
...@@ -80,7 +81,7 @@ namespace TheMachine ...@@ -80,7 +81,7 @@ namespace TheMachine
this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton6.IO_HIGH = "AMH_Front_Stop"; this.cylinderButton6.IO_HIGH = "AMH_Front_Stop";
this.cylinderButton6.IO_LOW = ""; this.cylinderButton6.IO_LOW = "";
this.cylinderButton6.Location = new System.Drawing.Point(624, 290); this.cylinderButton6.Location = new System.Drawing.Point(624, 316);
this.cylinderButton6.Name = "cylinderButton6"; this.cylinderButton6.Name = "cylinderButton6";
this.cylinderButton6.Size = new System.Drawing.Size(181, 38); this.cylinderButton6.Size = new System.Drawing.Size(181, 38);
this.cylinderButton6.TabIndex = 4; this.cylinderButton6.TabIndex = 4;
...@@ -95,7 +96,7 @@ namespace TheMachine ...@@ -95,7 +96,7 @@ namespace TheMachine
this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton1.IO_HIGH = "MI_Location_Up"; this.cylinderButton1.IO_HIGH = "MI_Location_Up";
this.cylinderButton1.IO_LOW = "MI_Location_Down"; this.cylinderButton1.IO_LOW = "MI_Location_Down";
this.cylinderButton1.Location = new System.Drawing.Point(624, 246); this.cylinderButton1.Location = new System.Drawing.Point(624, 272);
this.cylinderButton1.Name = "cylinderButton1"; this.cylinderButton1.Name = "cylinderButton1";
this.cylinderButton1.Size = new System.Drawing.Size(181, 38); this.cylinderButton1.Size = new System.Drawing.Size(181, 38);
this.cylinderButton1.TabIndex = 5; this.cylinderButton1.TabIndex = 5;
...@@ -107,13 +108,13 @@ namespace TheMachine ...@@ -107,13 +108,13 @@ namespace TheMachine
// //
this.ioControl1.Location = new System.Drawing.Point(3, 3); this.ioControl1.Location = new System.Drawing.Point(3, 3);
this.ioControl1.Name = "ioControl1"; this.ioControl1.Name = "ioControl1";
this.ioControl1.Size = new System.Drawing.Size(936, 213); this.ioControl1.Size = new System.Drawing.Size(936, 239);
this.ioControl1.TabIndex = 1; this.ioControl1.TabIndex = 1;
this.ioControl1.Tag = "not"; this.ioControl1.Tag = "not";
// //
// axisMoveControl1 // axisMoveControl1
// //
this.axisMoveControl1.Location = new System.Drawing.Point(3, 222); this.axisMoveControl1.Location = new System.Drawing.Point(3, 248);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(558, 402); this.axisMoveControl1.Size = new System.Drawing.Size(558, 402);
this.axisMoveControl1.TabIndex = 6; this.axisMoveControl1.TabIndex = 6;
...@@ -121,7 +122,7 @@ namespace TheMachine ...@@ -121,7 +122,7 @@ namespace TheMachine
// //
// button_save // button_save
// //
this.button_save.Location = new System.Drawing.Point(767, 543); this.button_save.Location = new System.Drawing.Point(767, 569);
this.button_save.Name = "button_save"; this.button_save.Name = "button_save";
this.button_save.Size = new System.Drawing.Size(100, 23); this.button_save.Size = new System.Drawing.Size(100, 23);
this.button_save.TabIndex = 7; this.button_save.TabIndex = 7;
...@@ -131,14 +132,14 @@ namespace TheMachine ...@@ -131,14 +132,14 @@ namespace TheMachine
// //
// textBox_p3 // textBox_p3
// //
this.textBox_p3.Location = new System.Drawing.Point(767, 507); this.textBox_p3.Location = new System.Drawing.Point(767, 533);
this.textBox_p3.Name = "textBox_p3"; this.textBox_p3.Name = "textBox_p3";
this.textBox_p3.Size = new System.Drawing.Size(100, 21); this.textBox_p3.Size = new System.Drawing.Size(100, 21);
this.textBox_p3.TabIndex = 8; this.textBox_p3.TabIndex = 8;
// //
// button_p3 // button_p3
// //
this.button_p3.Location = new System.Drawing.Point(590, 505); this.button_p3.Location = new System.Drawing.Point(590, 531);
this.button_p3.Name = "button_p3"; this.button_p3.Name = "button_p3";
this.button_p3.Size = new System.Drawing.Size(162, 23); this.button_p3.Size = new System.Drawing.Size(162, 23);
this.button_p3.TabIndex = 9; this.button_p3.TabIndex = 9;
...@@ -148,7 +149,7 @@ namespace TheMachine ...@@ -148,7 +149,7 @@ namespace TheMachine
// //
// button_p1 // button_p1
// //
this.button_p1.Location = new System.Drawing.Point(590, 476); this.button_p1.Location = new System.Drawing.Point(590, 502);
this.button_p1.Name = "button_p1"; this.button_p1.Name = "button_p1";
this.button_p1.Size = new System.Drawing.Size(162, 23); this.button_p1.Size = new System.Drawing.Size(162, 23);
this.button_p1.TabIndex = 9; this.button_p1.TabIndex = 9;
...@@ -159,6 +160,7 @@ namespace TheMachine ...@@ -159,6 +160,7 @@ namespace TheMachine
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.rfidControl1);
this.panel1.Controls.Add(this.button_p3); this.panel1.Controls.Add(this.button_p3);
this.panel1.Controls.Add(this.ioControl1); this.panel1.Controls.Add(this.ioControl1);
this.panel1.Controls.Add(this.button_p1); this.panel1.Controls.Add(this.button_p1);
...@@ -175,6 +177,15 @@ namespace TheMachine ...@@ -175,6 +177,15 @@ namespace TheMachine
this.panel1.Size = new System.Drawing.Size(1020, 621); this.panel1.Size = new System.Drawing.Size(1020, 621);
this.panel1.TabIndex = 10; this.panel1.TabIndex = 10;
// //
// rfidControl1
//
this.rfidControl1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rfidControl1.Location = new System.Drawing.Point(544, 137);
this.rfidControl1.Name = "rfidControl1";
this.rfidControl1.Size = new System.Drawing.Size(208, 105);
this.rfidControl1.TabIndex = 10;
this.rfidControl1.Visible = false;
//
// TrayStopControl // TrayStopControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -201,5 +212,6 @@ namespace TheMachine ...@@ -201,5 +212,6 @@ namespace TheMachine
private System.Windows.Forms.Button button_p3; private System.Windows.Forms.Button button_p3;
private System.Windows.Forms.Button button_p1; private System.Windows.Forms.Button button_p1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private UC.RfidControl rfidControl1;
} }
} }
...@@ -41,6 +41,10 @@ namespace TheMachine ...@@ -41,6 +41,10 @@ namespace TheMachine
var axis = RobotManage.Config.moveAxisList.Find(ma => ma.GetAxisValue() == RobotManage.DeviceGroup[deviceGroupName].AxisID); var axis = RobotManage.Config.moveAxisList.Find(ma => ma.GetAxisValue() == RobotManage.DeviceGroup[deviceGroupName].AxisID);
if (axis != null) if (axis != null)
axisMoveControl1.LoadData(AxisBean.List[deviceGroupName]); axisMoveControl1.LoadData(AxisBean.List[deviceGroupName]);
if (TrayStop.DeviceList[deviceGroupName].RFID_1 != null)
rfidControl1.Init(deviceGroupName, TrayStop.DeviceList[deviceGroupName].RFID_1);
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!