Commit 06446855 LN

1.出仓时,仓口无料门打开不要关闭并报警;

2.入库时现在仓口感应不到不报警的,改为仓口感应器感应不到料,门打开并报警.
1 个父辈 1f24990c
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
this.btnReset = new System.Windows.Forms.Button(); this.btnReset = new System.Windows.Forms.Button();
this.chbDebug = new System.Windows.Forms.CheckBox(); this.chbDebug = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chbEmptyNeedAlarm = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnSavePosID = new System.Windows.Forms.Button(); this.btnSavePosID = new System.Windows.Forms.Button();
this.cmbPosition15 = new System.Windows.Forms.ComboBox(); this.cmbPosition15 = new System.Windows.Forms.ComboBox();
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.cmbPosition7 = new System.Windows.Forms.ComboBox(); this.cmbPosition7 = new System.Windows.Forms.ComboBox();
this.label21 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label();
this.chbEmptyNeedAlarm = new System.Windows.Forms.CheckBox(); this.chbUseDoorCheck = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -156,7 +157,7 @@ ...@@ -156,7 +157,7 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(29, 199); this.chbDebug.Location = new System.Drawing.Point(29, 189);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(93, 25); this.chbDebug.Size = new System.Drawing.Size(93, 25);
this.chbDebug.TabIndex = 282; this.chbDebug.TabIndex = 282;
...@@ -165,6 +166,7 @@ ...@@ -165,6 +166,7 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.chbUseDoorCheck);
this.groupBox1.Controls.Add(this.chbEmptyNeedAlarm); this.groupBox1.Controls.Add(this.chbEmptyNeedAlarm);
this.groupBox1.Controls.Add(this.chbDebug); this.groupBox1.Controls.Add(this.chbDebug);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
...@@ -182,6 +184,18 @@ ...@@ -182,6 +184,18 @@
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓配置"; this.groupBox1.Text = "料仓配置";
// //
// chbEmptyNeedAlarm
//
this.chbEmptyNeedAlarm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbEmptyNeedAlarm.AutoSize = true;
this.chbEmptyNeedAlarm.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbEmptyNeedAlarm.Location = new System.Drawing.Point(153, 189);
this.chbEmptyNeedAlarm.Name = "chbEmptyNeedAlarm";
this.chbEmptyNeedAlarm.Size = new System.Drawing.Size(237, 25);
this.chbEmptyNeedAlarm.TabIndex = 283;
this.chbEmptyNeedAlarm.Text = "出库时仓门口信号不亮时报警";
this.chbEmptyNeedAlarm.UseVisualStyleBackColor = true;
//
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.btnSavePosID); this.groupBox2.Controls.Add(this.btnSavePosID);
...@@ -325,17 +339,17 @@ ...@@ -325,17 +339,17 @@
this.label21.Text = "库位号-7寸盘定位:"; this.label21.Text = "库位号-7寸盘定位:";
this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// chbEmptyNeedAlarm // chbUseDoorCheck
// //
this.chbEmptyNeedAlarm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbUseDoorCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbEmptyNeedAlarm.AutoSize = true; this.chbUseDoorCheck.AutoSize = true;
this.chbEmptyNeedAlarm.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbUseDoorCheck.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbEmptyNeedAlarm.Location = new System.Drawing.Point(153, 199); this.chbUseDoorCheck.Location = new System.Drawing.Point(153, 231);
this.chbEmptyNeedAlarm.Name = "chbEmptyNeedAlarm"; this.chbUseDoorCheck.Name = "chbUseDoorCheck";
this.chbEmptyNeedAlarm.Size = new System.Drawing.Size(237, 25); this.chbUseDoorCheck.Size = new System.Drawing.Size(189, 25);
this.chbEmptyNeedAlarm.TabIndex = 283; this.chbUseDoorCheck.TabIndex = 284;
this.chbEmptyNeedAlarm.Text = "出库时仓门口信号不亮时报警"; this.chbUseDoorCheck.Text = "使用仓门料盘检测信号";
this.chbEmptyNeedAlarm.UseVisualStyleBackColor = true; this.chbUseDoorCheck.UseVisualStyleBackColor = true;
// //
// FrmIdConfig // FrmIdConfig
// //
...@@ -382,5 +396,6 @@ ...@@ -382,5 +396,6 @@
public System.Windows.Forms.Label label4; public System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnSavePosID; private System.Windows.Forms.Button btnSavePosID;
private System.Windows.Forms.CheckBox chbEmptyNeedAlarm; private System.Windows.Forms.CheckBox chbEmptyNeedAlarm;
private System.Windows.Forms.CheckBox chbUseDoorCheck;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ namespace OnlineStore.ACSingleStore ...@@ -41,7 +41,7 @@ namespace OnlineStore.ACSingleStore
cmbId.SelectedIndex = StoreId - 1; cmbId.SelectedIndex = StoreId - 1;
} }
chbDebug.Checked = StoreManager.Store.IsDebug; chbDebug.Checked = StoreManager.Store.IsDebug;
chbUseDoorCheck.Checked = StoreManager.Store.Config.IsUse_Door_Check.Equals(1);
LoadPos(); LoadPos();
} }
private List<string> allList = new List<string>(); private List<string> allList = new List<string>();
...@@ -101,11 +101,32 @@ namespace OnlineStore.ACSingleStore ...@@ -101,11 +101,32 @@ namespace OnlineStore.ACSingleStore
bool emptyNeedAlarm = chbEmptyNeedAlarm.Checked; bool emptyNeedAlarm = chbEmptyNeedAlarm.Checked;
ConfigAppSettings.SaveValue(Setting_Init.EmptyOutNeedAlarm, emptyNeedAlarm ? 1 : 0); ConfigAppSettings.SaveValue(Setting_Init.EmptyOutNeedAlarm, emptyNeedAlarm ? 1 : 0);
LogUtil.info($"cid {storeCID} ,storeId{storeId} ,debug {StoreManager.Store.IsDebug} emptyNeedAlarm {emptyNeedAlarm}"); LogUtil.info($"cid {storeCID} ,storeId{storeId} ,debug {StoreManager.Store.IsDebug} emptyNeedAlarm {emptyNeedAlarm}");
SaveConfig();
MessageBox.Show("保存成功,请重启客户端"); MessageBox.Show("保存成功,请重启客户端");
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
} }
} }
private void SaveConfig()
{
try
{
bool useDoorCheck = chbUseDoorCheck.Checked;
bool configV = StoreManager.Config.IsUse_Door_Check.Equals(1);
if (!useDoorCheck.Equals(configV))
{
StoreManager.Config.IsUse_Door_Check = useDoorCheck ? 1 : 0;
LogUtil.info($"保存配置 Config。IsUse_Door_Check= {StoreManager.Config.IsUse_Door_Check}");
StoreManager.UpdateBoxConfig(StoreManager.Config);
}
}
catch (Exception ex)
{
LogUtil.error("SaveConfig 出错: " + ex.ToString());
}
}
private void btnBack_Click(object sender, EventArgs e) private void btnBack_Click(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.Cancel; this.DialogResult = DialogResult.Cancel;
......
...@@ -345,6 +345,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -345,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_00_TrayCheck); StoreMove.NextMoveStep(StoreMoveStep.SI_00_TrayCheck);
InStoreLog("入库:等待仓门口有料"); InStoreLog("入库:等待仓门口有料");
StoreMove.TimeOutSeconds = 5; StoreMove.TimeOutSeconds = 5;
StoreMove.OneWaitCanEndStep = true;
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
} }
...@@ -432,12 +433,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -432,12 +433,26 @@ namespace OnlineStore.DeviceLibrary
} }
} }
string msg = StoreName + "入库 等待料仓门口检测到料盘 [" + StoreMove.MoveParam.PosInfo.barcode + "] [" + StoreMove.MoveParam.PosInfo.PosId + "] 超时 [" + Math.Round(StoreMove.StepSpan().TotalSeconds, 1) + "]秒 ";
string msg = StoreName + "入库 等待料仓门口检测到料盘 [" + StoreMove.MoveParam.PosInfo.barcode + "] [" + StoreMove.MoveParam.PosInfo.PosId + "] 超时 [" + Math.Round(StoreMove.StepSpan().TotalSeconds, 1) + "]秒 ";
SetWarnMsg(msg, StoreMove.GetStepDes() + "_超时报警", StoreMove); SetWarnMsg(msg, StoreMove.GetStepDes() + "_超时报警", StoreMove);
LogUtil.error(WarnMsg, 100); LogUtil.error(WarnMsg, 100);
Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType); Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType);
StoreMove.NextMoveStep(StoreMoveStep.SI_01_TrayCheck);
InStoreLog("入库:打开仓门,继续等待仓门口信号");
StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(100));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
//打开仓门,等待信号
OpenDoor(false);
} }
}else if (StoreMove.MoveStep == StoreMoveStep.SI_01_TrayCheck)
{
SI_02_Move(moveP);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_02_InOutAxisHome) else if (StoreMove.MoveStep == StoreMoveStep.SI_02_InOutAxisHome)
{ {
...@@ -876,6 +891,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -876,6 +891,13 @@ namespace OnlineStore.DeviceLibrary
StoreMove.TimeOutSeconds = 5; StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
} }
else if (EmptyOutNeedAlarm && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_27_WaitDoorTray);
OutStoreLog("出库:检测料仓门口料盘信号 , EmptyOutAlarm=true, 需要等待 TrayCheck_Door=HIGH");
StoreMove.TimeOutSeconds = 5;
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
}
else else
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_28_CloseDoor); StoreMove.NextMoveStep(StoreMoveStep.SO_28_CloseDoor);
......
...@@ -350,6 +350,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -350,6 +350,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
[Description("入库_取料前_等待仓门口有料")] [Description("入库_取料前_等待仓门口有料")]
SI_00_TrayCheck = 200, SI_00_TrayCheck = 200,
/// <summary>
/// 等待仓门口有料
/// </summary>
[Description("入库_取料前_未检测到仓门口有料,打开仓门,继续等待")]
SI_01_TrayCheck ,
///// <summary> ///// <summary>
///// 入库,。定位气缸下降 ///// 入库,。定位气缸下降
///// </summary> ///// </summary>
......
...@@ -205,7 +205,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -205,7 +205,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
} }
catch (Exception e) { catch (Exception e) {
Common.LogUtil.error("出错:" + e.ToString()); Common.LogUtil.error("保存数据【"+line+"】出错:" + e.ToString());
} }
string newLine = ""; string newLine = "";
foreach (string s in newArray) foreach (string s in newArray)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!