取放料增加一个是否受停止按钮的控制

master
lhiven 10 months ago
parent 845dac2c83
commit ef28c6bf22

@ -374,7 +374,7 @@ namespace Rs.MotionPlat.Flow
ProductLocationResult ret = productLocationResult.Where(r => r.SlotIndex == takeSlotIndex).FirstOrDefault();
if(ret != null || GlobalVar.RunSpace)
{
if((ret!= null && ret.Result== EOneGrabSixteenResult.Ok) || GlobalVar.RunSpace)
if((ret!= null && ret.Result== EOneGrabSixteenResult.Ok) ||(ret!=null &&ret.Result== EOneGrabSixteenResult.LocationOkScanBarcodeFail && GlobalVar.EnableVirtualBarCode) || GlobalVar.RunSpace)
{
StockTakeFlow.Instance.Take( ETrayType.Input, takeSlotIndex, NozzleManager.GetIdelNozzle().NozzleIndex);
takeSlotIndex++;
@ -677,6 +677,7 @@ namespace Rs.MotionPlat.Flow
if (placeSlotIndex > 0)
{
StockPlaceFlow.Instance.Place(ETrayType.Ok, placeSlotIndex, placeNozzleIndex);
}
else if (placeSlotIndex == 0)//此区域已经无穴位放产品
{

@ -49,7 +49,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
/// 三点定位(左上/右上/左下)
/// </summary>
/// <param name="trayType"></param>
public void Location(ETrayType trayType)
public void Location(ETrayType trayType,bool needStop=true)
{
step = EThreePointLocationFlowStep.;
List<int> points = new List<int>() { 1, 16, 241 };
@ -65,7 +65,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
//Task.Run(() => {
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
{
Thread.Sleep(10);
continue;

@ -56,12 +56,13 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
private AlarmEntity alarmEntity = null;
EDischargeModuleGoSafePosFlowStep step = EDischargeModuleGoSafePosFlowStep.;
TargetPosition targetPos = new TargetPosition();
/// <summary>
/// 排料头回安全位
/// </summary>
public void GoSafePostion()
{
TargetPosition targetPos = new TargetPosition();
if (finished)
{
taskFinishedEvent.Reset();
@ -138,6 +139,7 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
/// </summary>
public void MoveXToSafe()
{
TargetPosition targetPos = new TargetPosition();
bool arrivedSafePos = false;
EDischargeModuleGoSafePosFlowStep moveXStep = EDischargeModuleGoSafePosFlowStep.;
//判断Y1当前在治具还是在料仓只有在治具侧才需要把X先移动到安全位
@ -184,6 +186,7 @@ namespace Rs.MotionPlat.Flow.SafePosFlow
/// </summary>
public void MoveY1ToFixtureSide(double targetLoadX)
{
TargetPosition targetPos = new TargetPosition();
bool arrivedSafePos = false;
EDischargeModuleGoSafePosFlowStep moveY1Step = EDischargeModuleGoSafePosFlowStep.;
//判断Y1当前在治具还是在料仓只有在料仓侧才需要把Y1先移动治具那边

@ -65,7 +65,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// <param name="tray">需要放入的料盘</param>
/// <param name="nozzleIndex">哪个吸嘴放</param>
/// <param name="className"></param>
public void Place(ETrayType trayType,int slotIndex,int nozzleIndex)
public void Place(ETrayType trayType,int slotIndex,int nozzleIndex,bool needStop=true)
{
RsTray tray = null;
if (finished)
@ -99,7 +99,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
TraySlot curPlaceSlot = null;
while (!finished)
{
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
{
Thread.Sleep(10);
continue;

@ -60,7 +60,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// 料仓取料
/// </summary>
/// <param name="className"></param>
public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, ProductLocationResult locaResult=null)
public void Take(ETrayType trayType, int slotIndex,int nozzleIndex, ProductLocationResult locaResult=null,bool needStop=true)
{
if (finished)
finished = false;
@ -71,7 +71,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
TargetPosition targetPosition = new TargetPosition();
while (!finished)
{
if (MachineManage.Instance.MachineStatus== EMachineStatus.Stop)
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
{
Thread.Sleep(10);
continue;
@ -188,9 +188,19 @@ namespace Rs.MotionPlat.Flow.SubFlow
}
else
{
if(OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex)!=null)
ProductLocationResult vResult = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex);
if (vResult!=null)
{
curNozzle.Product = new TestProduct() { SN = OneGrabSixteenManager.Instance.GetResultBySlotIndex(slotIndex).SN, TestNum = 0, From = $"R{waitTakeProductSlot.Row + 1}C{waitTakeProductSlot.Column + 1}" };
string sn = string.Empty;
if(GlobalVar.EnableVirtualBarCode)
{
sn = VirtualBarCode.Code;
}
else
{
sn = vResult.SN;
}
curNozzle.Product = new TestProduct() { SN = sn, TestNum = 0, From = $"R{waitTakeProductSlot.Row + 1}C{waitTakeProductSlot.Column + 1}" };
}
}
curNozzle.Status = ENozzleStatus.ToTest;

Loading…
Cancel
Save