Commit 9a6597be 几米阳光

出库时等待时间验证修改

1 个父辈 93713b36
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
this.轴运动配置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.轴运动配置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.开启DEBUGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.开启DEBUGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
...@@ -174,7 +175,6 @@ ...@@ -174,7 +175,6 @@
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -1836,14 +1836,19 @@ ...@@ -1836,14 +1836,19 @@
// 开启DEBUGToolStripMenuItem // 开启DEBUGToolStripMenuItem
// //
this.开启DEBUGToolStripMenuItem.Name = "开启DEBUGToolStripMenuItem"; this.开启DEBUGToolStripMenuItem.Name = "开启DEBUGToolStripMenuItem";
this.开启DEBUGToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.开启DEBUGToolStripMenuItem.Size = new System.Drawing.Size(167, 26);
this.开启DEBUGToolStripMenuItem.Text = "开启DEBUG"; this.开启DEBUGToolStripMenuItem.Text = "开启DEBUG";
this.开启DEBUGToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click); this.开启DEBUGToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
// //
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(164, 6);
//
// 清理日志ToolStripMenuItem // 清理日志ToolStripMenuItem
// //
this.清理日志ToolStripMenuItem.Name = "清理日志ToolStripMenuItem"; this.清理日志ToolStripMenuItem.Name = "清理日志ToolStripMenuItem";
this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(167, 26);
this.清理日志ToolStripMenuItem.Text = "清理日志"; this.清理日志ToolStripMenuItem.Text = "清理日志";
this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click); this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click);
// //
...@@ -1947,11 +1952,6 @@ ...@@ -1947,11 +1952,6 @@
this.notifyIcon1.Text = "料仓客户端"; this.notifyIcon1.Text = "料仓客户端";
this.notifyIcon1.Visible = true; this.notifyIcon1.Visible = true;
// //
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
...@@ -498,7 +498,7 @@ namespace OnlineStore.ACSingleStore ...@@ -498,7 +498,7 @@ namespace OnlineStore.ACSingleStore
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")"); // MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return; // return;
//} //}
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (ACStoreManager.store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -512,7 +512,7 @@ namespace OnlineStore.ACSingleStore ...@@ -512,7 +512,7 @@ namespace OnlineStore.ACSingleStore
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue); short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int speed = FormUtil.GetIntValue(txtASpeed); int speed = FormUtil.GetIntValue(txtASpeed);
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (ACStoreManager.store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -536,7 +536,7 @@ namespace OnlineStore.ACSingleStore ...@@ -536,7 +536,7 @@ namespace OnlineStore.ACSingleStore
// return; // return;
//} //}
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (ACStoreManager.store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -752,18 +752,33 @@ namespace OnlineStore.ACSingleStore ...@@ -752,18 +752,33 @@ namespace OnlineStore.ACSingleStore
private void btnInOutP1_Click(object sender, EventArgs e) private void btnInOutP1_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP1); int value = FormUtil.GetIntValue(txtInOutP1);
AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P1_Speed); AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P1_Speed);
} }
private void btnInOutP3_Click(object sender, EventArgs e) private void btnInOutP3_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP3); int value = FormUtil.GetIntValue(txtInOutP3);
AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P3_Speed); AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P3_Speed);
} }
private void btnInOutP2_Click(object sender, EventArgs e) private void btnInOutP2_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP2); int value = FormUtil.GetIntValue(txtInOutP2);
AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P2_Speed); AxisABSMove(store.Config.InOut_Axis, value, store.Config.InOutAxis_P2_Speed);
} }
...@@ -1168,7 +1183,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1168,7 +1183,7 @@ namespace OnlineStore.ACSingleStore
} }
private void toolStripMenuItem1_Click(object sender, EventArgs e) private void toolStripMenuItem1_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
...@@ -1190,7 +1205,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1190,7 +1205,7 @@ namespace OnlineStore.ACSingleStore
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Asterisk); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
......
...@@ -19,7 +19,7 @@ namespace OnlineStore.Common ...@@ -19,7 +19,7 @@ namespace OnlineStore.Common
public static System.Windows.Forms.RichTextBox logBox = null; public static System.Windows.Forms.RichTextBox logBox = null;
public static int showCount = 10; public static int showCount = 20;
public static bool debug_opened = false; public static bool debug_opened = false;
......
...@@ -581,7 +581,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -581,7 +581,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed);
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
LogUtil.info(LOGGER, StoreName + "回原点"); LogUtil.info(LOGGER, StoreName + "回原点完成");
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
StoreMove.EndMove(); StoreMove.EndMove();
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
......
...@@ -181,8 +181,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,8 +181,11 @@ namespace OnlineStore.DeviceLibrary
Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType); Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14); LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
} }
isOk = false; if (StoreMove.OneWaitCanEndStep.Equals(false))
break; {
isOk = false;
break;
}
} }
else if (StoreMove.OneWaitCanEndStep) else if (StoreMove.OneWaitCanEndStep)
{ {
...@@ -194,8 +197,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -194,8 +197,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (span.TotalMilliseconds < wait.TimeMSeconds) if (span.TotalMilliseconds < wait.TimeMSeconds)
{ {
isOk = false; if (StoreMove.OneWaitCanEndStep.Equals(false))
break; {
isOk = false;
break;
}
} }
else if (StoreMove.OneWaitCanEndStep) else if (StoreMove.OneWaitCanEndStep)
{ {
...@@ -721,9 +727,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -721,9 +727,9 @@ namespace OnlineStore.DeviceLibrary
public bool LoacationIsDown() public bool LoacationIsDown()
{ {
if (KNDIOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH) if (KNDIOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
|| KNDIOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW) && KNDIOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
|| KNDIOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH) && KNDIOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
|| KNDIOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW)) && KNDIOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW))
{ {
return true; return true;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!