|
|
@@ -18,6 +18,12 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="value"></param>
|
|
|
void Set(string key, int value);
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 设置流程站点Id,绑定流程站点的中断点
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="stationId"></param>
|
|
|
+ void SetStationId(int stationId);
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取参数
|
|
|
/// </summary>
|
|
|
@@ -29,13 +35,13 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// 控制使能, true: motion控制有效, false: motion控制无效
|
|
|
/// 运动过程中如有电机抛出MotionException, 该控制使能自动失效
|
|
|
/// </summary>
|
|
|
- void Enable(bool enabled = true);
|
|
|
+ //void Enable(bool enabled = true);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 控制使能是否有效
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- bool IsEnable();
|
|
|
+ //bool IsEnable();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 开启所有电机使能
|
|
|
@@ -92,10 +98,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="axisCode">电机码</param>
|
|
|
/// <param name="waiting">是否等待(!注意:目前此参数设置为false无效)</param>
|
|
|
/// <param name="safeCnd">安全条件, 回零中如果不满足该安全条件立即停止并报警</param>
|
|
|
- /// <param name="onSuccess"></param>
|
|
|
/// <param name="onTimeout"></param>
|
|
|
/// <param name="timeout">超时时间(毫秒)</param>
|
|
|
- void Home(string axisCode, bool waiting = true, Func<bool> safeCnd = null, Action onSuccess = null, Action onTimeout = null, int timeout = 60000);
|
|
|
+ void Home(string axisCode, bool waiting = true, Func<bool> safeCnd = null, Action onTimeout = null, int timeout = 60000);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 指定轴快速回零, 该轴必须是闭环电机, 如果是开环电机则降级为普通的HomeAxis回零
|
|
|
@@ -107,11 +112,10 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="stateCheck">状态判断, 这里指Ecat总线连接状态以及上一次回零后Ecat总线是否正常</param>
|
|
|
/// <param name="waiting">是否等待(!注意:目前此参数设置为false无效)</param>
|
|
|
/// <param name="safeCnd">安全条件, 回零中如果不满足该安全条件立即停止并报警</param>
|
|
|
- /// <param name="onSuccess"></param>
|
|
|
/// <param name="onTimeout"></param>
|
|
|
/// <param name="timeout">超时时间(毫秒)</param>
|
|
|
void HomeFast(string axisCode, string speedCode, bool stateCheck, bool waiting = true,
|
|
|
- Func<bool> safeCnd = null, Action onSuccess = null, Action onTimeout = null, int timeout = 60000);
|
|
|
+ Func<bool> safeCnd = null, Action onTimeout = null, int timeout = 60000);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 指定轴反向回零.
|
|
|
@@ -122,11 +126,10 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="maxPos">限位位置相对原点的位置, 单位mm, 推荐在限位位置设置点位并从点位获取</param>
|
|
|
/// <param name="waiting">是否等待</param>
|
|
|
/// <param name="safeCnd">安全条件, 回零中如果不满足该安全条件立即停止并报警</param>
|
|
|
- /// <param name="onSuccess"></param>
|
|
|
/// <param name="onTimeout"></param>
|
|
|
/// <param name="timeout">超时时间(毫秒)</param>
|
|
|
void HomeReverse(string axisCode, short homeMode, double maxPos, bool waiting = true,
|
|
|
- Func<bool> safeCnd = null, Action onSuccess = null, Action onTimeout = null, int timeout = 60000);
|
|
|
+ Func<bool> safeCnd = null, Action onTimeout = null, int timeout = 60000);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 判断绑定某个点位的电机(一个或多个)是否在该点位附近。需同时满足negativeOffset与PositiveOffset的位置限定后返回true.
|
|
|
@@ -149,10 +152,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedRound">电机每秒旋转圈数</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MoveRound(string pointCode, double speedRound, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MoveRound(string pointCode, double speedRound, bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码
|
|
|
@@ -161,10 +162,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePoint(string pointCode, string speedCode = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePoint(string pointCode, string speedCode = null, bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码
|
|
|
@@ -173,10 +172,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="recipeSpeed">速度对象, null表示使用该点配置的默认速度</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePoint(RecipePoint recipePoint, RecipeSpeed recipeSpeed = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePoint(RecipePoint recipePoint, RecipeSpeed recipeSpeed = null, bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码
|
|
|
@@ -185,10 +182,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePoint(RecipePoint recipePoint, string speedCode = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePoint(RecipePoint recipePoint, string speedCode = null, bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码并能叠加指定偏移量
|
|
|
@@ -198,10 +193,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePointFix(string pointCode, double[] posOffsets, string speedCode = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePointFix(string pointCode, double[] posOffsets, string speedCode = null,
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码,并能叠加指定偏移量
|
|
|
@@ -211,10 +205,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePointFix(RecipePoint recipePoint, double[] posOffsets, string speedCode = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePointFix(RecipePoint recipePoint, double[] posOffsets, string speedCode = null,
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的(多个)电机以指定速度运动到点位码,并能叠加指定偏移量
|
|
|
@@ -224,10 +217,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="recipeSpeed">速度对象, null表示使用该点配置的默认速度</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void MovePointFix(RecipePoint recipePoint, double[] posOffsets, RecipeSpeed recipeSpeed = null, bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void MovePointFix(RecipePoint recipePoint, double[] posOffsets, RecipeSpeed recipeSpeed = null,
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码
|
|
|
@@ -237,11 +229,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOne(string pointCode, string axisCode, string speedCode = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码
|
|
|
@@ -251,11 +241,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOne(RecipePoint recipePoint, string axisCode, string speedCode = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码
|
|
|
@@ -265,11 +253,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="recipeSpeed">速度对象, null表示使用该点配置的默认速度</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOne(RecipePoint recipePoint, string axisCode, RecipeSpeed recipeSpeed = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码,并能叠加指定偏移量
|
|
|
@@ -280,11 +266,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOneFix(string pointCode, double fixset, string axisCode, string speedCode = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码,并能叠加指定偏移量
|
|
|
@@ -295,11 +279,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="recipeSpeed">速度对象, null表示使用该点配置的默认速度</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOneFix(RecipePoint recipePoint, double fixset, string axisCode, RecipeSpeed recipeSpeed = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 让绑定点位码的指定单个电机以指定速度运动到点位码,并能叠加指定偏移量
|
|
|
@@ -310,11 +292,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="speedCode">速度码, null表示使用该点配置的默认速度码</param>
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePointOneFix(RecipePoint recipePoint, double fixset, string axisCode, string speedCode = null,
|
|
|
- bool waiting = true, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 聚合多个点位码并同时运动
|
|
|
@@ -323,11 +303,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
/// <param name="sync">是否同步到达,false: 使用recipeSpeed的速度,true:以recipeSpeed为基准,调整各点位速度</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePoints(List<RecipePoint> recipePoints, RecipeSpeed recipeSpeed,
|
|
|
- bool waiting = true, double inRange = -1, bool sync = false,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, bool sync = false, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 聚合多个点位码并同时运动
|
|
|
@@ -337,11 +315,9 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="waiting">是否等待到位, 默认为true</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
/// <param name="sync">是否同步到达,false: 使用各自的点位中的速度,true:以speedCode为基准,调整各点位速度</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
void MovePoints(string[] pointCodes, string speedCode = null,
|
|
|
- bool waiting = true, double inRange = -1, bool sync = false,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ bool waiting = true, double inRange = -1, bool sync = false, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 等待电机运动到位
|
|
|
@@ -349,10 +325,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="axisCode">电机码</param>
|
|
|
/// <param name="timeout">超时时间</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void WaitAxis(string axisCode, int timeout = 10000, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void WaitAxis(string axisCode, int timeout = 10000, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 等待电机运动到位
|
|
|
@@ -360,10 +334,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="motionAxis">电机对象</param>
|
|
|
/// <param name="timeout">超时时间</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void WaitAxis(MotionAxis motionAxis, int timeout = 10000, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void WaitAxis(MotionAxis motionAxis, int timeout = 10000, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 等待点位上所有电机到位
|
|
|
@@ -371,10 +343,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="pointCode">点位码</param>
|
|
|
/// <param name="timeout">超时时间</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void WaitPoint(string pointCode, int timeout = 10000, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void WaitPoint(string pointCode, int timeout = 10000, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 等待点位上所有电机到位
|
|
|
@@ -382,11 +352,8 @@ namespace SKMC.Api.Motion.Control
|
|
|
/// <param name="recipePoint">点位对象</param>
|
|
|
/// <param name="timeout">超时时间</param>
|
|
|
/// <param name="inRange">整定范围, 单位毫米或者步距</param>
|
|
|
- /// <param name="safeCnd">安全条件, 运动中如果不满足该安全条件立即停止并报警</param>
|
|
|
- /// <param name="onSuccess">运动完成后的回调动作</param>
|
|
|
/// <param name="onTimeout">超时未完成的回调动作</param>
|
|
|
- void WaitPoint(RecipePoint recipePoint, int timeout = 10000, double inRange = -1,
|
|
|
- Action onSuccess = null, Action onTimeout = null);
|
|
|
+ void WaitPoint(RecipePoint recipePoint, int timeout = 10000, double inRange = -1, Action onTimeout = null);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 等待电机组所有电机到位
|