Commit a2234284 几米阳光

报警文字修改

1 个父辈 29df02c8
...@@ -131,7 +131,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -131,7 +131,7 @@ namespace OnlineStore.AutoInOutStore
preOpen = isOpen; preOpen = isOpen;
btnOutStore.Enabled = isOpen; btnOutStore.Enabled = isOpen;
btnInStore.Enabled = isOpen; //btnInStore.Enabled = isOpen;
//btnAxisAMove.Enabled = isOpen; //btnAxisAMove.Enabled = isOpen;
...@@ -192,16 +192,13 @@ namespace OnlineStore.AutoInOutStore ...@@ -192,16 +192,13 @@ namespace OnlineStore.AutoInOutStore
} }
} }
} }
lblBatchStatus.Text = store.GetRunStr(AutomaticBaiting.AutoBaitingStatus,false );
if (!AutomaticBaiting.WarnMsg.Equals("")) lblBatchStatus.Text = store.GetRunStr(AutomaticBaiting.AutoBaitingStatus, false);
{ lblBatchMsg.Text = AutomaticBaiting.WarnMsg;
lblBatchStatus.Text = AutomaticBaiting.WarnMsg;
}
//ReadPosistion(); //ReadPosistion();
if (store.storeRunStatus > StoreRunStatus.Wait) if (store.storeRunStatus > StoreRunStatus.Wait)
{ {
if (启动ToolStripMenuItem.Enabled.Equals(true)) if (启动ToolStripMenuItem.Enabled.Equals(true))
{ {
StoreOpenStatus(true); StoreOpenStatus(true);
...@@ -241,7 +238,6 @@ namespace OnlineStore.AutoInOutStore ...@@ -241,7 +238,6 @@ namespace OnlineStore.AutoInOutStore
lblWarnMsg.Text = lblWarnMsg.Text + deviceMsg; lblWarnMsg.Text = lblWarnMsg.Text + deviceMsg;
} }
if (store.autoNext) if (store.autoNext)
{ {
string msg = store.autoMsg; string msg = store.autoMsg;
...@@ -474,6 +470,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -474,6 +470,8 @@ namespace OnlineStore.AutoInOutStore
private void btnInStore_Click(object sender, EventArgs e) private void btnInStore_Click(object sender, EventArgs e)
{ {
MessageBox.Show("此设备不支持单个入库","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
return;
if (store.storeRunStatus >= StoreRunStatus.HomeMoving) if (store.storeRunStatus >= StoreRunStatus.HomeMoving)
{ {
string selectPositionNum = cmbPosition.Text; string selectPositionNum = cmbPosition.Text;
...@@ -958,6 +956,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -958,6 +956,8 @@ namespace OnlineStore.AutoInOutStore
private void btnStartAuTo_Click(object sender, EventArgs e) private void btnStartAuTo_Click(object sender, EventArgs e)
{ {
MessageBox.Show("此设备不支持自动出入库", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
if (store.storeRunStatus >= StoreRunStatus.HomeMoving) if (store.storeRunStatus >= StoreRunStatus.HomeMoving)
{ {
if (store.autoNext) if (store.autoNext)
......
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
叉子未后退完成,吸盘就下降了 叉子未后退完成,吸盘就下降了
如果是未扫到码或者没有入库成功,需要将料盘送出,送出之后批量上料功能才能继续。 如果是未扫到码或者没有入库成功,需要将料盘送出,送出之后批量上料功能才能继续。
批量轴报警单独处理。
需要修改还未修改的: 需要修改还未修改的:
X12_上料机构出料检测信号: X12_上料机构出料检测信号:
批量出入库玩抽,打开门DI-21没有以后,上料机构上升,X12ON后停止,X12OFF以后再上升,检测到上极限亮了以后,X12OFF后,轴下降至原点位置。 批量出入库玩抽,打开门DI-21没有以后,上料机构上升,X12ON后停止,X12OFF以后再上升,检测到上极限亮了以后,X12OFF后,轴下降至原点位置。
......
...@@ -738,6 +738,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -738,6 +738,11 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndMove(); StoreMove.EndMove();
StopMove(true); StopMove(true);
storeStatus = StoreStatus.SuddenStop; storeStatus = StoreStatus.SuddenStop;
}else if (alarmType.Equals(StoreAlarmType.BatchAxisAlarm))
{
LogUtil.error("批量上下料轴报警,批量上料模块停止运动");
ACServerManager.SuddenStop(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue());
AutomaticBaiting.StopMove();
} }
} }
private bool InProcess = false; private bool InProcess = false;
...@@ -1003,17 +1008,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -1003,17 +1008,25 @@ namespace OnlineStore.DeviceLibrary
//若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过 //若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过
if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.IsInWait == false) if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.IsInWait == false)
{ {
LogUtil.info(StoreName + "当前空闲中,清理信号超时异常【" + alarmInfo.alarmDetail + "】"); LogUtil.info(StoreName + "当前空闲中,清理信号超时异常【" + StoreManager.Store.alarmType + "】"+WarnMsg);
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
if (AutomaticBaiting.WarnMsg.Contains("超时"))
{
AutomaticBaiting.WarnMsg = "";
}
WarnMsg = ""; WarnMsg = "";
} }
else if (alarmType.Equals(StoreAlarmType.BatchAlarm) || alarmType.Equals(StoreAlarmType.BatchIoTimeOut)) else if (alarmType.Equals(StoreAlarmType.BatchAlarm) || alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
{ {
if (AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.StoreMove.IsInWait.Equals(false)) if (AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.StoreMove.IsInWait.Equals(false))
{ {
LogUtil.info(StoreName + "当前批量上下料模块空闲中,清理报警【" + alarmInfo.alarmDetail + "】"); LogUtil.info( "批量上下料模块空闲中,清理报警【" + StoreManager.Store.alarmType + "】"+AutomaticBaiting.WarnMsg);
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
AutomaticBaiting.WarnMsg = ""; AutomaticBaiting.WarnMsg = "";
if (WarnMsg.Contains("超时"))
{
WarnMsg = "";
}
} }
} }
} }
...@@ -1128,9 +1141,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -1128,9 +1141,19 @@ namespace OnlineStore.DeviceLibrary
if (alarmIo == 1) if (alarmIo == 1)
{ {
if (axisInfo.DeviceName.Equals(Config.Batch_Axis.DeviceName))
{
AutomaticBaiting.WarnMsg = " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.BatchAxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None);
}
else
{
WarnMsg = StoreName + " 运动轴" + axisInfo.Explain + "报警"; WarnMsg = StoreName + " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo; info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None); Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None);
}
isInAlarm = true; isInAlarm = true;
} }
else else
......
...@@ -108,22 +108,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -108,22 +108,31 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool Reset(bool isNeedInout) public static bool Reset(bool isNeedInout)
{ {
AutomaticBaiting.IsNeedStartInout = isNeedInout;
if (!StoreMove.MoveType.Equals(StoreMoveType.None))
{
StopMove();
}
string msg = CanStart(); string msg = CanStart();
if (!String.IsNullOrEmpty(msg)) if (!String.IsNullOrEmpty(msg))
{ {
LogUtil.info(Name + "复位失败:" + msg); LogUtil.info(Name + "复位失败:" + msg);
return false; return false;
} }
if (StoreManager.Store.alarmType.Equals(StoreAlarmType.BatchAlarm) ||
StoreManager.Store.alarmType.Equals(StoreAlarmType.BatchAxisAlarm) || StoreManager.Store.alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
{
LogUtil.info(Name + " 复位前,清理报警【" + StoreManager.Store.alarmType + "】");
StoreManager.Store.alarmType = StoreAlarmType.None;
}
AutomaticBaiting.IsNeedStartInout = isNeedInout;
if (!StoreMove.MoveType.Equals(StoreMoveType.None))
{
StopMove();
}
WarnMsg = "";
ClearInOutInfo(); ClearInOutInfo();
DoorStatus = 2; DoorStatus = 2;
AutoBaitingStatus = StoreRunStatus.Reset; AutoBaitingStatus = StoreRunStatus.Reset;
StoreMove.NewMove(StoreMoveType.StoreReset); StoreMove.NewMove(StoreMoveType.StoreReset);
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R00_Start); StoreMove.NextMoveStep(StoreMoveStep.AUTO_R00_Start);
LogUtil.info(Name + "开始复位,是否需要入库【" + AutomaticBaiting.IsNeedStartInout + "】");
return true; return true;
} }
...@@ -287,7 +296,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -287,7 +296,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
//TODO 报警 //TODO 报警
WarnMsg = "吸盘已经尝试三次,仍然吸不到物料!"; WarnMsg = "吸盘吸料失败,请复位后拿出此料盘";
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore); StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, "吸盘吸料失败", WarnMsg, StoreMoveType.InStore);
} }
} }
...@@ -391,6 +400,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -391,6 +400,12 @@ namespace OnlineStore.DeviceLibrary
LastSize = 0; LastSize = 0;
LastPosId = ""; LastPosId = "";
SuckingDisc_WorkCount = 0; SuckingDisc_WorkCount = 0;
//如果有超时异常,需要清理
if ( StoreManager.Store.alarmType.Equals(StoreAlarmType.BatchIoTimeOut))
{
LogUtil.info(Name + " 复位前,清理报警【" + StoreManager.Store.alarmType + "】");
StoreManager.Store.alarmType = StoreAlarmType.None;
}
// if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0)) // if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{ {
......
...@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs) if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{ {
ConfigIO io = StoreManager.Config.getWaitIO(wait.IoType); ConfigIO io = StoreManager.Config.getWaitIO(wait.IoType);
WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!"; WarnMsg = "[" + StoreMove.MoveStep + "] 等待[" + io.ElectricalDefinition + "_" + io.Explain + "=" + wait.IoValue + "]超时";
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType); StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
isOk = false; isOk = false;
...@@ -163,8 +163,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -163,8 +163,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (span.TotalSeconds > StoreMove.TimeOutSeconds) else if (span.TotalSeconds > StoreMove.TimeOutSeconds)
{ {
WarnMsg = Name + "【" + StoreMove.MoveType + "】【" + StoreMove.MoveStep + "】等待超时 [" + NotOkMsg WarnMsg = "[" + StoreMove.MoveStep + "]等待[" + NotOkMsg + "]超时[" + Math.Round(span.TotalSeconds, 0) + "秒]";
+ "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, "", WarnMsg, StoreMove.MoveType); StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, "", WarnMsg, StoreMove.MoveType);
} }
......
...@@ -523,5 +523,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,5 +523,10 @@ namespace OnlineStore.DeviceLibrary
/// 批量上下料模块报警 /// 批量上下料模块报警
/// </summary> /// </summary>
BatchAlarm =110, BatchAlarm =110,
/// <summary>
/// 批量上下轴报警
/// </summary>
BatchAxisAlarm=120,
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!