Commit c7f834f6 LN

增加agv的cancelState的修改功能。

1 个父辈 646d3dfa
......@@ -70,6 +70,7 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.chbAGV = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox4.SuspendLayout();
......@@ -97,6 +98,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.chbAGV);
this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.chbDoorCanMove);
......@@ -170,7 +172,7 @@
//
this.chbDoorCanMove.AutoSize = true;
this.chbDoorCanMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDoorCanMove.Location = new System.Drawing.Point(36, 461);
this.chbDoorCanMove.Location = new System.Drawing.Point(36, 434);
this.chbDoorCanMove.Name = "chbDoorCanMove";
this.chbDoorCanMove.Size = new System.Drawing.Size(126, 24);
this.chbDoorCanMove.TabIndex = 197;
......@@ -182,7 +184,7 @@
//
this.chbAutoShelfInstore.AutoSize = true;
this.chbAutoShelfInstore.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoShelfInstore.Location = new System.Drawing.Point(36, 411);
this.chbAutoShelfInstore.Location = new System.Drawing.Point(36, 393);
this.chbAutoShelfInstore.Name = "chbAutoShelfInstore";
this.chbAutoShelfInstore.Size = new System.Drawing.Size(154, 24);
this.chbAutoShelfInstore.TabIndex = 196;
......@@ -194,7 +196,7 @@
//
this.chbUseBuzzer.AutoSize = true;
this.chbUseBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseBuzzer.Location = new System.Drawing.Point(36, 361);
this.chbUseBuzzer.Location = new System.Drawing.Point(36, 352);
this.chbUseBuzzer.Name = "chbUseBuzzer";
this.chbUseBuzzer.Size = new System.Drawing.Size(98, 24);
this.chbUseBuzzer.TabIndex = 195;
......@@ -460,6 +462,20 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// chbAGV
//
this.chbAGV.AutoSize = true;
this.chbAGV.Checked = true;
this.chbAGV.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAGV.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAGV.Location = new System.Drawing.Point(36, 470);
this.chbAGV.Name = "chbAGV";
this.chbAGV.Size = new System.Drawing.Size(138, 24);
this.chbAGV.TabIndex = 200;
this.chbAGV.Text = "AGV cancelState";
this.chbAGV.UseVisualStyleBackColor = true;
this.chbAGV.CheckedChanged += new System.EventHandler(this.chbAGV_CheckedChanged);
//
// FrmStore
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -534,6 +550,7 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.CheckBox chbAGV;
}
}
......@@ -387,6 +387,10 @@ namespace OnlineStore.ACPackingStore
msg += box.Name+":"+s+ "\r" ;
}
}
if (!chbAGV.Checked.Equals(AgvClient.CurrCancelState))
{
chbAGV.Checked = AgvClient.CurrCancelState;
}
lblWarnMsg.Text = msg;
LogM();
}
......@@ -597,5 +601,20 @@ namespace OnlineStore.ACPackingStore
LogUtil.info("去掉:启用入料口移门");
}
}
private void chbAGV_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (chbAGV.Checked.Equals(AgvClient.CurrCancelState))
{
return;
}
bool result = chbAGV.Checked;
AgvClient.SetCancelState(result);
LogUtil.info("勾选:AgvClient.SetCancelState =" + result);
}
}
}
......@@ -74,7 +74,8 @@ agv客户端启动时需要设置状态为none。
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
20200224
增加agv的cancelState的修改功能。
......
......@@ -140,10 +140,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "开始启动,连接agv调度,连接rfid,启动时间:" + StartTime.ToString());
storeRunStatus = StoreRunStatus.HomeMoving;
StartTime = DateTime.Now;
AgvClient.SetCancelState(false);
//if (!AgvClient.ISConnected())
//{
//}
//AgvClient.SetCancelState(false);
RFIDManager.Open(rfidList.ToArray());
mainTimer.Enabled = false;
......
......@@ -12,6 +12,7 @@ namespace OnlineStore.DeviceLibrary
{
public class AgvClient
{
public static bool CurrCancelState = true;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp);
private static Asa.Client2 agvClient;
......@@ -67,9 +68,9 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public static void SetCancelState(bool isCancel)
{
CurrCancelState = isCancel;
agvClient.CancelState = isCancel;
}
public static Dictionary<string, DateTime> closeDoorTimeMap = new Dictionary<string, DateTime>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!