|
|
@ -1,5 +1,6 @@
|
|
|
|
using Rs.Controls;
|
|
|
|
using Rs.Controls;
|
|
|
|
using Rs.Framework;
|
|
|
|
using Rs.Framework;
|
|
|
|
|
|
|
|
using Rs.Motion.Base;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
using Rs.MotionPlat.Entitys;
|
|
|
|
using Rs.MotionPlat.Entitys;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
|
using Rs.MotionPlat.Flow.Common;
|
|
|
@ -32,6 +33,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public class FixtureTakeFlow
|
|
|
|
public class FixtureTakeFlow
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int takeNum = 1;
|
|
|
|
bool finished = true;
|
|
|
|
bool finished = true;
|
|
|
|
EFixtureTakeFlowStep flowStep = EFixtureTakeFlowStep.待触发;
|
|
|
|
EFixtureTakeFlowStep flowStep = EFixtureTakeFlowStep.待触发;
|
|
|
|
public FixtureTakeFlow()
|
|
|
|
public FixtureTakeFlow()
|
|
|
@ -58,6 +60,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
AlarmEntity alarmEntity = new AlarmEntity();
|
|
|
|
AlarmEntity alarmEntity = new AlarmEntity();
|
|
|
|
public void Take(int fixtureIndex,int nozzleIndex=-1,bool btest=false, bool needStop = true)
|
|
|
|
public void Take(int fixtureIndex,int nozzleIndex=-1,bool btest=false, bool needStop = true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
takeNum = 1;
|
|
|
|
if (finished)
|
|
|
|
if (finished)
|
|
|
|
finished = false;
|
|
|
|
finished = false;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -245,9 +248,30 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (takeNum < 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
takeNum++;
|
|
|
|
|
|
|
|
IAxis homeAxis = AxisControl.GetAxis($"NozzleZ{curNozzle.NozzleIndex}");
|
|
|
|
|
|
|
|
if (homeAxis != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
homeAxis.Home();
|
|
|
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
|
|
|
while (true)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (homeAxis.HomeStatus == Motion.EHomeStatus.Finished)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Thread.Sleep(100);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
flowStep = EFixtureTakeFlowStep.到治具取料位上方;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具取料失败真空报警).Transform(curNozzle.NozzleIndex, curFixture.Index);
|
|
|
|
alarmEntity = AlarmCollection.Get(AlarmConstID.治具取料失败真空报警).Transform(curNozzle.NozzleIndex, curFixture.Index);
|
|
|
|
if(alarmEntity!=null)
|
|
|
|
if (alarmEntity != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logInfo = alarmEntity.CN;
|
|
|
|
logInfo = alarmEntity.CN;
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
|
MessageQueue.Instance.Warn(logInfo);
|
|
|
@ -279,6 +303,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
|
|
|
|
Msg.ShowError("Translated document cann't find item 治具取料失败真空报警");
|
|
|
|
Msg.ShowError("Translated document cann't find item 治具取料失败真空报警");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|