增加温度读取,将温度控制和摄像头代码结构化整理

This commit is contained in:
uu
2025-06-17 16:19:54 +08:00
parent 6f5a34a60c
commit 1dc8c88d4a
45 changed files with 2371 additions and 584 deletions

View File

@@ -112,6 +112,7 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="tempControl.cs" />
<EmbeddedResource Include="ShowForm.resx">
<DependentUpon>ShowForm.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -14,20 +14,25 @@ namespace HitBotCSharpDemo
{
public class CameraManager
{
private string configFilePath = "Camera_config.txt";
readonly DeviceTLayerType enumTLayerType = DeviceTLayerType.MvGigEDevice | DeviceTLayerType.MvUsbDevice
| DeviceTLayerType.MvGenTLGigEDevice | DeviceTLayerType.MvGenTLCXPDevice | DeviceTLayerType.MvGenTLCameraLinkDevice | DeviceTLayerType.MvGenTLXoFDevice;
List<IDeviceInfo> deviceInfoList = new List<IDeviceInfo>();
IDevice device = null;
bool isGrabbing = false;
Thread receiveThread = null;
private readonly DeviceTLayerType enumTLayerType = DeviceTLayerType.MvGigEDevice | DeviceTLayerType.MvUsbDevice
| DeviceTLayerType.MvGenTLGigEDevice | DeviceTLayerType.MvGenTLCXPDevice | DeviceTLayerType.MvGenTLCameraLinkDevice | DeviceTLayerType.MvGenTLXoFDevice;
private System.Collections.Generic.List<IDeviceInfo> deviceInfoList = new System.Collections.Generic.List<IDeviceInfo>();
private IDevice device = null;
private bool isGrabbing = false;
private Thread receiveThread = null;
private IFrameOut frameForSave;
private readonly object saveImageLock = new object();
// 添加曝光参数控制变量
private float currentExposure = 10000f; // 默认曝光时间
private float currentGain = 0f; // 默认增益
private string configFilePath = "Camera_config.txt";
private PictureBox displayControl;
private void InitializeCamera()
public CameraManager(PictureBox displayPictureBox)
{
displayControl = displayPictureBox;
}
public void Initialize()
{
// 枚举设备
int nRet = DeviceEnumerator.EnumDevices(enumTLayerType, out deviceInfoList);
@@ -42,6 +47,189 @@ namespace HitBotCSharpDemo
ConnectFirstCamera();
}
}
public void LoadConfiguration()
{
try
{
if (File.Exists(configFilePath))
{
string[] lines = File.ReadAllLines(configFilePath);
foreach (string line in lines)
{
if (line.StartsWith("Exposure="))
{
if (float.TryParse(line.Substring(9), out float exposure))
currentExposure = exposure;
}
else if (line.StartsWith("Gain="))
{
if (float.TryParse(line.Substring(5), out float gain))
currentGain = gain;
}
}
}
}
catch (Exception ex)
{
Console.WriteLine("加载相机配置失败: " + ex.Message);
}
}
public void TakePhoto()
{
if (frameForSave == null)
{
MessageBox.Show("没有可用的图像数据!");
return;
}
try
{
string fileName = "Photo_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".jpg";
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fileName, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
MessageBox.Show($"照片已保存: {fileName}");
}
else
{
MessageBox.Show("保存照片失败!" + result);
}
}
}
catch (Exception ex)
{
MessageBox.Show("拍照失败: " + ex.Message);
}
}
public void ShowParameterDialog()
{
if (device == null)
{
MessageBox.Show("相机未连接!");
return;
}
// 创建参数调整窗体
using (Form paramForm = new Form())
{
paramForm.Text = "相机参数设置";
paramForm.Size = new Size(300, 200);
paramForm.StartPosition = FormStartPosition.CenterParent;
// 曝光时间设置
Label lblExposure = new Label() { Text = "曝光时间:", Location = new Point(10, 20), Size = new Size(80, 20) };
TextBox txtExposure = new TextBox() { Location = new Point(100, 18), Size = new Size(100, 20), Text = currentExposure.ToString() };
// 增益设置
Label lblGain = new Label() { Text = "增益:", Location = new Point(10, 50), Size = new Size(80, 20) };
TextBox txtGain = new TextBox() { Location = new Point(100, 48), Size = new Size(100, 20), Text = currentGain.ToString() };
// 确定按钮
Button btnOK = new Button() { Text = "应用", Location = new Point(50, 100), Size = new Size(60, 30) };
btnOK.Click += (s, e) => {
try
{
float exposure = float.Parse(txtExposure.Text);
float gain = float.Parse(txtGain.Text);
SetCameraParameters(exposure, gain);
paramForm.Close();
}
catch
{
MessageBox.Show("请输入正确的数值!");
}
};
// 取消按钮
Button btnCancel = new Button() { Text = "取消", Location = new Point(130, 100), Size = new Size(60, 30) };
btnCancel.Click += (s, e) => paramForm.Close();
paramForm.Controls.AddRange(new Control[] { lblExposure, txtExposure, lblGain, txtGain, btnOK, btnCancel });
paramForm.ShowDialog();
}
}
public string SaveCurrentImageForDetection()
{
if (frameForSave == null) return null;
try
{
string fileName = "temp_detection_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".jpg";
string fullPath = Path.Combine(Application.StartupPath, fileName);
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fullPath, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
return fullPath;
}
}
}
catch (Exception ex)
{
MessageBox.Show("保存图像失败: " + ex.Message);
}
return null;
}
public string SaveImageToPositionFolder(int positionIndex, int currentCycle, string cycleStartTime)
{
if (frameForSave == null) return null;
try
{
string positionFolder = Path.Combine(Application.StartupPath, $"Position{positionIndex + 1}_Original_{cycleStartTime}");
if (!Directory.Exists(positionFolder))
{
Directory.CreateDirectory(positionFolder);
}
string fileName = $"Original_Pos{positionIndex + 1}_Cycle{currentCycle}_{DateTime.Now:yyyyMMddHHmmss}.jpg";
string fullPath = Path.Combine(positionFolder, fileName);
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fullPath, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
return fullPath;
}
}
}
catch (Exception ex)
{
MessageBox.Show($"保存点位{positionIndex + 1}图像失败: " + ex.Message);
}
return null;
}
public void StopCamera()
{
// 停止采集
if (isGrabbing)
{
isGrabbing = false;
if (receiveThread != null && receiveThread.IsAlive)
{
receiveThread.Join();
}
}
// 关闭设备
if (device != null)
{
device.StreamGrabber.StopGrabbing();
device.Close();
device.Dispose();
device = null;
}
// 释放帧缓存
lock (saveImageLock)
{
if (frameForSave != null)
{
frameForSave.Dispose();
frameForSave = null;
}
}
}
private void ConnectFirstCamera()
{
try
@@ -70,9 +258,7 @@ namespace HitBotCSharpDemo
// 设置采集模式
device.Parameters.SetEnumValueByString("AcquisitionMode", "Continuous");
device.Parameters.SetEnumValueByString("TriggerMode", "Off");
SetCameraParameters(currentExposure, currentGain);
// 启动图像采集
StartGrabbing();
}
@@ -110,7 +296,6 @@ namespace HitBotCSharpDemo
{
IFrameOut frameOut;
int nRet = device.StreamGrabber.GetImageBuffer(1000, out frameOut);
if (MvError.MV_OK == nRet)
{
// 保存帧信息用于拍照
@@ -125,10 +310,10 @@ namespace HitBotCSharpDemo
// 显示图像到PictureBox
try
{
//if (cam_feed.IsHandleCreated)
//{
// device.ImageRender.DisplayOneFrame(cam_feed.Handle, frameOut.Image);
//}
if (displayControl.IsHandleCreated)
{
device.ImageRender.DisplayOneFrame(displayControl.Handle, frameOut.Image);
}
}
catch (Exception ex)
{
@@ -143,41 +328,14 @@ namespace HitBotCSharpDemo
}
}
}
private void LoadCameraConfig()
{
try
{
if (File.Exists(configFilePath))
{
string[] lines = File.ReadAllLines(configFilePath);
foreach (string line in lines)
{
if (line.StartsWith("Exposure="))
{
if (float.TryParse(line.Substring(9), out float exposure))
currentExposure = exposure;
}
else if (line.StartsWith("Gain="))
{
if (float.TryParse(line.Substring(5), out float gain))
currentGain = gain;
}
}
}
}
catch (Exception ex)
{
Console.WriteLine("加载相机配置失败: " + ex.Message);
}
}
private void SaveCameraConfig()
{
try
{
string[] config = new string[]
{
$"Exposure={currentExposure}",
$"Gain={currentGain}"
$"Exposure={currentExposure}",
$"Gain={currentGain}"
};
File.WriteAllLines(configFilePath, config);
}
@@ -186,82 +344,6 @@ namespace HitBotCSharpDemo
Console.WriteLine("保存相机配置失败: " + ex.Message);
}
}
private void TakePhoto()
{
if (frameForSave == null)
{
MessageBox.Show("没有可用的图像数据!");
return;
}
try
{
string fileName = "Photo_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".jpg";
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fileName, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
MessageBox.Show($"照片已保存: {fileName}");
}
else
{
MessageBox.Show("保存照片失败!" + result);
}
}
}
catch (Exception ex)
{
MessageBox.Show("拍照失败: " + ex.Message);
}
}
//private void ShowCameraParameterDialog()
//{
// if (device == null)
// {
// MessageBox.Show("相机未连接!");
// return;
// }
// // 创建参数调整窗体
// using (Form paramForm = new Form())
// {
// paramForm.Text = "相机参数设置";
// paramForm.Size = new Size(300, 200);
// paramForm.StartPosition = FormStartPosition.CenterParent;
// // 曝光时间设置
// Label lblExposure = new Label() { Text = "曝光时间:", Location = new Point(10, 20), Size = new Size(80, 20) };
// TextBox txtExposure = new TextBox() { Location = new Point(100, 18), Size = new Size(100, 20), Text = currentExposure.ToString() };
// // 增益设置
// Label lblGain = new Label() { Text = "增益:", Location = new Point(10, 50), Size = new Size(80, 20) };
// TextBox txtGain = new TextBox() { Location = new Point(100, 48), Size = new Size(100, 20), Text = currentGain.ToString() };
// // 确定按钮
// Button btnOK = new Button() { Text = "应用", Location = new Point(50, 100), Size = new Size(60, 30) };
// btnOK.Click += (s, e) => {
// try
// {
// float exposure = float.Parse(txtExposure.Text);
// float gain = float.Parse(txtGain.Text);
// SetCameraParameters(exposure, gain);
// paramForm.Close();
// }
// catch
// {
// MessageBox.Show("请输入正确的数值!");
// }
// };
// // 取消按钮
// Button btnCancel = new Button() { Text = "取消", Location = new Point(130, 100), Size = new Size(60, 30) };
// btnCancel.Click += (s, e) => paramForm.Close();
// paramForm.Controls.AddRange(new Control[] { lblExposure, txtExposure, lblGain, txtGain, btnOK, btnCancel });
// paramForm.ShowDialog(this);
// }
//}
private void SetCameraParameters(float exposure, float gain)
{
if (device == null) return;
@@ -286,7 +368,6 @@ namespace HitBotCSharpDemo
currentExposure = exposure;
currentGain = gain;
SaveCameraConfig();
//MessageBox.Show("参数设置成功!");
}
catch (Exception ex)
@@ -294,38 +375,5 @@ namespace HitBotCSharpDemo
MessageBox.Show("设置参数失败: " + ex.Message);
}
}
//protected override void OnFormClosing(FormClosingEventArgs e)
//{
// // 停止采集
// if (isGrabbing)
// {
// isGrabbing = false;
// if (receiveThread != null && receiveThread.IsAlive)
// {
// receiveThread.Join();
// }
// }
// // 关闭设备
// if (device != null)
// {
// device.StreamGrabber.StopGrabbing();
// device.Close();
// device.Dispose();
// device = null;
// }
// // 释放帧缓存
// lock (saveImageLock)
// {
// if (frameForSave != null)
// {
// frameForSave.Dispose();
// frameForSave = null;
// }
// }
// // 终结SDK
// SDKSystem.Finalize();
// base.OnFormClosing(e);
//}
}
}

View File

@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HitBotCSharpDemo
{
public interface IPositionManager
{
bool LoadPositions();
float[] GetPosition(int index);
int PositionCount { get; }
bool IsPositionValid(int index);
}
internal class PositionManager
{
private float[][] cameraPositions;
private string filePath = "Cam_pos_path.txt";
public int PositionCount => cameraPositions?.Length ?? 0;
public bool LoadPositions()
{
try
{
if (File.Exists(filePath))
{
string[] lines = File.ReadAllLines(filePath);
cameraPositions = new float[5][];
int positionIndex = 0;
foreach (string line in lines)
{
if (string.IsNullOrWhiteSpace(line) || line.StartsWith("#"))
continue;
if (positionIndex < 5)
{
string[] coords = line.Split(',');
if (coords.Length == 4)
{
cameraPositions[positionIndex] = new float[4];
for (int i = 0; i < 4; i++)
{
if (float.TryParse(coords[i].Trim(), out float value))
{
cameraPositions[positionIndex][i] = value;
}
else
{
MessageBox.Show($"解析第{positionIndex + 1}行第{i + 1}个坐标时出错:{coords[i]}");
return false;
}
}
positionIndex++;
}
else
{
MessageBox.Show($"第{positionIndex + 1}行坐标格式错误应该包含4个值(X,Y,Z,R)");
return false;
}
}
}
return true;
}
else
{
MessageBox.Show($"未找到文件:{filePath}");
return false;
}
}
catch (Exception ex)
{
MessageBox.Show($"加载点位文件时出错:{ex.Message}");
return false;
}
}
public float[] GetPosition(int index)
{
if (IsPositionValid(index))
{
return cameraPositions[index];
}
return null;
}
public bool IsPositionValid(int index)
{
return cameraPositions != null &&
index >= 0 &&
index < cameraPositions.Length &&
cameraPositions[index] != null;
}
}
}

View File

