Commit bc6a6895 张东亮

1

1 个父辈 f48d80e7
...@@ -324,32 +324,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,32 +324,32 @@ namespace OnlineStore.DeviceLibrary
{ {
insafeAtOutlet = false; insafeAtOutlet = false;
insafeAtInlet = false; insafeAtInlet = false;
if (GetRobotInfo(out JAKA.JAKABean bean)) //if (GetRobotInfo(out JAKA.JAKABean bean))
{ //{
if (start) // if (start)
{ // {
bean.Run(); // bean.Run();
} // }
else // else
bean.Abort(); // bean.Abort();
} //}
} }
/// <summary> /// <summary>
/// 机器人运动中止 /// 机器人运动中止
/// </summary> /// </summary>
public void MotionAbort() public void MotionAbort()
{ {
if (GetRobotInfo(out JAKA.JAKABean bean)) //if (GetRobotInfo(out JAKA.JAKABean bean))
{ //{
bean.MotionAbort(); // bean.MotionAbort();
} //}
} }
public bool RobotPause() public bool RobotPause()
{ {
if (GetRobotInfo(out JAKA.JAKABean bean)) //if (GetRobotInfo(out JAKA.JAKABean bean))
{ //{
return bean.Pause(); // return bean.Pause();
} //}
return false; return false;
} }
......
...@@ -127,16 +127,16 @@ namespace JAKA ...@@ -127,16 +127,16 @@ namespace JAKA
public bool GetDigitalOutput(JKTYPE.IOType iOType, int index, out bool result) public bool GetDigitalOutput(JKTYPE.IOType iOType, int index, out bool result)
{ {
result = false; result = false;
int rtn = jakaAPI.get_digital_output(ref _handle, iOType, index, ref result); //int rtn = jakaAPI.get_digital_output(ref _handle, iOType, index, ref result);
if (rtn == RtnCode.ERR_SUCC) //if (rtn == RtnCode.ERR_SUCC)
{ //{
DebugLog($"GetDigitalOutput [{iOType}][{index}={result}] OK"); // DebugLog($"GetDigitalOutput [{iOType}][{index}={result}] OK");
return true; // return true;
} //}
else //else
{ //{
ErrorLog($"GetDigitalOutput [{iOType}][{index}={result}] Fail:{RtnCode.GetStrByCode(rtn)}"); // ErrorLog($"GetDigitalOutput [{iOType}][{index}={result}] Fail:{RtnCode.GetStrByCode(rtn)}");
} //}
return false; return false;
} }
/// <summary> /// <summary>
......
...@@ -133,10 +133,10 @@ namespace JAKA ...@@ -133,10 +133,10 @@ namespace JAKA
{ {
try try
{ {
if (jakaBean.GetDigitalOutput(IOType.IO_CABINET, 0, out bool insafe)) //if (jakaBean.GetDigitalOutput(IOType.IO_CABINET, 0, out bool insafe))
{ //{
lblSafe.BackColor = insafe ? Color.YellowGreen : Color.Red; // lblSafe.BackColor = insafe ? Color.YellowGreen : Color.Red;
} //}
} }
catch catch
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!