代码部分:
if (controller.OperatingMode == ControllerOperatingMode.Auto)
{
//获取控制器的任务集合
tasks = controller.Rapid.GetTasks();
//获取控制权
using (Mastership m = Mastership.Request(controller.Rapid))
{
//启动任务
// StartResult result = tasks[0].Start(RegainMode.Continue, ExecutionMode.Continuous, ExecutionCycle.Once, StartCheck.CallChain);
StartResult result = tasks[0].Start(true);
//显示启动结果,进行测试
MessageBox.Show(result.ToString());
}
}
报错提示:
Operation rejected by the controller safety access restriction mechanism.
楼主最近还看过