Commit 47d45d7d 张东亮

打印抽屉到位信号

1 个父辈 23b645e4
...@@ -294,7 +294,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,7 +294,6 @@ namespace OnlineStore.DeviceLibrary
moveInfo.EndStepWait(); moveInfo.EndStepWait();
return; return;
} }
//当等待超过一分钟时,需要打印提示 //当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - moveInfo.LastSetpTime; TimeSpan span = DateTime.Now - moveInfo.LastSetpTime;
string NotOkMsg = ""; string NotOkMsg = "";
......
...@@ -85,6 +85,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,6 +85,8 @@ namespace OnlineStore.DeviceLibrary
/// B面列抽屉列信号 /// B面列抽屉列信号
/// </summary> /// </summary>
public string[] trayBColumns; public string[] trayBColumns;
Dictionary<string, bool> cloumnsSig = new Dictionary<string, bool>();
/// <summary> /// <summary>
/// A面列信号屏蔽 /// A面列信号屏蔽
/// </summary> /// </summary>
...@@ -168,6 +170,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -168,6 +170,14 @@ namespace OnlineStore.DeviceLibrary
IO_Type.Column_Check_B5, IO_Type.Column_Check_B5,
IO_Type.Column_Check_B6 IO_Type.Column_Check_B6
}; };
for (int i = 1; i < trayAColumns.Count(); i++)
{
cloumnsSig.Add(trayAColumns[i], IOValue(trayAColumns[i]).Equals(IO_VALUE.HIGH));
}
for (int i = 1; i < trayBColumns.Count(); i++)
{
cloumnsSig.Add(trayBColumns[i], IOValue(trayBColumns[i]).Equals(IO_VALUE.HIGH));
}
sheidAColmns = new string[] sheidAColmns = new string[]
{ {
"Col_Sig_Shield", "Col_Sig_Shield",
...@@ -189,6 +199,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,6 +199,37 @@ namespace OnlineStore.DeviceLibrary
"B_Col6_Sig_Shield" "B_Col6_Sig_Shield"
}; };
} }
object locObj = new object();
void logColumnSig()
{
if(Monitor.TryEnter(locObj))
{
try
{
foreach (var item in cloumnsSig.Keys)
{
bool preState = cloumnsSig[item];
bool curState = IOValue(item).Equals(IO_VALUE.HIGH);
if (preState != curState)
{
LogUtil.info($"料斗到位信号变化【{MoveInfo.SLog}】【{MoveInfo.MoveParam.PosInfo.PosId}】【{item}={curState}】");
cloumnsSig[item] = curState;
}
}
}
catch (Exception ex)
{
LogUtil.error("打印料斗到位信号出错", ex);
}
finally
{
Monitor.Exit(locObj);
}
}
}
internal void InitAllAxis() internal void InitAllAxis()
{ {
MoveAxis = new AxisBean(Config.MoveAxis, Name); MoveAxis = new AxisBean(Config.MoveAxis, Name);
...@@ -273,7 +314,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
private bool CanReset() private bool CanReset()
{ {
if (!AxisAlarmFlag && (PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_CamA) || if (!AxisAlarmFlag && (PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_CamA) ||
PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_CamB)|| PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_CamB) ||
PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_P1))) PullAxis_Inout.IsInPosition(Config.PullAxis_Inout_P1)))
return true; return true;
return false; return false;
...@@ -289,7 +330,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -289,7 +330,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo($"复位 {MoveInfo.SLog} :确认取消"); LogInfo($"复位 {MoveInfo.SLog} :确认取消");
return; return;
} }
if(!CheckTrayInLocation(out string msg)) if (!CheckTrayInLocation(out string msg))
{ {
System.Windows.Forms.MessageBox.Show($"{msg},不允许启动/复位", "警告", System.Windows.Forms.MessageBox.Show($"{msg},不允许启动/复位", "警告",
System.Windows.Forms.MessageBoxButtons.OK); System.Windows.Forms.MessageBoxButtons.OK);
...@@ -624,7 +665,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -624,7 +665,7 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.BOX_H04_PullAxis_Updown_ABComAxis_Home: case StepEnum.BOX_H04_PullAxis_Updown_ABComAxis_Home:
MoveInfo.NextMoveStep(StepEnum.BOX_H05_XAxis_AB_UpDown_Home); MoveInfo.NextMoveStep(StepEnum.BOX_H05_XAxis_AB_UpDown_Home);
LogInfo($"复位 {MoveInfo.SLog}:AB面移栽X轴回原点、移栽升降轴"); LogInfo($"复位 {MoveInfo.SLog}:AB面移栽X轴回原点、移栽升降轴");
// PullAxis_Inout.HomeMove(MoveInfo); // PullAxis_Inout.HomeMove(MoveInfo);
XAxis_A.HomeMove(MoveInfo); XAxis_A.HomeMove(MoveInfo);
XAxis_B.HomeMove(MoveInfo); XAxis_B.HomeMove(MoveInfo);
UpdownAxis.HomeMove(MoveInfo); UpdownAxis.HomeMove(MoveInfo);
......
...@@ -1013,6 +1013,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1013,6 +1013,7 @@ namespace OnlineStore.DeviceLibrary
{ {
PrintAxisSts(MoveInfo); PrintAxisSts(MoveInfo);
CheckWait(MoveInfo); CheckWait(MoveInfo);
logColumnSig();
} }
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
...@@ -1186,6 +1187,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1186,6 +1187,7 @@ namespace OnlineStore.DeviceLibrary
{ {
PrintAxisSts(MoveInfo); PrintAxisSts(MoveInfo);
CheckWait(MoveInfo); CheckWait(MoveInfo);
logColumnSig();
} }
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
......
...@@ -89,6 +89,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,6 +89,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
CheckWait(MoveInfo); CheckWait(MoveInfo);
logColumnSig();
} }
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
......
...@@ -453,6 +453,10 @@ namespace OnlineStore.XLRStore ...@@ -453,6 +453,10 @@ namespace OnlineStore.XLRStore
boxBean.ChangeDebug(true); boxBean.ChangeDebug(true);
LogUtil.info(boxBean.Name + "用户切换到调试状态 "); LogUtil.info(boxBean.Name + "用户切换到调试状态 ");
} }
else
{
chbDebug.Checked=false;
}
} }
} }
else else
...@@ -468,6 +472,10 @@ namespace OnlineStore.XLRStore ...@@ -468,6 +472,10 @@ namespace OnlineStore.XLRStore
boxBean.ChangeDebug(false); boxBean.ChangeDebug(false);
LogUtil.info(boxBean.Name + "用户切换到正常工作状态 "); LogUtil.info(boxBean.Name + "用户切换到正常工作状态 ");
} }
else
{
chbDebug.Checked = true;
}
} }
} }
} }
...@@ -540,6 +548,11 @@ namespace OnlineStore.XLRStore ...@@ -540,6 +548,11 @@ namespace OnlineStore.XLRStore
{ {
boxBean.StopRecord(); boxBean.StopRecord();
} }
private void chbDebug_CheckedChanged_1(object sender, EventArgs e)
{
}
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!