Commit ad45b768 LN

bug修改

1 个父辈 c5310bd9
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
// //
this.lblCurrTray.AutoSize = true; this.lblCurrTray.AutoSize = true;
this.lblCurrTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblCurrTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCurrTray.Location = new System.Drawing.Point(12, 60); this.lblCurrTray.Location = new System.Drawing.Point(12, 55);
this.lblCurrTray.Name = "lblCurrTray"; this.lblCurrTray.Name = "lblCurrTray";
this.lblCurrTray.Size = new System.Drawing.Size(121, 17); this.lblCurrTray.Size = new System.Drawing.Size(121, 17);
this.lblCurrTray.TabIndex = 286; this.lblCurrTray.TabIndex = 286;
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
// //
this.lblOutTray.AutoSize = true; this.lblOutTray.AutoSize = true;
this.lblOutTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblOutTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblOutTray.Location = new System.Drawing.Point(12, 26); this.lblOutTray.Location = new System.Drawing.Point(12, 29);
this.lblOutTray.Name = "lblOutTray"; this.lblOutTray.Name = "lblOutTray";
this.lblOutTray.Size = new System.Drawing.Size(133, 17); this.lblOutTray.Size = new System.Drawing.Size(133, 17);
this.lblOutTray.TabIndex = 285; this.lblOutTray.TabIndex = 285;
......
...@@ -96,5 +96,7 @@ namespace OnlineStore.Common ...@@ -96,5 +96,7 @@ namespace OnlineStore.Common
/// </summary> /// </summary>
public static string LabelWaitMS = "LabelWaitMS"; public static string LabelWaitMS = "LabelWaitMS";
public static string GratingSignal = " GratingSignal";
} }
} }
...@@ -346,6 +346,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -346,6 +346,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void CheckHasTray() private void CheckHasTray()
{ {
WarnMsg = "";
if (Robot.IOValue(IO_AxisTrayCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false)) if (Robot.IOValue(IO_AxisTrayCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false))
{ {
IB09_ScanCode(); IB09_ScanCode();
......
...@@ -450,7 +450,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -450,7 +450,10 @@ namespace OnlineStore.DeviceLibrary
{ {
level = WorkLogLevel; level = WorkLogLevel;
} }
level = WorkLogLevel; if (level <= WorkLogLevel)
{
level = WorkLogLevel;
}
string code = ""; string code = "";
if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.WareCode != null) if (MoveInfo.MoveParam != null && MoveInfo.MoveParam.WareCode != null)
{ {
......
...@@ -88,6 +88,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,6 +88,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog("取料: 进出轴前进到P2",0); WorkLog("取料: 进出轴前进到P2",0);
InOutAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Inout_P2(Config), Config.InoutAxis_P2Speed); InOutAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Inout_P2(Config), Config.InoutAxis_P2Speed);
} }
private Task GetTargetPTask = null;
protected override void WorkingProcess() protected override void WorkingProcess()
{ {
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
...@@ -190,6 +191,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -190,6 +191,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.IW10_SaveSize)) else if (MoveInfo.IsStep(StepEnum.IW10_SaveSize))
{ {
GetTargetPTask = null;
MoveInfo.NextMoveStep(StepEnum.IW11_GetTargetPosition); MoveInfo.NextMoveStep(StepEnum.IW11_GetTargetPosition);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (String.IsNullOrEmpty(MoveInfo.MoveParam.WareCode)) if (String.IsNullOrEmpty(MoveInfo.MoveParam.WareCode))
...@@ -207,7 +209,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
else if (SServerManager.CanConnect()) else if (SServerManager.CanConnect())
{ {
Task task = Task.Factory.StartNew(delegate GetTargetPTask = Task.Factory.StartNew(delegate
{ {
int needPosition = 0; int needPosition = 0;
string msg = SServerManager.Get_VMICheckRLC(Name, MoveInfo.MoveParam.WareCode, out needPosition); string msg = SServerManager.Get_VMICheckRLC(Name, MoveInfo.MoveParam.WareCode, out needPosition);
...@@ -243,37 +245,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,37 +245,47 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IW11_GetTargetPosition)) else if (MoveInfo.IsStep(StepEnum.IW11_GetTargetPosition))
{ {
if (MoveInfo.MoveParam.TargetPosType.Equals(0)) if (GetTargetPTask == null || GetTargetPTask.IsCompleted)
{ {
if (SServerManager.CanConnect()) if (MoveInfo.MoveParam.TargetPosType.Equals(0))
{ {
if (MoveInfo.IsTimeOut(120)) if (SServerManager.CanConnect())
{
if (MoveInfo.IsTimeOut(120))
{
WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType, MoveInfo.logSeconds());
Alarm(AlarmType.IoSingleTimeOut);
}
}
else
{ {
WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒"; ////随机目标地址
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType,MoveInfo.logSeconds()); //Random r = new Random();
Alarm(AlarmType.IoSingleTimeOut); //int targetP = r.Next(1, 100) % 3 + 1;
MoveInfo.MoveParam.TargetPosType = 1;
WorkLog(" 随机放料目标:" + 1, 1);
} }
} }
if (MoveInfo.MoveParam.TargetPosType.Equals(1))
{
ClearTimeoutAlarm("验证是否测值");
MoveInfo.NextMoveStep(StepEnum.IW21_MiddleToP3);
WorkLog(" 开始放料到XRay入口,旋转轴到P3", 1);
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed);
}
else else
{ {
////随机目标地址 ClearTimeoutAlarm("验证是否测值");
//Random r = new Random(); MoveInfo.NextMoveStep(StepEnum.IW31_MIddleToP4);
//int targetP = r.Next(1, 100) % 3 + 1; WorkLog(" 开始放料到测值工位,旋转轴到P4", 1);
MoveInfo.MoveParam.TargetPosType = 1; MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed);
WorkLog(" 随机放料目标:" + 1,1);
} }
} }else if (MoveInfo.IsTimeOut(120))
if (MoveInfo.MoveParam.TargetPosType.Equals(1))
{
MoveInfo.NextMoveStep(StepEnum.IW21_MiddleToP3);
WorkLog(" 开始放料到XRay入口,旋转轴到P3",1);
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P3, Config.MiddleAxis_P3Speed);
}
else
{ {
MoveInfo.NextMoveStep(StepEnum.IW31_MIddleToP4); WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒";
WorkLog(" 开始放料到测值工位,旋转轴到P4",1); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType, MoveInfo.logSeconds());
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
......
...@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary
public class RobotManager public class RobotManager
{ {
public static bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1); public static bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
public static bool GratingSignal = ConfigAppSettings.GetIntValue(Setting_Init.GratingSignal).Equals(1);
private static bool isInit = false; private static bool isInit = false;
public static RobotBean robot = null; public static RobotBean robot = null;
......
...@@ -70,6 +70,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -70,6 +70,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
msg = strData.data.msg;
return msg; return msg;
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!