Commit e27b9d14 LN

出现 等待空托盘到达超时 报警时红灯闪烁

1 个父辈 d0f34a9d
...@@ -73,6 +73,8 @@ ...@@ -73,6 +73,8 @@
this.txtAxisValue = new System.Windows.Forms.TextBox(); this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox(); this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.lblServerOn = new System.Windows.Forms.Label(); this.lblServerOn = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.textBoxON = new System.Windows.Forms.TextBox();
this.groupAxis.SuspendLayout(); this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
...@@ -96,6 +98,8 @@ ...@@ -96,6 +98,8 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.textBoxON);
this.groupBox1.Controls.Add(this.txtBusyStatus); this.groupBox1.Controls.Add(this.txtBusyStatus);
this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.txtHomeStatus); this.groupBox1.Controls.Add(this.txtHomeStatus);
...@@ -111,9 +115,9 @@ ...@@ -111,9 +115,9 @@
this.groupBox1.Controls.Add(this.txtLimit1); this.groupBox1.Controls.Add(this.txtLimit1);
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtHomeSingle); this.groupBox1.Controls.Add(this.txtHomeSingle);
this.groupBox1.Location = new System.Drawing.Point(553, 14); this.groupBox1.Location = new System.Drawing.Point(553, 12);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(125, 277); this.groupBox1.Size = new System.Drawing.Size(125, 279);
this.groupBox1.TabIndex = 302; this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态"; this.groupBox1.Text = "状态";
...@@ -121,7 +125,7 @@ ...@@ -121,7 +125,7 @@
// txtBusyStatus // txtBusyStatus
// //
this.txtBusyStatus.Enabled = false; this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(89, 80); this.txtBusyStatus.Location = new System.Drawing.Point(91, 101);
this.txtBusyStatus.Name = "txtBusyStatus"; this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23); this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288; this.txtBusyStatus.TabIndex = 288;
...@@ -129,7 +133,7 @@ ...@@ -129,7 +133,7 @@
// label11 // label11
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(6, 113); this.label11.Location = new System.Drawing.Point(6, 131);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(81, 17); this.label11.Size = new System.Drawing.Size(81, 17);
this.label11.TabIndex = 292; this.label11.TabIndex = 292;
...@@ -138,7 +142,7 @@ ...@@ -138,7 +142,7 @@
// txtHomeStatus // txtHomeStatus
// //
this.txtHomeStatus.Enabled = false; this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(89, 110); this.txtHomeStatus.Location = new System.Drawing.Point(91, 128);
this.txtHomeStatus.Name = "txtHomeStatus"; this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23); this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291; this.txtHomeStatus.TabIndex = 291;
...@@ -146,7 +150,7 @@ ...@@ -146,7 +150,7 @@
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(21, 83); this.label10.Location = new System.Drawing.Point(21, 104);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(66, 17); this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289; this.label10.TabIndex = 289;
...@@ -155,7 +159,7 @@ ...@@ -155,7 +159,7 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(28, 53); this.label3.Location = new System.Drawing.Point(28, 77);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 17); this.label3.Size = new System.Drawing.Size(59, 17);
this.label3.TabIndex = 286; this.label3.TabIndex = 286;
...@@ -164,7 +168,7 @@ ...@@ -164,7 +168,7 @@
// label24 // label24
// //
this.label24.AutoSize = true; this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(16, 203); this.label24.Location = new System.Drawing.Point(16, 212);
this.label24.Name = "label24"; this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(71, 17); this.label24.Size = new System.Drawing.Size(71, 17);
this.label24.TabIndex = 316; this.label24.TabIndex = 316;
...@@ -174,7 +178,7 @@ ...@@ -174,7 +178,7 @@
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(28, 23); this.label5.Location = new System.Drawing.Point(28, 50);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 17); this.label5.Size = new System.Drawing.Size(59, 17);
this.label5.TabIndex = 328; this.label5.TabIndex = 328;
...@@ -183,7 +187,7 @@ ...@@ -183,7 +187,7 @@
// btnGetAlarm // btnGetAlarm
// //
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(7, 233); this.btnGetAlarm.Location = new System.Drawing.Point(7, 239);
this.btnGetAlarm.Name = "btnGetAlarm"; this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(110, 34); this.btnGetAlarm.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.TabIndex = 284; this.btnGetAlarm.TabIndex = 284;
...@@ -194,7 +198,7 @@ ...@@ -194,7 +198,7 @@
// txtAlarmStatus // txtAlarmStatus
// //
this.txtAlarmStatus.Enabled = false; this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(89, 50); this.txtAlarmStatus.Location = new System.Drawing.Point(91, 74);
this.txtAlarmStatus.Name = "txtAlarmStatus"; this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23); this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285; this.txtAlarmStatus.TabIndex = 285;
...@@ -202,7 +206,7 @@ ...@@ -202,7 +206,7 @@
// txtLimit2 // txtLimit2
// //
this.txtLimit2.Enabled = false; this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(89, 200); this.txtLimit2.Location = new System.Drawing.Point(91, 209);
this.txtLimit2.Name = "txtLimit2"; this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23); this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313; this.txtLimit2.TabIndex = 313;
...@@ -210,7 +214,7 @@ ...@@ -210,7 +214,7 @@
// txtServoStatue // txtServoStatue
// //
this.txtServoStatue.Enabled = false; this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(89, 20); this.txtServoStatue.Location = new System.Drawing.Point(91, 47);
this.txtServoStatue.Name = "txtServoStatue"; this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23); this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327; this.txtServoStatue.TabIndex = 327;
...@@ -218,7 +222,7 @@ ...@@ -218,7 +222,7 @@
// label22 // label22
// //
this.label22.AutoSize = true; this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(16, 173); this.label22.Location = new System.Drawing.Point(16, 185);
this.label22.Name = "label22"; this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(71, 17); this.label22.Size = new System.Drawing.Size(71, 17);
this.label22.TabIndex = 312; this.label22.TabIndex = 312;
...@@ -228,7 +232,7 @@ ...@@ -228,7 +232,7 @@
// txtLimit1 // txtLimit1
// //
this.txtLimit1.Enabled = false; this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(89, 170); this.txtLimit1.Location = new System.Drawing.Point(91, 182);
this.txtLimit1.Name = "txtLimit1"; this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23); this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309; this.txtLimit1.TabIndex = 309;
...@@ -236,7 +240,7 @@ ...@@ -236,7 +240,7 @@
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(28, 143); this.label6.Location = new System.Drawing.Point(28, 158);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17); this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300; this.label6.TabIndex = 300;
...@@ -245,7 +249,7 @@ ...@@ -245,7 +249,7 @@
// txtHomeSingle // txtHomeSingle
// //
this.txtHomeSingle.Enabled = false; this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(89, 140); this.txtHomeSingle.Location = new System.Drawing.Point(91, 155);
this.txtHomeSingle.Name = "txtHomeSingle"; this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23); this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297; this.txtHomeSingle.TabIndex = 297;
...@@ -637,6 +641,23 @@ ...@@ -637,6 +641,23 @@
this.lblServerOn.Size = new System.Drawing.Size(0, 19); this.lblServerOn.Size = new System.Drawing.Size(0, 19);
this.lblServerOn.TabIndex = 268; this.lblServerOn.TabIndex = 268;
// //
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 23);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(79, 17);
this.label13.TabIndex = 330;
this.label13.Text = "伺服ON输入:";
//
// textBoxON
//
this.textBoxON.Enabled = false;
this.textBoxON.Location = new System.Drawing.Point(91, 20);
this.textBoxON.Name = "textBoxON";
this.textBoxON.Size = new System.Drawing.Size(25, 23);
this.textBoxON.TabIndex = 329;
//
// AxisMoveControl // AxisMoveControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -700,5 +721,7 @@ ...@@ -700,5 +721,7 @@
private System.Windows.Forms.Button btnAddMove; private System.Windows.Forms.Button btnAddMove;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox textBoxON;
} }
} }
...@@ -114,6 +114,7 @@ namespace OnlineStore.AssemblyLine ...@@ -114,6 +114,7 @@ namespace OnlineStore.AssemblyLine
private void btnGetAlarm_Click(object sender, EventArgs e) private void btnGetAlarm_Click(object sender, EventArgs e)
{ {
txtServoStatue.Text = ACServerManager.SRV_ON(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString(); this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString(); this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString(); this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
......
20210322 2020120325
等待托盘超时报警时,蜂鸣器响。
20210322
1.进仓阻挡1下降2秒后自动上升 1.进仓阻挡1下降2秒后自动上升
2.入料机构点击暂停时只暂停入料,托盘继续处理。 2.入料机构点击暂停时只暂停入料,托盘继续处理。
3.入料机构提前获取库位号,提前拦截托盘。 3.入料机构提前获取库位号,提前拦截托盘。
......
...@@ -608,6 +608,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -608,6 +608,11 @@ namespace OnlineStore.DeviceLibrary
{ {
isInOut = true; isInOut = true;
} }
if ((moveEquip.alarmType.Equals(LineAlarmType.None).Equals(false)) && moveEquip.WarnMsg.Contains("等待空托盘到达超时"))
{
isNeedAlarmLed = true;
}
} }
...@@ -1099,11 +1104,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1099,11 +1104,12 @@ namespace OnlineStore.DeviceLibrary
} }
foreach (EquipBase equip in AllEquipMap.Values) foreach (EquipBase equip in AllEquipMap.Values)
{ {
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时")) //if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时"))
{ //{
continue; // continue;
} //}
else if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("获取库位号超时")) //else
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("获取库位号超时"))
{ {
continue; continue;
} }
......
...@@ -273,7 +273,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,7 +273,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return true; return true;
} }
else if (MoveInfo.IsTimeOut(180)) else if (MoveInfo.IsTimeOut(300))
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.SLog + "]等待空托盘到达超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.SLog + "]等待空托盘到达超时[" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 12); LogUtil.error(WarnMsg, DeviceID * 1000 + 12);
...@@ -972,11 +972,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -972,11 +972,21 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) && MoveInfo.MoveType.Equals(LineMoveType.None)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) )
{
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
StartInStoreMove(SecondMoveInfo.MoveParam); StartInStoreMove(SecondMoveInfo.MoveParam);
CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)"); CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo);
}else if (SecondMoveInfo.IsTimeOut(30))
{
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待开始入库超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg + ",暂时放托盘离开");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 入库超时,放托盘离开,顶升气缸1下降");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
} }
#endregion #endregion
......
...@@ -8,6 +8,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -8,6 +8,10 @@ namespace OnlineStore.DeviceLibrary
public class ACCMDManager public class ACCMDManager
{ {
/// <summary> /// <summary>
/// 0020h 伺服 On 输入(SRV-ON) ReadOnly 0:输入 OFF、1:输入 ON
/// </summary>
public static string SRV_ON = "0020";
/// <summary>
/// 0130h 选通输入(STB) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON /// 0130h 选通输入(STB) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON
/// </summary> /// </summary>
internal static string STB_State = "0130"; internal static string STB_State = "0130";
......
...@@ -132,7 +132,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,7 +132,23 @@ namespace OnlineStore.DeviceLibrary
} }
} }
/// <summary>
/// 是否有伺服使能信号
/// </summary>
public static bool SRV_ON(string portName, int slvAddr)
{
if (!serialBeanMap.ContainsKey(portName))
{
return false;
}
PreReadCoilAddr = ACCMDManager.SRV_ON;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, PreReadCoilAddr, "0000", 1);
//SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
int result = GetCoilData(portName, reviceData, PreReadCoilAddr);
//TODO
return result >= 1;
}
/// <summary> /// <summary>
/// 是否成功打开伺服 /// 是否成功打开伺服
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!