@@ -0,0 +1,133 @@
using ControlBeanExDll;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TcpserverExDll;
namespace HitBotCSharpDemo
{
public interface IRobotManager
{
ControlBeanEx Robot { get; }
bool IsInitialized { get; }
bool Initialize(int robotId);
void MoveToPosition(float x, float y, float z, float r, int hand);
void JogMove(float deltaX, float deltaY, float deltaZ, float deltaR);
void StopMove();
void GetCurrentPosition();
int[] GetIOInputs(int count);
int[] GetIOOutputs(int count);
void SetDigitalOutput(int index, bool state);
void JointHome(int jointNumber);
float X { get; }
float Y { get; }
float Z { get; }
float Rotation { get; }
int Hand { get; }
bool MoveFlag { get; }
}
internal class RobotManager
{
private ControlBeanEx robot;
private bool isInitialized = false;
public ControlBeanEx Robot => robot;
public bool IsInitialized => isInitialized;
public float X => robot?.x ?? 0;
public float Y => robot?.y ?? 0;
public float Z => robot?.z ?? 0;
public float Rotation => robot?.rotation ?? 0;
public int Hand => robot?.get_lr() ?? 0;
public bool MoveFlag => robot?.move_flag ?? false;
public RobotManager()
{
TcpserverEx.net_port_initial();
}
public bool Initialize(int robotId)
{
robot = TcpserverEx.get_robot(robotId);
if (robot.is_connected())
{
robot.check_joint(4, false);
int ret = robot.initial(1, 240);
if (ret == 1)
{
robot.unlock_position();
isInitialized = true;
MessageBox.Show("机械臂初始化完成");
return true;
}
else
{
MessageBox.Show($"机械臂初始化失败,返回值 = {ret}");
return false;
}
}
else
{
MessageBox.Show("机械臂未连接");
return false;
}
}
public void MoveToPosition(float x, float y, float z, float r, int hand)
{
if (!isInitialized) return;
robot.get_scara_param();
robot.new_set_acc(30, 30, 30, 30);
robot.new_movej_xyz_lr(x, y, z, r, 100, 0, hand);
}
public void JogMove(float deltaX, float deltaY, float deltaZ, float deltaR)
{
if (!isInitialized) return;
robot.jog_move2(deltaX, deltaY, deltaZ, deltaR, 1);
}
public void StopMove()
{
if (!isInitialized) return;
robot.new_stop_move();
}
public void GetCurrentPosition()
{
if (!isInitialized) return;
robot.get_scara_param();
}
public int[] GetIOInputs(int count)
{
if (!isInitialized) return new int[count];
int[] inputs = new int[count];
for (int i = 0; i < count; i++)
{
inputs[i] = robot.get_digital_in(i);
}
return inputs;
}
public int[] GetIOOutputs(int count)
{
if (!isInitialized) return new int[count];
int[] outputs = new int[count];
for (int i = 0; i < count; i++)
{
outputs[i] = robot.get_digital_out(i);
}
return outputs;
}
public void SetDigitalOutput(int index, bool state)
{
if (!isInitialized) return;
robot.set_digital_out(index, state);
}
public void JointHome(int jointNumber)
{
if (!isInitialized) return;
robot.joint_home(jointNumber);
}
}
}

View File

@@ -103,6 +103,7 @@
this.btn_Pause = new System.Windows.Forms.Button();
this.btn_Start = new System.Windows.Forms.Button();
this.tap_Cam = new System.Windows.Forms.TabPage();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
@@ -118,12 +119,52 @@
this.cam_btn_3 = new System.Windows.Forms.Button();
this.cam_btn_2 = new System.Windows.Forms.Button();
this.cam_btn_1 = new System.Windows.Forms.Button();
this.tap_tempCtrl = new System.Windows.Forms.TabPage();
this.grb_temport = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.cob_Robot_ID = new System.Windows.Forms.ComboBox();
this.lbl_Refresh_ID = new System.Windows.Forms.Label();
this.tim_IO_Refresh = new System.Windows.Forms.Timer(this.components);
this.rit_Coord = new System.Windows.Forms.RichTextBox();
this.label1 = new System.Windows.Forms.Label();
this.grb_pos1 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label18 = new System.Windows.Forms.Label();
this.button10 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.tac_MainForm.SuspendLayout();
this.tap_Axis.SuspendLayout();
this.grb_R.SuspendLayout();
@@ -139,7 +180,13 @@
this.tap_Cam.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cam_feed)).BeginInit();
this.tap_tempCtrl.SuspendLayout();
this.grb_temport.SuspendLayout();
this.panel1.SuspendLayout();
this.grb_pos1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// btn_Init
@@ -160,6 +207,7 @@
this.tac_MainForm.Controls.Add(this.tap_joint);
this.tac_MainForm.Controls.Add(this.tap_Move);
this.tac_MainForm.Controls.Add(this.tap_Cam);
this.tac_MainForm.Controls.Add(this.tap_tempCtrl);
this.tac_MainForm.Dock = System.Windows.Forms.DockStyle.Fill;
this.tac_MainForm.Location = new System.Drawing.Point(0, 0);
this.tac_MainForm.Margin = new System.Windows.Forms.Padding(4);
@@ -1023,10 +1071,19 @@
this.tap_Cam.Padding = new System.Windows.Forms.Padding(3);
this.tap_Cam.Size = new System.Drawing.Size(1214, 760);
this.tap_Cam.TabIndex = 4;
this.tap_Cam.Text = "相机点位";
this.tap_Cam.Text = "晶体检测";
this.tap_Cam.UseVisualStyleBackColor = true;
this.tap_Cam.Click += new System.EventHandler(this.tap_Cam_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(847, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(170, 18);
this.label1.TabIndex = 17;
this.label1.Text = "停留时间(分钟):";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(1023, 74);
@@ -1177,6 +1234,62 @@
this.cam_btn_1.UseVisualStyleBackColor = true;
this.cam_btn_1.Click += new System.EventHandler(this.button1_Click);
//
// tap_tempCtrl
//
this.tap_tempCtrl.Controls.Add(this.groupBox3);
this.tap_tempCtrl.Controls.Add(this.groupBox2);
this.tap_tempCtrl.Controls.Add(this.groupBox1);
this.tap_tempCtrl.Controls.Add(this.grb_pos1);
this.tap_tempCtrl.Controls.Add(this.grb_temport);
this.tap_tempCtrl.Location = new System.Drawing.Point(4, 28);
this.tap_tempCtrl.Name = "tap_tempCtrl";
this.tap_tempCtrl.Padding = new System.Windows.Forms.Padding(3);
this.tap_tempCtrl.Size = new System.Drawing.Size(1214, 760);
this.tap_tempCtrl.TabIndex = 5;
this.tap_tempCtrl.Text = "温度控制";
this.tap_tempCtrl.UseVisualStyleBackColor = true;
this.tap_tempCtrl.Click += new System.EventHandler(this.tabPage1_Click);
//
// grb_temport
//
this.grb_temport.Controls.Add(this.comboBox1);
this.grb_temport.Controls.Add(this.label2);
this.grb_temport.Controls.Add(this.button3);
this.grb_temport.Location = new System.Drawing.Point(61, 30);
this.grb_temport.Name = "grb_temport";
this.grb_temport.Size = new System.Drawing.Size(271, 169);
this.grb_temport.TabIndex = 3;
this.grb_temport.TabStop = false;
this.grb_temport.Text = "串口设置";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(108, 46);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(91, 26);
this.comboBox1.TabIndex = 5;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(40, 49);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(62, 18);
this.label2.TabIndex = 4;
this.label2.Text = "端口:";
//
// button3
//
this.button3.Location = new System.Drawing.Point(43, 101);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(156, 40);
this.button3.TabIndex = 0;
this.button3.Text = "打开串口";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click_1);
//
// panel1
//
this.panel1.Controls.Add(this.tac_MainForm);
@@ -1223,14 +1336,358 @@
this.rit_Coord.Text = "";
this.rit_Coord.TextChanged += new System.EventHandler(this.rit_Coord_TextChanged);
//
// label1
// grb_pos1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(847, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(170, 18);
this.label1.TabIndex = 17;
this.label1.Text = "停留时间(分钟):";
this.grb_pos1.Controls.Add(this.label7);
this.grb_pos1.Controls.Add(this.button5);
this.grb_pos1.Controls.Add(this.button4);
this.grb_pos1.Controls.Add(this.textBox2);
this.grb_pos1.Controls.Add(this.label6);
this.grb_pos1.Controls.Add(this.label5);
this.grb_pos1.Controls.Add(this.label4);
this.grb_pos1.Controls.Add(this.label3);
this.grb_pos1.Location = new System.Drawing.Point(61, 227);
this.grb_pos1.Name = "grb_pos1";
this.grb_pos1.Size = new System.Drawing.Size(1055, 100);
this.grb_pos1.TabIndex = 6;
this.grb_pos1.TabStop = false;
this.grb_pos1.Text = "点位1";
this.grb_pos1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(26, 42);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(98, 18);
this.label3.TabIndex = 0;
this.label3.Text = "实际温度:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(116, 43);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(17, 18);
this.label4.TabIndex = 1;
this.label4.Text = "0";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(227, 42);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(98, 18);
this.label5.TabIndex = 2;
this.label5.Text = "调节温度:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(458, 42);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(98, 18);
this.label6.TabIndex = 7;
this.label6.Text = "设定温度:";
this.label6.Click += new System.EventHandler(this.label6_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(321, 38);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 28);
this.textBox2.TabIndex = 8;
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// button4
//
this.button4.Location = new System.Drawing.Point(901, 31);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(113, 40);
this.button4.TabIndex = 7;
this.button4.Text = "开始升温";
this.button4.UseVisualStyleBackColor = true;
//
// button5
//
this.button5.Location = new System.Drawing.Point(761, 31);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(113, 40);
this.button5.TabIndex = 8;
this.button5.Text = "保存";
this.button5.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(549, 43);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(17, 18);
this.label7.TabIndex = 9;
this.label7.Text = "0";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.button6);
this.groupBox1.Controls.Add(this.button7);
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Location = new System.Drawing.Point(61, 360);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1055, 100);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "点位2";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter_1);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(549, 43);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(17, 18);
this.label8.TabIndex = 9;
this.label8.Text = "0";
//
// button6
//
this.button6.Location = new System.Drawing.Point(761, 31);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(113, 40);
this.button6.TabIndex = 8;
this.button6.Text = "保存";
this.button6.UseVisualStyleBackColor = true;
//
// button7
//
this.button7.Location = new System.Drawing.Point(901, 31);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(113, 40);
this.button7.TabIndex = 7;
this.button7.Text = "开始升温";
this.button7.UseVisualStyleBackColor = true;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(321, 38);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(100, 28);
this.textBox3.TabIndex = 8;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(458, 42);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(98, 18);
this.label9.TabIndex = 7;
this.label9.Text = "设定温度:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(227, 42);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(98, 18);
this.label10.TabIndex = 2;
this.label10.Text = "调节温度:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(116, 43);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(17, 18);
this.label11.TabIndex = 1;
this.label11.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(26, 42);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(98, 18);
this.label12.TabIndex = 0;
this.label12.Text = "实际温度:";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.button8);
this.groupBox2.Controls.Add(this.button9);
this.groupBox2.Controls.Add(this.textBox4);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this.label17);
this.groupBox2.Location = new System.Drawing.Point(61, 488);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1055, 100);
this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "点位3";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(549, 43);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(17, 18);
this.label13.TabIndex = 9;
this.label13.Text = "0";
//
// button8
//
this.button8.Location = new System.Drawing.Point(761, 31);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(113, 40);
this.button8.TabIndex = 8;
this.button8.Text = "保存";
this.button8.UseVisualStyleBackColor = true;
//
// button9
//
this.button9.Location = new System.Drawing.Point(901, 31);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(113, 40);
this.button9.TabIndex = 7;
this.button9.Text = "开始升温";
this.button9.UseVisualStyleBackColor = true;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(321, 38);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(100, 28);
this.textBox4.TabIndex = 8;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(458, 42);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(98, 18);
this.label14.TabIndex = 7;
this.label14.Text = "设定温度:";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(227, 42);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(98, 18);
this.label15.TabIndex = 2;
this.label15.Text = "调节温度:";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(116, 43);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(17, 18);
this.label16.TabIndex = 1;
this.label16.Text = "0";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(26, 42);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(98, 18);
this.label17.TabIndex = 0;
this.label17.Text = "实际温度:";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Controls.Add(this.button10);
this.groupBox3.Controls.Add(this.button11);
this.groupBox3.Controls.Add(this.textBox5);
this.groupBox3.Controls.Add(this.label19);
this.groupBox3.Controls.Add(this.label20);
this.groupBox3.Controls.Add(this.label21);
this.groupBox3.Controls.Add(this.label22);
this.groupBox3.Location = new System.Drawing.Point(61, 615);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(1055, 100);
this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "点位4";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(549, 43);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(17, 18);
this.label18.TabIndex = 9;
this.label18.Text = "0";
//
// button10
//
this.button10.Location = new System.Drawing.Point(761, 31);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(113, 40);
this.button10.TabIndex = 8;
this.button10.Text = "保存";
this.button10.UseVisualStyleBackColor = true;
//
// button11
//
this.button11.Location = new System.Drawing.Point(901, 31);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(113, 40);
this.button11.TabIndex = 7;
this.button11.Text = "开始升温";
this.button11.UseVisualStyleBackColor = true;
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(321, 38);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 28);
this.textBox5.TabIndex = 8;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(458, 42);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(98, 18);
this.label19.TabIndex = 7;
this.label19.Text = "设定温度:";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(227, 42);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(98, 18);
this.label20.TabIndex = 2;
this.label20.Text = "调节温度:";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(116, 43);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(17, 18);
this.label21.TabIndex = 1;
this.label21.Text = "0";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(26, 42);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(98, 18);
this.label22.TabIndex = 0;
this.label22.Text = "实际温度:";
//
// ShowForm
//
@@ -1274,7 +1731,18 @@
this.tap_Cam.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cam_feed)).EndInit();
this.tap_tempCtrl.ResumeLayout(false);
this.grb_temport.ResumeLayout(false);
this.grb_temport.PerformLayout();
this.panel1.ResumeLayout(false);
this.grb_pos1.ResumeLayout(false);
this.grb_pos1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -1376,6 +1844,47 @@
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TabPage tap_tempCtrl;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.GroupBox grb_temport;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.GroupBox grb_pos1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
}
}

View File

