InchGroup
Commands a never-ending controlled motion at a specified velocity for an axis group with a maximum distance. After the axis reaches the maximum distance it will automatically stop.
Syntax
KsCommandStatus InchGroup(
int Index,
int Length,
double* Distance,
double* Velocity,
double Acceleration,
double Deceleration,
double Jerk,
McCoordSystem CoordSystem
);
Parameters
Index [in]: the index of an axis group. Indexes are zero based. Aliases affect this parameter. You can have up to 32 groups.
Length [in]: the length of the Distance or Velocity. The length of them is same.
Distance [in]: the maximum distance traveled by this move.
Velocity [in]: a value of the specified velocity. [unit/second]
Acceleration [in]: a value of the acceleration. The unit is determined by the McProfileType type. (increasing energy of the motor) [unit/second2] or [second]
Deceleration [in]: a value of the deceleration. The unit is determined by the McProfileType type. (decreasing energy of the motor) [unit/second2] or [second]
Jerk [in]: a value of the jerk. The unit is determined by the McProfileType type. [unit/second3] or [second]
CoordSystem [in]: a coordinate system. See the McCoordSystem type.
Return value
Returns the KsCommandStatus structure.
Remarks
- The Velocity, Acceleration, Deceleration and Jerk are for each axis in the group, not for the path values. If one of these parameters' values, for example, Acceleration, exceeds the maximum Acceleration of one of the axes in the group, the axis will use its own max Acceleration value. Other axes use the provided values.
- Velocity and Distance can be modified when the axis group is running.
- The elements of the Distance array must greater than zero (> 0). That is, the distance for each axis to travel is greater than zero (> 0).
- InchGroup can be used only in the GroupStandstill state.
- If one of the axes in the group has done the movement and others haven't, but you want to keep that axis moving, you have two choices:
- Increase the distance. The axis will travel the increased part in another movement. For example, you change the distance from 2000 to 2500. The axis will travel 500 units more after it traveled 2000 units.
- Change the velocity of the axis. The axis will travel the current distance again using the new velocity.
IMPORTANT: If the distance is very short and the velocity is very fast, the "braking distance" for the axis may exceed the distance you specified, which can cause the axis to crash.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also