Commit 0ca7cebf LN

agv修改

1 个父辈 3c4a37e1
...@@ -280,13 +280,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -280,13 +280,13 @@ namespace OnlineStore.DeviceLibrary
//如果入口无料架即可进入 //如果入口无料架即可进入
if (IOManager.IOValue(IO_Type.OutL_InCheck).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.OutL_InCheck).Equals(IO_VALUE.LOW))
{ {
AgvClient.NeedEnter(Config.InL_AgvName, ""); AgvClient.NeedEnter(Config.OutL_AgvName, "");
}else }else
{ {
AgvClient.ConnotEnter(Config.InL_AgvName, ""); AgvClient.ConnotEnter(Config.OutL_AgvName, "");
} }
} }
private DateTime il_lastCallAgvTime = DateTime.Now; private DateTime il_lastCallAgvTime = DateTime.Now.AddMinutes(-5);
private Stopwatch il_outstopCheckWarch = new Stopwatch(); private Stopwatch il_outstopCheckWarch = new Stopwatch();
/// <summary> /// <summary>
/// 入料线体定时处理 /// 入料线体定时处理
......
...@@ -52,20 +52,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -52,20 +52,14 @@ namespace OnlineStore.DeviceLibrary
} }
} }
//private static void AgvClient_GetRFID(string name, byte[] content)
//{
// RFIDData data = new RFIDData(content);
// LogUtil.info("收到 AgvClient_GetRFID [" + name + "] [" + data.ToData() + "] ");
//}
public static void SetStatus(string id, string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low) public static void SetStatus(string id, string shelfId = "", ClientAction action = ClientAction.None, ClientLevel level = ClientLevel.Low)
{ {
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
//相同状态就设置一次 ////相同状态就设置一次
if (currA.Equals(action)) //if (currA.Equals(action))
{ //{
return; // return;
} //}
agvClient.SetStatus(id, "",shelfId, action, level); agvClient.SetStatus(id, "",shelfId, action, level);
UpdateAction(id, action); UpdateAction(id, action);
} }
...@@ -128,7 +122,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
public static bool ConnotEnter(string id,string shelfId) public static bool ConnotEnter(string id,string shelfId)
{ {
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter)) if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{ {
SetStatus(id, shelfId, ClientAction.None); SetStatus(id, shelfId, ClientAction.None);
return true; return true;
...@@ -138,7 +132,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
public static bool NeedEnter(string id, string shelfId) public static bool NeedEnter(string id, string shelfId)
{ {
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter)) if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{ {
SetStatus(id, shelfId, ClientAction.NeedEnter); SetStatus(id, shelfId, ClientAction.NeedEnter);
return true; return true;
...@@ -149,7 +143,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -149,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
{ {
ClientAction currA = GetAction(id); ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter)) if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{ {
SetStatus(id, shelfId, ClientAction.NeedLeave); SetStatus(id, shelfId, ClientAction.NeedLeave);
return true; return true;
......
...@@ -34,7 +34,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -34,7 +34,7 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("IO_DOLength")] [ConfigProAttribute("IO_DOLength")]
public string IO_DOLength { get; set; } public string IO_DOLength { get; set; }
/// <summary> /// <summary>
/// PRO,出空料架流水线AGV节点名称,OutL_AgvName,A1,,,,,,, /// PRO,出空料架流水线AGV节点名称,OutL_AgvName,A2,,,,,,,
/// </summary> /// </summary>
[ConfigProAttribute("OutL_AgvName" )] [ConfigProAttribute("OutL_AgvName" )]
public string OutL_AgvName { get; set; } public string OutL_AgvName { get; set; }
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
this.btnNeedLeave = new System.Windows.Forms.Button(); this.btnNeedLeave = new System.Windows.Forms.Button();
this.btnDis = new System.Windows.Forms.Button(); this.btnDis = new System.Windows.Forms.Button();
this.btnInit = new System.Windows.Forms.Button(); this.btnInit = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
...@@ -489,6 +490,7 @@ ...@@ -489,6 +490,7 @@
// //
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.button1);
this.groupBox5.Controls.Add(this.txtShelfId); this.groupBox5.Controls.Add(this.txtShelfId);
this.groupBox5.Controls.Add(this.txtname); this.groupBox5.Controls.Add(this.txtname);
this.groupBox5.Controls.Add(this.btnNeedEntry); this.groupBox5.Controls.Add(this.btnNeedEntry);
...@@ -505,7 +507,7 @@ ...@@ -505,7 +507,7 @@
// txtShelfId // txtShelfId
// //
this.txtShelfId.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtShelfId.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtShelfId.Location = new System.Drawing.Point(354, 31); this.txtShelfId.Location = new System.Drawing.Point(300, 31);
this.txtShelfId.MaxLength = 4; this.txtShelfId.MaxLength = 4;
this.txtShelfId.Name = "txtShelfId"; this.txtShelfId.Name = "txtShelfId";
this.txtShelfId.Size = new System.Drawing.Size(53, 26); this.txtShelfId.Size = new System.Drawing.Size(53, 26);
...@@ -515,7 +517,7 @@ ...@@ -515,7 +517,7 @@
// txtname // txtname
// //
this.txtname.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtname.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtname.Location = new System.Drawing.Point(299, 31); this.txtname.Location = new System.Drawing.Point(239, 31);
this.txtname.MaxLength = 4; this.txtname.MaxLength = 4;
this.txtname.Name = "txtname"; this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(53, 26); this.txtname.Size = new System.Drawing.Size(53, 26);
...@@ -525,9 +527,9 @@ ...@@ -525,9 +527,9 @@
// btnNeedEntry // btnNeedEntry
// //
this.btnNeedEntry.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnNeedEntry.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNeedEntry.Location = new System.Drawing.Point(548, 24); this.btnNeedEntry.Location = new System.Drawing.Point(469, 24);
this.btnNeedEntry.Name = "btnNeedEntry"; this.btnNeedEntry.Name = "btnNeedEntry";
this.btnNeedEntry.Size = new System.Drawing.Size(132, 39); this.btnNeedEntry.Size = new System.Drawing.Size(100, 39);
this.btnNeedEntry.TabIndex = 4; this.btnNeedEntry.TabIndex = 4;
this.btnNeedEntry.Text = "NeedEntry"; this.btnNeedEntry.Text = "NeedEntry";
this.btnNeedEntry.UseVisualStyleBackColor = true; this.btnNeedEntry.UseVisualStyleBackColor = true;
...@@ -536,9 +538,9 @@ ...@@ -536,9 +538,9 @@
// btnNeedLeave // btnNeedLeave
// //
this.btnNeedLeave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnNeedLeave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNeedLeave.Location = new System.Drawing.Point(410, 24); this.btnNeedLeave.Location = new System.Drawing.Point(361, 24);
this.btnNeedLeave.Name = "btnNeedLeave"; this.btnNeedLeave.Name = "btnNeedLeave";
this.btnNeedLeave.Size = new System.Drawing.Size(132, 39); this.btnNeedLeave.Size = new System.Drawing.Size(100, 39);
this.btnNeedLeave.TabIndex = 3; this.btnNeedLeave.TabIndex = 3;
this.btnNeedLeave.Text = "NeedLeave"; this.btnNeedLeave.Text = "NeedLeave";
this.btnNeedLeave.UseVisualStyleBackColor = true; this.btnNeedLeave.UseVisualStyleBackColor = true;
...@@ -547,9 +549,9 @@ ...@@ -547,9 +549,9 @@
// btnDis // btnDis
// //
this.btnDis.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnDis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDis.Location = new System.Drawing.Point(161, 24); this.btnDis.Location = new System.Drawing.Point(131, 24);
this.btnDis.Name = "btnDis"; this.btnDis.Name = "btnDis";
this.btnDis.Size = new System.Drawing.Size(132, 39); this.btnDis.Size = new System.Drawing.Size(100, 39);
this.btnDis.TabIndex = 2; this.btnDis.TabIndex = 2;
this.btnDis.Text = "断开"; this.btnDis.Text = "断开";
this.btnDis.UseVisualStyleBackColor = true; this.btnDis.UseVisualStyleBackColor = true;
...@@ -560,12 +562,22 @@ ...@@ -560,12 +562,22 @@
this.btnInit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInit.Location = new System.Drawing.Point(23, 24); this.btnInit.Location = new System.Drawing.Point(23, 24);
this.btnInit.Name = "btnInit"; this.btnInit.Name = "btnInit";
this.btnInit.Size = new System.Drawing.Size(132, 39); this.btnInit.Size = new System.Drawing.Size(100, 39);
this.btnInit.TabIndex = 1; this.btnInit.TabIndex = 1;
this.btnInit.Text = "连接"; this.btnInit.Text = "连接";
this.btnInit.UseVisualStyleBackColor = true; this.btnInit.UseVisualStyleBackColor = true;
this.btnInit.Click += new System.EventHandler(this.btnInit_Click); this.btnInit.Click += new System.EventHandler(this.btnInit_Click);
// //
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(577, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(100, 39);
this.button1.TabIndex = 7;
this.button1.Text = "NeedEntry";
this.button1.UseVisualStyleBackColor = true;
//
// FrmVMIClient // FrmVMIClient
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
...@@ -644,6 +656,7 @@ ...@@ -644,6 +656,7 @@
private System.Windows.Forms.ComboBox cmbStopList; private System.Windows.Forms.ComboBox cmbStopList;
private System.Windows.Forms.TextBox txtname; private System.Windows.Forms.TextBox txtname;
private System.Windows.Forms.TextBox txtShelfId; private System.Windows.Forms.TextBox txtShelfId;
private System.Windows.Forms.Button button1;
} }
} }
...@@ -367,12 +367,14 @@ namespace OnlineStore.VMILineClient ...@@ -367,12 +367,14 @@ namespace OnlineStore.VMILineClient
string agvName = "C2"; string agvName = "C2";
private void btnNeedLeave_Click(object sender, EventArgs e) private void btnNeedLeave_Click(object sender, EventArgs e)
{ {
AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedLeave); AgvClient.NeedLeave(txtname.Text, txtShelfId.Text);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedLeave);
} }
private void btnNeedEntry_Click(object sender, EventArgs e) private void btnNeedEntry_Click(object sender, EventArgs e)
{ {
AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedEnter); AgvClient.NeedEnter(txtname.Text, txtShelfId.Text);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedEnter);
} }
private void btnInit_Click(object sender, EventArgs e) private void btnInit_Click(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!