init
This commit is contained in:
28
device/control/acs/buffercode/buffer0autoexecode.cpp
Normal file
28
device/control/acs/buffercode/buffer0autoexecode.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "buffer0autoexecode.h"
|
||||
|
||||
Buffer0AutoExeCode::Buffer0AutoExeCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString Buffer0AutoExeCode::getCode()
|
||||
{
|
||||
QString code("\n");
|
||||
/*
|
||||
* ECUNMAPIN 此函数用于将ECIN定义的所有映射重置为特定偏移量
|
||||
* ECIN 将EtherCAT偏移地址的值映射到变量
|
||||
*/
|
||||
code+=
|
||||
"AUTOEXEC:\n"
|
||||
"ECUNMAPIN(RangeSAddr)\n"
|
||||
// 禁用报警
|
||||
"SAFETYCONF ALL,#NT,\"-\"\n"
|
||||
"ECIN(RangeSAddr, RangeVInt)\n"
|
||||
"WAIT 50\n"
|
||||
"WHILE 1\n"
|
||||
// 测距值换算为mm
|
||||
"RangeV=RangeVInt/10000\n"
|
||||
"END\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
12
device/control/acs/buffercode/buffer0autoexecode.h
Normal file
12
device/control/acs/buffercode/buffer0autoexecode.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef BUFFER0AUTOEXECODE_H
|
||||
#define BUFFER0AUTOEXECODE_H
|
||||
#include<QString>
|
||||
|
||||
class Buffer0AutoExeCode
|
||||
{
|
||||
public:
|
||||
Buffer0AutoExeCode();
|
||||
QString getCode();
|
||||
};
|
||||
|
||||
#endif // BUFFER0AUTOEXECODE_H
|
||||
190
device/control/acs/buffercode/csscancode.cpp
Normal file
190
device/control/acs/buffercode/csscancode.cpp
Normal file
@@ -0,0 +1,190 @@
|
||||
#include "csscancode.h"
|
||||
|
||||
CSScanCode::CSScanCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CSScanCode::~CSScanCode()
|
||||
{
|
||||
|
||||
}
|
||||
void CSScanCode::setRSToZeroXPos(double value)
|
||||
{
|
||||
RSToZeroXPos = value;
|
||||
}
|
||||
void CSScanCode::setRSToZeroYPos(double value)
|
||||
{
|
||||
RSToZeroYPos = value;
|
||||
}
|
||||
void CSScanCode::setRSToZeroZ1Pos(double value)
|
||||
{
|
||||
RSToZeroZ1Pos = value;
|
||||
}
|
||||
|
||||
void CSScanCode::setXWorkRange(double value)
|
||||
{
|
||||
xWorkRange = value;
|
||||
}
|
||||
|
||||
void CSScanCode::setYWorkRange(double value)
|
||||
{
|
||||
yWorkRange = value;
|
||||
}
|
||||
|
||||
void CSScanCode::setXSampInterval(double value)
|
||||
{
|
||||
xSampInterval = value;
|
||||
}
|
||||
|
||||
void CSScanCode::setYSampInterval(double value)
|
||||
{
|
||||
ySampInterval = value;
|
||||
}
|
||||
|
||||
int CSScanCode::getSampTotalNum()
|
||||
{
|
||||
int xLineSegmentCounts,yLineSegmentCounts;
|
||||
// y线段数比x线段数多1
|
||||
yLineSegmentCounts = int(yWorkRange/ySampInterval);
|
||||
xLineSegmentCounts = yLineSegmentCounts+1;
|
||||
int xSampCounts,ySampCounts;
|
||||
xSampCounts = (accDecSampCount+int(xWorkRange*xNumberOfUnitSamples))*xLineSegmentCounts;
|
||||
ySampCounts = int(yWorkRange*yNumberOfUnitSamples)+yNumberOfLineSegmentSamples*(yLineSegmentCounts-1);
|
||||
return ySampCounts + xSampCounts;
|
||||
}
|
||||
|
||||
|
||||
QString CSScanCode::getCode()
|
||||
{
|
||||
QString code = QString("GLOBAL REAL scanData(2)(%1),RSData(%1),xPosData(%1),xWorkRange\n").arg(getSampTotalNum())+
|
||||
QString("GLOBAL INT SampTotalNum=%1\n").arg(getSampTotalNum())+
|
||||
QString("GLOBAL REAL RSToZeroXPos=%1,RSToZeroYPos=%2\n").arg(RSToZeroXPos).arg(RSToZeroYPos)+
|
||||
//QString("GLOBAL REAL RSToZeroZ1Pos=%1\n").arg(RSToZeroZ1Pos)+
|
||||
"REAL xPos,yPos\n"+
|
||||
//"REAL xStartPos,yStartPos\n"+
|
||||
QString("REAL yInterval = %1\n").arg(ySampInterval)+
|
||||
"ENABLE (X,Y)\n"
|
||||
// 禁用Z1轴补偿
|
||||
"MFLAGS(Z).#DEFCON=1\n"
|
||||
// 停止buffer0运行
|
||||
"STOP 0\n"
|
||||
"START 0,1\n"+
|
||||
// 初始化数组
|
||||
QString("FILL(%1,scanData,0,0,0,%2); FILL(0, scanData,1,1,0,%2)\n").arg(rangeInitValue).arg(getSampTotalNum()-1)+
|
||||
//"ACC(X)=8000;DEC(X)=8000;KDEC(X)=120000;JERK(X)=120000; ACC(Y)=8000;DEC(Y)=8000;KDEC(Y)=120000;JERK(Y)=120000;\n "
|
||||
"ACC(X)=8000;DEC(X)=8000;KDEC(X)=120000;JERK(X)=120000; ACC(Y)=500;DEC(Y)=500;KDEC(Y)=5000;JERK(Y)=5000;\n "
|
||||
// 设置X、Y轴到位精度,会对INPOS什么时候变为1有影响
|
||||
"TARGRAD(X) = 0.0001; TARGRAD(Y) = 0.0001\n"
|
||||
"WAIT 200\n"+
|
||||
//"xStartPos = FPOS(X);yStartPos = FPOS(Y)\n"+
|
||||
// 设置X,Y轴起始位置。Y轴的起始位置把加减速段考虑进去
|
||||
QString("xPos = FPOS(X)-%1;yPos = FPOS(Y)\n").arg(AccDecDist)+
|
||||
// X、Y轴走到起始位置,速度为60mm/s
|
||||
"PTP/EV (X,Y),xPos,yPos,100\n"+
|
||||
// Y轴的工作范围等于设置的工作范围+加速距离+减速距离
|
||||
QString("xWorkRange = %1\n").arg(xWorkRange+2*AccDecDist)+
|
||||
// 定义同步采集,采集测距传感器值、Y轴坐标,采集间隔为0.1ms,采集总数为sampTotalNum
|
||||
QString("DC/s X,scanData,%1,1,RangeV,FPOS(X)\n").arg(getSampTotalNum())+
|
||||
// 定义分段运动,起始位置为xStart,yStart,结束速度为vel
|
||||
QString("XSEG/vy (X,Y),xPos,yPos,%1\n").arg(xAxisVel)+
|
||||
// 循环次数等于Y线段数
|
||||
QString("LOOP %1\n").arg(yWorkRange/ySampInterval+1)+
|
||||
// X轴位置不变,Y轴移动工作范围距离
|
||||
// 第1段运动,Y轴向正方向移动(测距头向Y负方向移动)
|
||||
"xPos = xPos+xWorkRange\n"+
|
||||
QString("LINE/v (X,Y),xPos,yPos,%1\n").arg(xAxisVel)+
|
||||
// Y轴位置不变,X轴向正向移动一个步距
|
||||
"yPos = yPos+yInterval\n"+
|
||||
|
||||
// /v参数定义当前和后续线段的速度,/f 定义当前线段结束时的速度
|
||||
// 意思就是说X轴运动时速度为20,Y轴运动时速度为100
|
||||
QString("LINE/v (X,Y),xPos,yPos,%1\n").arg(yAxisVel)+
|
||||
//QString("LINE/vf (X,Y),xPos,yPos,%1,%2\n").arg(xAxisVel).arg(yAxisVel)+
|
||||
|
||||
// Y轴移动工作距离范围取反
|
||||
"xWorkRange=(-1)*xWorkRange\n"
|
||||
"END\n"
|
||||
"ENDS (X,Y)\n"
|
||||
|
||||
// 阻塞,等待多段运动结束
|
||||
"TILL ^AST(X).5 & ^AST(Y).5 & GSEG(Y) = -1\n"
|
||||
// 停止采集
|
||||
"STOPDC/s X\n"
|
||||
"INT validDataEndIndex\n"+
|
||||
// 在0~(sampTotalNum-1)范围内找到第一个最大值并返回其索引(最大值为数组初始化值,索引为采集的测距值最后一个的索引+1)
|
||||
QString("validDataEndIndex=MAXI(scanData,0,0,0,%1)\n").arg(getSampTotalNum()-1)+
|
||||
// 把采集的测距值拷贝到 RSData数组中,把采集的Y轴的坐标放到xPosData数组中
|
||||
"COPY(scanData,RSData,0,0,0,validDataEndIndex,0,validDataEndIndex); COPY(scanData,xPosData,1,1,0,validDataEndIndex,0,validDataEndIndex)\n"
|
||||
"PTP/EV (X,Y),RSToZeroXPos,RSToZeroYPos,100\n"
|
||||
//"PTP/ERV (Z),RSToZeroZ1Pos,1\n"
|
||||
"WAIT 200\n"
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
//{
|
||||
// QString code = QString("GLOBAL REAL scanData(2)(%1),RSData(%1),yPosData(%1),yWorkRange\n").arg(getSampTotalNum())+
|
||||
// QString("GLOBAL INT SampTotalNum=%1\n").arg(getSampTotalNum())+
|
||||
// QString("GLOBAL REAL RSToZeroXPos=%1,RSToZeroYPos=%2\n").arg(RSToZeroXPos).arg(RSToZeroYPos)+
|
||||
// "REAL xPos,yPos\n"+
|
||||
// //"REAL xStartPos,yStartPos\n"+
|
||||
// QString("REAL xInterval = %1\n").arg(xSampInterval)+
|
||||
// "ENABLE (X,Y)\n"
|
||||
// // 禁用Z1轴补偿
|
||||
// "MFLAGS(Z).#DEFCON=1\n"
|
||||
// // 停止buffer0运行
|
||||
// "STOP 0\n"
|
||||
// "START 0,1\n"+
|
||||
// // 初始化数组
|
||||
// QString("FILL(%1,scanData,0,0,0,%2); FILL(0, scanData,1,1,0,%2)\n").arg(rangeInitValue).arg(getSampTotalNum()-1)+
|
||||
// //"ACC(X)=8000;DEC(X)=8000;KDEC(X)=120000;JERK(X)=120000; ACC(Y)=8000;DEC(Y)=8000;KDEC(Y)=120000;JERK(Y)=120000;\n "
|
||||
// "ACC(X)=5000;DEC(X)=5000;KDEC(X)=5000;JERK(X)=5000; ACC(Y)=8000;DEC(Y)=8000;KDEC(Y)=120000;JERK(Y)=120000;\n "
|
||||
// // 设置X、Y轴到位精度,会对INPOS什么时候变为1有影响
|
||||
// "TARGRAD(X) = 0.0001; TARGRAD(Y) = 0.0001\n"
|
||||
// "WAIT 200\n"+
|
||||
// //"xStartPos = FPOS(X);yStartPos = FPOS(Y)\n"+
|
||||
// // 设置X,Y轴起始位置。Y轴的起始位置把加减速段考虑进去
|
||||
// QString("xPos = FPOS(X);yPos = FPOS(Y)-%1\n").arg(AccDecDist)+
|
||||
// // X、Y轴走到起始位置,速度为60mm/s
|
||||
// "PTP/EV (X,Y),xPos,yPos,60\n"+
|
||||
// // Y轴的工作范围等于设置的工作范围+加速距离+减速距离
|
||||
// QString("yWorkRange = %1\n").arg(yWorkRange+2*AccDecDist)+
|
||||
// // 定义同步采集,采集测距传感器值、Y轴坐标,采集间隔为0.1ms,采集总数为sampTotalNum
|
||||
// QString("DC/s Y,scanData,%1,1,RangeV,FPOS(Y)\n").arg(getSampTotalNum())+
|
||||
// // 定义分段运动,起始位置为xStart,yStart,结束速度为vel
|
||||
// QString("XSEG/vy (X,Y),xPos,yPos,%1\n").arg(yAxisVel)+
|
||||
// // 循环次数等于Y线段数
|
||||
// QString("LOOP %1\n").arg(xWorkRange/xSampInterval+1)+
|
||||
// // X轴位置不变,Y轴移动工作范围距离
|
||||
// // 第1段运动,Y轴向正方向移动(测距头向Y负方向移动)
|
||||
// "yPos = yPos+yWorkRange\n"+
|
||||
// QString("LINE/v (X,Y),xPos,yPos,%1\n").arg(yAxisVel)+
|
||||
// // Y轴位置不变,X轴向正向移动一个步距
|
||||
// "xPos = xPos+xInterval\n"+
|
||||
|
||||
// // /v参数定义当前和后续线段的速度,/f 定义当前线段结束时的速度
|
||||
// // 意思就是说X轴运动时速度为20,Y轴运动时速度为100
|
||||
// QString("LINE/vf (X,Y),xPos,yPos,%1,%2\n").arg(xAxisVel).arg(yAxisVel)+
|
||||
|
||||
// // Y轴移动工作距离范围取反
|
||||
// "yWorkRange=(-1)*yWorkRange\n"
|
||||
// "END\n"
|
||||
// "ENDS (X,Y)\n"
|
||||
|
||||
// // 阻塞,等待多段运动结束
|
||||
// "TILL ^AST(Y).5 & ^AST(X).5 & GSEG(X) = -1\n"
|
||||
// // 停止采集
|
||||
// "STOPDC/s Y\n"
|
||||
// "INT validDataEndIndex\n"+
|
||||
// // 在0~(sampTotalNum-1)范围内找到第一个最大值并返回其索引(最大值为数组初始化值,索引为采集的测距值最后一个的索引+1)
|
||||
// QString("validDataEndIndex=MAXI(scanData,0,0,0,%1)\n").arg(getSampTotalNum()-1)+
|
||||
// // 把采集的测距值拷贝到 RSData数组中,把采集的Y轴的坐标放到yPosData数组中
|
||||
// "COPY(scanData,RSData,0,0,0,validDataEndIndex,0,validDataEndIndex); COPY(scanData,yPosData,1,1,0,validDataEndIndex,0,validDataEndIndex)\n"
|
||||
// "PTP/EV (X,Y),RSToZeroXPos,RSToZeroYPos,60\n"
|
||||
// "runF = 1\n"
|
||||
// "STOP";
|
||||
// return code;
|
||||
//}
|
||||
57
device/control/acs/buffercode/csscancode.h
Normal file
57
device/control/acs/buffercode/csscancode.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#ifndef CSSCANCODE_H
|
||||
#define CSSCANCODE_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
|
||||
class CSScanCode
|
||||
{
|
||||
public:
|
||||
explicit CSScanCode();
|
||||
~CSScanCode();
|
||||
QString getCode();
|
||||
void setXWorkRange(double value);
|
||||
void setYWorkRange(double value);
|
||||
void setXSampInterval(double value);
|
||||
void setYSampInterval(double value);
|
||||
int getSampTotalNum();
|
||||
void setRSToZeroXPos(double value);
|
||||
void setRSToZeroYPos(double value);
|
||||
void setRSToZeroZ1Pos(double value);
|
||||
|
||||
private:
|
||||
double xWorkRange{1.0};
|
||||
double yWorkRange{1.0};
|
||||
double xSampInterval{1.0};
|
||||
double ySampInterval{1.0};
|
||||
|
||||
const int yNumberOfUnitSamples{20};
|
||||
const int xNumberOfUnitSamples{12};
|
||||
const int yNumberOfLineSegmentSamples{600};
|
||||
const int accDecSampCount{2000};
|
||||
// rangeInitValue 用于初始化保存测距值的数组
|
||||
double rangeInitValue{100.0};
|
||||
// 加减速距离
|
||||
double AccDecDist{70};
|
||||
double xAxisVel{500.0};
|
||||
double yAxisVel{50.0};
|
||||
double RSToZeroXPos{1.0};
|
||||
double RSToZeroYPos{1.0};
|
||||
double RSToZeroZ1Pos{0.0};
|
||||
|
||||
|
||||
// const int yNumberOfUnitSamples{12};
|
||||
// const int xNumberOfUnitSamples{20};
|
||||
// const int xNumberOfLineSegmentSamples{200};
|
||||
// const int accDecSampCount{1500};
|
||||
// // rangeInitValue 用于初始化保存测距值的数组
|
||||
// double rangeInitValue{100.0};
|
||||
// // 加减速距离
|
||||
// double AccDecDist{45.0};
|
||||
// double xAxisVel{20.0};
|
||||
// double yAxisVel{100.0};
|
||||
// double RSToZeroXPos{1.0};
|
||||
// double RSToZeroYPos{1.0};
|
||||
};
|
||||
|
||||
#endif // CSSCANCODE_H
|
||||
24
device/control/acs/buffercode/machcode.cpp
Normal file
24
device/control/acs/buffercode/machcode.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "machcode.h"
|
||||
|
||||
MachCode::MachCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString MachCode::getCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code+=
|
||||
"ENABLE (Z)\n"
|
||||
"VEL(Z) = 2.000\n"
|
||||
"ACC(Z) = 20.00\n"
|
||||
"DEC(Z) = 20.00\n"
|
||||
"JERK(Z) = 200.0\n"
|
||||
"KDEC(Z) = 200.0\n"
|
||||
"PTP/e Z,2.2\n"
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
12
device/control/acs/buffercode/machcode.h
Normal file
12
device/control/acs/buffercode/machcode.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef MACHCODE_H
|
||||
#define MACHCODE_H
|
||||
#include <QString>
|
||||
|
||||
class MachCode
|
||||
{
|
||||
public:
|
||||
MachCode();
|
||||
QString getCode();
|
||||
};
|
||||
|
||||
#endif // MACHCODE_H
|
||||
668
device/control/acs/buffercode/maxisabsmovecode.cpp
Normal file
668
device/control/acs/buffercode/maxisabsmovecode.cpp
Normal file
@@ -0,0 +1,668 @@
|
||||
#include "maxisabsmovecode.h"
|
||||
|
||||
MAxisABSMoveCode::MAxisABSMoveCode()
|
||||
{
|
||||
|
||||
}
|
||||
QString MAxisABSMoveCode::getCode_L()
|
||||
{
|
||||
QString code("\n");
|
||||
code =
|
||||
|
||||
getSurCode_L()+
|
||||
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
QString MAxisABSMoveCode::getCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code =
|
||||
|
||||
getSurCode()+
|
||||
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
QString MAxisABSMoveCode::getLaserMarkCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code =
|
||||
|
||||
getAutoToLaserMarkCode()+
|
||||
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
QString MAxisABSMoveCode::getToCameraCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code =
|
||||
|
||||
getAutoToCameraCode()+
|
||||
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
void MAxisABSMoveCode::setXAxisTGPos(double value)
|
||||
{
|
||||
XTargetPos = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setYAxisTGPos(double value)
|
||||
{
|
||||
YTargetPos = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAxisTGPos(double value)
|
||||
{
|
||||
ZTargetPos = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAAxisTGPos(double value)
|
||||
{
|
||||
ZATargetPos = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ2AxisTGPos(double value)
|
||||
{
|
||||
Z2TargetPos = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ0AxisTGPos(double value)
|
||||
{
|
||||
Z0TargetPos = value;
|
||||
}
|
||||
|
||||
void MAxisABSMoveCode::setZAAxisSafePos(double value)
|
||||
{
|
||||
ZASafePos = value;
|
||||
}
|
||||
|
||||
void MAxisABSMoveCode::setZAAxisToSafePosVel(double value)
|
||||
{
|
||||
ZAAxisToSafePosVel = value;
|
||||
}
|
||||
|
||||
void MAxisABSMoveCode::setXAxisVel(double value)
|
||||
{
|
||||
XAxisVel = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setYAxisVel(double value)
|
||||
{
|
||||
YAxisVel = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAAxisVel(double value)
|
||||
{
|
||||
ZAAxisVel = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ2AxisVel(double value)
|
||||
{
|
||||
Z2AxisVel = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ0AxisVel(double value)
|
||||
{
|
||||
Z0AxisVel = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAxisVel(double value)
|
||||
{
|
||||
ZAxisVel = value;
|
||||
}
|
||||
|
||||
void MAxisABSMoveCode::setXAxisIsMove(bool value)
|
||||
{
|
||||
XAxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setYAxisIsMove(bool value)
|
||||
{
|
||||
YAxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAxisIsMove(bool value)
|
||||
{
|
||||
ZAxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZAAxisIsMove(bool value)
|
||||
{
|
||||
ZAAxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ2AxisIsMove(bool value)
|
||||
{
|
||||
Z2AxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::setZ0AxisIsMove(bool value)
|
||||
{
|
||||
Z0AxisIsMove = value;
|
||||
}
|
||||
void MAxisABSMoveCode::disableZAAxisToSafePos(bool value)
|
||||
{
|
||||
disabelZAToSafePos = value;
|
||||
}
|
||||
|
||||
void MAxisABSMoveCode::setCMRSwitch(bool value)
|
||||
{
|
||||
CMRHSwitch = value;
|
||||
}
|
||||
/***************************************************************
|
||||
* 修改码:1008610010
|
||||
* 日期:
|
||||
* 2024.3.4
|
||||
* 功能:
|
||||
* 添加新接口,先移动Z0
|
||||
**************************************************************/
|
||||
QString MAxisABSMoveCode::getSurCode_L()
|
||||
{
|
||||
QString moveAxis;
|
||||
if(XAxisIsMove)
|
||||
moveAxis+="X";
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Y";
|
||||
else
|
||||
moveAxis+=",Y";
|
||||
}
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z";
|
||||
else
|
||||
moveAxis+=",Z";
|
||||
}
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="ZA";
|
||||
else
|
||||
moveAxis+=",ZA";
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z2";
|
||||
else
|
||||
moveAxis+=",Z2";
|
||||
}
|
||||
if(Z0AxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z0";
|
||||
else
|
||||
moveAxis+=",Z0";
|
||||
}
|
||||
|
||||
|
||||
surCode+=
|
||||
QString("ENABLE (%1)\n").arg(moveAxis);
|
||||
// "REAL ZAFPos\n"
|
||||
// "ZAFPos = FPOS(ZA)\n";
|
||||
if(Z0AxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z0) = %1\n").arg(Z0AxisVel)+
|
||||
QString("ACC(Z0) = %1\n").arg(Z0AxisVel*10)+
|
||||
QString("DEC(Z0) = %1\n").arg(Z0AxisVel*10)+
|
||||
QString("JERK(Z0) = %1\n").arg(Z0AxisVel*100)+
|
||||
QString("KDEC(Z0) = %1\n").arg(Z0AxisVel*100)+
|
||||
QString("PTP/e Z0,%1\n").arg(Z0TargetPos,0,'f',4);
|
||||
Z0AxisIsMove = false;
|
||||
}
|
||||
if(!disabelZAToSafePos)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("PTP/e ZA,%1\n").arg(ZASafePos,0,'f',4);
|
||||
}
|
||||
|
||||
if(XAxisIsMove&&YAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100);
|
||||
if(CMRHSwitch)
|
||||
{
|
||||
surCode += QString("PTP/re (X,Y),%1,%2\n").arg(XTargetPos,0,'f',4).arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
else
|
||||
{
|
||||
surCode += QString("PTP/e (X,Y),%1,%2\n").arg(XTargetPos,0,'f',4).arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(XAxisIsMove)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("PTP/e (X),%1\n").arg(XTargetPos,0,'f',4);
|
||||
}
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("PTP/e (Y),%1\n").arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
}
|
||||
|
||||
if(ZAAxisIsMove&&ZAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("VEL(Z) = %1\n").arg(ZAxisVel)+
|
||||
QString("ACC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("DEC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("JERK(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("KDEC(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("PTP/e (ZA,Z),%1,%2\n").arg(ZATargetPos,0,'f',4).arg(ZTargetPos,0,'f',4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z) = %1\n").arg(ZAxisVel)+
|
||||
QString("ACC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("DEC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("JERK(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("KDEC(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("PTP/e Z,%1\n").arg(ZTargetPos,0,'f',4);
|
||||
}
|
||||
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("PTP/e ZA,%1\n").arg(ZATargetPos,0,'f',4);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// surCode +=
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
|
||||
// //ZA回到原来位置
|
||||
// "PTP/e ZA,ZAFPos\n";
|
||||
// }
|
||||
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z2) = %1\n").arg(Z2AxisVel)+
|
||||
QString("ACC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("DEC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("JERK(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
QString("KDEC(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
QString("PTP/e Z2,%1\n").arg(Z2TargetPos,0,'f',4);
|
||||
Z2AxisIsMove = false;
|
||||
}
|
||||
|
||||
return surCode;
|
||||
}
|
||||
QString MAxisABSMoveCode::getSurCode()
|
||||
{
|
||||
QString moveAxis;
|
||||
if(XAxisIsMove)
|
||||
moveAxis+="X";
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Y";
|
||||
else
|
||||
moveAxis+=",Y";
|
||||
}
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z";
|
||||
else
|
||||
moveAxis+=",Z";
|
||||
}
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="ZA";
|
||||
else
|
||||
moveAxis+=",ZA";
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z2";
|
||||
else
|
||||
moveAxis+=",Z2";
|
||||
}
|
||||
|
||||
|
||||
surCode+=
|
||||
QString("ENABLE (%1)\n").arg(moveAxis);
|
||||
// "REAL ZAFPos\n"
|
||||
// "ZAFPos = FPOS(ZA)\n";
|
||||
if(!disabelZAToSafePos)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("PTP/e ZA,%1\n").arg(ZASafePos,0,'f',4);
|
||||
}
|
||||
|
||||
if(XAxisIsMove&&YAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100);
|
||||
if(CMRHSwitch)
|
||||
{
|
||||
surCode += QString("PTP/re (X,Y),%1,%2\n").arg(XTargetPos,0,'f',4).arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
else
|
||||
{
|
||||
surCode += QString("PTP/e (X,Y),%1,%2\n").arg(XTargetPos,0,'f',4).arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(XAxisIsMove)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("PTP/e (X),%1\n").arg(XTargetPos,0,'f',4);
|
||||
}
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("PTP/e (Y),%1\n").arg(YTargetPos,0,'f',4);
|
||||
}
|
||||
}
|
||||
|
||||
if(ZAAxisIsMove&&ZAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("VEL(Z) = %1\n").arg(ZAxisVel)+
|
||||
QString("ACC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("DEC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("JERK(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("KDEC(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("PTP/e (ZA,Z),%1,%2\n").arg(ZATargetPos,0,'f',4).arg(ZTargetPos,0,'f',4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z) = %1\n").arg(ZAxisVel)+
|
||||
QString("ACC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("DEC(Z) = %1\n").arg(ZAxisVel*10)+
|
||||
QString("JERK(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("KDEC(Z) = %1\n").arg(ZAxisVel*100)+
|
||||
QString("PTP/e Z,%1\n").arg(ZTargetPos,0,'f',4);
|
||||
}
|
||||
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("PTP/e ZA,%1\n").arg(ZATargetPos,0,'f',4);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// surCode +=
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
|
||||
// //ZA回到原来位置
|
||||
// "PTP/e ZA,ZAFPos\n";
|
||||
// }
|
||||
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z2) = %1\n").arg(Z2AxisVel)+
|
||||
QString("ACC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("DEC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("JERK(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
QString("KDEC(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
QString("PTP/e Z2,%1\n").arg(Z2TargetPos,0,'f',4);
|
||||
Z2AxisIsMove = false;
|
||||
}
|
||||
if(Z0AxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z0) = %1\n").arg(Z0AxisVel)+
|
||||
QString("ACC(Z0) = %1\n").arg(Z0AxisVel*10)+
|
||||
QString("DEC(Z0) = %1\n").arg(Z0AxisVel*10)+
|
||||
QString("JERK(Z0) = %1\n").arg(Z0AxisVel*100)+
|
||||
QString("KDEC(Z0) = %1\n").arg(Z0AxisVel*100)+
|
||||
QString("PTP/e Z0,%1\n").arg(Z0TargetPos,0,'f',4);
|
||||
Z0AxisIsMove = false;
|
||||
}
|
||||
return surCode;
|
||||
}
|
||||
|
||||
|
||||
QString MAxisABSMoveCode::getAutoToCameraCode()
|
||||
{
|
||||
QString moveAxis;
|
||||
if(XAxisIsMove)
|
||||
moveAxis+="X";
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Y";
|
||||
else
|
||||
moveAxis+=",Y";
|
||||
}
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z";
|
||||
else
|
||||
moveAxis+=",Z";
|
||||
}
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="ZA";
|
||||
else
|
||||
moveAxis+=",ZA";
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z2";
|
||||
else
|
||||
moveAxis+=",Z2";
|
||||
}
|
||||
|
||||
|
||||
surCode+=
|
||||
QString("ENABLE (%1)\n").arg(moveAxis);
|
||||
// "REAL ZAFPos\n"
|
||||
// "ZAFPos = FPOS(ZA)\n";
|
||||
|
||||
|
||||
if(XAxisIsMove&&YAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100);
|
||||
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisVel*100);
|
||||
}
|
||||
surCode += QString("PTP/e (X,Y,ZA),%1,%2,%3\n").arg(XTargetPos).arg(YTargetPos).arg(ZATargetPos);
|
||||
|
||||
}
|
||||
|
||||
return surCode;
|
||||
}
|
||||
|
||||
|
||||
QString MAxisABSMoveCode::getAutoToLaserMarkCode()
|
||||
{
|
||||
QString moveAxis;
|
||||
if(XAxisIsMove)
|
||||
moveAxis+="X";
|
||||
if(YAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Y";
|
||||
else
|
||||
moveAxis+=",Y";
|
||||
}
|
||||
if(ZAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z";
|
||||
else
|
||||
moveAxis+=",Z";
|
||||
}
|
||||
if(ZAAxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="ZA";
|
||||
else
|
||||
moveAxis+=",ZA";
|
||||
}
|
||||
if(Z2AxisIsMove)
|
||||
{
|
||||
if(moveAxis.isEmpty())
|
||||
moveAxis+="Z2";
|
||||
else
|
||||
moveAxis+=",Z2";
|
||||
}
|
||||
|
||||
|
||||
surCode+=
|
||||
QString("ENABLE (%1)\n").arg(moveAxis);
|
||||
// "REAL ZAFPos\n"
|
||||
// "ZAFPos = FPOS(ZA)\n";
|
||||
//if(!disabelZAToSafePos)
|
||||
{
|
||||
surCode+=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("PTP/e ZA,%1\n").arg(ZASafePos);
|
||||
}
|
||||
|
||||
//if(XAxisIsMove&&YAxisIsMove)
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100);
|
||||
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
surCode +=
|
||||
QString("VEL(Z2) = %1\n").arg(Z2AxisVel)+
|
||||
QString("ACC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("DEC(Z2) = %1\n").arg(Z2AxisVel*10)+
|
||||
QString("JERK(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
QString("KDEC(Z2) = %1\n").arg(Z2AxisVel*100)+
|
||||
|
||||
QString("PTP/e (X,Y,Z2),%1,%2,%3\n").arg(XTargetPos).arg(YTargetPos).arg(Z2TargetPos);
|
||||
|
||||
}
|
||||
return surCode;
|
||||
}
|
||||
68
device/control/acs/buffercode/maxisabsmovecode.h
Normal file
68
device/control/acs/buffercode/maxisabsmovecode.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef MAXISABSMOVECODE_H
|
||||
#define MAXISABSMOVECODE_H
|
||||
#include <QString>
|
||||
|
||||
class MAxisABSMoveCode
|
||||
{
|
||||
public:
|
||||
explicit MAxisABSMoveCode();
|
||||
QString getCode();
|
||||
QString getCode_L();
|
||||
QString getToCameraCode();
|
||||
QString getLaserMarkCode();
|
||||
void setXAxisTGPos(double value);
|
||||
void setYAxisTGPos(double value);
|
||||
void setZAxisTGPos(double value);
|
||||
void setZAAxisTGPos(double value);
|
||||
void setZ2AxisTGPos(double value);
|
||||
void setZ0AxisTGPos(double value);
|
||||
void setZAAxisSafePos(double value);
|
||||
void setZAAxisToSafePosVel(double value);
|
||||
void setXAxisVel(double value);
|
||||
void setYAxisVel(double value);
|
||||
void setZAAxisVel(double value);
|
||||
void setZ2AxisVel(double value);
|
||||
void setZ0AxisVel(double value);
|
||||
void setZAxisVel(double value);
|
||||
void setXAxisIsMove(bool value);
|
||||
void setYAxisIsMove(bool value);
|
||||
void setZAxisIsMove(bool value);
|
||||
void setZAAxisIsMove(bool value);
|
||||
void setZ2AxisIsMove(bool value);
|
||||
void setZ0AxisIsMove(bool value);
|
||||
void disableZAAxisToSafePos(bool value);
|
||||
void setCMRSwitch(bool value);
|
||||
|
||||
|
||||
private:
|
||||
QString getSurCode();
|
||||
QString getSurCode_L();//1008610010,光路检测绝对移动,先移动Z0
|
||||
QString getAutoToLaserMarkCode();
|
||||
QString getAutoToCameraCode();
|
||||
private:
|
||||
bool disabelZAToSafePos{false};
|
||||
bool XAxisIsMove{false};
|
||||
bool YAxisIsMove{false};
|
||||
bool ZAxisIsMove{false};
|
||||
bool ZAAxisIsMove{false};
|
||||
bool Z2AxisIsMove{false};
|
||||
bool Z0AxisIsMove{false};
|
||||
double XTargetPos{0.0};
|
||||
double YTargetPos{0.0};
|
||||
double ZTargetPos{0.0};
|
||||
double ZATargetPos{0.0};
|
||||
double Z2TargetPos{0.0};
|
||||
double Z0TargetPos{0.0};
|
||||
QString surCode{""};
|
||||
double ZASafePos{0.0};
|
||||
double ZAAxisToSafePosVel{0.0};
|
||||
double XAxisVel{0.0};
|
||||
double YAxisVel{0.0};
|
||||
double ZAAxisVel{0.0};
|
||||
double Z2AxisVel{0.0};
|
||||
double Z0AxisVel{0.0};
|
||||
double ZAxisVel{0.0};
|
||||
bool CMRHSwitch{false};
|
||||
};
|
||||
|
||||
#endif // MAXISABSMOVECODE_H
|
||||
141
device/control/acs/buffercode/mhcompcode.cpp
Normal file
141
device/control/acs/buffercode/mhcompcode.cpp
Normal file
@@ -0,0 +1,141 @@
|
||||
#include "mhcompcode.h"
|
||||
#include <QString>
|
||||
|
||||
MHCompCode::MHCompCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MHCompCode::setXStartPos(double value)
|
||||
{
|
||||
xStartPos = value;
|
||||
}
|
||||
|
||||
void MHCompCode::setYStartPos(double value)
|
||||
{
|
||||
yStartPos = value;
|
||||
}
|
||||
|
||||
void MHCompCode::setXWorkRange(double value)
|
||||
{
|
||||
xWorkRange = value;
|
||||
}
|
||||
|
||||
void MHCompCode::setYWorkRange(double value)
|
||||
{
|
||||
yWorkRange = value;
|
||||
}
|
||||
|
||||
void MHCompCode::setXInterval(double value)
|
||||
{
|
||||
xInterval = value;
|
||||
}
|
||||
void MHCompCode::setYInterval(double value)
|
||||
{
|
||||
yInterval = value;
|
||||
}
|
||||
|
||||
int MHCompCode::getLookupRows()
|
||||
{
|
||||
// 比如范围为3,间隔为1,Y方向会有4条线段
|
||||
return int(xWorkRange/xInterval)+1;
|
||||
}
|
||||
|
||||
int MHCompCode::getLookupCols()
|
||||
{
|
||||
return int(yWorkRange/yInterval)+1;
|
||||
}
|
||||
|
||||
|
||||
void MHCompCode::setMHRHYOffset(double value)
|
||||
{
|
||||
MHRHYOffset = value;
|
||||
}
|
||||
void MHCompCode::setMHRHXOffset(double value)
|
||||
{
|
||||
MHRHXOffset = value;
|
||||
}
|
||||
|
||||
|
||||
void MHCompCode::setLookupRows(int value)
|
||||
{
|
||||
rows = value;
|
||||
}
|
||||
void MHCompCode::setLookupCols(int value)
|
||||
{
|
||||
cols = value;
|
||||
}
|
||||
QString MHCompCode::getCode()
|
||||
{
|
||||
QString code = QString("global real LookupTable(%1)(%2),xStart,yStart\n").arg(rows).arg(cols);
|
||||
code+=
|
||||
"MFLAGS(Z).#DEFCON = 0\n"
|
||||
"CONNECT RPOS(Z) = RPOS(Z)\n"
|
||||
"DEPENDS Z, Z\n"+
|
||||
//QString("SET APOS(Z) = RPOS(Z) - MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos+MHRHYOffset-yInterval).arg(yInterval).arg(xStartPos+MHRHXOffset-xInterval).arg(xInterval)+
|
||||
//QString("CONNECT RPOS(Z) = APOS(Z) + MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos+MHRHYOffset-yInterval).arg(yInterval).arg(xStartPos+MHRHXOffset-xInterval).arg(xInterval)+
|
||||
//QString("SET APOS(Z) = RPOS(Z) - MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos+MHRHYOffset).arg(yInterval).arg(xStartPos+MHRHXOffset).arg(xInterval)+
|
||||
//QString("CONNECT RPOS(Z) = APOS(Z) + MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos+MHRHYOffset).arg(yInterval).arg(xStartPos+MHRHXOffset).arg(xInterval)+
|
||||
QString("SET APOS(Z) = RPOS(Z) - MAP2(FPOS(X), FPOS(Y), LookupTable, %1, %2, %3, %4)\n").arg(xStartPos+MHRHXOffset).arg(xInterval).arg(yStartPos+MHRHYOffset).arg(yInterval)+
|
||||
QString("CONNECT RPOS(Z) = APOS(Z) + MAP2(FPOS(X), FPOS(Y), LookupTable, %1, %2, %3, %4)\n").arg(xStartPos+MHRHXOffset).arg(xInterval).arg(yStartPos+MHRHYOffset).arg(yInterval)+
|
||||
|
||||
"DEPENDS Z, Z\n"
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
QString MHCompCode::getCode_motion()
|
||||
{
|
||||
QString code = QString("GLOBAL REAL MAXINlhc=%1,MAXPOS_Xlhc=%2,MINPOS_Xlhc=%3,X_OFFSETlhc=%4,myRange\n").arg(MaxCmp).arg(MaxPos_x).arg(MinPos_x).arg(x_offset);
|
||||
code+=
|
||||
"GLOBAL REAL XPOINT(10000),ERR_Z1(10000)\n"
|
||||
"REAL tmp_data\n"
|
||||
"INT i,flag,count_data\n"
|
||||
"i=9999\n"
|
||||
"FILL(0,ERR_Z1,0,9999)\n"
|
||||
"FILL(MINPOS_Xlhc,XPOINT,0,9999)\n"
|
||||
"tmp_data=0;count_data=0\n"
|
||||
"MFLAGS(Z).17=0\n"
|
||||
"CONNECT RPOS(Z)=APOS(Z)+MAPNS((FPOS(X)+X_OFFSETlhc),XPOINT,ERR_Z1)\n"
|
||||
"DEPENDS Z, Z\n"
|
||||
"WHILE 1\n"
|
||||
"IF FPOS(X)>MINPOS_Xlhc & FPOS(X)<MAXPOS_Xlhc\n"
|
||||
"IF MST(X).#MOVE & RVEL(X) < 0\n"
|
||||
"XPOINT(i)=FPOS(X); myRange=RangeV\n"
|
||||
"IF ABS(myRange)>MAXINlhc\n"
|
||||
"if i<9999\n"
|
||||
"myRange=ERR_Z1(i+1)\n"
|
||||
"else\n"
|
||||
"myRange=tmp_data\n"
|
||||
"end\n"
|
||||
"ELSE\n"
|
||||
"IF count_data<1\n"
|
||||
"tmp_data=myRange\n"
|
||||
"count_data=count_data+1\n"
|
||||
"END\n"
|
||||
"END\n"
|
||||
"ERR_Z1(i)=myRange\n"
|
||||
"i=i-1\n"
|
||||
"if i<0\n"
|
||||
"i=0\n"
|
||||
"END\n"
|
||||
"END\n"
|
||||
"END\n"
|
||||
"IF FPOS(X)>MAXPOS_Xlhc\n"
|
||||
"i=9999\n"
|
||||
"count_data=0\n"
|
||||
"FILL(tmp_data,ERR_Z1,0,9999)\n"
|
||||
"FILL(MINPOS_Xlhc,XPOINT,0,9999)\n"
|
||||
"END\n"
|
||||
"END\n"
|
||||
"MFLAGS(Z).17=1\n"
|
||||
"STOP\n";
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
48
device/control/acs/buffercode/mhcompcode.h
Normal file
48
device/control/acs/buffercode/mhcompcode.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef MHCOMPCODE_H
|
||||
#define MHCOMPCODE_H
|
||||
|
||||
#include<QString>
|
||||
|
||||
class MHCompCode
|
||||
{
|
||||
public:
|
||||
MHCompCode();
|
||||
QString getCode();
|
||||
QString getCode_motion();
|
||||
void setXStartPos(double value);
|
||||
void setYStartPos(double value);
|
||||
void setXWorkRange(double value);
|
||||
void setYWorkRange(double value);
|
||||
void setXInterval(double value);
|
||||
void setYInterval(double value);
|
||||
void setMHRHYOffset(double value);
|
||||
void setMHRHXOffset(double value);
|
||||
|
||||
void setLookupRows(int value);
|
||||
void setLookupCols(int value);
|
||||
double MaxCmp{0.0};
|
||||
double MaxPos_x{0.0};
|
||||
double MinPos_x{0.0};
|
||||
double x_offset{0.0};
|
||||
|
||||
private:
|
||||
int getLookupRows();
|
||||
int getLookupCols();
|
||||
|
||||
|
||||
private:
|
||||
double xStartPos{0.0};
|
||||
double yStartPos{0.0};
|
||||
double xInterval{0.1};
|
||||
double yInterval{0.1};
|
||||
double xWorkRange{1.0};
|
||||
double yWorkRange{1.0};
|
||||
// 加工头和测距头之间Y方向偏移
|
||||
double MHRHYOffset{0.0};
|
||||
// 加工头和测距头之间X方向偏移
|
||||
double MHRHXOffset{0.0};
|
||||
double cols{0};
|
||||
double rows{0};
|
||||
};
|
||||
|
||||
#endif // MHCOMPCODE_H
|
||||
45
device/control/acs/buffercode/ptpcode.cpp
Normal file
45
device/control/acs/buffercode/ptpcode.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "ptpcode.h"
|
||||
|
||||
PTPCode::PTPCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString PTPCode::getCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code +=
|
||||
QString("ENABLE (%1)\n").arg(moveAxis)+
|
||||
QString("%1 (%2),%3\n").arg(getMoveCMDText()).arg(moveAxis).arg(targetPos)+
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
void PTPCode::setMoveType(bool value)
|
||||
{
|
||||
moveType = value;
|
||||
}
|
||||
|
||||
QString PTPCode::getMoveCMDText()
|
||||
{
|
||||
if(moveType)
|
||||
{
|
||||
return ABSMove;
|
||||
}
|
||||
else
|
||||
{
|
||||
return RMove;
|
||||
}
|
||||
}
|
||||
|
||||
void PTPCode::setTargetPos(QString value)
|
||||
{
|
||||
targetPos = value;
|
||||
}
|
||||
|
||||
|
||||
void PTPCode::setMoveAxis(QString value)
|
||||
{
|
||||
moveAxis = value;
|
||||
}
|
||||
24
device/control/acs/buffercode/ptpcode.h
Normal file
24
device/control/acs/buffercode/ptpcode.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef PTPCODE_H
|
||||
#define PTPCODE_H
|
||||
#include<QString>
|
||||
|
||||
class PTPCode
|
||||
{
|
||||
public:
|
||||
explicit PTPCode();
|
||||
QString getCode();
|
||||
void setMoveType(bool value);
|
||||
void setTargetPos(QString value);
|
||||
void setMoveAxis(QString value);
|
||||
private:
|
||||
QString getMoveCMDText();
|
||||
|
||||
private:
|
||||
QString RMove{"PTP/ER"};
|
||||
QString ABSMove{"PTP/E"};
|
||||
QString moveAxis{""};
|
||||
QString targetPos{""};
|
||||
bool moveType{false};
|
||||
};
|
||||
|
||||
#endif // PTPCODE_H
|
||||
59
device/control/acs/buffercode/rmcposswitchcode.cpp
Normal file
59
device/control/acs/buffercode/rmcposswitchcode.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#include "rmcposswitchcode.h"
|
||||
|
||||
RMCPosSwitchCode::RMCPosSwitchCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString RMCPosSwitchCode::getCode()
|
||||
{
|
||||
QString code("\n");
|
||||
code +=
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
"ENABLE ZA\n"+
|
||||
QString("PTP/e ZA,%1\n").arg(ZAAxisSafePos)+
|
||||
QString("VEL(X) = %1\n").arg(XAxisVel)+
|
||||
QString("ACC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("DEC(X) = %1\n").arg(XAxisVel*10)+
|
||||
QString("JERK(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("KDEC(X) = %1\n").arg(XAxisVel*100)+
|
||||
QString("VEL(Y) = %1\n").arg(YAxisVel)+
|
||||
QString("ACC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("DEC(Y) = %1\n").arg(YAxisVel*10)+
|
||||
QString("JERK(Y) = %1\n").arg(YAxisVel*100)+
|
||||
QString("KDEC(Y) = %1\n").arg(YAxisVel*100)+
|
||||
"ENABLE (X,Y)\n"+
|
||||
QString("PTP/er (X,Y),%1,%2\n").arg(XAxisTgPos).arg(YAxisTgPos)+
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
void RMCPosSwitchCode::setTargetPos(double XPos,double YPos)
|
||||
{
|
||||
XAxisTgPos=XPos;
|
||||
YAxisTgPos=YPos;
|
||||
}
|
||||
|
||||
void RMCPosSwitchCode::setZAAxisSafePos(double value)
|
||||
{
|
||||
ZAAxisSafePos = value;
|
||||
}
|
||||
|
||||
void RMCPosSwitchCode::setZAAxisToSafePosVel(double value)
|
||||
{
|
||||
ZAAxisToSafePosVel = value;
|
||||
}
|
||||
|
||||
void RMCPosSwitchCode::setXYAxisVel(double XVel,double YVel)
|
||||
{
|
||||
XAxisVel = XVel;
|
||||
YAxisVel = YVel;
|
||||
}
|
||||
|
||||
|
||||
24
device/control/acs/buffercode/rmcposswitchcode.h
Normal file
24
device/control/acs/buffercode/rmcposswitchcode.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef RMCPOSSWITCHCODE_H
|
||||
#define RMCPOSSWITCHCODE_H
|
||||
#include<QString>
|
||||
|
||||
class RMCPosSwitchCode
|
||||
{
|
||||
public:
|
||||
RMCPosSwitchCode();
|
||||
QString getCode();
|
||||
void setTargetPos(double XPos,double YPos);
|
||||
void setZAAxisSafePos(double value);
|
||||
void setZAAxisToSafePosVel(double value);
|
||||
void setXYAxisVel(double XVel,double YVel);
|
||||
|
||||
private:
|
||||
double XAxisTgPos{0.0};
|
||||
double YAxisTgPos{0.0};
|
||||
double ZAAxisSafePos{0.0};
|
||||
double ZAAxisToSafePosVel{0.0};
|
||||
double XAxisVel{0.0};
|
||||
double YAxisVel{0.0};
|
||||
};
|
||||
|
||||
#endif // RMCPOSSWITCHCODE_H
|
||||
74
device/control/acs/buffercode/rscompcode.cpp
Normal file
74
device/control/acs/buffercode/rscompcode.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
#include "rscompcode.h"
|
||||
|
||||
RSCompCode::RSCompCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RSCompCode::setXStartPos(double value)
|
||||
{
|
||||
xStartPos = value;
|
||||
}
|
||||
|
||||
void RSCompCode::setYStartPos(double value)
|
||||
{
|
||||
yStartPos = value;
|
||||
}
|
||||
|
||||
void RSCompCode::setXInterval(double value)
|
||||
{
|
||||
xInterval = value;
|
||||
}
|
||||
void RSCompCode::setYInterval(double value)
|
||||
{
|
||||
yInterval = value;
|
||||
}
|
||||
|
||||
void RSCompCode::setXWorkRange(double value)
|
||||
{
|
||||
xWorkRange = value;
|
||||
}
|
||||
|
||||
void RSCompCode::setYWorkRange(double value)
|
||||
{
|
||||
yWorkRange = value;
|
||||
}
|
||||
|
||||
int RSCompCode::getLookupRows()
|
||||
{
|
||||
// 比如范围为3,间隔为1,Y方向会有4条线段
|
||||
return int(xWorkRange/xInterval)+1;
|
||||
}
|
||||
|
||||
int RSCompCode::getLookupCols()
|
||||
{
|
||||
return int(yWorkRange/yInterval)+1;
|
||||
}
|
||||
|
||||
|
||||
QString RSCompCode::getCode()
|
||||
{
|
||||
|
||||
QString code = QString("global real LookupTable(%1)(%2)\n").arg(getLookupRows()).arg(getLookupCols());
|
||||
code +=
|
||||
// 设置APOS和RPOS非默认连接
|
||||
"MFLAGS(Z).#DEFCON = 0\n"
|
||||
"CONNECT RPOS(Z) = RPOS(Z)\n"
|
||||
// 执行connect命令后控制其将电机依赖重置为默认值
|
||||
// 如果连接公式实际上导致电机依赖于另一轴,则需要重新指定依赖
|
||||
"DEPENDS Z, Z\n"+
|
||||
// 防止开启补偿的瞬间Z1轴跳动
|
||||
//QString("SET APOS(Z) = RPOS(Z) - MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos-yInterval).arg(yInterval).arg(xStartPos-xInterval).arg(xInterval)+
|
||||
//QString("CONNECT RPOS(Z) = APOS(Z) + MAP2(FPOS(Y), FPOS(X), LookupTable,%1, %2, %3, %4)\n").arg(yStartPos-yInterval).arg(yInterval).arg(xStartPos-xInterval).arg(xInterval)+
|
||||
QString("SET APOS(Z) = RPOS(Z) - MAP2(FPOS(Y), FPOS(X), LookupTable, %1, %2, %3, %4)\n").arg(yStartPos).arg(yInterval).arg(xStartPos).arg(xInterval)+
|
||||
QString("CONNECT RPOS(Z) = APOS(Z) + MAP2(FPOS(Y), FPOS(X), LookupTable,%1, %2, %3, %4)\n").arg(yStartPos).arg(yInterval).arg(xStartPos).arg(xInterval)+
|
||||
"DEPENDS Z, Z\n"
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
32
device/control/acs/buffercode/rscompcode.h
Normal file
32
device/control/acs/buffercode/rscompcode.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef RSCOMPCODE_H
|
||||
#define RSCOMPCODE_H
|
||||
#include<QString>
|
||||
|
||||
class RSCompCode
|
||||
{
|
||||
public:
|
||||
RSCompCode();
|
||||
QString getCode();
|
||||
void setXStartPos(double value);
|
||||
void setYStartPos(double value);
|
||||
void setXWorkRange(double value);
|
||||
void setYWorkRange(double value);
|
||||
void setXInterval(double value);
|
||||
void setYInterval(double value);
|
||||
|
||||
private:
|
||||
int getLookupRows();
|
||||
int getLookupCols();
|
||||
|
||||
|
||||
private:
|
||||
double xStartPos{0.0};
|
||||
double yStartPos{0.0};
|
||||
double xInterval{0.1};
|
||||
double yInterval{0.1};
|
||||
double xWorkRange{1.0};
|
||||
double yWorkRange{1.0};
|
||||
|
||||
};
|
||||
|
||||
#endif // RSCOMPCODE_H
|
||||
193
device/control/acs/buffercode/rsensortozero.cpp
Normal file
193
device/control/acs/buffercode/rsensortozero.cpp
Normal file
@@ -0,0 +1,193 @@
|
||||
#include "rsensortozero.h"
|
||||
|
||||
RSensorToZero::RSensorToZero()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RSensorToZero::setZAAxisSafePos(double value)
|
||||
{
|
||||
ZAAxisSafePos = value;
|
||||
}
|
||||
|
||||
void RSensorToZero::setZAAxisToSafePosVel(double value)
|
||||
{
|
||||
ZAAxisToSafePosVel = value;
|
||||
}
|
||||
void RSensorToZero::setZAAxisToZero1Vel(double value)
|
||||
{
|
||||
ZAAxisToZero1Vel = value;
|
||||
}
|
||||
void RSensorToZero::setZAAxisToZero2Vel(double value)
|
||||
{
|
||||
ZAAxisToZero2Vel = value;
|
||||
}
|
||||
void RSensorToZero::setZAAxisToZero3Vel(double value)
|
||||
{
|
||||
ZAAxisToZero3Vel = value;
|
||||
}
|
||||
|
||||
|
||||
//QString RSensorToZero::getCode()
|
||||
//{
|
||||
// QString code;
|
||||
// code+=
|
||||
// QString("VEL(Z) = 2\n")+
|
||||
// QString("ACC(Z) = 20\n")+
|
||||
// QString("DEC(Z) = 20\n")+
|
||||
// QString("JERK(Z) = 200\n")+
|
||||
// QString("KDEC(Z) = 200\n")+
|
||||
// QString("PTP/e Z, 0\n")+
|
||||
// "IF RangeV<-1.5\n"+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
// QString("PTP/e ZA, %1\n").arg(ZAAxisSafePos)+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToZero1Vel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
// "PTP ZA, -30\n"
|
||||
// "TILL ABS(RangeV) < 0.1\n"
|
||||
// "HALT ZA\n"
|
||||
// "WAIT 1000\n"+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToZero2Vel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
// "PTP/er ZA, RangeV\n"
|
||||
// "WAIT 1000\n"
|
||||
// "ELSE\n"+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToZero1Vel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
// "PTP/ER ZA,RangeV\n"
|
||||
// "WAIT 1800\n"+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToZero2Vel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
// "PTP/ER ZA,RangeV\n"
|
||||
// "WAIT 600\n"
|
||||
// "END\n"
|
||||
// "IF ABS(RangeV) >= 0.0003\n"+
|
||||
// QString("VEL(ZA) = %1\n").arg(ZAAxisToZero3Vel)+
|
||||
// QString("ACC(ZA) = %1\n").arg(ZAAxisToZero3Vel*10)+
|
||||
// QString("DEC(ZA) = %1\n").arg(ZAAxisToZero3Vel*10)+
|
||||
// QString("JERK(ZA) = %1\n").arg(ZAAxisToZero3Vel*100)+
|
||||
// QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero3Vel*100)+
|
||||
// "PTP/er ZA, RangeV\n"
|
||||
// "END\n"
|
||||
// "runF = 1\n"
|
||||
// "STOP";
|
||||
// return code;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
QString RSensorToZero::getCode()
|
||||
{
|
||||
QString strDoOpen,strDiSts1,strDoClose,strDiSts0;
|
||||
if (CuCeGaoDiNum < 8)
|
||||
strDiSts1 = QString("DI1.%1=1\n").arg(CuCeGaoDiNum);
|
||||
else
|
||||
strDiSts1 = QString("DI2.%1=1\n").arg(CuCeGaoDiNum-8);
|
||||
if (CuCeGaoDiNum < 8)
|
||||
strDiSts0 = QString("DI1.%1=0\n").arg(CuCeGaoDiNum);
|
||||
else
|
||||
strDiSts0 = QString("DI2.%1=0\n").arg(CuCeGaoDiNum-8);
|
||||
|
||||
if (CuCeGaoDoNum < 8)
|
||||
strDoOpen = QString("DO1.%1=1\n").arg(CuCeGaoDoNum);
|
||||
else
|
||||
strDoOpen = QString("DO2.%1=1\n").arg(CuCeGaoDoNum-8);
|
||||
if (CuCeGaoDoNum < 8)
|
||||
strDoClose = QString("DO1.%1=0\n").arg(CuCeGaoDoNum);
|
||||
else
|
||||
strDoClose = QString("DO2.%1=0\n").arg(CuCeGaoDoNum-8);
|
||||
|
||||
QString code;
|
||||
code+=
|
||||
QString("GLOBAL INT DuiLingF=-1\n")+
|
||||
QString("VEL(Z) = 2\n")+
|
||||
QString("ACC(Z) = 20\n")+
|
||||
QString("DEC(Z) = 20\n")+
|
||||
QString("JERK(Z) = 200\n")+
|
||||
QString("KDEC(Z) = 200\n")+
|
||||
QString("PTP/e Z, 0\n")+
|
||||
QString("VEL(Z0) = 5\n")+
|
||||
QString("ACC(Z0) = 50\n")+
|
||||
QString("DEC(Z0) = 50\n")+
|
||||
QString("JERK(Z0) = 500\n")+
|
||||
QString("KDEC(Z0) = 500\n")+
|
||||
QString("PTP/e Z0, 0\n")+
|
||||
strDoClose+
|
||||
QString("TILL %1\n").arg(strDiSts1)+
|
||||
"IF RangeV<-1.5\n"+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToSafePosVel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToSafePosVel*100)+
|
||||
QString("PTP/e ZA, %1\n").arg(ZAAxisSafePos+1)+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToZero1Vel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
"PTP ZA, -30\n"
|
||||
"TILL ABS(RangeV) < 0.5 | "+
|
||||
strDiSts0+
|
||||
"HALT ZA\n"
|
||||
"WAIT 1000\n"
|
||||
"if RangeV < -10\n"
|
||||
"DuiLingF=0\n"
|
||||
"goto duiling\n"
|
||||
"end\n"+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToZero2Vel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
"PTP/er ZA, RangeV\n"
|
||||
"WAIT 1000\n"
|
||||
"ELSE\n"+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToZero1Vel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero1Vel*100)+
|
||||
"PTP/ER ZA,RangeV\n"
|
||||
"WAIT 1800\n"+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToZero2Vel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero2Vel*100)+
|
||||
"PTP/ER ZA,RangeV\n"
|
||||
"WAIT 600\n"
|
||||
"END\n"
|
||||
"IF ABS(RangeV) >= 0.0003\n"+
|
||||
QString("VEL(ZA) = %1\n").arg(ZAAxisToZero3Vel)+
|
||||
QString("ACC(ZA) = %1\n").arg(ZAAxisToZero3Vel*10)+
|
||||
QString("DEC(ZA) = %1\n").arg(ZAAxisToZero3Vel*10)+
|
||||
QString("JERK(ZA) = %1\n").arg(ZAAxisToZero3Vel*100)+
|
||||
QString("KDEC(ZA) = %1\n").arg(ZAAxisToZero3Vel*100)+
|
||||
"PTP/er ZA, RangeV\n"
|
||||
"END\n"
|
||||
"DuiLingF=1\n"
|
||||
"duiling:\n"+
|
||||
strDoOpen+
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
25
device/control/acs/buffercode/rsensortozero.h
Normal file
25
device/control/acs/buffercode/rsensortozero.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef RSENSORTOZERO_H
|
||||
#define RSENSORTOZERO_H
|
||||
#include<QString>
|
||||
|
||||
class RSensorToZero{
|
||||
public:
|
||||
RSensorToZero();
|
||||
QString getCode();
|
||||
void setZAAxisSafePos(double value);
|
||||
void setZAAxisToSafePosVel(double value);
|
||||
void setZAAxisToZero1Vel(double value);
|
||||
void setZAAxisToZero2Vel(double value);
|
||||
void setZAAxisToZero3Vel(double value);
|
||||
int CuCeGaoDoNum{0};
|
||||
int CuCeGaoDiNum{0};
|
||||
|
||||
private:
|
||||
double ZAAxisSafePos{0.0};
|
||||
double ZAAxisToSafePosVel{0.0};
|
||||
double ZAAxisToZero1Vel{0.0};
|
||||
double ZAAxisToZero2Vel{0.0};
|
||||
double ZAAxisToZero3Vel{0.0};
|
||||
};
|
||||
|
||||
#endif // RSENSORTOZERO_H
|
||||
100
device/control/acs/buffercode/sscancode.cpp
Normal file
100
device/control/acs/buffercode/sscancode.cpp
Normal file
@@ -0,0 +1,100 @@
|
||||
#include "sscancode.h"
|
||||
|
||||
SScanCode::SScanCode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SScanCode::setXWorkRange(double value)
|
||||
{
|
||||
xWorkRange = value;
|
||||
}
|
||||
|
||||
void SScanCode::setYWorkRange(double value)
|
||||
{
|
||||
yWorkRange = value;
|
||||
}
|
||||
|
||||
void SScanCode::setXSampInterval(double value)
|
||||
{
|
||||
xSampInterval = value;
|
||||
}
|
||||
|
||||
void SScanCode::setYSampInterval(double value)
|
||||
{
|
||||
ySampInterval = value;
|
||||
}
|
||||
|
||||
int SScanCode::getSampTotalNum()
|
||||
{
|
||||
int xLineSegmentCounts,yLineSegmentCounts;
|
||||
// y线段数比x线段数多1
|
||||
xLineSegmentCounts = int(xWorkRange/xSampInterval);
|
||||
yLineSegmentCounts = xLineSegmentCounts+1;
|
||||
int xSampCounts,ySampCounts;
|
||||
ySampCounts = (accDecSampCount+int(yWorkRange*yNumberOfUnitSamples))*yLineSegmentCounts;
|
||||
xSampCounts = int(xWorkRange*xNumberOfUnitSamples)+xNumberOfLineSegmentSamples*(xLineSegmentCounts-1);
|
||||
return ySampCounts + xSampCounts;
|
||||
|
||||
}
|
||||
|
||||
QString SScanCode::getCode()
|
||||
{
|
||||
|
||||
QString code = QString("GLOBAL REAL scanData(2)(%1),rangeData(%1),yPosData(%1),yWorkRange\n").arg(getSampTotalNum());
|
||||
code +="REAL xPos,yPos\n"+
|
||||
QString("REAL xInterval = %1\n").arg(xSampInterval)+
|
||||
"ENABLE (X,Y)\n"
|
||||
// 停止buffer0运行
|
||||
"STOP 0\n"
|
||||
"START 0,1\n"+
|
||||
// 初始化数组
|
||||
QString("FILL(%1,scanData,0,0,0,%2); FILL(0, scanData,1,1,0,%2)\n").arg(rangeInitValue).arg(getSampTotalNum()-1)+
|
||||
"ACC(X)=8000;DEC(X)=8000;KDEC(X)=120000;JERK(X)=120000; ACC(Y)=8000;DEC(Y)=8000;KDEC(Y)=120000;JERK(Y)=120000;\n "
|
||||
// 设置X、Y轴到位精度,会对INPOS什么时候变为1有影响
|
||||
"TARGRAD(X) = 0.0001; TARGRAD(Y) = 0.0001\n"
|
||||
"WAIT 200\n"+
|
||||
// 设置X,Y轴起始位置。Y轴的起始位置把加减速段考虑进去
|
||||
QString("xPos = FPOS(X);yPos = FPOS(Y)-%1\n").arg(AccDecDist)+
|
||||
// X、Y轴走到起始位置,速度为60mm/s
|
||||
"PTP/EV (X,Y),xPos,yPos,60\n"+
|
||||
// Y轴的工作范围等于设置的工作范围+加速距离+减速距离
|
||||
QString("yWorkRange = %1\n").arg(yWorkRange+2*AccDecDist)+
|
||||
// 定义同步采集,采集测距传感器值、Y轴坐标,采集间隔为0.1ms,采集总数为sampTotalNum
|
||||
QString("DC/s Y,scanData,%1,1,RangeV,FPOS(Y)\n").arg(getSampTotalNum())+
|
||||
// 定义分段运动,起始位置为xStart,yStart,结束速度为vel
|
||||
QString("XSEG/vy (X,Y),xPos,yPos,%1\n").arg(yAxisVel)+
|
||||
// 循环次数等于Y线段数
|
||||
QString("LOOP %1\n").arg(xWorkRange/xSampInterval+1)+
|
||||
// X轴位置不变,Y轴移动工作范围距离
|
||||
// 第1段运动,Y轴向正方向移动(测距头向Y负方向移动)
|
||||
"yPos = yPos+yWorkRange\n"+
|
||||
QString("LINE/v (X,Y),xPos,yPos,%1\n").arg(yAxisVel)+
|
||||
// Y轴位置不变,X轴向正向移动一个步距
|
||||
"xPos = xPos+xInterval\n"+
|
||||
// /v参数定义当前和后续线段的速度,/f 定义当前线段结束时的速度
|
||||
// 意思就是说X轴运动时速度为20,Y轴运动时速度为100
|
||||
QString("LINE/vf (X,Y),xPos,yPos,%1,%2\n").arg(xAxisVel).arg(yAxisVel)+
|
||||
// Y轴移动工作距离范围取反
|
||||
"yWorkRange=(-1)*yWorkRange\n"
|
||||
"END\n"
|
||||
"ENDS (X,Y)\n"
|
||||
// 阻塞,等待多段运动结束
|
||||
"TILL ^AST(Y).5 & ^AST(X).5 & GSEG(X) = -1\n"
|
||||
// 停止采集
|
||||
"STOPDC/s Y\n"
|
||||
"INT validDataEndIndex\n"+
|
||||
// 在0~(sampTotalNum-1)范围内找到第一个最大值并返回其索引(最大值为数组初始化值,索引为采集的测距值最后一个的索引+1)
|
||||
QString("validDataEndIndex=MAXI(scanData,0,0,0,%1)\n").arg(getSampTotalNum()-1)+
|
||||
// 把采集的测距值拷贝到 rangeData数组中,把采集的Y轴的坐标放到yPosData数组中
|
||||
"COPY(scanData,rangeData,0,0,0,validDataEndIndex,0,validDataEndIndex); COPY(scanData,yPosData,1,1,0,validDataEndIndex,0,validDataEndIndex)\n"
|
||||
"runF = 1\n"
|
||||
"STOP";
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
40
device/control/acs/buffercode/sscancode.h
Normal file
40
device/control/acs/buffercode/sscancode.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef SSCANCODE_H
|
||||
#define SSCANCODE_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
||||
class SScanCode
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
SScanCode();
|
||||
QString getCode();
|
||||
void setXWorkRange(double value);
|
||||
void setYWorkRange(double value);
|
||||
void setXSampInterval(double value);
|
||||
void setYSampInterval(double value);
|
||||
private:
|
||||
int getSampTotalNum();
|
||||
|
||||
private:
|
||||
double xWorkRange{1.0};
|
||||
double yWorkRange{1.0};
|
||||
double xSampInterval{1.0};
|
||||
double ySampInterval{1.0};
|
||||
|
||||
const int yNumberOfUnitSamples{12};
|
||||
const int xNumberOfUnitSamples{20};
|
||||
const int xNumberOfLineSegmentSamples{200};
|
||||
const int accDecSampCount{1500};
|
||||
// rangeInitValue 用于初始化保存测距值的数组
|
||||
double rangeInitValue{100.0};
|
||||
// 加减速距离
|
||||
double AccDecDist{45.0};
|
||||
double xAxisVel{20.0};
|
||||
double yAxisVel{100.0};
|
||||
};
|
||||
|
||||
#endif // SSCANCODE_H
|
||||
1333
device/control/acs/buffercode/tohomecode.cpp
Normal file
1333
device/control/acs/buffercode/tohomecode.cpp
Normal file
File diff suppressed because it is too large
Load Diff
114
device/control/acs/buffercode/tohomecode.h
Normal file
114
device/control/acs/buffercode/tohomecode.h
Normal file
@@ -0,0 +1,114 @@
|
||||
#ifndef TOHOMECODE_H
|
||||
#define TOHOMECODE_H
|
||||
#include <QString>
|
||||
#include "deviceproxy.h"
|
||||
class ToHomeCode
|
||||
{
|
||||
public:
|
||||
explicit ToHomeCode();
|
||||
QString getCode();
|
||||
|
||||
void setZAAxisToSafePosVel(double value);
|
||||
|
||||
void setXAxisToHomePos(double value);
|
||||
void setYAxisToHomePos(double value);
|
||||
void setZAxisToHomePos(double value);
|
||||
void setZAAxisToHomePos(double value);
|
||||
void setDAxisToHomePos(double value);
|
||||
void setZ0AxisToHomePos(double value);
|
||||
void setZ2AxisToHomePos(double value);
|
||||
|
||||
void setXAxisFindINDVel(double value);
|
||||
void setYAxisFindINDVel(double value);
|
||||
void setZAxisFindINDVel(double value);
|
||||
void setZAAxisFindINDVel(double value);
|
||||
void setDAxisFindINDVel(double value);
|
||||
void setZ0AxisFindINDVel(double value);
|
||||
void setZ2AxisFindINDVel(double value);
|
||||
|
||||
|
||||
void setXAxisINDZeroOffset(double value);
|
||||
void setYAxisINDZeroOffset(double value);
|
||||
void setZAxisINDZeroOffset(double value);
|
||||
void setZAAxisINDZeroOffset(double value);
|
||||
void setDAxisINDZeroOffset(double value);
|
||||
void setZ0AxisINDZeroOffset(double value);
|
||||
void setZ2AxisINDZeroOffset(double value);
|
||||
|
||||
void setXAxisSLLimit(double value);
|
||||
void setXAxisSRLimit(double value);
|
||||
void setYAxisSLLimit(double value);
|
||||
void setYAxisSRLimit(double value);
|
||||
void setZAxisSLLimit(double value);
|
||||
void setZAxisSRLimit(double value);
|
||||
void setZAAxisSLLimit(double value);
|
||||
void setZAAxisSRLimit(double value);
|
||||
void setDAxisSLLimit(double value);
|
||||
void setDAxisSRLimit(double value);
|
||||
void setZ0AxisSLLimit(double value);
|
||||
void setZ0AxisSRLimit(double value);
|
||||
void setZ2AxisSLLimit(double value);
|
||||
void setZ2AxisSRLimit(double value);
|
||||
|
||||
void setXAxisVel(double value);
|
||||
void setYAxisVel(double value);
|
||||
void setZAxisVel(double value);
|
||||
void setZAAxisVel(double value);
|
||||
void setDAxisVel(double value);
|
||||
void setZ0AxisVel(double value);
|
||||
void setZ2AxisVel(double value);
|
||||
|
||||
private:
|
||||
|
||||
double ZAAxisToSafePosVel{0.0};
|
||||
|
||||
double XAxisToHomePos{0.0};
|
||||
double YAxisToHomePos{0.0};
|
||||
double ZAxisToHomePos{0.0};
|
||||
double ZAAxisToHomePos{0.0};
|
||||
double DAxisToHomePos{0.0};
|
||||
double Z0AxisToHomePos{0.0};
|
||||
double Z2AxisToHomePos{0.0};
|
||||
|
||||
double XAxisFindINDVel{0.0};
|
||||
double YAxisFindINDVel{0.0};
|
||||
double ZAxisFindINDVel{0.0};
|
||||
double ZAAxisFindINDVel{0.0};
|
||||
double DAxisFindINDVel{0.0};
|
||||
double Z0AxisFindINDVel{0.0};
|
||||
double Z2AxisFindINDVel{0.0};
|
||||
|
||||
double XAxisINDZeroOffset{0.0};
|
||||
double YAxisINDZeroOffset{0.0};
|
||||
double ZAxisINDZeroOffset{0.0};
|
||||
double ZAAxisINDZeroOffset{0.0};
|
||||
double DAxisINDZeroOffset{0.0};
|
||||
double Z0AxisINDZeroOffset{0.0};
|
||||
double Z2AxisINDZeroOffset{0.0};
|
||||
|
||||
double XAxisSLLimit{0.0};
|
||||
double XAxisSRLimit{0.0};
|
||||
double YAxisSLLimit{0.0};
|
||||
double YAxisSRLimit{0.0};
|
||||
double ZAxisSLLimit{0.0};
|
||||
double ZAxisSRLimit{0.0};
|
||||
double ZAAxisSLLimit{0.0};
|
||||
double ZAAxisSRLimit{0.0};
|
||||
double DAxisSLLimit{0.0};
|
||||
double DAxisSRLimit{0.0};
|
||||
double Z0AxisSLLimit{0.0};
|
||||
double Z0AxisSRLimit{0.0};
|
||||
double Z2AxisSLLimit{0.0};
|
||||
double Z2AxisSRLimit{0.0};
|
||||
|
||||
|
||||
double XAxisVel{0.0};
|
||||
double YAxisVel{0.0};
|
||||
double ZAxisVel{0.0};
|
||||
double ZAAxisVel{0.0};
|
||||
double DAxisVel{0.0};
|
||||
double Z0AxisVel{0.0};
|
||||
double Z2AxisVel{0.0};
|
||||
};
|
||||
|
||||
#endif // TOHOMECODE_H
|
||||
Reference in New Issue
Block a user