	short rtn = 0;
	int comp2DDataIdx = 0;
	T2DCompensation comp2dXY;
	T2DCompensationTable comp2dXYTable;
	TCompData compData[16];
	memset(&comp2dXY,0,sizeof(T2DCompensation));
	memset(&comp2dXYTable,0,sizeof(T2DCompensationTable));

	// 1.参数基本设置
	comp2dXY.axisIndex[0] = 0;		// x轴轴号
	comp2dXY.axisIndex[1] = 1;		// y轴轴号
	comp2dXY.axisIndex[2] = 2;		// z轴轴号
	comp2dXY.axisType[0] = 0;		// 类型为规划
	comp2dXY.axisType[1] = 0;		// 类型为规划
	comp2dXY.enable = 1;			// 使能
	comp2dXY.tableIndex = 0;		// 表号为1
	rtn = NMC_Set2DCompensation(g_hDev,&comp2dXY);
	if (rtn != 0) {AddLog(_T("打开NMC_Set2DCompensation失败"),rtn);return;}

	// 2.补偿范围等设置
	comp2dXYTable.count[0] = 2;
	comp2dXYTable.count[1] = 2;
	comp2dXYTable.posBegin[0] = 0;		// 起点位置
	comp2dXYTable.posBegin[1] = 0;
	comp2dXYTable.step[0] = 10000;		// 补偿范围，也就是机台的工作范围
	comp2dXYTable.step[1] = 10000;
	comp2dXYTable.angle = 5;			// 夹角，单位:度
	comp2DDataIdx = 0;
	for(int compY = 0;compY < comp2dXYTable.count[1];compY++)
	{
		for(int compX = 0;compX < comp2dXYTable.count[0];compX++)
		{
			compData[comp2DDataIdx].xDirComp = 0;	// 不需要补偿
			compData[comp2DDataIdx].yDirComp = 0;	// 
			compData[comp2DDataIdx].zDirComp = 0;	// 
			comp2DDataIdx++;
		}
	}
	rtn = NMC_Set2DCompensationTable(g_hDev,0,&comp2dXYTable,compData);
	if (rtn != 0) {AddLog(_T("打开NMC_Set2DCompensationTable失败"),rtn);return;}