GTN_GetGroupVelProfileMode
指令原型:
GT_API GTN_GetGroupVelProfileMode(short core,short group,TVelProfileMode
*pSmooth)
指令类型:
group指令。
指令说明:
读取group的速度规划模式。
指令参数说明:
| core |
核号,正整数,取值范围请参照核号参数范围一栏。
|
| group |
group号,正整数,取值范围请参照group号参数范围一栏。
|
| pSmooth |
速度规划模式及参数结构体指针。详情说明请参照TVelProfileMode
TVelProfileMode
typedef struct VelProfileMode
{
short mode;
short reserve[3];
TVelProfileModeParameter parameter;
} TVelProfileMode;
mode:速度规划模式。根据不同的速度规划模式,设置不同的速度规划参数。
VEL_PROFILE_MODE_SMOOTH(40):平滑模式。
VEL_PROFILE_MODE_JERK(46):Jerk模式,此模式为保留值,暂不支持。
reserve:保留参数,必须为0。
parameter:速度规划参数,详情说明请参照TVelProfileModeParameter
TVelProfileModeParameter
typedef union VelProfileModeParameter
{
TVelProfileModeSmooth smooth;
TVelProfileModeJerk jerk;
double data[20];
} TVelProfileModeParameter;
smooth:平滑模式速度规划参数,详情说明请参照TVelProfileModeSmooth
TVelProfileModeSmooth
typedef struct VelProfileModeSmooth
{
double accTime;
double k;
double reserve[2];
} TVelProfileModeSmooth;
accTime:加速度变化时间,取值范围:[0,60],单位:ms。当accTime为0时,速度规划曲线为T型曲线。
k:形态系数,取值范围:[0,1000]。
reserve:保留参数,必须为0。
jerk:Jerk模式速度规划参数,详情说明请参照TVelProfileModeJerk
TVelProfileModeJerk
typedef struct VelProfileModeJerk
{
double value;
short beginPercent;
short endPercent;
short reserve[2];
} TVelProfileModeJerk;
value:加加速度,取值范围:(0,...),单位:mm/s3。
beginPercent:起始加速度百分比,取值范围:[0,100]。
endPercent:终止加速度百分比,取值范围:[0,100]。
reserve:保留参数,必须为0。
data:保留参数,必须为0。
|
指令返回值:
请参照通用返回值说明。