#0014:修复 etalon 接口,连续运动超过队列,更换了另一种方式

This commit is contained in:
zhengxuan.zhang
2024-09-20 17:06:36 +08:00
parent 8093dcd4a4
commit 9133577da0
15 changed files with 2378 additions and 1972 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ namespace HexcalMC.Base
SetColor = m_Color;
}
string strText = DateTime.Now.ToString("HH:mm:ss.ff") + "--" + str + Environment.NewLine;
string strText = DateTime.Now.ToString("HH:mm:ss.fff") + "--" + str + Environment.NewLine;
textBox_Msg.SelectionStart = textBox_Msg.TextLength;
if (string.IsNullOrEmpty(str))
SetText(textBox_Msg, str, SetColor, false, 16);
+40 -12
View File
@@ -140,6 +140,8 @@
this.btnEnable = new System.Windows.Forms.Button();
this.btnDisable = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.rdoTCP = new System.Windows.Forms.RadioButton();
this.rdoSimu = new System.Windows.Forms.RadioButton();
this.lamp_acs = new HexcalMC.Lamp();
this.txtPort = new System.Windows.Forms.TextBox();
this.txtIP = new System.Windows.Forms.TextBox();
@@ -855,9 +857,9 @@
this.grpSafety.Controls.Add(this.label20);
this.grpSafety.Controls.Add(this.label19);
this.grpSafety.Controls.Add(this.label17);
this.grpSafety.Location = new System.Drawing.Point(516, 15);
this.grpSafety.Location = new System.Drawing.Point(569, 15);
this.grpSafety.Name = "grpSafety";
this.grpSafety.Size = new System.Drawing.Size(199, 133);
this.grpSafety.Size = new System.Drawing.Size(146, 133);
this.grpSafety.TabIndex = 12;
this.grpSafety.TabStop = false;
this.grpSafety.Text = "安全限位";
@@ -1009,7 +1011,7 @@
this.grpMst.Controls.Add(this.lblAcc0);
this.grpMst.Controls.Add(this.lblMoving0);
this.grpMst.Controls.Add(this.label13);
this.grpMst.Location = new System.Drawing.Point(332, 15);
this.grpMst.Location = new System.Drawing.Point(381, 15);
this.grpMst.Name = "grpMst";
this.grpMst.Size = new System.Drawing.Size(178, 133);
this.grpMst.TabIndex = 11;
@@ -1188,7 +1190,7 @@
//
this.groupBox6.Controls.Add(this.btnEnable);
this.groupBox6.Controls.Add(this.btnDisable);
this.groupBox6.Location = new System.Drawing.Point(233, 15);
this.groupBox6.Location = new System.Drawing.Point(283, 15);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(93, 133);
this.groupBox6.TabIndex = 10;
@@ -1217,6 +1219,8 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.rdoTCP);
this.groupBox2.Controls.Add(this.rdoSimu);
this.groupBox2.Controls.Add(this.lamp_acs);
this.groupBox2.Controls.Add(this.txtPort);
this.groupBox2.Controls.Add(this.txtIP);
@@ -1226,15 +1230,37 @@
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Location = new System.Drawing.Point(14, 15);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(209, 133);
this.groupBox2.Size = new System.Drawing.Size(263, 133);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "通讯状态";
//
// rdoTCP
//
this.rdoTCP.AutoSize = true;
this.rdoTCP.Checked = true;
this.rdoTCP.Location = new System.Drawing.Point(6, 25);
this.rdoTCP.Name = "rdoTCP";
this.rdoTCP.Size = new System.Drawing.Size(43, 17);
this.rdoTCP.TabIndex = 32;
this.rdoTCP.TabStop = true;
this.rdoTCP.Text = "TCP";
this.rdoTCP.UseVisualStyleBackColor = true;
//
// rdoSimu
//
this.rdoSimu.AutoSize = true;
this.rdoSimu.Location = new System.Drawing.Point(6, 48);
this.rdoSimu.Name = "rdoSimu";
this.rdoSimu.Size = new System.Drawing.Size(64, 17);
this.rdoSimu.TabIndex = 31;
this.rdoSimu.Text = "模拟器";
this.rdoSimu.UseVisualStyleBackColor = true;
//
// lamp_acs
//
this.lamp_acs.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
this.lamp_acs.Location = new System.Drawing.Point(57, 50);
this.lamp_acs.Location = new System.Drawing.Point(120, 42);
this.lamp_acs.LText = "";
this.lamp_acs.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.lamp_acs.Name = "lamp_acs";
@@ -1245,7 +1271,7 @@
//
// txtPort
//
this.txtPort.Location = new System.Drawing.Point(103, 52);
this.txtPort.Location = new System.Drawing.Point(166, 44);
this.txtPort.Name = "txtPort";
this.txtPort.Size = new System.Drawing.Size(91, 21);
this.txtPort.TabIndex = 21;
@@ -1253,7 +1279,7 @@
//
// txtIP
//
this.txtIP.Location = new System.Drawing.Point(103, 29);
this.txtIP.Location = new System.Drawing.Point(166, 21);
this.txtIP.Name = "txtIP";
this.txtIP.Size = new System.Drawing.Size(91, 21);
this.txtIP.TabIndex = 22;
@@ -1261,7 +1287,7 @@
//
// btn_ACSStop
//
this.btn_ACSStop.Location = new System.Drawing.Point(113, 84);
this.btn_ACSStop.Location = new System.Drawing.Point(176, 76);
this.btn_ACSStop.Name = "btn_ACSStop";
this.btn_ACSStop.Size = new System.Drawing.Size(81, 30);
this.btn_ACSStop.TabIndex = 20;
@@ -1271,7 +1297,7 @@
//
// btn_ACSStart
//
this.btn_ACSStart.Location = new System.Drawing.Point(18, 84);
this.btn_ACSStart.Location = new System.Drawing.Point(81, 76);
this.btn_ACSStart.Name = "btn_ACSStart";
this.btn_ACSStart.Size = new System.Drawing.Size(81, 30);
this.btn_ACSStart.TabIndex = 19;
@@ -1282,7 +1308,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 56);
this.label2.Location = new System.Drawing.Point(81, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(33, 13);
this.label2.TabIndex = 17;
@@ -1291,7 +1317,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 33);
this.label1.Location = new System.Drawing.Point(81, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 13);
this.label1.TabIndex = 18;
@@ -1497,5 +1523,7 @@
private Telerik.WinControls.UI.RadButtonElement rtb_home;
private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup9;
private Telerik.WinControls.UI.RadButtonElement rtb_etalon;
private System.Windows.Forms.RadioButton rdoTCP;
private System.Windows.Forms.RadioButton rdoSimu;
}
}
+1587 -1386
View File
File diff suppressed because it is too large Load Diff
+15 -7
View File
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EtalonForm));
this.btn_draw_test = new System.Windows.Forms.Button();
this.checkMirrorY = new System.Windows.Forms.CheckBox();
@@ -47,8 +48,9 @@
this.btn_startmove = new System.Windows.Forms.Button();
this.btn_stop = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.text_etalon_info = new System.Windows.Forms.RichTextBox();
this.label1 = new System.Windows.Forms.Label();
this.timer_move = new System.Windows.Forms.Timer(this.components);
this.editor3D = new Plot3D.Editor3D();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -260,6 +262,14 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "etalon操作";
//
// text_etalon_info
//
this.text_etalon_info.Location = new System.Drawing.Point(6, 249);
this.text_etalon_info.Name = "text_etalon_info";
this.text_etalon_info.Size = new System.Drawing.Size(440, 361);
this.text_etalon_info.TabIndex = 50;
this.text_etalon_info.Text = "";
//
// label1
//
this.label1.AutoSize = true;
@@ -269,13 +279,10 @@
this.label1.TabIndex = 49;
this.label1.Text = "输出";
//
// text_etalon_info
// timer_move
//
this.text_etalon_info.Location = new System.Drawing.Point(6, 249);
this.text_etalon_info.Name = "text_etalon_info";
this.text_etalon_info.Size = new System.Drawing.Size(440, 361);
this.text_etalon_info.TabIndex = 50;
this.text_etalon_info.Text = "";
this.timer_move.Interval = 500;
this.timer_move.Tick += new System.EventHandler(this.timer_move_Tick);
//
// editor3D
//
@@ -335,5 +342,6 @@
private System.Windows.Forms.Button btn_clear;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RichTextBox text_etalon_info;
private System.Windows.Forms.Timer timer_move;
}
}
File diff suppressed because it is too large Load Diff
+3
View File
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer_move.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 4</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
+35 -8
View File
@@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Motion));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtPort = new System.Windows.Forms.TextBox();
@@ -37,7 +36,7 @@
this.btnOpen = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tmrMonitor = new System.Windows.Forms.Timer(this.components);
this.tmrMonitor = new System.Windows.Forms.Timer();
this.grpMotionTest = new System.Windows.Forms.GroupBox();
this.btnHallAll = new System.Windows.Forms.Button();
this.btnHalt = new System.Windows.Forms.Button();
@@ -200,6 +199,8 @@
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.btn_home = new System.Windows.Forms.Button();
this.rdoSimu = new System.Windows.Forms.RadioButton();
this.rdoTCP = new System.Windows.Forms.RadioButton();
this.groupBox1.SuspendLayout();
this.grpMotionTest.SuspendLayout();
this.grpMst.SuspendLayout();
@@ -221,6 +222,8 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.rdoTCP);
this.groupBox1.Controls.Add(this.rdoSimu);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.txtIP);
this.groupBox1.Controls.Add(this.btnClose);
@@ -236,7 +239,7 @@
//
// txtPort
//
this.txtPort.Location = new System.Drawing.Point(103, 37);
this.txtPort.Location = new System.Drawing.Point(171, 37);
this.txtPort.Name = "txtPort";
this.txtPort.Size = new System.Drawing.Size(91, 21);
this.txtPort.TabIndex = 15;
@@ -244,7 +247,7 @@
//
// txtIP
//
this.txtIP.Location = new System.Drawing.Point(103, 14);
this.txtIP.Location = new System.Drawing.Point(171, 14);
this.txtIP.Name = "txtIP";
this.txtIP.Size = new System.Drawing.Size(91, 21);
this.txtIP.TabIndex = 16;
@@ -252,7 +255,7 @@
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(113, 62);
this.btnClose.Location = new System.Drawing.Point(181, 62);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(81, 23);
this.btnClose.TabIndex = 14;
@@ -262,7 +265,7 @@
//
// btnOpen
//
this.btnOpen.Location = new System.Drawing.Point(7, 62);
this.btnOpen.Location = new System.Drawing.Point(75, 62);
this.btnOpen.Name = "btnOpen";
this.btnOpen.Size = new System.Drawing.Size(81, 23);
this.btnOpen.TabIndex = 13;
@@ -273,7 +276,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(15, 41);
this.label2.Location = new System.Drawing.Point(83, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 11;
@@ -282,7 +285,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 18);
this.label1.Location = new System.Drawing.Point(83, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 12);
this.label1.TabIndex = 12;
@@ -1964,6 +1967,28 @@
this.btn_home.UseVisualStyleBackColor = true;
this.btn_home.Click += new System.EventHandler(this.btn_home_Click);
//
// rdoSimu
//
this.rdoSimu.AutoSize = true;
this.rdoSimu.Location = new System.Drawing.Point(6, 40);
this.rdoSimu.Name = "rdoSimu";
this.rdoSimu.Size = new System.Drawing.Size(59, 16);
this.rdoSimu.TabIndex = 10;
this.rdoSimu.TabStop = true;
this.rdoSimu.Text = "模拟器";
this.rdoSimu.UseVisualStyleBackColor = true;
//
// rdoTCP
//
this.rdoTCP.AutoSize = true;
this.rdoTCP.Location = new System.Drawing.Point(6, 17);
this.rdoTCP.Name = "rdoTCP";
this.rdoTCP.Size = new System.Drawing.Size(41, 16);
this.rdoTCP.TabIndex = 17;
this.rdoTCP.TabStop = true;
this.rdoTCP.Text = "TCP";
this.rdoTCP.UseVisualStyleBackColor = true;
//
// Motion
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -2188,6 +2213,8 @@
private System.Windows.Forms.Button btn_Z_Down;
private System.Windows.Forms.Button btn_Z_Up;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.RadioButton rdoSimu;
private System.Windows.Forms.RadioButton rdoTCP;
}
}
+1 -7
View File
@@ -292,13 +292,7 @@ namespace HexcalMC
{
DebugDfn.AddLogText("运动平台已连接");
}
else
{
// TCP/IP (Ethernet)
_acs.OpenCommEthernetTCP(
txtIP.Text, // IP Address (Default : 10.0.0.100)
Convert.ToInt32(txtPort.Text.Trim())); // TCP/IP Port nubmer (default : 701)
}
InitMotion();
_mBConnected = true;
+12 -9
View File
@@ -7,14 +7,17 @@ ENABLE_ACS=1
Port = 1234
;运动速度
MOTION_SPEED=60.0
;最大行程极限
X_MAXSTROKESW = 795
Y_MAXSTROKESW = 995
Z_MAXSTROKESW = 20
MOTION_SPEEDXY=100
MOTION_SPEEDZ=30
;最小行程极限
X_MINSTROKESW = -5
Y_MINSTROKESW = -5
Z_MINSTROKESW = -280
X_MINSTROKESW = 0
Y_MINSTROKESW = 0
Z_MINSTROKESW = -295
;最大行程极限
X_MAXSTROKESW = 800
Y_MAXSTROKESW = 980
Z_MAXSTROKESW = 0
+1 -1
View File
@@ -21,7 +21,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>3I+Sdzke39z2xPBTFN2cGyU/DYa1hH93nKjBGpXTzUw=</dsig:DigestValue>
<dsig:DigestValue>5BAu5mmkGH6UcqUDfkL6WCaAYDZ3v+HSBDiHWDwiFF0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Binary file not shown.
+2 -2
View File
@@ -55,14 +55,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="HexcalMC.exe" size="508928">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="HexcalMC.exe" size="512000">
<assemblyIdentity name="HexcalMC" version="0.0.3.0" language="neutral" processorArchitecture="amd64" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Pllh2aI7tVRTnfFfbvwT2qdIQZ30ZwrhlbF820ogi8o=</dsig:DigestValue>
<dsig:DigestValue>cGpoIhg/anGo/O6Lnll6V35Q+gP3ExIYb7ltMw03hpA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -5,7 +5,7 @@
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{19741897-37D8-43EE-94A2-637975035CEA}</ProjectGuid>
<ProjectGuid>{A9C5B87B-031B-4450-AB03-5D85EFFB0636}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ACS_DotNET_Library_Advanced_Demo</RootNamespace>