Commit 66887678 LN

增加调试切换功能

1 个父辈 203ba6e5
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<add key="HumitureControllerType" value="0"/> <add key="HumitureControllerType" value="0"/>
<add key="UseAIOBOX" value="1"/> <add key="UseAIOBOX" value="1"/>
<!--流水线地址和端口配置--> <!--流水线地址和端口配置-->
<add key ="LineServerIp" value ="192.168.1.110"/> <add key ="LineServerIp" value ="192.168.1.113"/>
<add key ="LineServerPort" value ="5246"/> <add key ="LineServerPort" value ="5246"/>
<!--是否调试状态--> <!--是否调试状态-->
<add key ="IsInDebug" value ="1"/> <add key ="IsInDebug" value ="1"/>
......
...@@ -794,9 +794,9 @@ ...@@ -794,9 +794,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 9); this.richTextBox1.Location = new System.Drawing.Point(7, 92);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 536); this.richTextBox1.Size = new System.Drawing.Size(545, 453);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
...@@ -2048,6 +2048,7 @@ ...@@ -2048,6 +2048,7 @@
// //
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.btnClearLog); this.tabPage3.Controls.Add(this.btnClearLog);
this.tabPage3.Controls.Add(this.btnCloseDoor); this.tabPage3.Controls.Add(this.btnCloseDoor);
this.tabPage3.Controls.Add(this.btnOpenDoor); this.tabPage3.Controls.Add(this.btnOpenDoor);
...@@ -2097,7 +2098,6 @@ ...@@ -2097,7 +2098,6 @@
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupBox2);
this.tabPage2.Controls.Add(this.groupBox7); this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
...@@ -2112,16 +2112,16 @@ ...@@ -2112,16 +2112,16 @@
this.groupBox2.Controls.Add(this.button6); this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3); this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5); this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(11, 179); this.groupBox2.Location = new System.Drawing.Point(7, 8);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(534, 104); this.groupBox2.Size = new System.Drawing.Size(545, 78);
this.groupBox2.TabIndex = 276; this.groupBox2.TabIndex = 276;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "流水线通信测试"; this.groupBox2.Text = "流水线通信测试";
// //
// button6 // button6
// //
this.button6.Location = new System.Drawing.Point(317, 43); this.button6.Location = new System.Drawing.Point(317, 32);
this.button6.Name = "button6"; this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(100, 33); this.button6.Size = new System.Drawing.Size(100, 33);
this.button6.TabIndex = 275; this.button6.TabIndex = 275;
...@@ -2131,7 +2131,7 @@ ...@@ -2131,7 +2131,7 @@
// //
// button3 // button3
// //
this.button3.Location = new System.Drawing.Point(64, 42); this.button3.Location = new System.Drawing.Point(64, 31);
this.button3.Name = "button3"; this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(100, 33); this.button3.Size = new System.Drawing.Size(100, 33);
this.button3.TabIndex = 273; this.button3.TabIndex = 273;
...@@ -2141,7 +2141,7 @@ ...@@ -2141,7 +2141,7 @@
// //
// button5 // button5
// //
this.button5.Location = new System.Drawing.Point(193, 43); this.button5.Location = new System.Drawing.Point(193, 32);
this.button5.Name = "button5"; this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(100, 33); this.button5.Size = new System.Drawing.Size(100, 33);
this.button5.TabIndex = 274; this.button5.TabIndex = 274;
......
...@@ -171,6 +171,13 @@ namespace OnlineStore.ACSingleStore ...@@ -171,6 +171,13 @@ namespace OnlineStore.ACSingleStore
{ {
return; return;
} }
if (chbDebug.Checked.Equals(store.IsDebug).Equals(false))
{
LoadOk = false;
chbDebug.Checked = store.IsDebug;
LoadOk = true;
}
lblTemp.Text = store.currTempStr; lblTemp.Text = store.currTempStr;
lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString() ; lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString() ;
//忙碌状态不读取状态 //忙碌状态不读取状态
...@@ -1351,7 +1358,12 @@ namespace OnlineStore.ACSingleStore ...@@ -1351,7 +1358,12 @@ namespace OnlineStore.ACSingleStore
private void button6_Click(object sender, EventArgs e) private void button6_Click(object sender, EventArgs e)
{ {
int hasTray = (int)IOManager.IOValue(IO_Type.TrayCheck_Door); int hasTray = (int)IOManager.IOValue(IO_Type.TrayCheck_Door);
LineConnect.SendHeart(StoreManager.Config.Id, StoreManager.Config.CID, (int)StoreStatus.StoreOnline, (int)StoreRunStatus.Runing, hasTray,(int)StoreAlarmType.None); StoreStatus ss = StoreStatus.StoreOnline;
if (store.IsDebug)
{
ss = StoreStatus.Debugging;
}
LineConnect.SendHeart(StoreManager.Config.Id, StoreManager.Config.CID, (int)ss, (int)StoreRunStatus.Runing, hasTray,(int)StoreAlarmType.None);
} }
private void chbDebug_CheckedChanged(object sender, EventArgs e) private void chbDebug_CheckedChanged(object sender, EventArgs e)
......
...@@ -129,7 +129,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,7 +129,15 @@ namespace OnlineStore.DeviceLibrary
string plateW = msgArray[4]; string plateW = msgArray[4];
string code = msgArray[5]; string code = msgArray[5];
StoreManager.Store.ReviceLineInStoreCMD(posId, plateH, plateW, code); StoreManager.Store.ReviceLineInStoreCMD(posId, plateH, plateW, code);
}
else if (cmd.Equals(cmd_updateDebug))
{
int isDebug = Convert.ToInt32(msgArray[2]);
LogUtil.info("收到流水线更改调试状态=" + isDebug);
StoreManager.Store.IsDebug = isDebug.Equals(1) ? true : false;
ConfigAppSettings.SaveValue(Setting_Init.IsInDebug, isDebug);
LogUtil.info("切换调试状态= " + isDebug + ";");
} }
else else
{ {
...@@ -139,13 +147,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -139,13 +147,14 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("处理流水线消息出错:" + message ); LogUtil.error("处理流水线消息出错:" + message);
} }
} }
public static char cmd_spilt = ';'; public static char cmd_spilt = ';';
private static string cmd_heart = "heart"; private static string cmd_heart = "heart";
private static string cmd_outend = "outend"; private static string cmd_outend = "outend";
private static string cmd_startIn = "starIn"; private static string cmd_startIn = "starIn";
private static string cmd_updateDebug = "updateDebug";
private static bool CanOutStore = false; private static bool CanOutStore = false;
public static DateTime LastUpdateTime = new DateTime(0); public static DateTime LastUpdateTime = new DateTime(0);
public static bool IsConnect() public static bool IsConnect()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!