1、修复在于Hexcal 补偿过程中的通讯问题;2、改变监听端口方式,改为监听所有端口,不在固定 测量机默认IP 100.0.0.1 ;

This commit is contained in:
zhengxuan.zhang
2024-03-11 10:37:51 +08:00
parent 8e15635264
commit 92705068f7
8 changed files with 207 additions and 273 deletions
+41
View File
@@ -5,6 +5,7 @@ using System.Windows.Forms;
using ACS.SPiiPlusNET;
using HexcalMC.Base;
using HexcalMC.Properties;
using Telerik.WinControls.UI;
// ACS .NET Library
@@ -892,6 +893,46 @@ namespace HexcalMC
private void btn_movepose_Click(object sender, EventArgs e)
{
//判断是否为textBox_x空
if (string.IsNullOrWhiteSpace(textBox_x.Text) || string.IsNullOrEmpty(textBox_y.Text) ||
string.IsNullOrEmpty(textBox_z.Text))
{
MessageBox.Show("输入文本框为空,请修改", "警告");
return;
}
//获取 textBox_x 的值
double x = double.Parse(textBox_x.Text);
double y = double.Parse(textBox_y.Text);
double z = double.Parse(textBox_z.Text);
Point3D _point3D = new Point3D(x, y, z);
if (MainFrom.IsWithinStrokes(_point3D)) //判断点是否在行程范围内
{
double[] pointsArray =
{
_point3D.X,
_point3D.Y,
_point3D.Z
};
//执行运动指令
_acs.ToPointM(MotionFlags.ACSC_NONE, MainFrom.UseAxis, pointsArray); //多轴运动到指定位置
////等待运动完成
//for (int i = 0; i < USE_AXIS.Length; i++)
//{
// _acs.WaitMotionEnd(USE_AXIS[i], _motionTimeout); //等待回家完成
//}
//_currentMotionState = MotionStates.InPos;
//DebugDfn.AddLogText("运动到位");
}
else
{
DebugDfn.AddLogText("目标位置超出行程范围,请重新设置");
MessageBox.Show("目标位置超出行程范围,请重新设置", "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void btn_start_Click(object sender, EventArgs e)