public bool PNPMoveToPointZDownLogic(MVVMPointYZ mVVMPointYZ, bool? isNewArm = null)
{
if (isNewArm == null)
{
isNewArm = JudgeZ(mVVMPointYZ);
}
if (Math.Abs(AxisPNP.Axis.Position - mVVMPointYZ.Y) > 0.01)
{//Y没到位则移动Y
if (UpAllZ())
{
return Global.HW.LogicMoveTo(AxisPNP, mVVMPointYZ.Y);
}
}
else
{//Y到位Z到位后返回True
if ((bool)isNewArm)
{
return Global.HW.LogicMoveTo(AxisPNPNewArm, mVVMPointYZ.Z);
}
else
{
return Global.HW.LogicMoveTo(AxisPNPCutArm, mVVMPointYZ.Z);
}
}
return false;
}
当不赋值时,自动检测生成可用值,在数据库中可空值应用广泛。