|
|
|
@ -5,6 +5,7 @@ using Rs.AutoDischarge.V3.Flow;
|
|
|
|
|
using Rs.Controls;
|
|
|
|
|
using Rs.Framework;
|
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
|
using Rs.MotionPlat.Flow.Camera;
|
|
|
|
|
using Rs.MotionPlat.Flow.SafePosFlow;
|
|
|
|
|
using Rs.MotionPlat.Flow.SubFlow;
|
|
|
|
|
using System;
|
|
|
|
@ -25,6 +26,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
public class TestCenter
|
|
|
|
|
{
|
|
|
|
|
TcpClientHelper client = new TcpClientHelper("127.0.0.1",2048);
|
|
|
|
|
//TcpClientHelper client = new TcpClientHelper("192.168.31.120", 2048);
|
|
|
|
|
SchedulingResult schedulResult = new SchedulingResult();
|
|
|
|
|
SchedulingMaterial sm;
|
|
|
|
|
Dictionary<int, AlarmItem> alarmInfos = new Dictionary<int, AlarmItem>();
|
|
|
|
@ -145,6 +147,7 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
{
|
|
|
|
|
foreach (string json in Scheduling.GetJsons(msg))
|
|
|
|
|
{
|
|
|
|
|
//MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
|
|
|
|
|
Scheduling schedule = JsonConvert.DeserializeObject<Scheduling>(json);
|
|
|
|
|
EInstruction eInstructioneInstruction = schedule.Instruction;
|
|
|
|
|
if (eInstructioneInstruction != EInstruction.InquireStatus)
|
|
|
|
@ -153,6 +156,35 @@ namespace Rs.MotionPlat.Flow
|
|
|
|
|
}
|
|
|
|
|
switch (eInstructioneInstruction)
|
|
|
|
|
{
|
|
|
|
|
case EInstruction.CheckTray:
|
|
|
|
|
MachineManage.Instance.SetLoadUnloadStatus(ERunState.Busying);
|
|
|
|
|
ReportToTestCenter(schedule);
|
|
|
|
|
//这里开始检测料盘
|
|
|
|
|
List<int> hasProduct = new List<int>();
|
|
|
|
|
SchedulingCheckTray checkTraySchedule = (SchedulingCheckTray)json;
|
|
|
|
|
int checkNum = checkTraySchedule.ProductCount;
|
|
|
|
|
int lastIndex = DischargeFlow.Instance.GetLastTakeSlotIndex();
|
|
|
|
|
for(int i=0;i<checkNum;i++)
|
|
|
|
|
{
|
|
|
|
|
lastIndex++;
|
|
|
|
|
if(lastIndex <= (GlobalTray.InputTray.RowNum * GlobalTray.InputTray.ColumnNum))
|
|
|
|
|
{
|
|
|
|
|
SlotProductHasOrNotResult result = UpCameraCheckFlow.Instance.CheckStockTrayHasProduct(ETrayType.Input, lastIndex, true);
|
|
|
|
|
if (result.HasProduct)
|
|
|
|
|
{
|
|
|
|
|
hasProduct.Add(lastIndex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
checkTraySchedule.Instruction = EInstruction.CheckTrayResult;
|
|
|
|
|
checkTraySchedule.ProductCount = hasProduct.Count;
|
|
|
|
|
ReportToTestCenter(checkTraySchedule);
|
|
|
|
|
MachineManage.Instance.SetLoadUnloadStatus(ERunState.Waiting);
|
|
|
|
|
break;
|
|
|
|
|
case EInstruction.MoveTurnoverArmToSafePoint:
|
|
|
|
|
ReportToTestCenter(schedule);
|
|
|
|
|
Task.Run(() => {
|
|
|
|
|