MoveCircularRelative

命令轴群之工具中心点自当前位置进行圆轴插补运动。终点和辅助点在相对于起始点的指定的坐标系统中定义(终点和辅助点的定义取决于所选的 CircMode 模式),

语法

KsCommandStatus MoveCircularRelative(
     int Index,
     McCircMode CircMode,
     int Length,
     double* AuxPoint,
     double* EndPoint,
     McCircPathChoice PathChoice,
     double Velocity,
     double Acceleration,
     double Deceleration,
     double Jerk,
     McCoordSystem CoordSystem,
     McBufferMode BufferMode,
     McTransitionMode TransitionMode,
     double* TransitionParameter
);

参数

Index [in]:轴组索引,索引以零为起点。最多可有 32 个轴组。

CircMode [in]:指定输入信号 AuxPoint 的定义。请见 McCircMode 类型。

Length [in]: AuxPoint EndPoint 阵列的长度。.

AuxPoint [in]:指定坐标系中每个维度的位置阵列 [1..N],其中 N 为 64。这些位置是相对于起点的位置所定义的。

EndPoint [in]:指定坐标系中每个维度的位置阵列 [1..N],其中 N 为 64。这些位置是相对于起点的位置所定义的。

PathChoice [in]:路径的选择。请见 McCircPathChoice 类型。

Velocity [in]:定义路径中坐标系路径的最大速度,永远为正值,非必要到达,[单位/秒]。

Acceleration [in]:最大加速度,永远为正值,非必要到达,单位由 McProfileType 类型决定,为 [单位/秒2] 或 [秒]。

Deceleration [in]:最大减速度,永远为正值,非必要到达,单位由 McProfileType 类型决定,为 [单位/秒2] 或 [秒]。

Jerk [in]:最大加加速度。永远为正值,非必要到达,单位由 McProfileType 类型决定,为 [单位/秒3] 或 [秒]。

CoordSystem [in]:座标系统,请见 McCoordSystem 类型。

BufferMode [in]:定义如何融合两功能的速度,请见 McBufferMode 类型。

TransitionMode [in]:插入转换曲线。请见 McTransitionMode 类型。

TransitionParameter [in]:转换模式的附加参数,若将 TransitionMode 设为 mcNone,则此参数无效。

回传值

返回 KsCommandStatus 结构。

备注

范例

VOID MoveCircular(INT Group, DOUBLE Radius, DOUBLE DistanceX, DOUBLE DistanceY) {
   DOUBLE EndPoint[3] = { DistanceX, DistanceY, 0 };
   DOUBLE AuxPoint[3] = { Radius, 0, 0 };

   //Start an absolute move.
   KsCommandStatus move = WaitForCommand(30, TRUE, MoveCircularRelative(Group, mcRadius, 3, 
      AuxPoint, EndPoint, mcShortPath, 
      3600, 36000, 36000, 3600000, mcAxisCoordSystem, 
      mcAborting, mcNone, NULL));

   DOUBLE Position[2] = { 0, 0 };
   GetGroupActualPosition(Group, mcAxisCoordSystem, mcActualValue, 2, Position);
   RtPrintf("Current Position: %d,%d\n", (int)Position[0], (int)Position[1]);
}

使用需求

  RT Win32
最低支援版本 4.0 4.0
标头档 ksmotion.h ksmotion.h
程式库 KsApi_Rtss.lib KsApi.lib

参见

MoveCircularAbsolute

MoveCircularAdditive