@@ -45,31 +45,19 @@ namespace HitBotCSharpDemo
Thread thread_PosMove;
private float[][] cameraPositions;
private string filePath = "Cam_pos_path.txt";
private string configFilePath = "Camera_config.txt";
readonly DeviceTLayerType enumTLayerType = DeviceTLayerType.MvGigEDevice | DeviceTLayerType.MvUsbDevice
| DeviceTLayerType.MvGenTLGigEDevice | DeviceTLayerType.MvGenTLCXPDevice | DeviceTLayerType.MvGenTLCameraLinkDevice | DeviceTLayerType.MvGenTLXoFDevice;
List<IDeviceInfo> deviceInfoList = new List<IDeviceInfo>();
IDevice device = null;
bool isGrabbing = false;
Thread receiveThread = null;
private IFrameOut frameForSave;
private readonly object saveImageLock = new object();
private float currentExposure = 10000f; // 默认曝光时间
private float currentGain = 0f; // 默认增益
private TcpClient tcpClient;
private NetworkStream networkStream;
private Thread detectionThread;
private bool isDetectionRunning = false;
private const int SERVER_PORT = 8888; // Python服务器端口
private const string SERVER_IP = "192.168.124.4"; // 本机IP
private const string SERVER_IP = "127.0.0.1"; // 本机IP
private float receivedWidth = 0;
private float receivedHeight = 0;
private bool isCycleRunning = false;
private Thread cycleThread;
//private string xlsFilePath = Path.Combine(Application.StartupPath, "DetectionResults.xlsx");
private List<float[]> detectionData = new List<float[]>(); // 存储每轮检测数据
private int currentCycle = 0;
@@ -77,6 +65,9 @@ namespace HitBotCSharpDemo
private int dwellTimeMinutes = 1; // 停留时间(分钟)
private string cycleStartTime = ""; // 循环开始时间
private CameraManager cameraManager;
private tempControl tempControl;
private ControlBeanEx robot;
public ShowForm()
{
@@ -87,272 +78,6 @@ namespace HitBotCSharpDemo
//InitializeCamera(); // 初始化相机
Control.CheckForIllegalCrossThreadCalls = false;
}
private void InitializeCamera()
{
// 枚举设备
int nRet = DeviceEnumerator.EnumDevices(enumTLayerType, out deviceInfoList);
if (nRet != MvError.MV_OK)
{
MessageBox.Show($"枚举设备失败!,{ nRet}");
return;
}
// 如果有设备,自动连接第一个
if (deviceInfoList.Count > 0)
{
ConnectFirstCamera();
}
}
private void ConnectFirstCamera()
{
try
{
// 创建设备
IDeviceInfo deviceInfo = deviceInfoList[0];
device = DeviceFactory.CreateDevice(deviceInfo);
// 打开设备
int result = device.Open();
if (result != MvError.MV_OK)
{
MessageBox.Show($"打开设备失败!,{result}");
return;
}
// GigE设备优化
if (device is IGigEDevice)
{
IGigEDevice gigEDevice = device as IGigEDevice;
int optionPacketSize;
result = gigEDevice.GetOptimalPacketSize(out optionPacketSize);
if (result == MvError.MV_OK)
{
device.Parameters.SetIntValue("GevSCPSPacketSize", (long)optionPacketSize);
}
}
// 设置采集模式
device.Parameters.SetEnumValueByString("AcquisitionMode", "Continuous");
device.Parameters.SetEnumValueByString("TriggerMode", "Off");
SetCameraParameters(currentExposure, currentGain);
// 启动图像采集
StartGrabbing();
}
catch (Exception ex)
{
MessageBox.Show("连接相机失败: " + ex.Message);
}
}
private void StartGrabbing()
{
if (device == null) return;
try
{
isGrabbing = true;
receiveThread = new Thread(ReceiveThreadProcess);
receiveThread.Start();
// 开始采集
int result = device.StreamGrabber.StartGrabbing();
if (result != MvError.MV_OK)
{
isGrabbing = false;
receiveThread.Join();
MessageBox.Show("开始采集失败!" + result);
return;
}
}
catch (Exception ex)
{
MessageBox.Show("启动采集线程失败: " + ex.Message);
}
}
public void ReceiveThreadProcess()
{
while (isGrabbing)
{
IFrameOut frameOut;
int nRet = device.StreamGrabber.GetImageBuffer(1000, out frameOut);
if (MvError.MV_OK == nRet)
{
// 保存帧信息用于拍照
lock (saveImageLock)
{
if (frameForSave != null)
{
frameForSave.Dispose();
}
frameForSave = frameOut.Clone() as IFrameOut;
}
// 显示图像到PictureBox
try
{
if (cam_feed.IsHandleCreated)
{
device.ImageRender.DisplayOneFrame(cam_feed.Handle, frameOut.Image);
}
}
catch (Exception ex)
{
// 处理显示异常
Console.WriteLine("显示图像异常: " + ex.Message);
}
device.StreamGrabber.FreeImageBuffer(frameOut);
}
else
{
Thread.Sleep(5);
}
}
}
private void LoadCameraConfig()
{
try
{
if (File.Exists(configFilePath))
{
string[] lines = File.ReadAllLines(configFilePath);
foreach (string line in lines)
{
if (line.StartsWith("Exposure="))
{
if (float.TryParse(line.Substring(9), out float exposure))
currentExposure = exposure;
}
else if (line.StartsWith("Gain="))
{
if (float.TryParse(line.Substring(5), out float gain))
currentGain = gain;
}
}
}
}
catch (Exception ex)
{
Console.WriteLine("加载相机配置失败: " + ex.Message);
}
}
private void SaveCameraConfig()
{
try
{
string[] config = new string[]
{
$"Exposure={currentExposure}",
$"Gain={currentGain}"
};
File.WriteAllLines(configFilePath, config);
}
catch (Exception ex)
{
Console.WriteLine("保存相机配置失败: " + ex.Message);
}
}
private void TakePhoto()
{
if (frameForSave == null)
{
MessageBox.Show("没有可用的图像数据!");
return;
}
try
{
string fileName = "Photo_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".jpg";
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fileName, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
MessageBox.Show($"照片已保存: {fileName}");
}
else
{
MessageBox.Show("保存照片失败!"+ result);
}
}
}
catch (Exception ex)
{
MessageBox.Show("拍照失败: " + ex.Message);
}
}
private void ShowCameraParameterDialog()
{
if (device == null)
{
MessageBox.Show("相机未连接!");
return;
}
// 创建参数调整窗体
using (Form paramForm = new Form())
{
paramForm.Text = "相机参数设置";
paramForm.Size = new Size(300, 200);
paramForm.StartPosition = FormStartPosition.CenterParent;
// 曝光时间设置
Label lblExposure = new Label() { Text = "曝光时间:", Location = new Point(10, 20), Size = new Size(80, 20) };
TextBox txtExposure = new TextBox() { Location = new Point(100, 18), Size = new Size(100, 20), Text = currentExposure.ToString() };
// 增益设置
Label lblGain = new Label() { Text = "增益:", Location = new Point(10, 50), Size = new Size(80, 20) };
TextBox txtGain = new TextBox() { Location = new Point(100, 48), Size = new Size(100, 20), Text = currentGain.ToString() };
// 确定按钮
Button btnOK = new Button() { Text = "应用", Location = new Point(50, 100), Size = new Size(60, 30) };
btnOK.Click += (s, e) => {
try
{
float exposure = float.Parse(txtExposure.Text);
float gain = float.Parse(txtGain.Text);
SetCameraParameters(exposure, gain);
paramForm.Close();
}
catch
{
MessageBox.Show("请输入正确的数值!");
}
};
// 取消按钮
Button btnCancel = new Button() { Text = "取消", Location = new Point(130, 100), Size = new Size(60, 30) };
btnCancel.Click += (s, e) => paramForm.Close();
paramForm.Controls.AddRange(new Control[] { lblExposure, txtExposure, lblGain, txtGain, btnOK, btnCancel });
paramForm.ShowDialog(this);
}
}
private void SetCameraParameters(float exposure, float gain)
{
if (device == null) return;
try
{
// 设置曝光时间
device.Parameters.SetEnumValue("ExposureAuto", 0); // 关闭自动曝光
int result = device.Parameters.SetFloatValue("ExposureTime", exposure);
if (result != MvError.MV_OK)
{
MessageBox.Show("设置曝光时间失败!"+ result);
return;
}
// 设置增益
device.Parameters.SetEnumValue("GainAuto", 0); // 关闭自动增益
result = device.Parameters.SetFloatValue("Gain", gain);
if (result != MvError.MV_OK)
{
MessageBox.Show("设置增益失败!"+result);
return;
}
currentExposure = exposure;
currentGain = gain;
SaveCameraConfig();
//MessageBox.Show("参数设置成功!");
}
catch (Exception ex)
{
MessageBox.Show("设置参数失败: " + ex.Message);
}
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
// 停止循环检测
@@ -362,35 +87,10 @@ namespace HitBotCSharpDemo
// 恢复控件状态
SetControlsEnabled(true);
}
// 停止相机
cameraManager?.StopCamera();
// 停止采集
if (isGrabbing)
{
isGrabbing = false;
if (receiveThread != null && receiveThread.IsAlive)
{
receiveThread.Join();
}
}
// 关闭设备
if (device != null)
{
device.StreamGrabber.StopGrabbing();
device.Close();
device.Dispose();
device = null;
}
// 释放帧缓存
lock (saveImageLock)
{
if (frameForSave != null)
{
frameForSave.Dispose();
frameForSave = null;
}
}
StopDetection();
// 终结SDK
SDKSystem.Finalize();
base.OnFormClosing(e);
@@ -502,9 +202,16 @@ namespace HitBotCSharpDemo
{
lbl_Current_Input = new Label[] { lbl_InputState_0, lbl_InputState_1, lbl_InputState_2, lbl_InputState_3, lbl_InputState_4, lbl_InputState_5 };//输入信号数组
lbl_Current_Output = new Label[] { lbl_OutputState_0, lbl_OutputState_1, lbl_OutputState_2, lbl_OutputState_3, lbl_OutputState_4, lbl_OutputState_5 };//输出信号数组
LoadCameraPositions();
LoadCameraConfig();
InitializeCamera();
cameraManager = new CameraManager(cam_feed);
cameraManager.LoadConfiguration();
cameraManager.Initialize();
Label[] temperatureLabels = new Label[] { label4, label11, label16, label21 };
tempControl = new tempControl(temperatureLabels);
tempControl.LoadAvailablePorts(comboBox1);
}
private void cob_Robot_ID_Click(object sender, EventArgs e)
@@ -973,12 +680,12 @@ namespace HitBotCSharpDemo
}
private void button1_Click_1(object sender, EventArgs e)
{
TakePhoto();
cameraManager.TakePhoto();
}
private void cam_feed_Click(object sender, EventArgs e)
{
ShowCameraParameterDialog();
cameraManager.ShowParameterDialog();
}
private void button1_Click_2(object sender, EventArgs e)
@@ -1055,7 +762,7 @@ namespace HitBotCSharpDemo
try
{
// 保存当前图像
string imagePath = SaveCurrentImage();
string imagePath = cameraManager.SaveCurrentImageForDetection();
if (!string.IsNullOrEmpty(imagePath))
{
// 发送图像到Python服务器
@@ -1082,35 +789,7 @@ namespace HitBotCSharpDemo
}
}
// 保存当前图像
private string SaveCurrentImage()
{
if (frameForSave == null) return null;
try
{
string fileName = "temp_detection_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".jpg";
string fullPath = Path.Combine(Application.StartupPath, fileName);
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fullPath, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
return fullPath;
}
}
}
catch (Exception ex)
{
MessageBox.Show("保存图像失败: " + ex.Message);
}
return null;
}
// 发送图像到服务器
private void SendImageToServer(string imagePath)
{
@@ -1559,87 +1238,9 @@ namespace HitBotCSharpDemo
private string SaveImageToPositionFolder(int positionIndex)
{
if (frameForSave == null) return null;
try
{
string positionFolder = Path.Combine(Application.StartupPath, $"Position{positionIndex + 1}_Original_{cycleStartTime}");
if (!Directory.Exists(positionFolder))
{
Directory.CreateDirectory(positionFolder);
}
string fileName = $"Original_Pos{positionIndex + 1}_Cycle{currentCycle}_{DateTime.Now:yyyyMMddHHmmss}.jpg";
string fullPath = Path.Combine(positionFolder, fileName);
ImageFormatInfo imageFormatInfo = new ImageFormatInfo();
imageFormatInfo.FormatType = ImageFormatType.Jpeg;
imageFormatInfo.JpegQuality = 90;
lock (saveImageLock)
{
int result = device.ImageSaver.SaveImageToFile(fullPath, frameForSave.Image, imageFormatInfo, CFAMethod.Optimal);
if (result == MvError.MV_OK)
{
return fullPath;
}
}
}
catch (Exception ex)
{
MessageBox.Show($"保存点位{positionIndex + 1}图像失败: " + ex.Message);
}
return null;
return cameraManager.SaveImageToPositionFolder(positionIndex, currentCycle, cycleStartTime);
}
//private void UpdateExcelFile()
//{
// try
// {
// ExcelPackage.LicenseContext = LicenseContext.NonCommercial; // 设置EPPlus许可证
// FileInfo file = new FileInfo(xlsFilePath);
// using (ExcelPackage package = new ExcelPackage(file))
// {
// ExcelWorksheet worksheet;
// if (package.Workbook.Worksheets.Count == 0)
// {
// // 创建新的工作表
// worksheet = package.Workbook.Worksheets.Add("检测结果");
// // 设置表头
// worksheet.Cells[1, 1].Value = "循环次数";
// worksheet.Cells[1, 2].Value = "pos1_width";
// worksheet.Cells[1, 3].Value = "pos1_height";
// worksheet.Cells[1, 4].Value = "pos2_width";
// worksheet.Cells[1, 5].Value = "pos2_height";
// worksheet.Cells[1, 6].Value = "pos3_width";
// worksheet.Cells[1, 7].Value = "pos3_height";
// worksheet.Cells[1, 8].Value = "pos4_width";
// worksheet.Cells[1, 9].Value = "pos4_height";
// }
// else
// {
// worksheet = package.Workbook.Worksheets[0];
// }
// // 添加数据行
// int row = worksheet.Dimension?.Rows + 1 ?? 2;
// float[] lastCycleData = detectionData[detectionData.Count - 1];
// worksheet.Cells[row, 1].Value = currentCycle;
// for (int i = 0; i < 8 && i < lastCycleData.Length; i++)
// {
// worksheet.Cells[row, i + 2].Value = lastCycleData[i];
// }
// package.Save();
// }
// }
// catch (Exception ex)
// {
// MessageBox.Show("更新Excel文件失败: " + ex.Message);
// }
//}
private void StopCycle()
{
isCycleRunning = false;
@@ -1693,5 +1294,50 @@ namespace HitBotCSharpDemo
if (checkBox3.Checked) selectedPositions.Add(2); // 点位3
if (checkBox4.Checked) selectedPositions.Add(3); // 点位4
}
private void button3_Click_1(object sender, EventArgs e)
{
tempControl.ToggleSerialPort(button3, comboBox1);
}
private void tabPage1_Click(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
tempControl.OnComboBoxSelectedIndexChanged(comboBox1, button3);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
tempControl.OnFormClosing();
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void label6_Click(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void groupBox1_Enter_1(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
}
}

View File

@@ -0,0 +1,18 @@
2025-06-12 18:50:26.130 ROBOT_ERROR_CODE = 1101
2025-06-12 18:50:26.134
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 0 0 0 0 0 0

View File

@@ -2014,3 +2014,410 @@
2025-06-12 17:34:53.150 trail_number1.998897
2025-06-12 17:34:53.150 tcp_distance 199.889740
2025-06-12 17:34:53.151 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 17:40:27.016 SDK_VERSION_V2.0.0.29_Release
2025-06-12 17:40:27.016 robot connected
2025-06-12 17:40:27.016 26
2025-06-12 17:40:27.018 current generation=26
2025-06-12 17:40:27.520 0x1a
2025-06-12 17:40:28.405 initial joint2 4444931
2025-06-12 17:40:28.405 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-12 17:40:28.405 robot WritePID
2025-06-12 17:40:28.712 initial joint1 -1269935
2025-06-12 17:40:28.757 initial joint2 4444932
2025-06-12 17:40:28.805 initial joint3 -12991
2025-06-12 17:40:28.850 initial joint4 -25056187
2025-06-12 17:40:28.866 initial joint1 -1269935
2025-06-12 17:40:28.911 initial joint2 4444933
2025-06-12 17:40:28.958 initial joint3 -12991
2025-06-12 17:40:29.004 initial joint4 -25056187
2025-06-12 17:40:29.020 initial joint1 -1269935
2025-06-12 17:40:29.067 initial joint2 4444934
2025-06-12 17:40:29.115 initial joint3 -12991
2025-06-12 17:40:29.161 initial joint4 -25056188
2025-06-12 17:40:31.399 initial_thread initialized
2025-06-12 17:40:31.399 servo enable
2025-06-12 17:40:31.400 brake open
2025-06-12 17:40:31.400 set_brake_state 0 1
2025-06-12 17:40:31.614 robot initialized
2025-06-12 17:40:32.172 get_scara_param -87.199501 152.604797 -4.460100 -1027.919800
2025-06-12 17:40:32.172 get_scara_real_coor -87.199501 152.604706 -4.460400 -1027.919922
2025-06-12 17:40:32.172 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-12 17:40:32.173 position -1269934.750000 4444937.000000 -12990.983398 -25056188.000000 -1192152.375000 4246483.500000 -39104.808594 -25018550.000000
2025-06-12 17:40:32.173 speed 5340.891602 6813.359863 8965.470703 1550.637817
2025-06-12 17:40:32.173 set_first_position_after_initial
2025-06-12 17:40:32.173 movej_old start_pos: -87.199501 152.604797 -4.460100 -1027.919800 end_pos: -87.199501 152.604797 -4.460100 -1027.919800 org_sp 10.000000 end_sp 10.000000
2025-06-12 17:40:32.481 J3 Belt Meilage=40.911091km
2025-06-12 17:41:24.274 30 30 30 30
2025-06-12 17:41:24.275 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:41:24.276 goal_angle -44.911705 98.661697
2025-06-12 17:41:24.276 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:41:24.276 z1 -4.460100 z2 -75.466103
2025-06-12 17:41:24.276 angle1_1 -87.199501 angle2_1 152.604797 z1 -4.460100 r1 -1027.919800
2025-06-12 17:41:24.277 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-12 17:41:24.277 speed 100.000000
2025-06-12 17:41:24.277 tcp_distance 200.024445
2025-06-12 17:41:24.277 new_end_speed 100.000000 j1_acc_t 1.000122 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 46.246586
2025-06-12 17:41:24.277 new_end_speed 100.000000 j2_acc_t 1.000122 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 58.993004
2025-06-12 17:41:24.277 new_end_speed 100.000000 j3_acc_t 1.000122 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 77.653259
2025-06-12 17:41:24.278 new_end_speed 100.000000 j4_acc_t 1.000122 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 24.276962
2025-06-12 17:41:24.278 end_speed 100.000000
2025-06-12 17:41:24.278 trail_number2.000244
2025-06-12 17:41:24.278 tcp_distance 200.024445
2025-06-12 17:41:24.279 angle1_1 = -87.199501 angle2_1 = 152.604797 z1 = -4.460100 r1 = -1027.919800 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:41:59.083 30 30 30 30
2025-06-12 17:41:59.083 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-12 17:41:59.083 goal_angle -87.199585 152.604431
2025-06-12 17:41:59.085 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-12 17:41:59.085 z1 -75.466103 z2 -4.457100
2025-06-12 17:41:59.086 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-12 17:41:59.086 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-12 17:41:59.086 speed 100.000000
2025-06-12 17:41:59.086 tcp_distance 199.889740
2025-06-12 17:41:59.086 new_end_speed 100.000000 j1_acc_t 0.999449 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 46.277863
2025-06-12 17:41:59.087 new_end_speed 100.000000 j2_acc_t 0.999449 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 59.032387
2025-06-12 17:41:59.087 new_end_speed 100.000000 j3_acc_t 0.999449 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 77.708908
2025-06-12 17:41:59.087 new_end_speed 100.000000 j4_acc_t 0.999449 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 24.293588
2025-06-12 17:41:59.087 end_speed 100.000000
2025-06-12 17:41:59.087 trail_number1.998897
2025-06-12 17:41:59.088 tcp_distance 199.889740
2025-06-12 17:41:59.088 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 17:42:05.453 30 30 30 30
2025-06-12 17:42:05.453 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:42:05.453 goal_angle -67.226128 86.401024
2025-06-12 17:42:05.453 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:42:05.453 z1 -4.457100 z2 -75.466103
2025-06-12 17:42:05.454 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-12 17:42:05.454 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-12 17:42:05.454 speed 100.000000
2025-06-12 17:42:05.454 tcp_distance 218.567566
2025-06-12 17:42:05.454 new_end_speed 100.000000 j1_acc_t 1.092838 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 19.990139
2025-06-12 17:42:05.454 new_end_speed 100.000000 j2_acc_t 1.092838 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 66.258698
2025-06-12 17:42:05.455 new_end_speed 100.000000 j3_acc_t 1.092838 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 71.068306
2025-06-12 17:42:05.455 new_end_speed 100.000000 j4_acc_t 1.092838 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 22.217565
2025-06-12 17:42:05.455 end_speed 100.000000
2025-06-12 17:42:05.455 trail_number2.185676
2025-06-12 17:42:05.455 tcp_distance 218.567566
2025-06-12 17:42:05.456 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:43:12.639 30 30 30 30
2025-06-12 17:43:12.640 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:43:12.640 goal_angle -44.911705 98.661697
2025-06-12 17:43:12.640 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:43:12.640 z1 -75.466103 z2 -75.466103
2025-06-12 17:43:12.640 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-12 17:43:12.642 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-12 17:43:12.642 speed 100.000000
2025-06-12 17:43:12.643 tcp_distance 144.069748
2025-06-12 17:43:12.643 new_end_speed 100.000000 j1_acc_t 0.720349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.881371
2025-06-12 17:43:12.643 new_end_speed 100.000000 j2_acc_t 0.720349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.616140
2025-06-12 17:43:12.643 new_end_speed 100.000000 j3_acc_t 0.720349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:43:12.643 new_end_speed 100.000000 j4_acc_t 0.720349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:43:12.643 end_speed 100.000000
2025-06-12 17:43:12.644 trail_number1.440697
2025-06-12 17:43:12.644 tcp_distance 144.069748
2025-06-12 17:43:12.644 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:44:19.272 30 30 30 30
2025-06-12 17:44:19.273 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:44:19.273 goal_angle -67.226128 86.401024
2025-06-12 17:44:19.275 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:44:19.275 z1 -75.466103 z2 -75.466103
2025-06-12 17:44:19.275 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-12 17:44:19.275 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-12 17:44:19.276 speed 100.000000
2025-06-12 17:44:19.276 tcp_distance 143.985626
2025-06-12 17:44:19.276 new_end_speed 100.000000 j1_acc_t 0.719928 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.901131
2025-06-12 17:44:19.276 new_end_speed 100.000000 j2_acc_t 0.719928 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.626997
2025-06-12 17:44:19.277 new_end_speed 100.000000 j3_acc_t 0.719928 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:44:19.277 new_end_speed 100.000000 j4_acc_t 0.719928 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:44:19.277 end_speed 100.000000
2025-06-12 17:44:19.278 trail_number1.439856
2025-06-12 17:44:19.278 tcp_distance 143.985626
2025-06-12 17:44:19.278 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:45:25.722 30 30 30 30
2025-06-12 17:45:25.723 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:45:25.723 goal_angle -44.911705 98.661697
2025-06-12 17:45:25.723 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:45:25.724 z1 -75.466103 z2 -75.466103
2025-06-12 17:45:25.724 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-12 17:45:25.724 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-12 17:45:25.724 speed 100.000000
2025-06-12 17:45:25.724 tcp_distance 144.069748
2025-06-12 17:45:25.725 new_end_speed 100.000000 j1_acc_t 0.720349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.881371
2025-06-12 17:45:25.725 new_end_speed 100.000000 j2_acc_t 0.720349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.616140
2025-06-12 17:45:25.725 new_end_speed 100.000000 j3_acc_t 0.720349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:45:25.725 new_end_speed 100.000000 j4_acc_t 0.720349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:45:25.725 end_speed 100.000000
2025-06-12 17:45:25.726 trail_number1.440697
2025-06-12 17:45:25.726 tcp_distance 144.069748
2025-06-12 17:45:25.726 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:46:32.240 30 30 30 30
2025-06-12 17:46:32.241 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:46:32.241 goal_angle -67.226128 86.401024
2025-06-12 17:46:32.241 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:46:32.241 z1 -75.466103 z2 -75.466103
2025-06-12 17:46:32.242 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-12 17:46:32.242 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-12 17:46:32.242 speed 100.000000
2025-06-12 17:46:32.242 tcp_distance 143.985626
2025-06-12 17:46:32.243 new_end_speed 100.000000 j1_acc_t 0.719928 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.901131
2025-06-12 17:46:32.243 new_end_speed 100.000000 j2_acc_t 0.719928 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.626997
2025-06-12 17:46:32.243 new_end_speed 100.000000 j3_acc_t 0.719928 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:46:32.243 new_end_speed 100.000000 j4_acc_t 0.719928 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:46:32.244 end_speed 100.000000
2025-06-12 17:46:32.244 trail_number1.439856
2025-06-12 17:46:32.244 tcp_distance 143.985626
2025-06-12 17:46:32.245 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:47:38.625 30 30 30 30
2025-06-12 17:47:38.625 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:47:38.626 goal_angle -44.911705 98.661697
2025-06-12 17:47:38.626 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:47:38.626 z1 -75.466103 z2 -75.466103
2025-06-12 17:47:38.626 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-12 17:47:38.627 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-12 17:47:38.627 speed 100.000000
2025-06-12 17:47:38.627 tcp_distance 144.069748
2025-06-12 17:47:38.627 new_end_speed 100.000000 j1_acc_t 0.720349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.881371
2025-06-12 17:47:38.628 new_end_speed 100.000000 j2_acc_t 0.720349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.616140
2025-06-12 17:47:38.628 new_end_speed 100.000000 j3_acc_t 0.720349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:47:38.628 new_end_speed 100.000000 j4_acc_t 0.720349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:47:38.628 end_speed 100.000000
2025-06-12 17:47:38.629 trail_number1.440697
2025-06-12 17:47:38.629 tcp_distance 144.069748
2025-06-12 17:47:38.630 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:48:05.961 30 30 30 30
2025-06-12 17:48:05.961 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-12 17:48:05.962 goal_angle -87.199585 152.604431
2025-06-12 17:48:05.962 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-12 17:48:05.962 z1 -75.466103 z2 -4.457100
2025-06-12 17:48:05.962 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-12 17:48:05.962 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-12 17:48:05.963 speed 100.000000
2025-06-12 17:48:05.963 tcp_distance 199.889740
2025-06-12 17:48:05.963 new_end_speed 100.000000 j1_acc_t 0.999449 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 46.277863
2025-06-12 17:48:05.963 new_end_speed 100.000000 j2_acc_t 0.999449 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 59.032387
2025-06-12 17:48:05.964 new_end_speed 100.000000 j3_acc_t 0.999449 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 77.708908
2025-06-12 17:48:05.964 new_end_speed 100.000000 j4_acc_t 0.999449 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 24.293588
2025-06-12 17:48:05.964 end_speed 100.000000
2025-06-12 17:48:05.964 trail_number1.998897
2025-06-12 17:48:05.964 tcp_distance 199.889740
2025-06-12 17:48:05.965 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 17:48:30.433 30 30 30 30
2025-06-12 17:48:30.433 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:48:30.434 goal_angle -67.226128 86.401024
2025-06-12 17:48:30.434 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:48:30.434 z1 -4.457100 z2 -75.466103
2025-06-12 17:48:30.434 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-12 17:48:30.434 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-12 17:48:30.435 speed 100.000000
2025-06-12 17:48:30.435 tcp_distance 218.567566
2025-06-12 17:48:30.435 new_end_speed 100.000000 j1_acc_t 1.092838 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 19.990139
2025-06-12 17:48:30.435 new_end_speed 100.000000 j2_acc_t 1.092838 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 66.258698
2025-06-12 17:48:30.435 new_end_speed 100.000000 j3_acc_t 1.092838 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 71.068306
2025-06-12 17:48:30.436 new_end_speed 100.000000 j4_acc_t 1.092838 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 22.217565
2025-06-12 17:48:30.436 end_speed 100.000000
2025-06-12 17:48:30.436 trail_number2.185676
2025-06-12 17:48:30.436 tcp_distance 218.567566
2025-06-12 17:48:30.437 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:49:37.652 30 30 30 30
2025-06-12 17:49:37.653 new_movej_xyz_lr 274.065002 149.383698 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:49:37.653 goal_angle -11.002804 84.112190
2025-06-12 17:49:37.653 new_movej_angle -11.002804 84.112190 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:49:37.654 z1 -75.466103 z2 -75.466103
2025-06-12 17:49:37.655 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-12 17:49:37.655 angle1_2 -11.002804 angle2_2 84.112190 z2 -75.466103 r2 -1005.721008
2025-06-12 17:49:37.655 speed 100.000000
2025-06-12 17:49:37.655 tcp_distance 296.269745
2025-06-12 17:49:37.655 new_end_speed 100.000000 j1_acc_t 1.481349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 41.512333
2025-06-12 17:49:37.656 new_end_speed 100.000000 j2_acc_t 1.481349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 1.689954
2025-06-12 17:49:37.656 new_end_speed 100.000000 j3_acc_t 1.481349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:49:37.656 new_end_speed 100.000000 j4_acc_t 1.481349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:49:37.656 end_speed 100.000000
2025-06-12 17:49:37.656 trail_number2.962698
2025-06-12 17:49:37.657 tcp_distance 296.269745
2025-06-12 17:49:37.657 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -11.002804 angle2_2 = 84.112190 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:49:54.895 30 30 30 30
2025-06-12 17:49:54.895 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-12 17:49:54.897 goal_angle -87.199585 152.604431
2025-06-12 17:49:54.897 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-12 17:49:54.897 z1 -75.466103 z2 -4.457100
2025-06-12 17:49:54.897 angle1_1 -11.002804 angle2_1 84.112190 z1 -75.466103 r1 -1005.721008
2025-06-12 17:49:54.898 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-12 17:49:54.898 speed 100.000000
2025-06-12 17:49:54.898 tcp_distance 288.737366
2025-06-12 17:49:54.898 new_end_speed 100.000000 j1_acc_t 1.443687 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 57.727364
2025-06-12 17:49:54.899 new_end_speed 100.000000 j2_acc_t 1.443687 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 51.890335
2025-06-12 17:49:54.899 new_end_speed 100.000000 j3_acc_t 1.443687 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 53.797054
2025-06-12 17:49:54.899 new_end_speed 100.000000 j4_acc_t 1.443687 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 16.818187
2025-06-12 17:49:54.899 end_speed 100.000000
2025-06-12 17:49:54.899 trail_number2.887374
2025-06-12 17:49:54.900 tcp_distance 288.737366
2025-06-12 17:49:54.901 angle1_1 = -11.002804 angle2_1 = 84.112190 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 17:52:09.217 SDK_VERSION_V2.0.0.29_Release
2025-06-12 17:52:09.217 robot connected
2025-06-12 17:52:09.217 26
2025-06-12 17:52:09.217 current generation=26
2025-06-12 17:52:09.726 0x1a
2025-06-12 17:52:10.624 initial joint2 4444931
2025-06-12 17:52:10.624 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-12 17:52:10.624 robot WritePID
2025-06-12 17:52:10.935 initial joint1 -1269935
2025-06-12 17:52:10.983 initial joint2 4444932
2025-06-12 17:52:11.029 initial joint3 -12993
2025-06-12 17:52:11.090 initial joint4 -25056187
2025-06-12 17:52:11.121 initial joint1 -1269935
2025-06-12 17:52:11.168 initial joint2 4444932
2025-06-12 17:52:11.215 initial joint3 -12993
2025-06-12 17:52:11.262 initial joint4 -25056188
2025-06-12 17:52:11.277 initial joint1 -1269935
2025-06-12 17:52:11.322 initial joint2 4444933
2025-06-12 17:52:11.368 initial joint3 -12993
2025-06-12 17:52:11.413 initial joint4 -25056189
2025-06-12 17:52:13.557 initial_thread initialized
2025-06-12 17:52:13.557 servo enable
2025-06-12 17:52:13.557 brake open
2025-06-12 17:52:13.557 set_brake_state 0 1
2025-06-12 17:52:13.761 robot initialized
2025-06-12 17:52:14.332 get_scara_param -87.199501 152.604797 -4.461100 -1027.919922
2025-06-12 17:52:14.332 get_scara_real_coor -87.199501 152.604706 -4.461100 -1027.920044
2025-06-12 17:52:14.333 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-12 17:52:14.333 position -1269934.750000 4444937.000000 -12993.895508 -25056190.000000 -160242.156250 2449945.250000 -219810.953125 -25369358.000000
2025-06-12 17:52:14.333 speed 76196.546875 68492.601563 71005.007813 12902.124023
2025-06-12 17:52:14.333 set_first_position_after_initial
2025-06-12 17:52:14.334 movej_old start_pos: -87.199501 152.604797 -4.461100 -1027.919922 end_pos: -87.199501 152.604797 -4.461100 -1027.919922 org_sp 10.000000 end_sp 10.000000
2025-06-12 17:52:14.623 J3 Belt Meilage=40.911598km
2025-06-12 17:52:23.059 30 30 30 30
2025-06-12 17:52:23.059 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:52:23.059 goal_angle -63.500324 35.083988
2025-06-12 17:52:23.061 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:52:23.061 z1 -4.461100 z2 -75.466103
2025-06-12 17:52:23.061 angle1_1 -87.199501 angle2_1 152.604797 z1 -4.461100 r1 -1027.919922
2025-06-12 17:52:23.061 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-12 17:52:23.061 speed 100.000000
2025-06-12 17:52:23.062 tcp_distance 347.515656
2025-06-12 17:52:23.062 new_end_speed 100.000000 j1_acc_t 1.737578 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.917871
2025-06-12 17:52:23.062 new_end_speed 100.000000 j2_acc_t 1.737578 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.975578
2025-06-12 17:52:23.062 new_end_speed 100.000000 j3_acc_t 1.737578 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.695370
2025-06-12 17:52:23.062 new_end_speed 100.000000 j4_acc_t 1.737578 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.973507
2025-06-12 17:52:23.062 end_speed 100.000000
2025-06-12 17:52:23.063 trail_number3.475157
2025-06-12 17:52:23.063 tcp_distance 347.515656
2025-06-12 17:52:23.063 angle1_1 = -87.199501 angle2_1 = 152.604797 z1 = -4.461100 r1 = -1027.919922 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:53:03.721 30 30 30 30
2025-06-12 17:53:03.721 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-12 17:53:03.721 goal_angle -87.199585 152.604431
2025-06-12 17:53:03.722 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-12 17:53:03.723 z1 -75.466103 z2 -4.457100
2025-06-12 17:53:03.723 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-12 17:53:03.723 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-12 17:53:03.723 speed 100.000000
2025-06-12 17:53:03.723 tcp_distance 346.692505
2025-06-12 17:53:03.724 new_end_speed 100.000000 j1_acc_t 1.733463 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.953341
2025-06-12 17:53:03.724 new_end_speed 100.000000 j2_acc_t 1.733463 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 74.150970
2025-06-12 17:53:03.724 new_end_speed 100.000000 j3_acc_t 1.733463 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.804005
2025-06-12 17:53:03.724 new_end_speed 100.000000 j4_acc_t 1.733463 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 14.006761
2025-06-12 17:53:03.724 end_speed 100.000000
2025-06-12 17:53:03.724 trail_number3.466925
2025-06-12 17:53:03.724 tcp_distance 346.692505
2025-06-12 17:53:03.725 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 17:53:08.981 30 30 30 30
2025-06-12 17:53:08.981 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:53:08.982 goal_angle -63.500324 35.083988
2025-06-12 17:53:08.982 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:53:08.982 z1 -4.457100 z2 -75.466103
2025-06-12 17:53:08.982 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-12 17:53:08.982 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-12 17:53:08.983 speed 100.000000
2025-06-12 17:53:08.983 tcp_distance 347.514679
2025-06-12 17:53:08.983 new_end_speed 100.000000 j1_acc_t 1.737573 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.917970
2025-06-12 17:53:08.983 new_end_speed 100.000000 j2_acc_t 1.737573 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.975578
2025-06-12 17:53:08.983 new_end_speed 100.000000 j3_acc_t 1.737573 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.698025
2025-06-12 17:53:08.983 new_end_speed 100.000000 j4_acc_t 1.737573 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.973623
2025-06-12 17:53:08.984 end_speed 100.000000
2025-06-12 17:53:08.984 trail_number3.475147
2025-06-12 17:53:08.984 tcp_distance 347.514679
2025-06-12 17:53:08.985 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:54:17.439 30 30 30 30
2025-06-12 17:54:17.440 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:54:17.440 goal_angle -67.226128 86.401024
2025-06-12 17:54:17.440 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:54:17.440 z1 -75.466103 z2 -75.466103
2025-06-12 17:54:17.440 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-12 17:54:17.441 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-12 17:54:17.441 speed 100.000000
2025-06-12 17:54:17.441 tcp_distance 158.906982
2025-06-12 17:54:17.441 new_end_speed 100.000000 j1_acc_t 0.794535 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 5.128908
2025-06-12 17:54:17.441 new_end_speed 100.000000 j2_acc_t 0.794535 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 70.642578
2025-06-12 17:54:17.442 new_end_speed 100.000000 j3_acc_t 0.794535 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:54:17.442 new_end_speed 100.000000 j4_acc_t 0.794535 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:54:17.442 end_speed 100.000000
2025-06-12 17:54:17.442 trail_number1.589070
2025-06-12 17:54:17.442 tcp_distance 158.906982
2025-06-12 17:54:17.443 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:55:23.941 30 30 30 30
2025-06-12 17:55:23.942 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:55:23.942 goal_angle -44.911705 98.661697
2025-06-12 17:55:23.942 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:55:23.942 z1 -75.466103 z2 -75.466103
2025-06-12 17:55:23.942 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-12 17:55:23.943 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-12 17:55:23.943 speed 100.000000
2025-06-12 17:55:23.943 tcp_distance 144.069748
2025-06-12 17:55:23.943 new_end_speed 100.000000 j1_acc_t 0.720349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.881371
2025-06-12 17:55:23.943 new_end_speed 100.000000 j2_acc_t 0.720349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.616140
2025-06-12 17:55:23.944 new_end_speed 100.000000 j3_acc_t 0.720349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:55:23.944 new_end_speed 100.000000 j4_acc_t 0.720349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:55:23.944 end_speed 100.000000
2025-06-12 17:55:23.944 trail_number1.440697
2025-06-12 17:55:23.945 tcp_distance 144.069748
2025-06-12 17:55:23.945 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:56:30.348 30 30 30 30
2025-06-12 17:56:30.349 new_movej_xyz_lr 274.065002 149.383698 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-12 17:56:30.349 goal_angle -11.002804 84.112190
2025-06-12 17:56:30.349 new_movej_angle -11.002804 84.112190 -75.466103 -1005.721008 0.000000 100.000000
2025-06-12 17:56:30.349 z1 -75.466103 z2 -75.466103
2025-06-12 17:56:30.349 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-12 17:56:30.350 angle1_2 -11.002804 angle2_2 84.112190 z2 -75.466103 r2 -1005.721008
2025-06-12 17:56:30.350 speed 100.000000
2025-06-12 17:56:30.350 tcp_distance 144.322098
2025-06-12 17:56:30.350 new_end_speed 100.000000 j1_acc_t 0.721610 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 51.395920
2025-06-12 17:56:30.350 new_end_speed 100.000000 j2_acc_t 0.721610 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.052773
2025-06-12 17:56:30.350 new_end_speed 100.000000 j3_acc_t 0.721610 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-12 17:56:30.350 new_end_speed 100.000000 j4_acc_t 0.721610 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-12 17:56:30.351 end_speed 100.000000
2025-06-12 17:56:30.351 trail_number1.443221
2025-06-12 17:56:30.351 tcp_distance 144.322098
2025-06-12 17:56:30.351 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -11.002804 angle2_2 = 84.112190 z2 = -75.466103 r2 = -1005.721008
2025-06-12 17:57:16.229 30 30 30 30
2025-06-12 17:57:16.229 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-12 17:57:16.230 goal_angle -87.199585 152.604431
2025-06-12 17:57:16.230 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-12 17:57:16.230 z1 -75.466103 z2 -4.457100
2025-06-12 17:57:16.230 angle1_1 -11.002804 angle2_1 84.112190 z1 -75.466103 r1 -1005.721008
2025-06-12 17:57:16.231 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-12 17:57:16.231 speed 100.000000
2025-06-12 17:57:16.231 tcp_distance 288.737366
2025-06-12 17:57:16.231 new_end_speed 100.000000 j1_acc_t 1.443687 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 57.727364
2025-06-12 17:57:16.231 new_end_speed 100.000000 j2_acc_t 1.443687 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 51.890335
2025-06-12 17:57:16.231 new_end_speed 100.000000 j3_acc_t 1.443687 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 53.797054
2025-06-12 17:57:16.232 new_end_speed 100.000000 j4_acc_t 1.443687 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 16.818187
2025-06-12 17:57:16.232 end_speed 100.000000
2025-06-12 17:57:16.232 trail_number2.887374
2025-06-12 17:57:16.232 tcp_distance 288.737366
2025-06-12 17:57:16.233 angle1_1 = -11.002804 angle2_1 = 84.112190 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-12 18:50:28.157 ROBOT_ERROR_CODE = 1001
2025-06-12 18:50:28.158
0 : 9999 9999 9999 9999 10000 0
1 : 9999 9999 9999 9999 10000 0
2 : 9999 9999 9999 9999 10000 0
3 : 9999 9999 9999 9999 10000 0
4 : 9999 9999 9999 9999 10000 0
5 : 9999 9999 9999 9999 10000 0
6 : 9999 9999 9999 9999 10000 0
7 : 9999 9999 9999 9999 10000 0
8 : 9999 9999 9999 9999 10000 0
9 : 9999 9999 9999 9999 10000 0
10 : 9999 9999 9999 9999 10000 0
11 : 9999 9999 9999 9999 10000 0
12 : 9999 9999 9999 9999 10000 0
13 : 9999 9999 9999 9999 10000 0
14 : 9999 9999 9999 9999 10000 0
15 : 9999 9999 9999 9999 10000 0

View File

@@ -0,0 +1,338 @@
2025-06-13 09:45:56.614 ROBOT_ERROR_CODE = 1004
2025-06-13 09:45:56.614
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 9999 9999 9999 9999 9999 0
2025-06-13 09:46:03.052 SDK_VERSION_V2.0.0.29_Release
2025-06-13 09:46:03.052 robot connected
2025-06-13 09:46:03.053 26
2025-06-13 09:46:03.053 current generation=26
2025-06-13 09:46:03.618 0x1a
2025-06-13 09:46:04.542 initial joint2 4434858
2025-06-13 09:46:04.543 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-13 09:46:04.543 robot WritePID
2025-06-13 09:46:04.854 initial joint1 -1265142
2025-06-13 09:46:04.900 initial joint2 4434858
2025-06-13 09:46:04.946 initial joint3 -13276
2025-06-13 09:46:04.992 initial joint4 -25059016
2025-06-13 09:46:05.008 initial joint1 -1265141
2025-06-13 09:46:05.054 initial joint2 4434858
2025-06-13 09:46:05.100 initial joint3 -13276
2025-06-13 09:46:05.147 initial joint4 -25059016
2025-06-13 09:46:05.162 initial joint1 -1265156
2025-06-13 09:46:05.209 initial joint2 4434858
2025-06-13 09:46:05.270 initial joint3 -13276
2025-06-13 09:46:05.331 initial joint4 -25059016
2025-06-13 09:46:07.474 initial_thread initialized
2025-06-13 09:46:07.474 servo enable
2025-06-13 09:46:07.474 brake open
2025-06-13 09:46:07.475 set_brake_state 0 1
2025-06-13 09:46:07.688 robot initialized
2025-06-13 09:46:08.238 get_scara_param -86.871300 152.258804 -4.557900 -1027.915771
2025-06-13 09:46:08.239 get_scara_real_coor -86.871300 152.258804 -4.557900 -1027.915771
2025-06-13 09:46:08.239 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-13 09:46:08.240 position -1265155.000000 4434859.000000 -13275.845703 -25059018.000000 0.000000 0.000000 0.000000 0.000000
2025-06-13 09:46:08.240 speed 86871.296875 152258.796875 4557.899902 1032399.750000
2025-06-13 09:46:08.240 set_first_position_after_initial
2025-06-13 09:46:08.242 movej_old start_pos: -86.871300 152.258804 -4.557900 -1027.915771 end_pos: -86.871300 152.258804 -4.557900 -1027.915771 org_sp 10.000000 end_sp 10.000000
2025-06-13 09:46:08.547 J3 Belt Meilage=40.912121km
2025-06-13 09:46:22.800 30 30 30 30
2025-06-13 09:46:22.802 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 09:46:22.802 goal_angle -63.500324 35.083988
2025-06-13 09:46:22.803 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 09:46:22.803 z1 -4.557900 z2 -75.466103
2025-06-13 09:46:22.803 angle1_1 -86.871300 angle2_1 152.258804 z1 -4.557900 r1 -1027.915771
2025-06-13 09:46:22.804 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-13 09:46:22.804 speed 100.000000
2025-06-13 09:46:22.804 tcp_distance 346.922180
2025-06-13 09:46:22.805 new_end_speed 100.000000 j1_acc_t 1.734611 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.736454
2025-06-13 09:46:22.806 new_end_speed 100.000000 j2_acc_t 1.734611 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.884003
2025-06-13 09:46:22.806 new_end_speed 100.000000 j3_acc_t 1.734611 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.710819
2025-06-13 09:46:22.806 new_end_speed 100.000000 j4_acc_t 1.734611 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.994794
2025-06-13 09:46:22.806 end_speed 100.000000
2025-06-13 09:46:22.807 trail_number3.469222
2025-06-13 09:46:22.807 tcp_distance 346.922180
2025-06-13 09:46:22.808 angle1_1 = -86.871300 angle2_1 = 152.258804 z1 = -4.557900 r1 = -1027.915771 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-13 09:46:28.000 30 30 30 30
2025-06-13 09:46:28.000 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-13 09:46:28.001 goal_angle -87.199585 152.604431
2025-06-13 09:46:28.001 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-13 09:46:28.001 z1 -75.466103 z2 -4.457100
2025-06-13 09:46:28.001 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-13 09:46:28.001 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-13 09:46:28.002 speed 100.000000
2025-06-13 09:46:28.002 tcp_distance 346.692505
2025-06-13 09:46:28.002 new_end_speed 100.000000 j1_acc_t 1.733463 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.953341
2025-06-13 09:46:28.002 new_end_speed 100.000000 j2_acc_t 1.733463 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 74.150970
2025-06-13 09:46:28.002 new_end_speed 100.000000 j3_acc_t 1.733463 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.804005
2025-06-13 09:46:28.003 new_end_speed 100.000000 j4_acc_t 1.733463 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 14.006761
2025-06-13 09:46:28.003 end_speed 100.000000
2025-06-13 09:46:28.003 trail_number3.466925
2025-06-13 09:46:28.003 tcp_distance 346.692505
2025-06-13 09:46:28.004 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-13 09:50:24.244 30 30 30 30
2025-06-13 09:50:24.245 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 09:50:24.245 goal_angle -63.500324 35.083988
2025-06-13 09:50:24.245 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 09:50:24.245 z1 -4.457100 z2 -75.466103
2025-06-13 09:50:24.245 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-13 09:50:24.246 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-13 09:50:24.246 speed 100.000000
2025-06-13 09:50:24.246 tcp_distance 347.514679
2025-06-13 09:50:24.247 new_end_speed 100.000000 j1_acc_t 1.737573 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.917970
2025-06-13 09:50:24.247 new_end_speed 100.000000 j2_acc_t 1.737573 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.975578
2025-06-13 09:50:24.247 new_end_speed 100.000000 j3_acc_t 1.737573 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.698025
2025-06-13 09:50:24.247 new_end_speed 100.000000 j4_acc_t 1.737573 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.973623
2025-06-13 09:50:24.247 end_speed 100.000000
2025-06-13 09:50:24.248 trail_number3.475147
2025-06-13 09:50:24.248 tcp_distance 347.514679
2025-06-13 09:50:24.248 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-13 09:51:32.946 30 30 30 30
2025-06-13 09:51:32.947 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 09:51:32.947 goal_angle -67.226128 86.401024
2025-06-13 09:51:32.947 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 09:51:32.947 z1 -75.466103 z2 -75.466103
2025-06-13 09:51:32.947 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-13 09:51:32.948 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-13 09:51:32.948 speed 100.000000
2025-06-13 09:51:32.948 tcp_distance 158.906982
2025-06-13 09:51:32.948 new_end_speed 100.000000 j1_acc_t 0.794535 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 5.128908
2025-06-13 09:51:32.948 new_end_speed 100.000000 j2_acc_t 0.794535 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 70.642578
2025-06-13 09:51:32.949 new_end_speed 100.000000 j3_acc_t 0.794535 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-13 09:51:32.949 new_end_speed 100.000000 j4_acc_t 0.794535 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-13 09:51:32.949 end_speed 100.000000
2025-06-13 09:51:32.949 trail_number1.589070
2025-06-13 09:51:32.949 tcp_distance 158.906982
2025-06-13 09:51:32.950 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-13 09:51:47.206 30 30 30 30
2025-06-13 09:51:47.206 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-13 09:51:47.206 goal_angle -87.199585 152.604431
2025-06-13 09:51:47.207 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-13 09:51:47.207 z1 -75.466103 z2 -4.457100
2025-06-13 09:51:47.207 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-13 09:51:47.207 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-13 09:51:47.207 speed 100.000000
2025-06-13 09:51:47.207 tcp_distance 218.265945
2025-06-13 09:51:47.208 new_end_speed 100.000000 j1_acc_t 1.091330 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 20.017746
2025-06-13 09:51:47.208 new_end_speed 100.000000 j2_acc_t 1.091330 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 66.350204
2025-06-13 09:51:47.208 new_end_speed 100.000000 j3_acc_t 1.091330 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 71.166458
2025-06-13 09:51:47.208 new_end_speed 100.000000 j4_acc_t 1.091330 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 22.248268
2025-06-13 09:51:47.208 end_speed 100.000000
2025-06-13 09:51:47.209 trail_number2.182659
2025-06-13 09:51:47.209 tcp_distance 218.265945
2025-06-13 09:51:47.209 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-13 09:52:35.169 SDK_VERSION_V2.0.0.29_Release
2025-06-13 09:52:35.169 robot connected
2025-06-13 09:52:35.169 26
2025-06-13 09:52:35.170 current generation=26
2025-06-13 09:52:35.681 0x1a
2025-06-13 09:52:36.555 initial joint2 4444929
2025-06-13 09:52:36.555 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-13 09:52:36.556 robot WritePID
2025-06-13 09:52:36.864 initial joint1 -1269935
2025-06-13 09:52:36.911 initial joint2 4444930
2025-06-13 09:52:36.956 initial joint3 -12994
2025-06-13 09:52:37.003 initial joint4 -25056189
2025-06-13 09:52:37.019 initial joint1 -1269935
2025-06-13 09:52:37.066 initial joint2 4444933
2025-06-13 09:52:37.114 initial joint3 -12995
2025-06-13 09:52:37.175 initial joint4 -25056190
2025-06-13 09:52:37.191 initial joint1 -1269935
2025-06-13 09:52:37.238 initial joint2 4444935
2025-06-13 09:52:37.285 initial joint3 -12995
2025-06-13 09:52:37.332 initial joint4 -25056191
2025-06-13 09:52:39.492 initial_thread initialized
2025-06-13 09:52:39.492 servo enable
2025-06-13 09:52:39.493 brake open
2025-06-13 09:52:39.493 set_brake_state 0 1
2025-06-13 09:52:39.693 robot initialized
2025-06-13 09:52:40.253 get_scara_param -87.199501 152.604797 -4.461800 -1027.919922
2025-06-13 09:52:40.253 get_scara_real_coor -87.199501 152.604797 -4.461800 -1027.920044
2025-06-13 09:52:40.253 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-13 09:52:40.254 position -1269934.750000 4444937.000000 -12995.934570 -25056190.000000 -980521.375000 2526356.500000 -218765.796875 -24043154.000000
2025-06-13 09:52:40.254 speed 19872.439453 65869.234375 70645.476563 41735.800781
2025-06-13 09:52:40.254 set_first_position_after_initial
2025-06-13 09:52:40.255 movej_old start_pos: -87.199501 152.604797 -4.461800 -1027.919922 end_pos: -87.199501 152.604797 -4.461800 -1027.919922 org_sp 10.000000 end_sp 10.000000
2025-06-13 09:52:40.553 J3 Belt Meilage=40.912525km
2025-06-13 10:09:14.293 SDK_VERSION_V2.0.0.29_Release
2025-06-13 10:09:14.294 robot connected
2025-06-13 10:09:14.294 26
2025-06-13 10:09:14.294 current generation=26
2025-06-13 10:09:14.801 0x1a
2025-06-13 10:09:15.716 initial joint2 4444939
2025-06-13 10:09:15.716 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-13 10:09:15.717 robot WritePID
2025-06-13 10:09:16.028 initial joint1 -1269934
2025-06-13 10:09:16.073 initial joint2 4444943
2025-06-13 10:09:16.119 initial joint3 -13000
2025-06-13 10:09:16.164 initial joint4 -25056191
2025-06-13 10:09:16.196 initial joint1 -1269933
2025-06-13 10:09:16.244 initial joint2 4444945
2025-06-13 10:09:16.291 initial joint3 -13000
2025-06-13 10:09:16.338 initial joint4 -25056195
2025-06-13 10:09:16.354 initial joint1 -1269933
2025-06-13 10:09:16.401 initial joint2 4444946
2025-06-13 10:09:16.462 initial joint3 -13000
2025-06-13 10:09:16.523 initial joint4 -25056197
2025-06-13 10:09:18.731 initial_thread initialized
2025-06-13 10:09:18.731 servo enable
2025-06-13 10:09:18.732 brake open
2025-06-13 10:09:18.732 set_brake_state 0 1
2025-06-13 10:09:18.934 robot initialized
2025-06-13 10:09:19.490 get_scara_param -87.199303 152.605194 -4.463500 -1027.919800
2025-06-13 10:09:19.490 get_scara_real_coor -87.199303 152.605194 -4.463500 -1027.919800
2025-06-13 10:09:19.490 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-13 10:09:19.490 position -1269931.875000 4444948.500000 -13000.885742 -25056200.000000 -980521.375000 2526356.500000 -218765.796875 -24043154.000000
2025-06-13 10:09:19.491 speed 19872.242188 65869.632813 70643.773438 41736.210938
2025-06-13 10:09:19.491 set_first_position_after_initial
2025-06-13 10:09:19.491 movej_old start_pos: -87.199303 152.605194 -4.463500 -1027.919800 end_pos: -87.199303 152.605194 -4.463500 -1027.919800 org_sp 10.000000 end_sp 10.000000
2025-06-13 10:09:19.783 J3 Belt Meilage=40.912582km
2025-06-13 10:20:44.817 30 30 30 30
2025-06-13 10:20:44.819 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:20:44.819 goal_angle -63.500324 35.083988
2025-06-13 10:20:44.819 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:20:44.820 z1 -4.463500 z2 -75.466103
2025-06-13 10:20:44.820 angle1_1 -87.199303 angle2_1 152.605194 z1 -4.463500 r1 -1027.919800
2025-06-13 10:20:44.820 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-13 10:20:44.821 speed 100.000000
2025-06-13 10:20:44.821 tcp_distance 347.517059
2025-06-13 10:20:44.822 new_end_speed 100.000000 j1_acc_t 1.737585 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.917685
2025-06-13 10:20:44.822 new_end_speed 100.000000 j2_acc_t 1.737585 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.975517
2025-06-13 10:20:44.823 new_end_speed 100.000000 j3_acc_t 1.737585 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.693676
2025-06-13 10:20:44.823 new_end_speed 100.000000 j4_acc_t 1.737585 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.973373
2025-06-13 10:20:44.823 end_speed 100.000000
2025-06-13 10:20:44.823 trail_number3.475171
2025-06-13 10:20:44.823 tcp_distance 347.517059
2025-06-13 10:20:44.823 angle1_1 = -87.199303 angle2_1 = 152.605194 z1 = -4.463500 r1 = -1027.919800 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:21:53.749 30 30 30 30
2025-06-13 10:21:53.750 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:21:53.750 goal_angle -67.226128 86.401024
2025-06-13 10:21:53.750 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:21:53.750 z1 -75.466103 z2 -75.466103
2025-06-13 10:21:53.751 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-13 10:21:53.751 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-13 10:21:53.751 speed 100.000000
2025-06-13 10:21:53.751 tcp_distance 158.906982
2025-06-13 10:21:53.751 new_end_speed 100.000000 j1_acc_t 0.794535 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 5.128908
2025-06-13 10:21:53.751 new_end_speed 100.000000 j2_acc_t 0.794535 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 70.642578
2025-06-13 10:21:53.751 new_end_speed 100.000000 j3_acc_t 0.794535 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-13 10:21:53.752 new_end_speed 100.000000 j4_acc_t 0.794535 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-13 10:21:53.752 end_speed 100.000000
2025-06-13 10:21:53.752 trail_number1.589070
2025-06-13 10:21:53.753 tcp_distance 158.906982
2025-06-13 10:21:53.753 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:23:00.752 30 30 30 30
2025-06-13 10:23:00.752 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:23:00.752 goal_angle -44.911705 98.661697
2025-06-13 10:23:00.753 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:23:00.753 z1 -75.466103 z2 -75.466103
2025-06-13 10:23:00.753 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-13 10:23:00.753 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-13 10:23:00.753 speed 100.000000
2025-06-13 10:23:00.754 tcp_distance 144.069748
2025-06-13 10:23:00.754 new_end_speed 100.000000 j1_acc_t 0.720349 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 33.881371
2025-06-13 10:23:00.754 new_end_speed 100.000000 j2_acc_t 0.720349 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 18.616140
2025-06-13 10:23:00.754 new_end_speed 100.000000 j3_acc_t 0.720349 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-13 10:23:00.754 new_end_speed 100.000000 j4_acc_t 0.720349 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-13 10:23:00.754 end_speed 100.000000
2025-06-13 10:23:00.755 trail_number1.440697
2025-06-13 10:23:00.755 tcp_distance 144.069748
2025-06-13 10:23:00.755 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:24:07.687 30 30 30 30
2025-06-13 10:24:07.687 new_movej_xyz_lr 274.065002 149.383698 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:24:07.688 goal_angle -11.002804 84.112190
2025-06-13 10:24:07.688 new_movej_angle -11.002804 84.112190 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:24:07.688 z1 -75.466103 z2 -75.466103
2025-06-13 10:24:07.689 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-13 10:24:07.689 angle1_2 -11.002804 angle2_2 84.112190 z2 -75.466103 r2 -1005.721008
2025-06-13 10:24:07.689 speed 100.000000
2025-06-13 10:24:07.689 tcp_distance 144.322098
2025-06-13 10:24:07.689 new_end_speed 100.000000 j1_acc_t 0.721610 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 51.395920
2025-06-13 10:24:07.689 new_end_speed 100.000000 j2_acc_t 0.721610 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.052773
2025-06-13 10:24:07.689 new_end_speed 100.000000 j3_acc_t 0.721610 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-13 10:24:07.690 new_end_speed 100.000000 j4_acc_t 0.721610 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-13 10:24:07.690 end_speed 100.000000
2025-06-13 10:24:07.690 trail_number1.443221
2025-06-13 10:24:07.691 tcp_distance 144.322098
2025-06-13 10:24:07.691 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -11.002804 angle2_2 = 84.112190 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:25:15.075 30 30 30 30
2025-06-13 10:25:15.075 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:25:15.075 goal_angle -63.500324 35.083988
2025-06-13 10:25:15.076 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:25:15.076 z1 -75.466103 z2 -75.466103
2025-06-13 10:25:15.076 angle1_1 -11.002804 angle2_1 84.112190 z1 -75.466103 r1 -1005.721008
2025-06-13 10:25:15.076 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-13 10:25:15.077 speed 100.000000
2025-06-13 10:25:15.077 tcp_distance 482.199493
2025-06-13 10:25:15.077 new_end_speed 100.000000 j1_acc_t 2.410997 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 23.815506
2025-06-13 10:25:15.077 new_end_speed 100.000000 j2_acc_t 2.410997 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.241650
2025-06-13 10:25:15.077 new_end_speed 100.000000 j3_acc_t 2.410997 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-13 10:25:15.078 new_end_speed 100.000000 j4_acc_t 2.410997 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-13 10:25:15.078 end_speed 100.000000
2025-06-13 10:25:15.078 trail_number4.821995
2025-06-13 10:25:15.078 tcp_distance 482.199493
2025-06-13 10:25:15.079 angle1_1 = -11.002804 angle2_1 = 84.112190 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:25:25.937 30 30 30 30
2025-06-13 10:25:25.937 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-13 10:25:25.937 goal_angle -87.199585 152.604431
2025-06-13 10:25:25.938 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-13 10:25:25.938 z1 -75.466103 z2 -4.457100
2025-06-13 10:25:25.938 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-13 10:25:25.938 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-13 10:25:25.939 speed 100.000000
2025-06-13 10:25:25.939 tcp_distance 346.692505
2025-06-13 10:25:25.939 new_end_speed 100.000000 j1_acc_t 1.733463 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.953341
2025-06-13 10:25:25.939 new_end_speed 100.000000 j2_acc_t 1.733463 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 74.150970
2025-06-13 10:25:25.939 new_end_speed 100.000000 j3_acc_t 1.733463 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.804005
2025-06-13 10:25:25.940 new_end_speed 100.000000 j4_acc_t 1.733463 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 14.006761
2025-06-13 10:25:25.940 end_speed 100.000000
2025-06-13 10:25:25.940 trail_number3.466925
2025-06-13 10:25:25.940 tcp_distance 346.692505
2025-06-13 10:25:25.941 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-13 10:56:01.430 30 30 30 30
2025-06-13 10:56:01.431 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-13 10:56:01.433 goal_angle -63.500324 35.083988
2025-06-13 10:56:01.433 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-13 10:56:01.433 z1 -4.457100 z2 -75.466103
2025-06-13 10:56:01.433 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-13 10:56:01.435 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-13 10:56:01.435 speed 100.000000
2025-06-13 10:56:01.435 tcp_distance 347.514679
2025-06-13 10:56:01.435 new_end_speed 100.000000 j1_acc_t 1.737573 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.917970
2025-06-13 10:56:01.436 new_end_speed 100.000000 j2_acc_t 1.737573 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.975578
2025-06-13 10:56:01.436 new_end_speed 100.000000 j3_acc_t 1.737573 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.698025
2025-06-13 10:56:01.436 new_end_speed 100.000000 j4_acc_t 1.737573 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 13.973623
2025-06-13 10:56:01.436 end_speed 100.000000
2025-06-13 10:56:01.436 trail_number3.475147
2025-06-13 10:56:01.436 tcp_distance 347.514679
2025-06-13 10:56:01.437 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-13 10:56:40.940 30 30 30 30
2025-06-13 10:56:40.940 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-13 10:56:40.941 goal_angle -87.199585 152.604431
2025-06-13 10:56:40.942 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-13 10:56:40.942 z1 -75.466103 z2 -4.457100
2025-06-13 10:56:40.942 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-13 10:56:40.942 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-13 10:56:40.942 speed 100.000000
2025-06-13 10:56:40.943 tcp_distance 346.692505
2025-06-13 10:56:40.943 new_end_speed 100.000000 j1_acc_t 1.733463 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.953341
2025-06-13 10:56:40.943 new_end_speed 100.000000 j2_acc_t 1.733463 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 74.150970
2025-06-13 10:56:40.943 new_end_speed 100.000000 j3_acc_t 1.733463 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.804005
2025-06-13 10:56:40.943 new_end_speed 100.000000 j4_acc_t 1.733463 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 14.006761
2025-06-13 10:56:40.943 end_speed 100.000000
2025-06-13 10:56:40.944 trail_number3.466925
2025-06-13 10:56:40.944 tcp_distance 346.692505
2025-06-13 10:56:40.946 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044

View File

@@ -0,0 +1,118 @@
2025-06-16 16:46:43.024 ROBOT_ERROR_CODE = 1004
2025-06-16 16:46:43.024
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 9999 9999 9999 9999 9999 0
2025-06-16 16:47:00.542 SDK_VERSION_V2.0.0.29_Release
2025-06-16 16:47:00.542 robot connected
2025-06-16 16:47:00.542 26
2025-06-16 16:47:00.542 current generation=26
2025-06-16 16:47:01.125 0x1a
2025-06-16 16:47:01.968 initial joint2 4432239
2025-06-16 16:47:01.969 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-16 16:47:01.969 robot WritePID
2025-06-16 16:47:02.275 initial joint1 -1248502
2025-06-16 16:47:02.323 initial joint2 4432240
2025-06-16 16:47:02.379 initial joint3 -13281
2025-06-16 16:47:02.423 initial joint4 -25060087
2025-06-16 16:47:02.440 initial joint1 -1248503
2025-06-16 16:47:02.492 initial joint2 4432238
2025-06-16 16:47:02.539 initial joint3 -13281
2025-06-16 16:47:02.588 initial joint4 -25060089
2025-06-16 16:47:02.622 initial joint1 -1248502
2025-06-16 16:47:02.663 initial joint2 4432239
2025-06-16 16:47:02.706 initial joint3 -13281
2025-06-16 16:47:02.754 initial joint4 -25060089
2025-06-16 16:47:04.876 initial_thread initialized
2025-06-16 16:47:04.876 servo enable
2025-06-16 16:47:04.877 brake open
2025-06-16 16:47:04.880 set_brake_state 0 1
2025-06-16 16:47:05.093 robot initialized
2025-06-16 16:47:05.652 get_scara_param -85.727798 152.168793 -4.559600 -1026.870483
2025-06-16 16:47:05.652 get_scara_real_coor -85.727898 152.168900 -4.559600 -1026.870483
2025-06-16 16:47:05.652 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-16 16:47:05.654 position -1248501.500000 4432237.500000 -13280.796875 -25060090.000000 0.000000 0.000000 0.000000 0.000000
2025-06-16 16:47:05.654 speed 85727.796875 152168.796875 4559.600098 1032443.937500
2025-06-16 16:47:05.654 set_first_position_after_initial
2025-06-16 16:47:05.654 movej_old start_pos: -85.727798 152.168793 -4.559600 -1026.870483 end_pos: -85.727798 152.168701 -4.559600 -1026.870483 org_sp 10.000000 end_sp 0.660932
2025-06-16 16:47:05.951 J3 Belt Meilage=40.917797km
2025-06-16 16:49:10.728 SDK_VERSION_V2.0.0.29_Release
2025-06-16 16:49:10.728 robot connected
2025-06-16 16:49:10.728 26
2025-06-16 16:49:10.728 current generation=26
2025-06-16 16:49:11.237 0x1a
2025-06-16 16:49:12.043 initial joint2 4432242
2025-06-16 16:49:12.044 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-16 16:49:12.044 robot WritePID
2025-06-16 16:49:12.347 initial joint1 -1248500
2025-06-16 16:49:12.393 initial joint2 4432242
2025-06-16 16:49:12.440 initial joint3 -13281
2025-06-16 16:49:12.485 initial joint4 -25060091
2025-06-16 16:49:12.501 initial joint1 -1248500
2025-06-16 16:49:12.548 initial joint2 4432243
2025-06-16 16:49:12.588 initial joint3 -13281
2025-06-16 16:49:12.636 initial joint4 -25060092
2025-06-16 16:49:12.651 initial joint1 -1248500
2025-06-16 16:49:12.708 initial joint2 4432245
2025-06-16 16:49:12.755 initial joint3 -13281
2025-06-16 16:49:12.793 initial joint4 -25060093
2025-06-16 16:49:14.903 initial_thread initialized
2025-06-16 16:49:14.903 servo enable
2025-06-16 16:49:14.903 brake open
2025-06-16 16:49:14.903 set_brake_state 0 1
2025-06-16 16:49:15.126 robot initialized
2025-06-16 16:49:15.705 get_scara_param -85.727600 152.169098 -4.559600 -1026.870361
2025-06-16 16:49:15.705 get_scara_real_coor -85.727699 152.169098 -4.559600 -1026.870483
2025-06-16 16:49:15.705 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-16 16:49:15.706 position -1248498.625000 4432246.000000 -13280.796875 -25060098.000000 0.000000 0.000000 0.000000 0.000000
2025-06-16 16:49:15.706 speed 85727.593750 152169.093750 4559.600098 1032444.250000
2025-06-16 16:49:15.706 set_first_position_after_initial
2025-06-16 16:49:15.707 movej_old start_pos: -85.727600 152.169098 -4.559600 -1026.870361 end_pos: -85.727600 152.169098 -4.559600 -1026.870361 org_sp 10.000000 end_sp 10.000000
2025-06-16 16:49:16.015 J3 Belt Meilage=40.917816km
2025-06-16 16:49:25.932 30 30 30 30
2025-06-16 16:49:25.934 new_movej_xyz_lr 274.065002 -137.158203 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-16 16:49:25.934 goal_angle -67.226128 86.401024
2025-06-16 16:49:25.935 new_movej_angle -67.226128 86.401024 -75.466103 -1005.721008 0.000000 100.000000
2025-06-16 16:49:25.935 z1 -4.559600 z2 -75.466103
2025-06-16 16:49:25.935 angle1_1 -85.727600 angle2_1 152.169098 z1 -4.559600 r1 -1026.870361
2025-06-16 16:49:25.935 angle1_2 -67.226128 angle2_2 86.401024 z2 -75.466103 r2 -1005.721008
2025-06-16 16:49:25.935 speed 100.000000
2025-06-16 16:49:25.935 tcp_distance 217.840149
2025-06-16 16:49:25.937 new_end_speed 100.000000 j1_acc_t 1.089201 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 18.578747
2025-06-16 16:49:25.937 new_end_speed 100.000000 j2_acc_t 1.089201 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 66.042763
2025-06-16 16:49:25.937 new_end_speed 100.000000 j3_acc_t 1.089201 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 71.202652
2025-06-16 16:49:25.937 new_end_speed 100.000000 j4_acc_t 1.089201 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 21.237688
2025-06-16 16:49:25.937 end_speed 100.000000
2025-06-16 16:49:25.938 trail_number2.178401
2025-06-16 16:49:25.938 tcp_distance 217.840149
2025-06-16 16:49:25.938 angle1_1 = -85.727600 angle2_1 = 152.169098 z1 = -4.559600 r1 = -1026.870361 angle1_2 = -67.226128 angle2_2 = 86.401024 z2 = -75.466103 r2 = -1005.721008
2025-06-16 16:49:37.836 30 30 30 30
2025-06-16 16:49:37.836 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-16 16:49:37.837 goal_angle -87.199585 152.604431
2025-06-16 16:49:37.837 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-16 16:49:37.837 z1 -75.466103 z2 -4.457100
2025-06-16 16:49:37.837 angle1_1 -67.226128 angle2_1 86.401024 z1 -75.466103 r1 -1005.721008
2025-06-16 16:49:37.837 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-16 16:49:37.837 speed 100.000000
2025-06-16 16:49:37.837 tcp_distance 218.265945
2025-06-16 16:49:37.838 new_end_speed 100.000000 j1_acc_t 1.091330 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 20.017746
2025-06-16 16:49:37.838 new_end_speed 100.000000 j2_acc_t 1.091330 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 66.350204
2025-06-16 16:49:37.838 new_end_speed 100.000000 j3_acc_t 1.091330 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 71.166458
2025-06-16 16:49:37.838 new_end_speed 100.000000 j4_acc_t 1.091330 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 22.248268
2025-06-16 16:49:37.838 end_speed 100.000000
2025-06-16 16:49:37.838 trail_number2.182659
2025-06-16 16:49:37.839 tcp_distance 218.265945
2025-06-16 16:49:37.839 angle1_1 = -67.226128 angle2_1 = 86.401024 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044

View File

@@ -0,0 +1,206 @@
2025-06-17 10:26:55.925 ROBOT_ERROR_CODE = 1004
2025-06-17 10:26:55.925
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 9999 9999 9999 9999 9999 0
2025-06-17 14:55:40.251 ROBOT_ERROR_CODE = 1004
2025-06-17 14:55:40.252
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 9999 9999 9999 9999 9999 0
2025-06-17 16:14:21.376 ROBOT_ERROR_CODE = 1004
2025-06-17 16:14:21.377
0 : 0 0 0 0 0 0
1 : 0 0 0 0 0 0
2 : 0 0 0 0 0 0
3 : 0 0 0 0 0 0
4 : 0 0 0 0 0 0
5 : 0 0 0 0 0 0
6 : 0 0 0 0 0 0
7 : 0 0 0 0 0 0
8 : 0 0 0 0 0 0
9 : 0 0 0 0 0 0
10 : 0 0 0 0 0 0
11 : 0 0 0 0 0 0
12 : 0 0 0 0 0 0
13 : 0 0 0 0 0 0
14 : 0 0 0 0 0 0
15 : 9999 9999 9999 9999 9999 0
2025-06-17 16:14:29.575 SDK_VERSION_V2.0.0.29_Release
2025-06-17 16:14:29.576 robot connected
2025-06-17 16:14:29.577 26
2025-06-17 16:14:29.577 current generation=26
2025-06-17 16:14:30.205 0x1a
2025-06-17 16:14:31.083 initial joint2 4433675
2025-06-17 16:14:31.084 C:\Users\fusy_\source\repos\HitBotCSharpDemo_x64\HitBotCSharpDemo\HitBotCSharpDemo\bin\x64\Debug\\j4_pid.txt do not exist
2025-06-17 16:14:31.084 robot WritePID
2025-06-17 16:14:31.387 initial joint1 -1267890
2025-06-17 16:14:31.433 initial joint2 4433677
2025-06-17 16:14:31.479 initial joint3 -13279
2025-06-17 16:14:31.525 initial joint4 -25059762
2025-06-17 16:14:31.541 initial joint1 -1267892
2025-06-17 16:14:31.588 initial joint2 4433676
2025-06-17 16:14:31.635 initial joint3 -13279
2025-06-17 16:14:31.681 initial joint4 -25059761
2025-06-17 16:14:31.696 initial joint1 -1267900
2025-06-17 16:14:31.743 initial joint2 4433675
2025-06-17 16:14:31.789 initial joint3 -13279
2025-06-17 16:14:31.851 initial joint4 -25059762
2025-06-17 16:14:34.062 initial_thread initialized
2025-06-17 16:14:34.062 servo enable
2025-06-17 16:14:34.063 brake open
2025-06-17 16:14:34.063 set_brake_state 0 1
2025-06-17 16:14:34.277 robot initialized
2025-06-17 16:14:34.847 get_scara_param -87.060097 152.218201 -4.558900 -1028.159668
2025-06-17 16:14:34.848 get_scara_real_coor -87.060097 152.218094 -4.558900 -1028.159668
2025-06-17 16:14:34.848 <09><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD>
2025-06-17 16:14:34.848 position -1267904.500000 4433676.500000 -13278.758789 -25059764.000000 0.000000 0.000000 0.000000 0.000000
2025-06-17 16:14:34.849 speed 87060.093750 152218.203125 4558.899902 1032430.500000
2025-06-17 16:14:34.849 set_first_position_after_initial
2025-06-17 16:14:34.850 movej_old start_pos: -87.060089 152.218201 -4.558900 -1028.159668 end_pos: -87.059998 152.218201 -4.558900 -1028.159668 org_sp 10.000000 end_sp 0.357694
2025-06-17 16:14:35.138 J3 Belt Meilage=40.921722km
2025-06-17 16:14:44.004 30 30 30 30
2025-06-17 16:14:44.005 new_movej_xyz_lr 274.065002 -292.061096 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:14:44.005 goal_angle -63.500324 35.083988
2025-06-17 16:14:44.006 new_movej_angle -63.500324 35.083988 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:14:44.006 z1 -4.558900 z2 -75.466103
2025-06-17 16:14:44.006 angle1_1 -87.059998 angle2_1 152.218201 z1 -4.558900 r1 -1028.159668
2025-06-17 16:14:44.006 angle1_2 -63.500324 angle2_2 35.083988 z2 -75.466103 r2 -1005.721008
2025-06-17 16:14:44.007 speed 100.000000
2025-06-17 16:14:44.007 tcp_distance 346.322388
2025-06-17 16:14:44.007 new_end_speed 100.000000 j1_acc_t 1.731612 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 14.881173
2025-06-17 16:14:44.008 new_end_speed 100.000000 j2_acc_t 1.731612 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 73.986359
2025-06-17 16:14:44.008 new_end_speed 100.000000 j3_acc_t 1.731612 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 44.787647
2025-06-17 16:14:44.008 new_end_speed 100.000000 j4_acc_t 1.731612 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 14.173085
2025-06-17 16:14:44.008 end_speed 100.000000
2025-06-17 16:14:44.008 trail_number3.463224
2025-06-17 16:14:44.009 tcp_distance 346.322388
2025-06-17 16:14:44.009 angle1_1 = -87.059998 angle2_1 = 152.218201 z1 = -4.558900 r1 = -1028.159668 angle1_2 = -63.500324 angle2_2 = 35.083988 z2 = -75.466103 r2 = -1005.721008
2025-06-17 16:14:47.994 30 30 30 30
2025-06-17 16:14:47.994 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:14:47.994 goal_angle -44.911705 98.661697
2025-06-17 16:14:47.994 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:14:47.994 z1 -75.466103 z2 -75.466103
2025-06-17 16:14:47.994 angle1_1 -63.500324 angle2_1 35.083988 z1 -75.466103 r1 -1005.721008
2025-06-17 16:14:47.995 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-17 16:14:47.995 speed 100.000000
2025-06-17 16:14:47.995 tcp_distance 318.237030
2025-06-17 16:14:47.995 new_end_speed 100.000000 j1_acc_t 1.591185 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 12.777455
2025-06-17 16:14:47.995 new_end_speed 100.000000 j2_acc_t 1.591185 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 43.702080
2025-06-17 16:14:47.995 new_end_speed 100.000000 j3_acc_t 1.591185 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-17 16:14:47.995 new_end_speed 100.000000 j4_acc_t 1.591185 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-17 16:14:47.996 end_speed 100.000000
2025-06-17 16:14:47.996 trail_number3.182370
2025-06-17 16:14:47.996 tcp_distance 318.237030
2025-06-17 16:14:47.997 angle1_1 = -63.500324 angle2_1 = 35.083988 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-17 16:14:51.588 30 30 30 30
2025-06-17 16:14:51.588 new_movej_xyz_lr 274.065002 149.383698 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:14:51.588 goal_angle -11.002804 84.112190
2025-06-17 16:14:51.589 new_movej_angle -11.002804 84.112190 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:14:51.589 z1 -75.466103 z2 -75.466103
2025-06-17 16:14:51.589 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-17 16:14:51.589 angle1_2 -11.002804 angle2_2 84.112190 z2 -75.466103 r2 -1005.721008
2025-06-17 16:14:51.589 speed 100.000000
2025-06-17 16:14:51.590 tcp_distance 144.322098
2025-06-17 16:14:51.590 new_end_speed 100.000000 j1_acc_t 0.721610 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 51.395920
2025-06-17 16:14:51.590 new_end_speed 100.000000 j2_acc_t 0.721610 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.052773
2025-06-17 16:14:51.590 new_end_speed 100.000000 j3_acc_t 0.721610 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-17 16:14:51.590 new_end_speed 100.000000 j4_acc_t 0.721610 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-17 16:14:51.591 end_speed 100.000000
2025-06-17 16:14:51.591 trail_number1.443221
2025-06-17 16:14:51.591 tcp_distance 144.322098
2025-06-17 16:14:51.592 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -11.002804 angle2_2 = 84.112190 z2 = -75.466103 r2 = -1005.721008
2025-06-17 16:14:55.998 30 30 30 30
2025-06-17 16:14:55.998 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:14:55.998 goal_angle -44.911705 98.661697
2025-06-17 16:14:55.998 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:14:55.998 z1 -75.466103 z2 -75.466103
2025-06-17 16:14:55.998 angle1_1 -11.002804 angle2_1 84.112190 z1 -75.466103 r1 -1005.721008
2025-06-17 16:14:55.999 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-17 16:14:55.999 speed 100.000000
2025-06-17 16:14:55.999 tcp_distance 144.406967
2025-06-17 16:14:55.999 new_end_speed 100.000000 j1_acc_t 0.722035 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 51.365715
2025-06-17 16:14:56.000 new_end_speed 100.000000 j2_acc_t 0.722035 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.039812
2025-06-17 16:14:56.000 new_end_speed 100.000000 j3_acc_t 0.722035 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-17 16:14:56.000 new_end_speed 100.000000 j4_acc_t 0.722035 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-17 16:14:56.000 end_speed 100.000000
2025-06-17 16:14:56.000 trail_number1.444070
2025-06-17 16:14:56.000 tcp_distance 144.406967
2025-06-17 16:14:56.001 angle1_1 = -11.002804 angle2_1 = 84.112190 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-17 16:14:58.547 30 30 30 30
2025-06-17 16:14:58.547 new_movej_xyz_lr 93.989304 -37.882999 -4.457100 -1027.920044 100.000000 0.000000 1
2025-06-17 16:14:58.547 goal_angle -87.199585 152.604431
2025-06-17 16:14:58.548 new_movej_angle -87.199585 152.604431 -4.457100 -1027.920044 0.000000 100.000000
2025-06-17 16:14:58.548 z1 -75.466103 z2 -4.457100
2025-06-17 16:14:58.548 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-17 16:14:58.548 angle1_2 -87.199585 angle2_2 152.604431 z2 -4.457100 r2 -1027.920044
2025-06-17 16:14:58.548 speed 100.000000
2025-06-17 16:14:58.549 tcp_distance 199.889740
2025-06-17 16:14:58.549 new_end_speed 100.000000 j1_acc_t 0.999449 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 46.277863
2025-06-17 16:14:58.549 new_end_speed 100.000000 j2_acc_t 0.999449 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 59.032387
2025-06-17 16:14:58.549 new_end_speed 100.000000 j3_acc_t 0.999449 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 77.708908
2025-06-17 16:14:58.549 new_end_speed 100.000000 j4_acc_t 0.999449 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 24.293588
2025-06-17 16:14:58.549 end_speed 100.000000
2025-06-17 16:14:58.550 trail_number1.998897
2025-06-17 16:14:58.550 tcp_distance 199.889740
2025-06-17 16:14:58.550 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -87.199585 angle2_2 = 152.604431 z2 = -4.457100 r2 = -1027.920044
2025-06-17 16:15:01.023 30 30 30 30
2025-06-17 16:15:01.023 new_movej_xyz_lr 274.065002 5.965300 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:15:01.023 goal_angle -44.911705 98.661697
2025-06-17 16:15:01.023 new_movej_angle -44.911705 98.661697 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:15:01.024 z1 -4.457100 z2 -75.466103
2025-06-17 16:15:01.024 angle1_1 -87.199585 angle2_1 152.604431 z1 -4.457100 r1 -1027.920044
2025-06-17 16:15:01.024 angle1_2 -44.911705 angle2_2 98.661697 z2 -75.466103 r2 -1005.721008
2025-06-17 16:15:01.024 speed 100.000000
2025-06-17 16:15:01.024 tcp_distance 200.024658
2025-06-17 16:15:01.024 new_end_speed 100.000000 j1_acc_t 1.000123 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 46.246628
2025-06-17 16:15:01.024 new_end_speed 100.000000 j2_acc_t 1.000123 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 58.992538
2025-06-17 16:15:01.024 new_end_speed 100.000000 j3_acc_t 1.000123 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 77.656456
2025-06-17 16:15:01.025 new_end_speed 100.000000 j4_acc_t 1.000123 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 24.277203
2025-06-17 16:15:01.025 end_speed 100.000000
2025-06-17 16:15:01.025 trail_number2.000247
2025-06-17 16:15:01.025 tcp_distance 200.024658
2025-06-17 16:15:01.025 angle1_1 = -87.199585 angle2_1 = 152.604431 z1 = -4.457100 r1 = -1027.920044 angle1_2 = -44.911705 angle2_2 = 98.661697 z2 = -75.466103 r2 = -1005.721008
2025-06-17 16:15:05.186 30 30 30 30
2025-06-17 16:15:05.187 new_movej_xyz_lr 274.065002 149.383698 -75.466103 -1005.721008 100.000000 0.000000 1
2025-06-17 16:15:05.187 goal_angle -11.002804 84.112190
2025-06-17 16:15:05.187 new_movej_angle -11.002804 84.112190 -75.466103 -1005.721008 0.000000 100.000000
2025-06-17 16:15:05.187 z1 -75.466103 z2 -75.466103
2025-06-17 16:15:05.187 angle1_1 -44.911705 angle2_1 98.661697 z1 -75.466103 r1 -1005.721008
2025-06-17 16:15:05.187 angle1_2 -11.002804 angle2_2 84.112190 z2 -75.466103 r2 -1005.721008
2025-06-17 16:15:05.187 speed 100.000000
2025-06-17 16:15:05.189 tcp_distance 144.322098
2025-06-17 16:15:05.189 new_end_speed 100.000000 j1_acc_t 0.721610 j1_avg_time 0.000000 j1_max_acc 237.000000 j1_max_sp 51.395920
2025-06-17 16:15:05.189 new_end_speed 100.000000 j2_acc_t 0.721610 j2_avg_time 0.000000 j2_max_acc 2566.500000 j2_max_sp 22.052773
2025-06-17 16:15:05.189 new_end_speed 100.000000 j3_acc_t 0.721610 j3_avg_time 0.000000 j3_max_acc 3869.100098 j3_max_sp 0.000000
2025-06-17 16:15:05.189 new_end_speed 100.000000 j4_acc_t 0.721610 j4_avg_time 0.000000 j4_max_acc 1572.900024 j4_max_sp 0.000000
2025-06-17 16:15:05.189 end_speed 100.000000
2025-06-17 16:15:05.190 trail_number1.443221
2025-06-17 16:15:05.190 tcp_distance 144.322098
2025-06-17 16:15:05.190 angle1_1 = -44.911705 angle2_1 = 98.661697 z1 = -75.466103 r1 = -1005.721008 angle1_2 = -11.002804 angle2_2 = 84.112190 z2 = -75.466103 r2 = -1005.721008

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

View File

@@ -1 +1 @@
d2d0757b578ccf65dbeb538a88f077879bb6f6ea29b9d3d8e25a6e4f8c33ed7d
5c4765cc5751b3038bbbfc77461925fc32c32c7429e0f32c686d1470e388eeb2

View File

@@ -0,0 +1,270 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO.Ports;
using System.Windows.Forms;
namespace HitBotCSharpDemo
{
internal class tempControl
{
private SerialPort serialPort;
private System.Windows.Forms.Timer temperatureTimer;
private string[] temperatureCommands = {
"TC1:TCACTUALTEMP?@0\r",
"TC1:TCACTUALTEMP?@1\r",
"TC1:TCACTUALTEMP?@2\r",
"TC1:TCACTUALTEMP?@3\r"
};
private Label[] temperatureLabels;
private int currentCommandIndex = 0;
private string receivedData = "";
public tempControl(Label[] labels)
{
temperatureLabels = labels;
InitializeSerialPort();
InitializeTemperatureTimer();
}
public void LoadAvailablePorts(ComboBox comboBox)
{
try
{
comboBox.Items.Clear();
string[] ports = SerialPort.GetPortNames();
if (ports.Length > 0)
{
foreach (string port in ports)
{
comboBox.Items.Add(port);
}
// 默认选择第一个串口
comboBox.SelectedIndex = 0;
}
else
{
MessageBox.Show("系统中没有找到可用的串口!", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show($"获取串口列表时发生错误: {ex.Message}", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
public void ToggleSerialPort(Button button, ComboBox comboBox)
{
try
{
if (serialPort.IsOpen)
{
// 串口已打开,执行关闭操作
temperatureTimer.Stop(); // 停止温度查询定时器
serialPort.Close();
UpdateUIStatus(false, button, comboBox);
MessageBox.Show("串口已关闭", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
// 串口未打开,执行打开操作
if (string.IsNullOrEmpty(serialPort.PortName))
{
MessageBox.Show("请先选择一个串口!", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
serialPort.Open();
temperatureTimer.Start(); // 启动温度查询定时器
UpdateUIStatus(true, button, comboBox);
MessageBox.Show($"串口 {serialPort.PortName} 已成功打开", "提示",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (UnauthorizedAccessException)
{
MessageBox.Show("串口访问被拒绝,可能已被其他程序占用!", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (ArgumentException)
{
MessageBox.Show("串口名称无效!", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (InvalidOperationException)
{
MessageBox.Show("串口已经处于打开状态!", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
MessageBox.Show($"操作串口时发生错误: {ex.Message}", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
public void OnComboBoxSelectedIndexChanged(ComboBox comboBox, Button button)
{
if (serialPort != null && serialPort.IsOpen)
{
try
{
temperatureTimer.Stop(); // 停止温度查询定时器
serialPort.Close();
UpdateUIStatus(false, button, comboBox);
}
catch (Exception ex)
{
MessageBox.Show($"关闭串口时发生错误: {ex.Message}", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
// 设置新选择的串口名称
if (comboBox.SelectedItem != null)
{
serialPort.PortName = comboBox.SelectedItem.ToString();
}
}
public void OnFormClosing()
{
try
{
temperatureTimer?.Stop();
temperatureTimer?.Dispose();
if (serialPort != null && serialPort.IsOpen)
{
serialPort.Close();
}
serialPort?.Dispose();
}
catch (Exception ex)
{
MessageBox.Show($"关闭串口时发生错误: {ex.Message}", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void InitializeSerialPort()
{
serialPort = new SerialPort();
serialPort.BaudRate = 57600; // 波特率
serialPort.DataBits = 8; // 数据位
serialPort.StopBits = StopBits.One; // 停止位
serialPort.Parity = Parity.None; // 奇偶校验
// 可选:添加数据接收事件处理
serialPort.DataReceived += SerialPort_DataReceived;
}
private void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
try
{
string newData = serialPort.ReadExisting();
receivedData += newData;
// 检查是否接收到完整的数据(以\r结尾
if (receivedData.Contains("\r"))
{
string[] messages = receivedData.Split('\r');
for (int i = 0; i < messages.Length - 1; i++)
{
if (!string.IsNullOrEmpty(messages[i]))
{
ProcessTemperatureData(messages[i]);
}
}
// 保留最后一部分未完整的数据
receivedData = messages[messages.Length - 1];
}
}
catch (Exception ex)
{
Console.WriteLine($"处理串口接收数据时发生错误: {ex.Message}");
}
}
private void ProcessTemperatureData(string data)
{
try
{
// 匹配温度数据格式: TC1:TCACTUALTEMP=25.94@0
if (data.StartsWith("TC1:TCACTUALTEMP="))
{
// 解析地址和温度值
string[] parts = data.Split('@');
if (parts.Length == 2)
{
string temperaturePart = parts[0];
string addressPart = parts[1];
// 提取温度值
string[] tempParts = temperaturePart.Split('=');
if (tempParts.Length == 2)
{
string temperatureValue = tempParts[1];
int address = int.Parse(addressPart);
// 更新对应标签的温度显示
UpdateTemperatureLabel(address, temperatureValue);
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"解析温度数据时发生错误: {ex.Message}");
}
}
private void UpdateTemperatureLabel(int address, string temperature)
{
if (address >= 0 && address < temperatureLabels.Length)
{
// 使用Invoke确保在UI线程中更新界面
if (temperatureLabels[address].InvokeRequired)
{
temperatureLabels[address].Invoke(new Action(() =>
{
temperatureLabels[address].Text = $"{temperature}°C";
}));
}
else
{
temperatureLabels[address].Text = $"{temperature}°C";
}
}
}
private void InitializeTemperatureTimer()
{
temperatureTimer = new System.Windows.Forms.Timer();
temperatureTimer.Interval = 1000; // 1秒间隔
temperatureTimer.Tick += TemperatureTimer_Tick;
}
private void TemperatureTimer_Tick(object sender, EventArgs e)
{
if (serialPort != null && serialPort.IsOpen)
{
try
{
// 发送当前索引对应的温度查询命令
serialPort.Write(temperatureCommands[currentCommandIndex]);
// 更新索引,循环发送四个命令
currentCommandIndex = (currentCommandIndex + 1) % temperatureCommands.Length;
}
catch (Exception ex)
{
// 可以记录日志或显示错误信息
Console.WriteLine($"发送温度查询命令时发生错误: {ex.Message}");
}
}
}
private void UpdateUIStatus(bool isPortOpen, Button button, ComboBox comboBox)
{
if (isPortOpen)
{
button.Text = "关闭串口";
comboBox.Enabled = false; // 串口打开时禁用选择框
}
else
{
button.Text = "打开串口";
comboBox.Enabled = true; // 串口关闭时启用选择框
}
}
}
}