Commit 615ba250 LN

叉子伸出前判断门是否上升到位。

1 个父辈 56a72d0b
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<add key="HumitureControllerType" value="0" /> <add key="HumitureControllerType" value="0" />
<add key="UseAIOBOX" value="1" /> <add key="UseAIOBOX" value="1" />
<!--流水线地址和端口配置--> <!--流水线地址和端口配置-->
<add key="LineServerIp" value="192.168.204.88" /> <add key="LineServerIp" value="192.168.104.88" />
<add key="LineServerPort" value="5246" /> <add key="LineServerPort" value="5246" />
<!--是否调试状态--> <!--是否调试状态-->
<add key="IsInDebug" value="1" /> <add key="IsInDebug" value="1" />
......
...@@ -701,7 +701,7 @@ ...@@ -701,7 +701,7 @@
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 92); this.richTextBox1.Location = new System.Drawing.Point(7, 92);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 425); this.richTextBox1.Size = new System.Drawing.Size(545, 425);
......
...@@ -184,25 +184,6 @@ namespace OnlineStore.ACSingleStore ...@@ -184,25 +184,6 @@ namespace OnlineStore.ACSingleStore
//忙碌状态不读取状态 //忙碌状态不读取状态
if (!store.storeRunStatus.Equals(StoreRunStatus.Busy)) if (!store.storeRunStatus.Equals(StoreRunStatus.Busy))
{ {
//if (chbAutoRead.Checked)
//{
// string portName = GetPortName();
// int SlvAddr = GetSlaveAddr();
// //判断私服是否打开、
// if (ACServerManager.ServerOnStatus(portName, SlvAddr))
// {
// lblServerOn.Text = "伺服ON";
// int lOutPulse = ACServerManager.GetTargetPosition(portName, SlvAddr);
// lblActual.Text = string.Format("{0:d}", lOutPulse);
// int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
// lblTargetP.Text = string.Format("{0:d}", lCountPulse);
// }
// else
// {
// lblServerOn.Text = "伺服OFF";
// }
//}
} }
//ReadPosistion(); //ReadPosistion();
...@@ -256,10 +237,10 @@ namespace OnlineStore.ACSingleStore ...@@ -256,10 +237,10 @@ namespace OnlineStore.ACSingleStore
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查"; lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查";
} }
if (IOManager.IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW)) //if (IOManager.IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
{ //{
lblWarnMsg.Text = lblWarnMsg.Text + " 无门禁信号,请检查"; // lblWarnMsg.Text = lblWarnMsg.Text + " 无门禁信号,请检查";
} //}
if (store.TempOrHumidityIsAlarm) if (store.TempOrHumidityIsAlarm)
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 温湿度报警[" + store.TempAlarmTime.ToLongTimeString() + "]"; lblWarnMsg.Text = lblWarnMsg.Text + " 温湿度报警[" + store.TempAlarmTime.ToLongTimeString() + "]";
......
...@@ -20,7 +20,7 @@ namespace OnlineStore.Common ...@@ -20,7 +20,7 @@ namespace OnlineStore.Common
public static System.Windows.Forms.RichTextBox logBox = null; public static System.Windows.Forms.RichTextBox logBox = null;
public static int showCount = 20; public static int showCount = 30;
public static bool debug_opened = false; public static bool debug_opened = false;
......
...@@ -400,6 +400,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -400,6 +400,14 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private bool DoorIsOpen()
{
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.LOW) && IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
public void OpenDoor(bool IsWait = true) public void OpenDoor(bool IsWait = true)
{ {
if (Config.HasDoor.Equals(1)) if (Config.HasDoor.Equals(1))
......
...@@ -104,7 +104,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -104,7 +104,7 @@ namespace OnlineStore.DeviceLibrary
} }
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH)); //StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
} }
private DateTime preRWTime = DateTime.Now;
private void CheckWait() private void CheckWait()
{ {
List<WaitResultInfo> list = StoreMove.WaitList; List<WaitResultInfo> list = StoreMove.WaitList;
...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue); wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut; int timeOutMs = Config.IOSingle_TimerOut;
if (StoreMove.MoveStep .Equals( StoreMoveStep.SO_14_WaitTake)) if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_14_WaitTake))
{ {
timeOutMs = 650000; timeOutMs = 650000;
} }
...@@ -169,6 +169,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -169,6 +169,29 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要重发入库结束命令 //判断是否需要重发入库结束命令
SendOutStoreEnd(StoreMove); SendOutStoreEnd(StoreMove);
} }
TimeSpan rwSpan = DateTime.Now - preRWTime;
if (!wait.IsEnd && rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6)
{
preRWTime = DateTime.Now;
string msg = StoreName + " " + NotOkMsg + "已等待 " + Math.Abs(span.TotalSeconds) + "秒,重写DO:";
bool isLog = false;
foreach (WaitResultInfo ww in list)
{
if (ww != null && ww.WaitType.Equals(2) && Config.StoreDOList.ContainsKey(ww.IoType))
{
isLog = true;
IOManager.IOMove(ww.IoType, ww.IoValue);
msg += ww.ToStr() + ",";
}
}
if (isLog)
{
LogUtil.error(msg);
}
isOk = false;
break;
}
} }
else if (wait.WaitType == 3) else if (wait.WaitType == 3)
{ {
...@@ -181,13 +204,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,13 +204,7 @@ namespace OnlineStore.DeviceLibrary
//{ //{
// LogUtil.debug("等待height=" + wait.HeightValue + "完成"); // LogUtil.debug("等待height=" + wait.HeightValue + "完成");
//} //}
} }
//else if (wait.WaitType == 5)
//{
// string msg = "";
// wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
//}
if (wait.IsEnd) if (wait.IsEnd)
{ {
if (StoreMove.OneWaitCanEndStep) if (StoreMove.OneWaitCanEndStep)
...@@ -291,10 +308,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -291,10 +308,20 @@ namespace OnlineStore.DeviceLibrary
} }
private void SI_05_DeviceToDoor() private void SI_05_DeviceToDoor()
{ {
InStoreLog("入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) "); if (DoorIsOpen())
StoreMove.NextMoveStep(StoreMoveStep.SI_05_DeviceToDoor); {
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed); //判断仓门是否打开
//NeedCheckSafetyLight = 1; InStoreLog("入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_05_DeviceToDoor);
ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
}
else
{
InStoreLog("入库:SI_04 叉子即将取料,发现门未上升到位,重新打开门 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
OpenDoor();
}
} }
protected override void InStoreProcess() protected override void InStoreProcess()
{ {
...@@ -338,7 +365,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -338,7 +365,8 @@ namespace OnlineStore.DeviceLibrary
{ {
InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"); InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare); StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
OpenDoor();
} }
else else
{ {
...@@ -708,11 +736,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -708,11 +736,22 @@ namespace OnlineStore.DeviceLibrary
private void SO_10_DeviceToDoorPro() private void SO_10_DeviceToDoorPro()
{ {
LineMoveP moveP = StoreMove.MoveParam.MoveP; if (DoorIsOpen())
StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor); {
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "); //判断仓门是否打开
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); LineMoveP moveP = StoreMove.MoveParam.MoveP;
//NeedCheckSafetyLight = 1; StoreMove.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
OutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
}
else
{
InStoreLog("出库:SO_09 叉子即将取料,发现门未上升到位,重新打开门 ");
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OpenDoor();
}
} }
public bool InOutAxisCanMove() public bool InOutAxisCanMove()
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!