优化手动治具取放料不动

master
lhiven 10 months ago
parent b0c0f96827
commit 89f7996e56

@ -58,7 +58,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
/// <summary> /// <summary>
/// 治具放料 /// 治具放料
/// </summary> /// </summary>
public void Place(int fixtureIndex,int nozzleIndex,bool bTest=false) public void Place(int fixtureIndex,int nozzleIndex,bool bTest=false, bool needStop = true)
{ {
if (finished) if (finished)
finished = false; finished = false;
@ -71,7 +71,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
Nozzle curNozzle=NozzleManager.GetNozzle(nozzleIndex); Nozzle curNozzle=NozzleManager.GetNozzle(nozzleIndex);
while (!finished) while (!finished)
{ {
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop) if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
{ {
Thread.Sleep(10); Thread.Sleep(10);
continue; continue;

@ -56,7 +56,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) public void Take(int fixtureIndex,int nozzleIndex=-1,bool btest=false, bool needStop = true)
{ {
if (finished) if (finished)
finished = false; finished = false;
@ -70,7 +70,7 @@ namespace Rs.MotionPlat.Flow.SubFlow
while (!finished) while (!finished)
{ {
if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop) if (MachineManage.Instance.MachineStatus == EMachineStatus.Stop && needStop)
{ {
Thread.Sleep(10); Thread.Sleep(10);
continue; continue;

@ -183,7 +183,7 @@ namespace Rs.MotionPlat.SysConfig
if (rbtnNozzle4.Checked) if (rbtnNozzle4.Checked)
nozzleIndex = 4; nozzleIndex = 4;
Task.Run(() => { Task.Run(() => {
FixtureTakeFlow.Instance.Take(int.Parse(((Button)sender).Tag.ToString()), nozzleIndex,true); FixtureTakeFlow.Instance.Take(int.Parse(((Button)sender).Tag.ToString()), nozzleIndex,true,false);
//double curLoadX = Ops.GetCurPosition(AxisControl.LoadX); //double curLoadX = Ops.GetCurPosition(AxisControl.LoadX);
//if (curLoadX - GlobalVar.FixtureSafePosX > 50) //if (curLoadX - GlobalVar.FixtureSafePosX > 50)
//{ //{
@ -205,8 +205,8 @@ namespace Rs.MotionPlat.SysConfig
if (rbtnNozzle4.Checked) if (rbtnNozzle4.Checked)
nozzleIndex = 4; nozzleIndex = 4;
Task.Run(() => { Task.Run(() => {
FixturePlaceFlow.Instance.Place(int.Parse(((Button)sender).Tag.ToString()), nozzleIndex,true); FixturePlaceFlow.Instance.Place(int.Parse(((Button)sender).Tag.ToString()), nozzleIndex,true,false);
double curLoadX = Ops.GetCurPosition(AxisControl.LoadX); //double curLoadX = Ops.GetCurPosition(AxisControl.LoadX);
//if(curLoadX-GlobalVar.FixtureSafePosX>50) //if(curLoadX-GlobalVar.FixtureSafePosX>50)
//{ //{
// DischargeModuleGoSafePosFlow.Instance.GoSafePostion(ESafePosSide.PlaceToStock); // DischargeModuleGoSafePosFlow.Instance.GoSafePostion(ESafePosSide.PlaceToStock);

Loading…
Cancel
Save