S型走位,适用于吸嘴,矩阵走位等,都是相通的
记录下来,备忘吧
// 轨迹:从左到右,从右到左
for (int M = 0; M < nRows_Tray; M++)//行数
{
nYStartPos_new = M*dYDelta_Tray + dYStartPos;
for (int N = 0; N < nCols_Tray; N++)
{
int cols_Tray_new;
if (M % 2 == 0) //偶行
{
cols_Tray_new = N;
}
else
{
cols_Tray_new = nCols_Tray - N - 1;//奇数行
}
nXStartPos_new = cols_Tray_new*dXDelta_Tray + dXStartPos;
ST_TRACE_NODE node;
node.bHadDone = false;
node.col = cols_Tray_new;
node.row = M;
// gLOG->Infos(L"print node guiji:{}, row:{},col: {}", tempStr, node.row, node.col);
node.axiLocation.nAxisPos_Platform_X = (dXDelta_Tray*cols_Tray_new) + dXStartPos;
node.axiLocation.nAxisPos_Platform_Y = (dYDelta_Tray*M) + dYStartPos;
node.axiLocation.nAxisPos_Tube_Z = dStartPos_Tube_Z;
node.axiLocation.nAxisPos_camera_Z = dStartPos_camera_Z;
for (int j = 0; j < AngelList.count(); j++)
{
node.angleIndex = j;
//node.axiLocation.e_Axis_TabletZ = AngelList.at(j);
node.index = index;
index++;
m_objTrace.trace.push_back(node);
qDebug() << QStringLiteral("S组装节点") << node.index << node.axiLocation.nAxisPos_Platform_X << node.axiLocation.nAxisPos_Platform_Y;
}
}
}
gLOG->Infos(L"组装节点共计数量: {}", index);
qDebug() << "MGroup all nodes,index over is " << index;
}