验证档位速度,修改测试用例
This commit is contained in:
@@ -1891,6 +1891,7 @@ HSI_STATUS HSI_Motion::Jog(UINT AxisTypes, double Speed)
|
||||
//ÊÇ·ñ»Ø¹ý¼ÒÅжÏ
|
||||
if (m_Home_Machine_Axis[AxisNumber] == 0)
|
||||
{
|
||||
g_pLogger->SendAndFlushWithTime(L"[Jog] Current Axis[%d] not homed \n",AxisNumber);
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
@@ -1902,7 +1903,7 @@ HSI_STATUS HSI_Motion::Jog(UINT AxisTypes, double Speed)
|
||||
int limitSDPul = 0;
|
||||
double time;
|
||||
/*GetPositionXyz(1, now_pos[0], now_pos[1], now_pos[2], time);*/
|
||||
GetPositionEncPrfMulti(1, now_pos, Prf_pos, 1);
|
||||
//GetPositionEncPrfMulti(1, now_pos, Prf_pos, 1);
|
||||
|
||||
|
||||
JogSpeed = abs(SpeedPercent(AxisNumber, Speed, DriveSpeed, StartSpeed, AccLine, DecLine, AccCurve, DecCurve));
|
||||
@@ -3915,16 +3916,16 @@ HSI_STATUS HSI_Motion::Load_EF3_Motion_Inifile(CString GoogolIniFile)
|
||||
csAppPath);
|
||||
m_SpeedMax[i] = GetPrivateProfileInt(L"SET_POSITION_SPEED", L"SPEED_RUNMAX_" + axisNum[i], 150, csAppPath);
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 5; i++)// i 轴
|
||||
{
|
||||
for (int j = 1; j < 5; j++)
|
||||
for (int j = 1; j < 5; j++) //j 档位
|
||||
{
|
||||
GetPrivateProfileString(L"JOG_SPEED", L"JOG_DRIVESPEED_" + strGear[i] + axisNum[j], L"10",
|
||||
temp.GetBufferSetLength(50), 10, csAppPath);
|
||||
float speed = (atof(T2A(temp)));
|
||||
m_JogDriveSpeed[j][i] = GetPrivateProfileInt(L"JOG_SPEED", L"JOG_DRIVESPEED_" , 10, csAppPath);
|
||||
//m_JogDriveSpeed[j][i] = speed / (m_Resolution[j] * 50);
|
||||
g_pLogger->SendAndFlushWithTime(L"[Load_EF3_Motion_Inifile] m_JogDriveSpeed[%d][%d]: %lf %d\n", j, i, speed,m_JogDriveSpeed[j][i]);//打印配置文件 档位速度
|
||||
/*m_JogDriveSpeed[j][i] = GetPrivateProfileInt(L"JOG_SPEED", L"JOG_DRIVESPEED_" , 10, csAppPath);*/
|
||||
m_JogDriveSpeed[j][i] = speed / (m_Resolution[j] * 50);
|
||||
g_pLogger->SendAndFlushWithTime(L"[Load_EF3_Motion_Inifile] m_JogDriveSpeed[%d][%d]: %.4f %ld\n", i,j,speed,m_JogDriveSpeed[i][j]);//打印配置文件 档位速度
|
||||
|
||||
GetPrivateProfileString(L"JOG_SPEED", L"JOG_STARTSPEED_" + strGear[i] + axisNum[j], L"10",
|
||||
temp.GetBufferSetLength(50), 10, csAppPath);
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
#define HSI_VERSION_REVNUM
|
||||
#define HSI_VERSION_BUILD_DATE _T(__DATE__ )
|
||||
#define HSI_VERSION_BUILD_TIME _T(__TIME__ )
|
||||
#define HSI_FILE_DESCRIPTION "2022.11.02 / 13:33 "
|
||||
#define HSI_FILE_CSDESCRIPTION _T("2022.11.02 / 13:33 ")
|
||||
#define HSI_FILE_DESCRIPTION "2022.11.07 / 17:44 "
|
||||
#define HSI_FILE_CSDESCRIPTION _T("2022.11.07 / 17:44 ")
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace HSI_SEVENOCEAN_EF1_CsTest
|
||||
//rStatus = Motion.IsHomed(ref bHomed);
|
||||
//Console.WriteLine("Motion.IsHomed:{0}", rStatus);
|
||||
var bexit = false;
|
||||
var SpeedGear = 1.0;
|
||||
var SpeedGear = 0.2;
|
||||
var dPos = new double[3];
|
||||
do
|
||||
{
|
||||
@@ -122,15 +122,19 @@ namespace HSI_SEVENOCEAN_EF1_CsTest
|
||||
|
||||
//加减速
|
||||
case ConsoleKey.Add:
|
||||
SpeedGear += 1.0;
|
||||
SpeedGear += 0.2;
|
||||
if (SpeedGear > 1.1)
|
||||
{
|
||||
SpeedGear = 1.1;
|
||||
}
|
||||
Console.WriteLine("Motion.SpeedGera:{0}", SpeedGear);
|
||||
break;
|
||||
|
||||
case ConsoleKey.Subtract:
|
||||
SpeedGear -= 1.0;
|
||||
if (SpeedGear < 1.0)
|
||||
SpeedGear -= 0.2;
|
||||
if (SpeedGear < 0.1)
|
||||
{
|
||||
SpeedGear = 1.0;
|
||||
SpeedGear = 0.1;
|
||||
}
|
||||
|
||||
Console.WriteLine("Motion.SpeedGera:{0}", SpeedGear);
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace WPFSerialAssistant
|
||||
{
|
||||
public static class Utilities
|
||||
{
|
||||
public static double m_Resolution = 0.0001; //分辨率设置 0.1um
|
||||
public static double m_Resolution = 1; //分辨率设置 0.1um
|
||||
public static string BytesToText(List<byte> bytesBuffer, ReceiveMode mode, Encoding encoding)
|
||||
{
|
||||
string result = "";
|
||||
@@ -47,7 +47,7 @@ namespace WPFSerialAssistant
|
||||
int tempX2 = pointByteArray[12 * i + 0] | pointByteArray[12 * i + 1] << 8 | pointByteArray[12 * i + 2] << 16 | pointByteArray[12 * i + 3] << 24;
|
||||
int tempY2 = pointByteArray[12 * i + 4] | pointByteArray[12 * i + 5] << 8 | pointByteArray[12 * i + 6] << 16 | pointByteArray[12 * i + 7] << 24;
|
||||
int tempZ2 = pointByteArray[12 * i + 8] | pointByteArray[12 * i + 9] << 8 | pointByteArray[12 * i + 10] << 16 | pointByteArray[12 * i + 11] << 24;
|
||||
result += "Point: " + (i + 1).ToString()+"\t X: " + (tempX2 * m_Resolution).ToString() + "\t Y1: " + (tempY2 * m_Resolution).ToString() + "\t Y2: " + (tempZ2 * m_Resolution).ToString() + "\n";
|
||||
result += "Point: " + (i + 1).ToString()+"\t X: " + (tempX2 * m_Resolution).ToString() + "\t Y: " + (tempY2 * m_Resolution).ToString() + "\t Z: " + (tempZ2 * m_Resolution).ToString() + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user