test_acs 프로젝트 변경

This commit is contained in:
backuppc
2026-02-05 13:18:20 +09:00
parent ec2af6ac1f
commit ba542beaff
26 changed files with 416 additions and 533 deletions

View File

@@ -15,7 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{530A
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "..\SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\..\AGVLogic\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NARUMI", "..\SubProject\AGV\NARUMI.csproj", "{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}"
EndProject

View File

@@ -29,7 +29,12 @@ namespace Test_ACS
this.rbAGV2 = new System.Windows.Forms.RadioButton();
this.rbAGV1 = new System.Windows.Forms.RadioButton();
this.grpCommands = new System.Windows.Forms.GroupBox();
this.button11 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();
this.btnLiftStop = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.btnLiftDown = new System.Windows.Forms.Button();
this.btnLiftUp = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
@@ -50,13 +55,13 @@ namespace Test_ACS
this.radForw = new System.Windows.Forms.RadioButton();
this.radBack = new System.Windows.Forms.RadioButton();
this.btAMove = new System.Windows.Forms.Button();
this.btnMarkStop = new System.Windows.Forms.Button();
this.grpManual = new System.Windows.Forms.GroupBox();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.btnMarkStop = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnGotoAlias = new System.Windows.Forms.Button();
@@ -66,11 +71,6 @@ namespace Test_ACS
this.lblAlias = new System.Windows.Forms.Label();
this.txtRFID = new System.Windows.Forms.NumericUpDown();
this.lblRFID = new System.Windows.Forms.Label();
this.grpLift = new System.Windows.Forms.GroupBox();
this.btnLiftStop = new System.Windows.Forms.Button();
this.btnLiftDown = new System.Windows.Forms.Button();
this.btnLiftUp = new System.Windows.Forms.Button();
this.lblDirection = new System.Windows.Forms.Label();
this.grpLogs = new System.Windows.Forms.GroupBox();
this.tabLogs = new System.Windows.Forms.TabControl();
this.tabRX = new System.Windows.Forms.TabPage();
@@ -84,22 +84,10 @@ namespace Test_ACS
this.tabPage1 = new System.Windows.Forms.TabPage();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.grpAGVStatus = new System.Windows.Forms.GroupBox();
this.lblLastTagValue = new System.Windows.Forms.Label();
this.lblLastTag = new System.Windows.Forms.Label();
this.lblLiftStValue = new System.Windows.Forms.Label();
this.lblLiftSt = new System.Windows.Forms.Label();
this.lblCartStValue = new System.Windows.Forms.Label();
this.lblCartSt = new System.Windows.Forms.Label();
this.lblChargeStValue = new System.Windows.Forms.Label();
this.lblChargeSt = new System.Windows.Forms.Label();
this.lblInpositionValue = new System.Windows.Forms.Label();
this.lblInposition = new System.Windows.Forms.Label();
this.lblDirectionValue = new System.Windows.Forms.Label();
this.lblRunStValue = new System.Windows.Forms.Label();
this.lblRunSt = new System.Windows.Forms.Label();
this.lblModeValue = new System.Windows.Forms.Label();
this.lblMode = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.rtStatus = new System.Windows.Forms.TextBox();
this.tbErCode = new System.Windows.Forms.TextBox();
this.tbErmsg = new System.Windows.Forms.TextBox();
this.grpConnection.SuspendLayout();
this.grpAGV.SuspendLayout();
this.grpCommands.SuspendLayout();
@@ -110,7 +98,6 @@ namespace Test_ACS
this.panel1.SuspendLayout();
this.grpManual.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtRFID)).BeginInit();
this.grpLift.SuspendLayout();
this.grpLogs.SuspendLayout();
this.tabLogs.SuspendLayout();
this.tabRX.SuspendLayout();
@@ -118,7 +105,7 @@ namespace Test_ACS
this.tabInfo.SuspendLayout();
this.tabPage1.SuspendLayout();
this.grpAGVStatus.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// grpConnection
@@ -231,7 +218,12 @@ namespace Test_ACS
//
// grpCommands
//
this.grpCommands.Controls.Add(this.button11);
this.grpCommands.Controls.Add(this.button12);
this.grpCommands.Controls.Add(this.btnLiftStop);
this.grpCommands.Controls.Add(this.button8);
this.grpCommands.Controls.Add(this.btnLiftDown);
this.grpCommands.Controls.Add(this.btnLiftUp);
this.grpCommands.Controls.Add(this.button10);
this.grpCommands.Controls.Add(this.button7);
this.grpCommands.Controls.Add(this.button9);
@@ -249,11 +241,41 @@ namespace Test_ACS
this.grpCommands.Controls.Add(this.lblRFID);
this.grpCommands.Location = new System.Drawing.Point(12, 98);
this.grpCommands.Name = "grpCommands";
this.grpCommands.Size = new System.Drawing.Size(433, 307);
this.grpCommands.Size = new System.Drawing.Size(535, 307);
this.grpCommands.TabIndex = 2;
this.grpCommands.TabStop = false;
this.grpCommands.Text = "ACS 명령";
//
// button11
//
this.button11.Location = new System.Drawing.Point(431, 198);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(100, 43);
this.button11.TabIndex = 18;
this.button11.Text = "전자석 OFF";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// button12
//
this.button12.Location = new System.Drawing.Point(431, 153);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(100, 43);
this.button12.TabIndex = 17;
this.button12.Text = "전자석 ON";
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// btnLiftStop
//
this.btnLiftStop.Location = new System.Drawing.Point(431, 108);
this.btnLiftStop.Name = "btnLiftStop";
this.btnLiftStop.Size = new System.Drawing.Size(100, 43);
this.btnLiftStop.TabIndex = 2;
this.btnLiftStop.Text = "리프트 정지";
this.btnLiftStop.UseVisualStyleBackColor = true;
this.btnLiftStop.Click += new System.EventHandler(this.btnLiftStop_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(102, 264);
@@ -264,6 +286,26 @@ namespace Test_ACS
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// btnLiftDown
//
this.btnLiftDown.Location = new System.Drawing.Point(431, 63);
this.btnLiftDown.Name = "btnLiftDown";
this.btnLiftDown.Size = new System.Drawing.Size(100, 43);
this.btnLiftDown.TabIndex = 1;
this.btnLiftDown.Text = "리프트 DN";
this.btnLiftDown.UseVisualStyleBackColor = true;
this.btnLiftDown.Click += new System.EventHandler(this.btnLiftDown_Click);
//
// btnLiftUp
//
this.btnLiftUp.Location = new System.Drawing.Point(431, 18);
this.btnLiftUp.Name = "btnLiftUp";
this.btnLiftUp.Size = new System.Drawing.Size(100, 43);
this.btnLiftUp.TabIndex = 0;
this.btnLiftUp.Text = "리프트 UP";
this.btnLiftUp.UseVisualStyleBackColor = true;
this.btnLiftUp.Click += new System.EventHandler(this.btnLiftUp_Click);
//
// button10
//
this.button10.Location = new System.Drawing.Point(102, 229);
@@ -310,6 +352,7 @@ namespace Test_ACS
// radSpdL
//
this.radSpdL.AutoSize = true;
this.radSpdL.Checked = true;
this.radSpdL.Location = new System.Drawing.Point(9, 20);
this.radSpdL.Name = "radSpdL";
this.radSpdL.Size = new System.Drawing.Size(30, 16);
@@ -326,7 +369,6 @@ namespace Test_ACS
this.radSpdM.Name = "radSpdM";
this.radSpdM.Size = new System.Drawing.Size(34, 16);
this.radSpdM.TabIndex = 7;
this.radSpdM.TabStop = true;
this.radSpdM.Tag = "1";
this.radSpdM.Text = "M";
this.radSpdM.UseVisualStyleBackColor = true;
@@ -338,7 +380,6 @@ namespace Test_ACS
this.radSpdH.Name = "radSpdH";
this.radSpdH.Size = new System.Drawing.Size(31, 16);
this.radSpdH.TabIndex = 7;
this.radSpdH.TabStop = true;
this.radSpdH.Tag = "2";
this.radSpdH.Text = "H";
this.radSpdH.UseVisualStyleBackColor = true;
@@ -417,13 +458,13 @@ namespace Test_ACS
this.radRight.Name = "radRight";
this.radRight.Size = new System.Drawing.Size(31, 16);
this.radRight.TabIndex = 1;
this.radRight.TabStop = true;
this.radRight.Text = "R";
this.radRight.UseVisualStyleBackColor = true;
//
// radLeft
//
this.radLeft.AutoSize = true;
this.radLeft.Checked = true;
this.radLeft.Location = new System.Drawing.Point(51, 9);
this.radLeft.Name = "radLeft";
this.radLeft.Size = new System.Drawing.Size(30, 16);
@@ -439,7 +480,6 @@ namespace Test_ACS
this.radStraight.Name = "radStraight";
this.radStraight.Size = new System.Drawing.Size(31, 16);
this.radStraight.TabIndex = 0;
this.radStraight.TabStop = true;
this.radStraight.Text = "S";
this.radStraight.UseVisualStyleBackColor = true;
//
@@ -459,13 +499,13 @@ namespace Test_ACS
this.radForw.Name = "radForw";
this.radForw.Size = new System.Drawing.Size(30, 16);
this.radForw.TabIndex = 0;
this.radForw.TabStop = true;
this.radForw.Text = "F";
this.radForw.UseVisualStyleBackColor = true;
//
// radBack
//
this.radBack.AutoSize = true;
this.radBack.Checked = true;
this.radBack.Location = new System.Drawing.Point(12, 9);
this.radBack.Name = "radBack";
this.radBack.Size = new System.Drawing.Size(31, 16);
@@ -484,6 +524,16 @@ namespace Test_ACS
this.btAMove.UseVisualStyleBackColor = true;
this.btAMove.Click += new System.EventHandler(this.btAMove_Click);
//
// btnMarkStop
//
this.btnMarkStop.Location = new System.Drawing.Point(10, 137);
this.btnMarkStop.Name = "btnMarkStop";
this.btnMarkStop.Size = new System.Drawing.Size(139, 40);
this.btnMarkStop.TabIndex = 6;
this.btnMarkStop.Text = "마크 정지";
this.btnMarkStop.UseVisualStyleBackColor = true;
this.btnMarkStop.Click += new System.EventHandler(this.btnMarkStop_Click);
//
// grpManual
//
this.grpManual.Controls.Add(this.button5);
@@ -553,16 +603,6 @@ namespace Test_ACS
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.btnManual_Click);
//
// btnMarkStop
//
this.btnMarkStop.Location = new System.Drawing.Point(10, 137);
this.btnMarkStop.Name = "btnMarkStop";
this.btnMarkStop.Size = new System.Drawing.Size(139, 40);
this.btnMarkStop.TabIndex = 6;
this.btnMarkStop.Text = "마크 정지";
this.btnMarkStop.UseVisualStyleBackColor = true;
this.btnMarkStop.Click += new System.EventHandler(this.btnMarkStop_Click);
//
// btnReset
//
this.btnReset.Location = new System.Drawing.Point(193, 81);
@@ -662,62 +702,10 @@ namespace Test_ACS
this.lblRFID.TabIndex = 0;
this.lblRFID.Text = "RFID 번호:";
//
// grpLift
//
this.grpLift.Controls.Add(this.tableLayoutPanel2);
this.grpLift.Location = new System.Drawing.Point(12, 535);
this.grpLift.Name = "grpLift";
this.grpLift.Size = new System.Drawing.Size(433, 79);
this.grpLift.TabIndex = 9;
this.grpLift.TabStop = false;
this.grpLift.Text = "리프트 제어";
//
// btnLiftStop
//
this.btnLiftStop.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftStop.Location = new System.Drawing.Point(287, 3);
this.btnLiftStop.Name = "btnLiftStop";
this.btnLiftStop.Size = new System.Drawing.Size(137, 53);
this.btnLiftStop.TabIndex = 2;
this.btnLiftStop.Text = "정지";
this.btnLiftStop.UseVisualStyleBackColor = true;
this.btnLiftStop.Click += new System.EventHandler(this.btnLiftStop_Click);
//
// btnLiftDown
//
this.btnLiftDown.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftDown.Location = new System.Drawing.Point(145, 3);
this.btnLiftDown.Name = "btnLiftDown";
this.btnLiftDown.Size = new System.Drawing.Size(136, 53);
this.btnLiftDown.TabIndex = 1;
this.btnLiftDown.Text = "하강";
this.btnLiftDown.UseVisualStyleBackColor = true;
this.btnLiftDown.Click += new System.EventHandler(this.btnLiftDown_Click);
//
// btnLiftUp
//
this.btnLiftUp.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftUp.Location = new System.Drawing.Point(3, 3);
this.btnLiftUp.Name = "btnLiftUp";
this.btnLiftUp.Size = new System.Drawing.Size(136, 53);
this.btnLiftUp.TabIndex = 0;
this.btnLiftUp.Text = "상승";
this.btnLiftUp.UseVisualStyleBackColor = true;
this.btnLiftUp.Click += new System.EventHandler(this.btnLiftUp_Click);
//
// lblDirection
//
this.lblDirection.AutoSize = true;
this.lblDirection.Location = new System.Drawing.Point(10, 48);
this.lblDirection.Name = "lblDirection";
this.lblDirection.Size = new System.Drawing.Size(33, 12);
this.lblDirection.TabIndex = 4;
this.lblDirection.Text = "방향:";
//
// grpLogs
//
this.grpLogs.Controls.Add(this.tabLogs);
this.grpLogs.Location = new System.Drawing.Point(451, 12);
this.grpLogs.Location = new System.Drawing.Point(553, 12);
this.grpLogs.Name = "grpLogs";
this.grpLogs.Size = new System.Drawing.Size(520, 602);
this.grpLogs.TabIndex = 3;
@@ -816,7 +804,7 @@ namespace Test_ACS
this.tabInfo.Controls.Add(this.txtInfoLog);
this.tabInfo.Location = new System.Drawing.Point(4, 22);
this.tabInfo.Name = "tabInfo";
this.tabInfo.Size = new System.Drawing.Size(506, 518);
this.tabInfo.Size = new System.Drawing.Size(506, 556);
this.tabInfo.TabIndex = 2;
this.tabInfo.Text = "정보";
this.tabInfo.UseVisualStyleBackColor = true;
@@ -830,7 +818,7 @@ namespace Test_ACS
this.txtInfoLog.Name = "txtInfoLog";
this.txtInfoLog.ReadOnly = true;
this.txtInfoLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtInfoLog.Size = new System.Drawing.Size(506, 518);
this.txtInfoLog.Size = new System.Drawing.Size(506, 556);
this.txtInfoLog.TabIndex = 0;
//
// tabPage1
@@ -838,7 +826,7 @@ namespace Test_ACS
this.tabPage1.Controls.Add(this.richTextBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(506, 518);
this.tabPage1.Size = new System.Drawing.Size(506, 556);
this.tabPage1.TabIndex = 3;
this.tabPage1.Text = "프레임구조";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -851,201 +839,63 @@ namespace Test_ACS
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Margin = new System.Windows.Forms.Padding(10);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(506, 518);
this.richTextBox1.Size = new System.Drawing.Size(506, 556);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
//
// grpAGVStatus
//
this.grpAGVStatus.Controls.Add(this.lblLastTagValue);
this.grpAGVStatus.Controls.Add(this.lblLastTag);
this.grpAGVStatus.Controls.Add(this.lblLiftStValue);
this.grpAGVStatus.Controls.Add(this.lblLiftSt);
this.grpAGVStatus.Controls.Add(this.lblCartStValue);
this.grpAGVStatus.Controls.Add(this.lblCartSt);
this.grpAGVStatus.Controls.Add(this.lblChargeStValue);
this.grpAGVStatus.Controls.Add(this.lblChargeSt);
this.grpAGVStatus.Controls.Add(this.lblInpositionValue);
this.grpAGVStatus.Controls.Add(this.lblInposition);
this.grpAGVStatus.Controls.Add(this.lblDirectionValue);
this.grpAGVStatus.Controls.Add(this.lblDirection);
this.grpAGVStatus.Controls.Add(this.lblRunStValue);
this.grpAGVStatus.Controls.Add(this.lblRunSt);
this.grpAGVStatus.Controls.Add(this.lblModeValue);
this.grpAGVStatus.Controls.Add(this.lblMode);
this.grpAGVStatus.Controls.Add(this.rtStatus);
this.grpAGVStatus.Location = new System.Drawing.Point(12, 409);
this.grpAGVStatus.Name = "grpAGVStatus";
this.grpAGVStatus.Size = new System.Drawing.Size(433, 120);
this.grpAGVStatus.Size = new System.Drawing.Size(535, 120);
this.grpAGVStatus.TabIndex = 4;
this.grpAGVStatus.TabStop = false;
this.grpAGVStatus.Text = "AGV 상태";
//
// lblLastTagValue
// groupBox3
//
this.lblLastTagValue.AutoSize = true;
this.lblLastTagValue.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold);
this.lblLastTagValue.Location = new System.Drawing.Point(221, 98);
this.lblLastTagValue.Name = "lblLastTagValue";
this.lblLastTagValue.Size = new System.Drawing.Size(14, 14);
this.lblLastTagValue.TabIndex = 15;
this.lblLastTagValue.Text = "-";
this.groupBox3.Controls.Add(this.tbErCode);
this.groupBox3.Controls.Add(this.tbErmsg);
this.groupBox3.Location = new System.Drawing.Point(12, 535);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(535, 79);
this.groupBox3.TabIndex = 16;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Error 상태";
//
// lblLastTag
// rtStatus
//
this.lblLastTag.AutoSize = true;
this.lblLastTag.Location = new System.Drawing.Point(151, 98);
this.lblLastTag.Name = "lblLastTag";
this.lblLastTag.Size = new System.Drawing.Size(57, 12);
this.lblLastTag.TabIndex = 14;
this.lblLastTag.Text = "현재태그:";
this.rtStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtStatus.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtStatus.Location = new System.Drawing.Point(3, 17);
this.rtStatus.Multiline = true;
this.rtStatus.Name = "rtStatus";
this.rtStatus.ReadOnly = true;
this.rtStatus.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.rtStatus.Size = new System.Drawing.Size(529, 100);
this.rtStatus.TabIndex = 1;
//
// lblLiftStValue
// tbErCode
//
this.lblLiftStValue.AutoSize = true;
this.lblLiftStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblLiftStValue.Location = new System.Drawing.Point(80, 98);
this.lblLiftStValue.Name = "lblLiftStValue";
this.lblLiftStValue.Size = new System.Drawing.Size(12, 12);
this.lblLiftStValue.TabIndex = 13;
this.lblLiftStValue.Text = "-";
this.tbErCode.Location = new System.Drawing.Point(6, 20);
this.tbErCode.Name = "tbErCode";
this.tbErCode.Size = new System.Drawing.Size(523, 21);
this.tbErCode.TabIndex = 3;
//
// lblLiftSt
// tbErmsg
//
this.lblLiftSt.AutoSize = true;
this.lblLiftSt.Location = new System.Drawing.Point(10, 98);
this.lblLiftSt.Name = "lblLiftSt";
this.lblLiftSt.Size = new System.Drawing.Size(45, 12);
this.lblLiftSt.TabIndex = 12;
this.lblLiftSt.Text = "리프트:";
//
// lblCartStValue
//
this.lblCartStValue.AutoSize = true;
this.lblCartStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblCartStValue.Location = new System.Drawing.Point(221, 73);
this.lblCartStValue.Name = "lblCartStValue";
this.lblCartStValue.Size = new System.Drawing.Size(12, 12);
this.lblCartStValue.TabIndex = 11;
this.lblCartStValue.Text = "-";
//
// lblCartSt
//
this.lblCartSt.AutoSize = true;
this.lblCartSt.Location = new System.Drawing.Point(151, 73);
this.lblCartSt.Name = "lblCartSt";
this.lblCartSt.Size = new System.Drawing.Size(33, 12);
this.lblCartSt.TabIndex = 10;
this.lblCartSt.Text = "카트:";
//
// lblChargeStValue
//
this.lblChargeStValue.AutoSize = true;
this.lblChargeStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblChargeStValue.Location = new System.Drawing.Point(80, 73);
this.lblChargeStValue.Name = "lblChargeStValue";
this.lblChargeStValue.Size = new System.Drawing.Size(12, 12);
this.lblChargeStValue.TabIndex = 9;
this.lblChargeStValue.Text = "-";
//
// lblChargeSt
//
this.lblChargeSt.AutoSize = true;
this.lblChargeSt.Location = new System.Drawing.Point(10, 73);
this.lblChargeSt.Name = "lblChargeSt";
this.lblChargeSt.Size = new System.Drawing.Size(33, 12);
this.lblChargeSt.TabIndex = 8;
this.lblChargeSt.Text = "충전:";
//
// lblInpositionValue
//
this.lblInpositionValue.AutoSize = true;
this.lblInpositionValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblInpositionValue.Location = new System.Drawing.Point(221, 48);
this.lblInpositionValue.Name = "lblInpositionValue";
this.lblInpositionValue.Size = new System.Drawing.Size(12, 12);
this.lblInpositionValue.TabIndex = 7;
this.lblInpositionValue.Text = "-";
//
// lblInposition
//
this.lblInposition.AutoSize = true;
this.lblInposition.Location = new System.Drawing.Point(151, 48);
this.lblInposition.Name = "lblInposition";
this.lblInposition.Size = new System.Drawing.Size(57, 12);
this.lblInposition.TabIndex = 6;
this.lblInposition.Text = "도달완료:";
//
// lblDirectionValue
//
this.lblDirectionValue.AutoSize = true;
this.lblDirectionValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblDirectionValue.Location = new System.Drawing.Point(80, 48);
this.lblDirectionValue.Name = "lblDirectionValue";
this.lblDirectionValue.Size = new System.Drawing.Size(12, 12);
this.lblDirectionValue.TabIndex = 5;
this.lblDirectionValue.Text = "-";
//
// lblRunStValue
//
this.lblRunStValue.AutoSize = true;
this.lblRunStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblRunStValue.Location = new System.Drawing.Point(221, 23);
this.lblRunStValue.Name = "lblRunStValue";
this.lblRunStValue.Size = new System.Drawing.Size(12, 12);
this.lblRunStValue.TabIndex = 3;
this.lblRunStValue.Text = "-";
//
// lblRunSt
//
this.lblRunSt.AutoSize = true;
this.lblRunSt.Location = new System.Drawing.Point(151, 23);
this.lblRunSt.Name = "lblRunSt";
this.lblRunSt.Size = new System.Drawing.Size(57, 12);
this.lblRunSt.TabIndex = 2;
this.lblRunSt.Text = "실행상태:";
//
// lblModeValue
//
this.lblModeValue.AutoSize = true;
this.lblModeValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblModeValue.Location = new System.Drawing.Point(80, 23);
this.lblModeValue.Name = "lblModeValue";
this.lblModeValue.Size = new System.Drawing.Size(12, 12);
this.lblModeValue.TabIndex = 1;
this.lblModeValue.Text = "-";
//
// lblMode
//
this.lblMode.AutoSize = true;
this.lblMode.Location = new System.Drawing.Point(10, 23);
this.lblMode.Name = "lblMode";
this.lblMode.Size = new System.Drawing.Size(33, 12);
this.lblMode.TabIndex = 0;
this.lblMode.Text = "모드:";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.Controls.Add(this.btnLiftStop, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.btnLiftUp, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.btnLiftDown, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(427, 59);
this.tableLayoutPanel2.TabIndex = 0;
this.tbErmsg.Location = new System.Drawing.Point(7, 47);
this.tbErmsg.Name = "tbErmsg";
this.tbErmsg.Size = new System.Drawing.Size(523, 21);
this.tbErmsg.TabIndex = 2;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(979, 621);
this.Controls.Add(this.grpLift);
this.ClientSize = new System.Drawing.Size(1083, 621);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.grpAGVStatus);
this.Controls.Add(this.grpLogs);
this.Controls.Add(this.grpCommands);
@@ -1073,7 +923,6 @@ namespace Test_ACS
this.panel1.PerformLayout();
this.grpManual.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtRFID)).EndInit();
this.grpLift.ResumeLayout(false);
this.grpLogs.ResumeLayout(false);
this.tabLogs.ResumeLayout(false);
this.tabRX.ResumeLayout(false);
@@ -1084,7 +933,8 @@ namespace Test_ACS
this.tabPage1.ResumeLayout(false);
this.grpAGVStatus.ResumeLayout(false);
this.grpAGVStatus.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
}
@@ -1109,7 +959,6 @@ namespace Test_ACS
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnMarkStop;
private System.Windows.Forms.GroupBox grpManual;
private System.Windows.Forms.GroupBox grpLift;
private System.Windows.Forms.Button btnLiftStop;
private System.Windows.Forms.Button btnLiftDown;
private System.Windows.Forms.Button btnLiftUp;
@@ -1125,22 +974,6 @@ namespace Test_ACS
private System.Windows.Forms.TextBox txtAlias;
private System.Windows.Forms.Label lblAlias;
private System.Windows.Forms.GroupBox grpAGVStatus;
private System.Windows.Forms.Label lblLastTagValue;
private System.Windows.Forms.Label lblLastTag;
private System.Windows.Forms.Label lblLiftStValue;
private System.Windows.Forms.Label lblLiftSt;
private System.Windows.Forms.Label lblCartStValue;
private System.Windows.Forms.Label lblCartSt;
private System.Windows.Forms.Label lblChargeStValue;
private System.Windows.Forms.Label lblChargeSt;
private System.Windows.Forms.Label lblInpositionValue;
private System.Windows.Forms.Label lblInposition;
private System.Windows.Forms.Label lblDirectionValue;
private System.Windows.Forms.Label lblDirection;
private System.Windows.Forms.Label lblRunStValue;
private System.Windows.Forms.Label lblRunSt;
private System.Windows.Forms.Label lblModeValue;
private System.Windows.Forms.Label lblMode;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
@@ -1172,6 +1005,11 @@ namespace Test_ACS
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.RadioButton radLidarOff;
private System.Windows.Forms.RadioButton radLidarOn;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox rtStatus;
private System.Windows.Forms.TextBox tbErCode;
private System.Windows.Forms.TextBox tbErmsg;
}
}

