跳转至

GTN_GetDynamicCompensateStatus

指令原型:

GT_API GTN_GetDynamicCompensateStatus(short core,shortdcIndex,TDynamicCompensateStatus *pPrm)

指令类型:

立即指令,调用后立即生效。

指令说明:

读取动态补偿状态。

指令参数说明:

core 核号,正整数,取值范围请参照核号参数范围一栏。
dcIndex 动态补偿表索引号,取值范围:[1, 2]。
pPrm 动态补偿状态参数结构体指针。详情说明请参照TDynamicCompensateStatus
TDynamicCompensateStatus
typedef struct DynamicCompensateStatus
{
    unsigned short enable;               // 动态补偿使能状态
    unsigned short execute;              // 动态补偿进行中
    unsigned short pad1;                 // 保留参数
    unsigned short pad2;                 // 保留参数

    unsigned long pointReceive;         // 接收到到补偿点数量
    unsigned long pointUse;             // 用过的补偿点数量

    TDynamicCompensatePoint point;      // 当前正在使用的补偿点

    double pos1;                       // 当前位置1
    double pos2;                       // 当前位置2
    double travelDistance;             // 当前走过的合成位移(以上一个补偿点作为起点)
    double compensateValue;            // 当前补偿值

    double reserve1;                   // 保留参数
    double reserve2;                   // 保留参数
    double reserve3;                   // 保留参数
    double reserve4;                   // 保留参数
}TDynamicCompensateStatus;
enable:动态补偿使能状态。
execute:动态补偿进行中状态。
pad1:保留参数,必须为0。
pad2:保留参数,必须为0。
pointReceive:接收到到补偿点数量。
pointUse:用过的补偿点数量。
point:当前正在使用的补偿点。详情说明请参照TDynamicCompensatePoint
TDynamicCompensatePoint
typedef struct DynamicCompensatePoint
{
    unsigned short pointType;         // 数据点类型,必须为0
    unsigned short pad1;              // 保留参数,必须为0
    unsigned short pad2;              // 保留参数,必须为0
    unsigned short pad3;              // 保留参数,必须为0

    double compensateValue;            // 补偿值
    double compensateDistance;         // 补偿区间长度

    double reserve1;                   // 保留参数,必须为0
    double reserve2;                   // 保留参数,必须为0
    double reserve3;                   // 保留参数,必须为0
    double reserve4;                   // 保留参数,必须为0
}TDynamicCompensatePoint;
pointType:数据点类型,必须为0。
pad1:保留参数,必须为0。
pad2:保留参数,必须为0。
pad3:保留参数,必须为0。
compensateValue:补偿值。
compensateDistance:补偿区间长度。
reserve1:保留参数,必须为0。
reserve2:保留参数,必须为0。
reserve3:保留参数,必须为0。
reserve4:保留参数,必须为0。
pos1:当前位置1。
pos2:当前位置2。
travelDistance:当前走过的合成位移(以上一个补偿点作为起点)。
compensateValue:当前补偿值。
reserve1:保留参数,必须为0。
reserve2:保留参数,必须为0。
reserve3:保留参数,必须为0。
reserve4:保留参数,必须为0。

指令返回值:

17053:dcIndex参数错误。

其他返回值请参照通用返回值说明

相关指令:

GTN_GetDynamicCompensateParameter