Commit a542bb55 几米阳光

轴报警检测间隔修改。停止料仓后清理界面显示

1 个父辈 5ea90f59
...@@ -137,8 +137,7 @@ namespace OnlineStore.ACSingleStore ...@@ -137,8 +137,7 @@ namespace OnlineStore.ACSingleStore
} }
private DateTime preReadModblsTime = DateTime.Now; private DateTime preReadModblsTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
//验证运动是否完成 //验证运动是否完成
//CheckWait(); //CheckWait();
...@@ -168,18 +167,12 @@ namespace OnlineStore.ACSingleStore ...@@ -168,18 +167,12 @@ namespace OnlineStore.ACSingleStore
} }
lblThisSta.Text = store.GetRunStr(); lblThisSta.Text = store.GetRunStr();
DateTime time = DateTime.Now;
if (store != null && store.storeRunStatus != StoreRunStatus.Wait)
{
txtAxisRunTime.Text = store.GetAxisRunTime(store.Config.Middle_Axis.GetAxisValue()).ToString(@"dd\.hh\:mm\:ss");
txtStoreRunTime.Text = store.GetStoreRunTime().ToString(@"dd\.hh\:mm\:ss");
}
//复位按钮状态显示 //复位按钮状态显示
if (复位ToolStripMenuItem.Enabled == false) if (复位ToolStripMenuItem.Enabled == false)
{ {
if ((store.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || store.storeRunStatus.Equals(StoreRunStatus.Reset)) if ((store.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || store.storeRunStatus.Equals(StoreRunStatus.Reset))
&&store.alarmType.Equals(StoreAlarmType.None)) && store.alarmType.Equals(StoreAlarmType.None))
{ {
} }
else else
...@@ -197,11 +190,12 @@ namespace OnlineStore.ACSingleStore ...@@ -197,11 +190,12 @@ namespace OnlineStore.ACSingleStore
} }
} }
lblWarnMsg.Text = store.WarnMsg; lblWarnMsg.Text = store.WarnMsg;
if (store.KNDIOValue(IO_Type.Left_Door_LimitSingle).Equals(IO_VALUE.LOW)) if (store.KNDIOValue(IO_Type.Left_Door_LimitSingle).Equals(IO_VALUE.LOW))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 左侧门未关"; lblWarnMsg.Text = lblWarnMsg.Text + " 左侧门未关";
} if (store.KNDIOValue(IO_Type.Right_Door_LimitSingle).Equals(IO_VALUE.LOW)) }
if (store.KNDIOValue(IO_Type.Right_Door_LimitSingle).Equals(IO_VALUE.LOW))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 右侧门未关"; lblWarnMsg.Text = lblWarnMsg.Text + " 右侧门未关";
} }
...@@ -234,6 +228,12 @@ namespace OnlineStore.ACSingleStore ...@@ -234,6 +228,12 @@ namespace OnlineStore.ACSingleStore
} }
} }
} }
else
{
lblThisSta.Text = "等待启动";
lblWarnMsg.Text = "";
btnStartAuTo.Text = "开始自动出入库";
}
} }
private void ReadPosistion() private void ReadPosistion()
......
...@@ -669,6 +669,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -669,6 +669,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public override void StopRun() public override void StopRun()
{ {
WarnMsg = "";
autoNext = false; autoNext = false;
serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
StopMove(); StopMove();
...@@ -1093,10 +1094,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -1093,10 +1094,16 @@ namespace OnlineStore.DeviceLibrary
private DateTime checkAlarmTime = DateTime.Now; private DateTime checkAlarmTime = DateTime.Now;
public bool CheckAxisAlarm() public bool CheckAxisAlarm()
{ {
TimeSpan span = DateTime.Now - checkAlarmTime; //在回原点,复位,出入库时,检测报警间隔减小
if (span.TotalSeconds < 2) if (storeRunStatus.Equals(StoreRunStatus.Busy) || storeRunStatus.Equals(StoreRunStatus.HomeMoving) || storeRunStatus.Equals(StoreRunStatus.Reset))
{ }
else
{ {
return false; TimeSpan span = DateTime.Now - checkAlarmTime;
if (span.TotalSeconds < 2)
{
return false;
}
} }
checkAlarmTime = DateTime.Now; checkAlarmTime = DateTime.Now;
bool isInAlarm = false; bool isInAlarm = false;
...@@ -1156,7 +1163,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -1156,7 +1163,6 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "StopMove"); LogUtil.info(LOGGER, StoreName + "StopMove");
KNDIOMove(IO_Type.Door_Down, IO_VALUE.LOW); KNDIOMove(IO_Type.Door_Down, IO_VALUE.LOW);
KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW); KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW);
Thread.Sleep(100);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!