Commit e27b9d14 LN

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

1 个父辈 d0f34a9d
......@@ -73,6 +73,8 @@
this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
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.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
......@@ -96,6 +98,8 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.textBoxON);
this.groupBox1.Controls.Add(this.txtBusyStatus);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.txtHomeStatus);
......@@ -111,9 +115,9 @@
this.groupBox1.Controls.Add(this.txtLimit1);
this.groupBox1.Controls.Add(this.label6);
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.Size = new System.Drawing.Size(125, 277);
this.groupBox1.Size = new System.Drawing.Size(125, 279);
this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态";
......@@ -121,7 +125,7 @@
// txtBusyStatus
//
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.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
......@@ -129,7 +133,7 @@
// label11
//
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.Size = new System.Drawing.Size(81, 17);
this.label11.TabIndex = 292;
......@@ -138,7 +142,7 @@
// txtHomeStatus
//
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.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
......@@ -146,7 +150,7 @@
// label10
//
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.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
......@@ -155,7 +159,7 @@
// label3
//
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.Size = new System.Drawing.Size(59, 17);
this.label3.TabIndex = 286;
......@@ -164,7 +168,7 @@
// label24
//
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.Size = new System.Drawing.Size(71, 17);
this.label24.TabIndex = 316;
......@@ -174,7 +178,7 @@
// label5
//
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.Size = new System.Drawing.Size(59, 17);
this.label5.TabIndex = 328;
......@@ -183,7 +187,7 @@
// btnGetAlarm
//
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.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.TabIndex = 284;
......@@ -194,7 +198,7 @@
// txtAlarmStatus
//
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.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
......@@ -202,7 +206,7 @@
// txtLimit2
//
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.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
......@@ -210,7 +214,7 @@
// txtServoStatue
//
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.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
......@@ -218,7 +222,7 @@
// label22
//
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.Size = new System.Drawing.Size(71, 17);
this.label22.TabIndex = 312;
......@@ -228,7 +232,7 @@
// txtLimit1
//
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.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
......@@ -236,7 +240,7 @@
// label6
//
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.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
......@@ -245,7 +249,7 @@
// txtHomeSingle
//
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.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
......@@ -637,6 +641,23 @@
this.lblServerOn.Size = new System.Drawing.Size(0, 19);
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
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -700,5 +721,7 @@
private System.Windows.Forms.Button btnAddMove;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox textBoxON;
}
}
......@@ -113,7 +113,8 @@ namespace OnlineStore.AssemblyLine
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
{
txtServoStatue.Text = ACServerManager.SRV_ON(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
......
20210322
2020120325
等待托盘超时报警时,蜂鸣器响。
20210322
1.进仓阻挡1下降2秒后自动上升
2.入料机构点击暂停时只暂停入料,托盘继续处理。
3.入料机构提前获取库位号,提前拦截托盘。
......
......@@ -595,7 +595,7 @@ namespace OnlineStore.DeviceLibrary
}
foreach (EquipBase moveEquip in AllEquipMap.Values)
{
{
if (moveEquip.isNoAirCheck || moveEquip.isInSuddenDown || moveEquip.alarmType > LineAlarmType.AxisAlarm)
{
isNeedAlarmLed = true;
......@@ -608,6 +608,11 @@ namespace OnlineStore.DeviceLibrary
{
isInOut = true;
}
if ((moveEquip.alarmType.Equals(LineAlarmType.None).Equals(false)) && moveEquip.WarnMsg.Contains("等待空托盘到达超时"))
{
isNeedAlarmLed = true;
}
}
......@@ -1099,11 +1104,12 @@ namespace OnlineStore.DeviceLibrary
}
foreach (EquipBase equip in AllEquipMap.Values)
{
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时"))
{
continue;
}
else if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("获取库位号超时"))
//if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时"))
//{
// continue;
//}
//else
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("获取库位号超时"))
{
continue;
}
......
......@@ -273,7 +273,7 @@ namespace OnlineStore.DeviceLibrary
{
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) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 12);
......@@ -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) )
{
StartInStoreMove(SecondMoveInfo.MoveParam);
CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo);
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{
StartInStoreMove(SecondMoveInfo.MoveParam);
CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,等待移栽完成后放开阻挡)");
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
......
......@@ -8,6 +8,10 @@ namespace OnlineStore.DeviceLibrary
public class ACCMDManager
{
/// <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
/// </summary>
internal static string STB_State = "0130";
......
......@@ -131,8 +131,24 @@ namespace OnlineStore.DeviceLibrary
ColsePort(key);
}
}
/// <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>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!