1
This commit is contained in:
parent
3926ec6158
commit
ebe721806a
@ -1609,7 +1609,7 @@ namespace ViewModel
|
||||
|
||||
if (lastMsg != TestRecStr)
|
||||
{
|
||||
|
||||
|
||||
msgNumber++;
|
||||
info = new RecordInfo() { Number = msgNumber, HappenTime = DateTime.Now, Describe = TestRecStr };
|
||||
//异步新增项 这是微软的BUG 只能这么麻烦了
|
||||
@ -1838,14 +1838,14 @@ namespace ViewModel
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step3:
|
||||
//放缓存皮带
|
||||
if (CurrXizui.State.StatusBackground == ColorStr.Yellow)
|
||||
|
||||
if (CurrXizui.State.StatusBackground == ColorStr.Yellow) //放缓存皮带
|
||||
{
|
||||
AnalysisFlow = new FlowModel("产品分选");
|
||||
MyFlow.RunStep = GengralProcessEnum.Step7;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
else if (CurrXizui.State.StatusBackground == ColorStr.Green) //放测试盒
|
||||
{
|
||||
//获取吸嘴
|
||||
CurrXizui = XizuiLabelPaperList[1];
|
||||
@ -1853,16 +1853,12 @@ namespace ViewModel
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
BoxOutPutFlow = new FlowModel("测试盒取出");
|
||||
|
||||
////获取可以取料的测试盒
|
||||
//CurrBox = TestBenchBox.Where(w => (w.State.StatusBackground == ColorStr.White && !ClearBox) || w.State.StatusBackground == ColorStr.Green || w.State.StatusBackground == ColorStr.Red).FirstOrDefault();
|
||||
//if (CurrBox != null)
|
||||
//{
|
||||
// //获取吸嘴
|
||||
// CurrXizui = XizuiLabelPaperList[1];
|
||||
// MyFlow.RunStep++;
|
||||
// MyFlow.RunTime = DateTime.Now;
|
||||
// BoxOutPutFlow = new FlowModel("测试盒取出");
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step4:
|
||||
@ -2380,7 +2376,8 @@ namespace ViewModel
|
||||
if (CurrXizui.State.StatusBackground == ColorStr.Green)
|
||||
{
|
||||
//良品皮带可放料/缓存流线可放料
|
||||
if ((DoneLineFlow.ProductPut && !InputList[I41流线1皮带检知1].LightUp && CurrXizui.Number == 2) || (CacheLineFlow.ProductPut && !InputList[I43流线2皮带检知1].LightUp && CurrXizui.Number == 1))
|
||||
if ((ProduceLineList[0].State.StatusBackground == ColorStr.White && ProduceLineList[1].State.StatusBackground == ColorStr.White && !InputList[I41流线1皮带检知1].LightUp && CurrXizui.Number == 2)
|
||||
|| (CacheLineList[0].State.StatusBackground == ColorStr.White && CacheLineList[1].State.StatusBackground == ColorStr.White && !InputList[I43流线2皮带检知1].LightUp && CurrXizui.Number == 1))
|
||||
{
|
||||
CurrXizui.QiGang.Switchs = true;
|
||||
MyFlow.RunStep++;
|
||||
@ -2434,7 +2431,21 @@ namespace ViewModel
|
||||
{
|
||||
BadLineRun = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (CurrXizui.Number == 1)
|
||||
{
|
||||
CacheLineList[0].State.StatusBackground = ColorStr.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProduceLineList[0].State.StatusBackground = ColorStr.Green;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
CurrXizui.State = new ShowInfo();
|
||||
ClearBox = false; //清料完成
|
||||
MyFlow.RunStep = GengralProcessEnum.Start;
|
||||
@ -2738,7 +2749,7 @@ namespace ViewModel
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (CacheLineFlow.ProductPut) //缓存可放料
|
||||
else if (CacheLineList[0].State.StatusBackground == ColorStr.White && CacheLineList[1].State.StatusBackground == ColorStr.White) //缓存可放料
|
||||
{
|
||||
CurrXizui.State.StatusBackground = ColorStr.Yellow;
|
||||
bl = true;
|
||||
@ -4567,7 +4578,7 @@ namespace ViewModel
|
||||
|
||||
ClearBox = false;
|
||||
|
||||
|
||||
|
||||
//MyVehicleBox.ForEach(w => w.State.StatusBackground = ColorStr.White);
|
||||
|
||||
//重置吸嘴状态
|
||||
@ -5232,121 +5243,87 @@ namespace ViewModel
|
||||
//重置信号
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
MyFlow.ProductPut = false;
|
||||
//流线检知状态,感应器有料状态需要持续1S
|
||||
if (MyFlow.InSignal.LightUp && MyFlow.OutSignal.LightUp)
|
||||
|
||||
//出料检知有
|
||||
if (ProduceLineList[1].State.StatusBackground == ColorStr.Green || MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
ExcepStop($"{MyFlow.InSignal.InputMeaning} 和 {MyFlow.OutSignal.InputMeaning} 不能同时有料,请取出一个 ");
|
||||
ProduceLineList[1].State.StatusBackground = ColorStr.Green;
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
//入料检知有
|
||||
else if (MyFlow.InSignal.LightUp)
|
||||
else if (ProduceLineList[0].State.StatusBackground == ColorStr.Green)
|
||||
{
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
//出料检知有
|
||||
else if (MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
MyFlow.ProductPut = true;
|
||||
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
|
||||
break;
|
||||
case GengralProcessEnum.Step2:
|
||||
//产品流到出料检知
|
||||
if (MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
ProduceLineList[0].State.StatusBackground = ColorStr.White;
|
||||
ProduceLineList[1].State.StatusBackground = ColorStr.Green;
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
NextStationSend.RequestOut = true; //向后站发送出料请求
|
||||
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(20) < DateTime.Now)
|
||||
{
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
ExcepNoStop($"从 {MyFlow.InSignal.InputMeaning} 到 {MyFlow.OutSignal.InputMeaning} 传递超时 ");
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
MyFlow.OutCmd.Switchs = true;
|
||||
ExcepNoStop($"良品线产品 到 {MyFlow.OutSignal.InputMeaning} 传递超时 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
MyFlow.OutCmd.Switchs = true;
|
||||
|
||||
MyFlow.OutCmd.Switchs = true;
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step10:
|
||||
//后站回复要料
|
||||
if (NextStationReceive.OutProducrOK && NextStationReceive.Running || OfflineMode)
|
||||
MyFlow.OutCmd.Switchs = false; //流线
|
||||
NextStationSend.RequestOut = true; //向后站发送出料请求
|
||||
if (NextStationReceive.Request && NextStationReceive.Running || OfflineMode)
|
||||
{
|
||||
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
|
||||
}
|
||||
else if (!MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
//感应器2S无信号
|
||||
if (MyFlow.RunTime.AddSeconds(2) <= DateTime.Now)
|
||||
{
|
||||
MyFlow.RunStep = GengralProcessEnum.Step1;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NextStationSend.RequestOut = true; //向后站发送出料请求
|
||||
MyFlow.OutCmd.Switchs = false; //流线
|
||||
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GengralProcessEnum.Step11:
|
||||
//出料检知无
|
||||
if (MyFlow.OutSignal.LightUp == false)
|
||||
{
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(10) < DateTime.Now)
|
||||
{
|
||||
|
||||
ExcepStop($"{MyFlow.OutSignal.InputMeaning} 流出超时");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step12:
|
||||
//后站撤销要料
|
||||
if (!NextStationReceive.OutProducrOK && NextStationReceive.Running || OfflineMode)
|
||||
if (!NextStationReceive.Request && NextStationReceive.Running || OfflineMode)
|
||||
{
|
||||
NextStationSend.Request = false; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = false; //流线
|
||||
NextStationSend.RequestOut = false; //撤销
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(10) < DateTime.Now)
|
||||
{
|
||||
//ExcepStop($"<后站交互>后站撤销要料回复超时");
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
ExcepNoStop($"<后站交互>后站撤销要料回复超时");
|
||||
NextStationSend.Request = true; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
else
|
||||
{
|
||||
NextStationSend.Request = true; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
|
||||
if (ProduceLineList[1].State.StatusBackground == ColorStr.White)
|
||||
{
|
||||
NextStationSend.Request = false; //回复出料信号
|
||||
MyFlow.RunStep = GengralProcessEnum.Start;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step13:
|
||||
|
||||
NextStationSend.RequestOut = false; //撤销
|
||||
MyFlow.RunStep = GengralProcessEnum.Start;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -5367,112 +5344,83 @@ namespace ViewModel
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
break;
|
||||
case GengralProcessEnum.Step1:
|
||||
//重置信号
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
MyFlow.ProductPut = false;
|
||||
//流线检知状态,感应器有料状态需要持续1S
|
||||
if (MyFlow.InSignal.LightUp && MyFlow.OutSignal.LightUp)
|
||||
if (CacheLineList[1].State.StatusBackground == ColorStr.Green || MyFlow.OutSignal.LightUp) //出料检知有
|
||||
{
|
||||
ExcepStop($"{MyFlow.InSignal.InputMeaning} 和 {MyFlow.OutSignal.InputMeaning} 不能同时有料,请取出一个 ");
|
||||
CacheLineList[1].State.StatusBackground = ColorStr.Green;
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10; //出料
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.InSignal.LightUp && PutLock == false) //入料检知有
|
||||
else if (CacheLineList[0].State.StatusBackground == ColorStr.Green) //入料检知有
|
||||
{
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.OutSignal.LightUp) //出料检知有
|
||||
{
|
||||
if (NextStationReceive.RequestCache && NextStationReceive.Running) //后站要料,优先流向后站
|
||||
{
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10; //出料
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else //流线检知无,等待机械手放料
|
||||
{
|
||||
MyFlow.ProductPut = true;
|
||||
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step2:
|
||||
//产品流到出料检知
|
||||
if (MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
NextStationSend.RequestOutCache = true; //向后站发送出料请求
|
||||
MyFlow.RunStep = GengralProcessEnum.Step1;
|
||||
CacheLineList[0].State.StatusBackground = ColorStr.White;
|
||||
CacheLineList[1].State.StatusBackground = ColorStr.Green;
|
||||
|
||||
MyFlow.RunStep = GengralProcessEnum.Step10;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(20) < DateTime.Now)
|
||||
{
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
ExcepNoStop($"从 {MyFlow.InSignal.InputMeaning} 到 {MyFlow.OutSignal.InputMeaning} 传递超时 ");
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
MyFlow.OutCmd.Switchs = true;
|
||||
ExcepNoStop($"缓存产品到 {MyFlow.OutSignal.InputMeaning} 传递超时 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
MyFlow.OutCmd.Switchs = true;
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step10:
|
||||
MyFlow.OutCmd.Switchs = false;
|
||||
//后站要料,出料
|
||||
if (NextStationReceive.RequestCache && NextStationReceive.Running)
|
||||
{
|
||||
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
NextStationSend.RequestCacheAchieve = true; //回复出料信号
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step11:
|
||||
//出料检知无
|
||||
if (!MyFlow.OutSignal.LightUp)
|
||||
{
|
||||
NextStationSend.RequestCache = true; //回复出料信号
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(10) < DateTime.Now)
|
||||
{
|
||||
ExcepStop($"{MyFlow.OutSignal.InputMeaning} 流出超时");
|
||||
}
|
||||
else
|
||||
{
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
break;
|
||||
case GengralProcessEnum.Step12:
|
||||
|
||||
case GengralProcessEnum.Step11:
|
||||
//后站撤销要料
|
||||
if (!NextStationReceive.RequestCache && NextStationReceive.Running || OfflineMode)
|
||||
{
|
||||
NextStationSend.RequestCache = false; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = false; //流线
|
||||
NextStationSend.RequestCacheAchieve = false; //撤销出料请求
|
||||
MyFlow.RunStep++;
|
||||
CacheLineList[1].State.StatusBackground = ColorStr.White;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
|
||||
}
|
||||
else if (MyFlow.RunTime.AddSeconds(10) < DateTime.Now)
|
||||
{
|
||||
//ExcepStop($"<后站交互>后站撤销要料回复超时");
|
||||
MyFlow.RunStep++;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
ExcepNoStop($"<后站交互>后站撤销要料回复超时");
|
||||
NextStationSend.RequestCache = true; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
else
|
||||
{
|
||||
NextStationSend.RequestCacheAchieve = true; //回复出料信号
|
||||
NextStationSend.RequestCache = true; //回复出料信号
|
||||
MyFlow.OutCmd.Switchs = true; //流线
|
||||
}
|
||||
|
||||
if (CacheLineList[1].State.StatusBackground == ColorStr.White)
|
||||
{
|
||||
NextStationSend.RequestCache = false; //回复出料信号
|
||||
MyFlow.RunStep = GengralProcessEnum.Start;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
}
|
||||
|
||||
break;
|
||||
case GengralProcessEnum.Step13:
|
||||
|
||||
NextStationSend.RequestCacheAchieve = false; //撤销出料请求
|
||||
MyFlow.RunStep = GengralProcessEnum.Start;
|
||||
MyFlow.RunTime = DateTime.Now;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -102,8 +102,8 @@
|
||||
Background="{Binding StatusBackground}"></Label>
|
||||
|
||||
<GroupBox Header="前后机台运行状态" Padding="0" Grid.Row="5" Grid.RowSpan="2" Grid.Column="1" Content="{Binding StationStateGrid}"></GroupBox>
|
||||
<GroupBox Header="缓存流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Content="{Binding ProduceLineGrid}"></GroupBox>
|
||||
<GroupBox Header="良品流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Grid.Column="1" Content="{Binding CacheLineGrid}"></GroupBox>
|
||||
<GroupBox Header="良品流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Content="{Binding ProduceLineGrid}"></GroupBox>
|
||||
<GroupBox Header="缓存流线物料状态" Padding="0" Grid.Row="8" Grid.RowSpan="2" Grid.Column="1" Content="{Binding CacheLineGrid}"></GroupBox>
|
||||
<GroupBox Header="测试平台状态" Padding="0" Grid.Row="10" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding TestBenchGrid}"></GroupBox>
|
||||
<GroupBox Header="吸嘴状态" Padding="0" Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{Binding XizuiLabelGrid}"></GroupBox>
|
||||
<!--<Grid Grid.Row="12" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user