View File

@@ -55,16 +55,35 @@ namespace Test_ACS
// AGV 상태 수신 처리 (cmd = 3)
var device = e.ReceivedPacket.ID;
var command = (ENIGProtocol.AGVCommandEH)e.ReceivedPacket.Command;
var data = e.ReceivedPacket.Data;
switch (command)
{
case AGVCommandEH.Status:
UpdateAGVStatus(e.ReceivedPacket.Data);
_remoteStatus.Mode = data[0];
_remoteStatus.RunSt = data[1];
_remoteStatus.HWError = BitConverter.ToUInt16(data, 2);
_remoteStatus.RunStep = data[4];
_remoteStatus.RunStepSeq = data[5];
_remoteStatus.MotorDir = data[6];
_remoteStatus.MagnetDir = data[7];
_remoteStatus.ChargeSt = data[8];
_remoteStatus.CartSt = data[9];
_remoteStatus.LiftSt = data[10];
_remoteStatus.ErrorCode = data[11];
_remoteErrorCode = (ENIGProtocol.AGVErrorCode)data[11];
_remoteErrorMessage = ENIGProtocol.AGVUtility.GetAGVErrorMessage(_remoteErrorCode);
_remoteStatus.LastTag = Encoding.ASCII.GetString(data, 12, 4);
UpdateUIStatus();
break;
case AGVCommandEH.Error:
var errorcode = (AGVErrorCode)e.ReceivedPacket.Data[0];
var errorMessage = System.Text.Encoding.UTF8.GetString(e.ReceivedPacket.Data, 1, e.ReceivedPacket.Data.Length - 1);
AddLog($"Error Received : {errorcode} ID:{e.ReceivedPacket.ID} MSG:{errorMessage}", LogType.Info);
_remoteErrorCode = (ENIGProtocol.AGVErrorCode)data[0];
// _remoteErrorMessage = ... Error 메시지 자체는 패킷에 포함되지 않으므로 유틸리티 사용 가능
_remoteErrorMessage = ENIGProtocol.AGVUtility.GetAGVErrorMessage(_remoteErrorCode);
UpdateUIStatus();
AddLog($"Error Received : {_remoteErrorCode} ID:{e.ReceivedPacket.ID} MSG:{_remoteErrorMessage}", LogType.Info);
break;
default:
AddLog($"unknown command:{command}", LogType.Error);
@@ -305,20 +324,21 @@ namespace Test_ACS
private void btnLiftUp_Click(object sender, EventArgs e)
{
SendLiftCommand(1); // Up
SendLiftCommand( arDev.Narumi.LiftCommand.UP); // Up
}
private void btnLiftDown_Click(object sender, EventArgs e)
{
SendLiftCommand(2); // Down
SendLiftCommand( arDev.Narumi.LiftCommand.DN); // Down
}
private void btnLiftStop_Click(object sender, EventArgs e)
{
SendLiftCommand(0); // Stop
SendLiftCommand( arDev.Narumi.LiftCommand.STP); // Stop
}
private void SendLiftCommand(byte liftCmd)
private void SendLiftCommand(arDev.Narumi.LiftCommand liftCmd)
{
// LiftControl: data = TargetID(2 hex) + LiftCommand(1 byte)
var targetID = selectedAGV.ToString("X2");
@@ -372,124 +392,56 @@ namespace Test_ACS
AddLog($"전송 실패: {ex.Message}", LogType.Error);
}
}
private void UpdateAGVStatus(byte[] data)
public ENIGProtocol.AGVErrorCode _remoteErrorCode = ENIGProtocol.AGVErrorCode.None;
public string _remoteErrorMessage = "";
public RemoteStatus _remoteStatus = new RemoteStatus();
private void UpdateUIStatus()
{
if (data.Length < 12)
if (this.InvokeRequired)
{
AddLog($"AGV 상태 데이터 길이 오류: {data.Length} bytes", LogType.Error);
return;
}
if (InvokeRequired)
{
BeginInvoke(new Action(() => UpdateAGVStatus(data)));
this.BeginInvoke(new Action(UpdateUIStatus));
return;
}
try
{
// Mode[1]: 0=manual, 1=auto
lblModeValue.Text = data[0] == 0 ? "수동" : "자동";
lblModeValue.ForeColor = data[0] == 0 ? Color.Blue : Color.Green;
// RunSt[1]: 0=stop, 1=run, 2=error
switch (data[1])
rtStatus.Text = _remoteStatus.ToString();
string errCode = _remoteErrorCode.ToString();
string errMsg = _remoteErrorMessage;
if (_remoteStatus.HWError > 0)
{
case 0:
lblRunStValue.Text = "정지";
lblRunStValue.ForeColor = Color.Gray;
break;
case 1:
lblRunStValue.Text = "실행";
lblRunStValue.ForeColor = Color.Green;
break;
case 2:
lblRunStValue.Text = "에러";
lblRunStValue.ForeColor = Color.Red;
break;
default:
lblRunStValue.Text = "알 수 없음";
lblRunStValue.ForeColor = Color.Black;
break;
errCode = $"HW:{_remoteStatus.HWError:X4}" + (errCode == "None" ? "" : $" | {errCode}");
StringBuilder sbHw = new StringBuilder();
for (int i = 0; i < 16; i++)
{
if (((ushort)_remoteStatus.HWError & (1 << i)) != 0)
{
sbHw.Append($"{(arDev.Narumi.eflag)i}, ");
}
}
errMsg = $"[HW] {sbHw}" + (string.IsNullOrEmpty(errMsg) ? "" : $" | {errMsg}");
}
// Mot Direction[1]: 0=forward, 1:backward
switch (data[2])
tbErCode.Text = errCode;
tbErmsg.Text = errMsg;
if (_remoteErrorCode != ENIGProtocol.AGVErrorCode.None || _remoteStatus.HWError > 0)
{
case 0:
lblDirectionValue.Text = "전진";
break;
case 1:
lblDirectionValue.Text = "후진";
break;
default:
lblDirectionValue.Text = "??";
break;
tbErCode.BackColor = Color.Red;
tbErCode.ForeColor = Color.White;
}
else
{
tbErCode.BackColor = SystemColors.Window;
tbErCode.ForeColor = SystemColors.WindowText;
}
// Direction[1]: 0=straight, 1=left, 2=right, 3=markstop
switch (data[3])
{
case 0:
lblDirectionValue.Text += "/직진";
break;
case 1:
lblDirectionValue.Text += "/좌회전";
break;
case 2:
lblDirectionValue.Text += "/우회전";
break;
default:
lblDirectionValue.Text += "/??";
break;
}
// Inposition[1]: 0=off, 1=on
lblInpositionValue.Text = data[4] == 0 ? "OFF" : "ON";
lblInpositionValue.ForeColor = data[4] == 0 ? Color.Gray : Color.Green;
// ChargeSt[1]: 0=off, 1=on
lblChargeStValue.Text = data[5] == 0 ? "OFF" : "ON";
lblChargeStValue.ForeColor = data[5] == 0 ? Color.Gray : Color.Orange;
// CartSt[1]: 0=off, 1=on, 2=unknown
switch (data[6])
{
case 0:
lblCartStValue.Text = "없음";
lblCartStValue.ForeColor = Color.Gray;
break;
case 1:
lblCartStValue.Text = "있음";
lblCartStValue.ForeColor = Color.Green;
break;
default:
lblCartStValue.Text = "??";
lblCartStValue.ForeColor = Color.Red;
break;
}
// LiftSt[1]: 0=down, 1=up, 2=unknown
switch (data[7])
{
case 0:
lblLiftStValue.Text = "하강";
lblLiftStValue.ForeColor = Color.Blue;
break;
case 1:
lblLiftStValue.Text = "상승";
lblLiftStValue.ForeColor = Color.Green;
break;
default:
lblLiftStValue.Text = "??";
lblLiftStValue.ForeColor = Color.Red;
break;
}
string lastTag = Encoding.ASCII.GetString(data, 8, 4);
lblLastTagValue.Text = lastTag;
lblLastTagValue.ForeColor = Color.Black;
}
catch (Exception ex)
{
@@ -585,6 +537,8 @@ namespace Test_ACS
private void button7_Click(object sender, EventArgs e)
{
//lt180
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.LTurn180, targetID);
}
@@ -592,6 +546,8 @@ namespace Test_ACS
private void button8_Click(object sender, EventArgs e)
{
//rt180
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.RTurn180, targetID);
}
@@ -599,6 +555,8 @@ namespace Test_ACS
private void button9_Click(object sender, EventArgs e)
{
//l turn
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.LTurn, targetID);
}
@@ -606,8 +564,20 @@ namespace Test_ACS
private void button10_Click(object sender, EventArgs e)
{
///r-turn
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.RTurn, targetID);
}
private void button12_Click(object sender, EventArgs e)
{
SendLiftCommand(arDev.Narumi.LiftCommand.ON);
}
private void button11_Click(object sender, EventArgs e)
{
SendLiftCommand(arDev.Narumi.LiftCommand.OFF);
}
}
}

View File

@@ -0,0 +1,49 @@
using System.Text;
namespace Test_ACS
{
public partial class MainForm
{
public class RemoteStatus
{
public byte Mode { get; set; } // 0=manual, 1=auto
public byte RunSt { get; set; } // 0=stop, 1=run, 2=error
public byte RunStep { get; set; }
public byte RunStepSeq { get; set; }
public ushort HWError { get; set; }
public byte MotorDir { get; set; } // 0=F, 1=B
public byte MagnetDir { get; set; } // 0=S, 1=L, 2=R
public byte ChargeSt { get; set; } // 0=off, 1=on
public byte CartSt { get; set; } // 0=off, 1=on, 2=unknown
public byte LiftSt { get; set; } // 0=down, 1=up, 2=unknown
public byte ErrorCode { get; set; }
public string LastTag { get; set; }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"Mode: {(Mode == 1 ? "Auto" : "Manual")}");
sb.AppendLine($"RunSt: {(RunSt == 0 ? "Stop" : (RunSt == 1 ? "Run" : "Error"))}");
if (HWError > 0)
{
sb.Append(" [HW ERR: ");
for (int i = 0; i < 16; i++)
{
if ((HWError & (1 << i)) != 0)
{
sb.Append($"{(arDev.Narumi.eflag)i},");
}
}
sb.AppendLine("]");
}
sb.AppendLine($"Step: {RunStep}, Seq: {RunStepSeq}");
sb.AppendLine($"Dir: {(MotorDir == 1 ? "B" : "F")}, Mag: {(MagnetDir == 1 ? "L" : (MagnetDir == 2 ? "R" : "S"))}");
sb.AppendLine($"Charge: {(ChargeSt == 1 ? "ON" : "OFF")}");
sb.AppendLine($"Cart: {(CartSt == 1 ? "ON" : (CartSt == 0 ? "OFF" : "Unk"))}");
sb.AppendLine($"Lift: {(LiftSt == 1 ? "UP" : (LiftSt == 0 ? "DOWN" : "Unk"))}");
sb.Append($"Tag: {LastTag}");
return sb.ToString();
}
}
}
}

View File

@@ -69,6 +69,9 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="RemoteStatus.cs">
<SubType>Form</SubType>
</Compile>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
@@ -84,10 +87,14 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj">
<Project>{499d8912-4b96-41e5-a70d-cfe797883d65}</Project>
<ProjectReference Include="..\..\..\AGVLogic\EnigProtocol\enigprotocol\ENIGProtocol.csproj">
<Project>{9365803b-933d-4237-93c7-b502c855a71c}</Project>
<Name>ENIGProtocol</Name>
</ProjectReference>
<ProjectReference Include="..\..\SubProject\AGV\NARUMI.csproj">
<Project>{8bae0eac-3d25-402f-9a65-2ba1ecfe28b7}</Project>
<Name>NARUMI</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>