LB_SmartVision/Forms/Pages/CameraPage/CamerasEditPage.cs
@@ -1,4 +1,3 @@  using LB_VisionControl; using LB_VisionProcesses.Cameras; using OpenCvSharp.Flann; @@ -177,4 +176,4 @@ } } } } } LB_SmartVision/Forms/Pages/CameraPage/CreateCameraForm.cs
@@ -1,5 +1,6 @@ using LB_VisionProcesses.Cameras; using LB_VisionProcesses.Cameras.HRCameras; using LB_VisionProcesses.Cameras.LBCameras; using RJCP.IO.Ports; using System; using System.Collections.Concurrent; @@ -100,7 +101,7 @@ camera = new HRCamera(); break; case CameraBrand.LBCamera: //camera = new LBCamera(); camera = new LBCamera(); break; default: return; LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorForm.Designer.cs
@@ -28,33 +28,44 @@ /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CommunicatorForm)); label3 = new Label(); tableLayoutPanel1 = new TableLayoutPanel(); grpReceive = new GroupBox(); txtReceiveMsg = new TextBox(); txtSendMsg = new TextBox(); grpSetting = new GroupBox(); txtAddress = new TextBox(); cmbType = new ComboBox(); txtIP = new TextBox(); txtPort = new TextBox(); lblPort = new Label(); cmbIP = new ComboBox(); lblType = new Label(); lblAddress = new Label(); lblIP = new Label(); tableLayoutPanel2 = new TableLayoutPanel(); btnRuleSend = new Button(); btnSend = new Button(); themeForm_Communicator = new ReaLTaiizor.Forms.ThemeForm(); controlBox1 = new ReaLTaiizor.Controls.ControlBox(); panel_CommunicatorForm = new Panel(); tableLayoutPanel1.SuspendLayout(); grpReceive.SuspendLayout(); grpSetting.SuspendLayout(); tableLayoutPanel2.SuspendLayout(); themeForm_Communicator.SuspendLayout(); panel_CommunicatorForm.SuspendLayout(); SuspendLayout(); // // label3 // label3.AutoSize = true; label3.Dock = DockStyle.Fill; label3.ForeColor = Color.CornflowerBlue; label3.Location = new Point(3, 100); label3.Name = "label3"; label3.Size = new Size(669, 20); label3.Size = new Size(655, 20); label3.TabIndex = 18; label3.Text = "åéä¿¡æ¯"; label3.TextAlign = ContentAlignment.BottomLeft; @@ -69,7 +80,7 @@ tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 3); tableLayoutPanel1.Controls.Add(label3, 0, 1); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.Location = new Point(3, 64); tableLayoutPanel1.Location = new Point(0, 0); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 5; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 100F)); @@ -77,16 +88,17 @@ tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F)); tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.Size = new Size(675, 334); tableLayoutPanel1.Size = new Size(661, 322); tableLayoutPanel1.TabIndex = 26; // // grpReceive // grpReceive.Controls.Add(txtReceiveMsg); grpReceive.Dock = DockStyle.Fill; grpReceive.ForeColor = Color.CornflowerBlue; grpReceive.Location = new Point(3, 193); grpReceive.Name = "grpReceive"; grpReceive.Size = new Size(669, 138); grpReceive.Size = new Size(655, 126); grpReceive.TabIndex = 30; grpReceive.TabStop = false; grpReceive.Text = "é讯记å½"; @@ -94,12 +106,12 @@ // txtReceiveMsg // txtReceiveMsg.Dock = DockStyle.Fill; txtReceiveMsg.Location = new Point(3, 19); txtReceiveMsg.Location = new Point(3, 17); txtReceiveMsg.Multiline = true; txtReceiveMsg.Name = "txtReceiveMsg"; txtReceiveMsg.ReadOnly = true; txtReceiveMsg.ScrollBars = ScrollBars.Both; txtReceiveMsg.Size = new Size(663, 116); txtReceiveMsg.Size = new Size(649, 106); txtReceiveMsg.TabIndex = 0; // // txtSendMsg @@ -107,36 +119,59 @@ txtSendMsg.Dock = DockStyle.Fill; txtSendMsg.Location = new Point(3, 123); txtSendMsg.Name = "txtSendMsg"; txtSendMsg.Size = new Size(669, 23); txtSendMsg.Size = new Size(655, 21); txtSendMsg.TabIndex = 29; // // grpSetting // grpSetting.BackColor = Color.FromArgb(32, 41, 50); grpSetting.Controls.Add(txtAddress); grpSetting.Controls.Add(cmbType); grpSetting.Controls.Add(txtIP); grpSetting.Controls.Add(txtPort); grpSetting.Controls.Add(lblPort); grpSetting.Controls.Add(cmbIP); grpSetting.Controls.Add(lblType); grpSetting.Controls.Add(lblAddress); grpSetting.Controls.Add(lblIP); grpSetting.Dock = DockStyle.Fill; grpSetting.ForeColor = Color.CornflowerBlue; grpSetting.Location = new Point(3, 3); grpSetting.MinimumSize = new Size(261, 61); grpSetting.Name = "grpSetting"; grpSetting.Size = new Size(669, 94); grpSetting.Size = new Size(655, 94); grpSetting.TabIndex = 28; grpSetting.TabStop = false; grpSetting.Text = "é讯é ç½®"; // // txtAddress // txtAddress.Location = new Point(251, 60); txtAddress.Name = "txtAddress"; txtAddress.Size = new Size(100, 21); txtAddress.TabIndex = 9; // // cmbType // cmbType.DropDownStyle = ComboBoxStyle.DropDownList; cmbType.FormattingEnabled = true; cmbType.Location = new Point(251, 23); cmbType.Name = "cmbType"; cmbType.Size = new Size(100, 23); cmbType.TabIndex = 8; // // txtIP // txtIP.Location = new Point(79, 22); txtIP.Name = "txtIP"; txtIP.Size = new Size(100, 23); txtIP.Size = new Size(100, 21); txtIP.TabIndex = 7; // // txtPort // txtPort.Location = new Point(79, 60); txtPort.Name = "txtPort"; txtPort.Size = new Size(100, 23); txtPort.Size = new Size(100, 21); txtPort.TabIndex = 6; // // lblPort @@ -144,7 +179,7 @@ lblPort.AutoSize = true; lblPort.Location = new Point(13, 63); lblPort.Name = "lblPort"; lblPort.Size = new Size(32, 17); lblPort.Size = new Size(31, 15); lblPort.TabIndex = 4; lblPort.Text = "端å£"; // @@ -153,15 +188,33 @@ cmbIP.FormattingEnabled = true; cmbIP.Location = new Point(79, 21); cmbIP.Name = "cmbIP"; cmbIP.Size = new Size(100, 25); cmbIP.Size = new Size(100, 23); cmbIP.TabIndex = 1; // // lblType // lblType.AutoSize = true; lblType.Location = new Point(205, 26); lblType.Name = "lblType"; lblType.Size = new Size(31, 15); lblType.TabIndex = 0; lblType.Text = "åå·"; // // lblAddress // lblAddress.AutoSize = true; lblAddress.Location = new Point(205, 63); lblAddress.Name = "lblAddress"; lblAddress.Size = new Size(31, 15); lblAddress.TabIndex = 0; lblAddress.Text = "å°å"; // // lblIP // lblIP.AutoSize = true; lblIP.Location = new Point(13, 26); lblIP.Name = "lblIP"; lblIP.Size = new Size(32, 17); lblIP.Size = new Size(31, 15); lblIP.TabIndex = 0; lblIP.Text = "å°å"; // @@ -178,12 +231,13 @@ tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel2.Size = new Size(669, 34); tableLayoutPanel2.Size = new Size(655, 34); tableLayoutPanel2.TabIndex = 27; // // btnRuleSend // btnRuleSend.Dock = DockStyle.Fill; btnRuleSend.ForeColor = Color.CornflowerBlue; btnRuleSend.Location = new Point(83, 3); btnRuleSend.Name = "btnRuleSend"; btnRuleSend.Size = new Size(74, 28); @@ -195,6 +249,7 @@ // btnSend // btnSend.Dock = DockStyle.Fill; btnSend.ForeColor = Color.CornflowerBlue; btnSend.Location = new Point(3, 3); btnSend.Name = "btnSend"; btnSend.Size = new Size(74, 28); @@ -203,13 +258,63 @@ btnSend.UseVisualStyleBackColor = true; btnSend.Click += btnSend_Click; // // themeForm_Communicator // themeForm_Communicator.BackColor = Color.FromArgb(32, 41, 50); themeForm_Communicator.Controls.Add(controlBox1); themeForm_Communicator.Controls.Add(panel_CommunicatorForm); themeForm_Communicator.Dock = DockStyle.Fill; themeForm_Communicator.Font = new Font("Microsoft Sans Serif", 9F); themeForm_Communicator.Image = (Image)resources.GetObject("themeForm_Communicator.Image"); themeForm_Communicator.Location = new Point(0, 0); themeForm_Communicator.Name = "themeForm_Communicator"; themeForm_Communicator.Padding = new Padding(10, 70, 10, 9); themeForm_Communicator.RoundCorners = true; themeForm_Communicator.Sizable = true; themeForm_Communicator.Size = new Size(681, 401); themeForm_Communicator.SmartBounds = true; themeForm_Communicator.StartPosition = FormStartPosition.WindowsDefaultLocation; themeForm_Communicator.TabIndex = 27; themeForm_Communicator.Text = "é讯设置"; // // controlBox1 // controlBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right; controlBox1.BackColor = Color.FromArgb(32, 34, 37); controlBox1.CloseHoverColor = Color.FromArgb(230, 17, 35); controlBox1.DefaultLocation = true; controlBox1.EnableHoverHighlight = true; controlBox1.EnableMaximizeButton = true; controlBox1.EnableMinimizeButton = true; controlBox1.ForeColor = Color.FromArgb(155, 155, 155); controlBox1.Location = new Point(581, 18); controlBox1.MaximizeHoverColor = Color.FromArgb(74, 74, 74); controlBox1.MinimizeHoverColor = Color.FromArgb(63, 63, 65); controlBox1.Name = "controlBox1"; controlBox1.Size = new Size(90, 25); controlBox1.TabIndex = 28; controlBox1.Text = "controlBox1"; // // panel_CommunicatorForm // panel_CommunicatorForm.Controls.Add(tableLayoutPanel1); panel_CommunicatorForm.Dock = DockStyle.Fill; panel_CommunicatorForm.Location = new Point(10, 70); panel_CommunicatorForm.Name = "panel_CommunicatorForm"; panel_CommunicatorForm.Size = new Size(661, 322); panel_CommunicatorForm.TabIndex = 27; // // CommunicatorForm // AutoScaleDimensions = new SizeF(96F, 96F); AutoScaleMode = AutoScaleMode.Dpi; ClientSize = new Size(681, 401); Controls.Add(tableLayoutPanel1); Controls.Add(themeForm_Communicator); FormBorderStyle = FormBorderStyle.None; MinimumSize = new Size(261, 61); Name = "CommunicatorForm"; Text = "é讯设置"; TransparencyKey = Color.Fuchsia; FormClosing += CommunicatorForm_FormClosing; tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel1.PerformLayout(); @@ -218,6 +323,8 @@ grpSetting.ResumeLayout(false); grpSetting.PerformLayout(); tableLayoutPanel2.ResumeLayout(false); themeForm_Communicator.ResumeLayout(false); panel_CommunicatorForm.ResumeLayout(false); ResumeLayout(false); } @@ -236,5 +343,12 @@ private TextBox txtReceiveMsg; private Button btnSend; private Button btnRuleSend; private ReaLTaiizor.Forms.ThemeForm themeForm_Communicator; private ReaLTaiizor.Controls.ControlBox controlBox1; private Panel panel_CommunicatorForm; private Label lblType; private ComboBox cmbType; private Label lblAddress; private TextBox txtAddress; } } LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorForm.cs
@@ -1,4 +1,5 @@ using LB_VisionProcesses.Communicators; using LB_VisionProcesses.Communicators.SiemensS7; using LB_VisionProcesses.Communicators.TCom; using ReaLTaiizor.Forms; using RJCP.IO.Ports; @@ -6,13 +7,19 @@ namespace LB_SmartVision.Forms.Pages.CommunicatorPage { public partial class CommunicatorForm : MaterialForm public partial class CommunicatorForm : Form { BaseCommunicator communicator { get; set; } public CommunicatorForm() { InitializeComponent(); cmbType.Items.Clear(); if (communicator != null && !string.IsNullOrEmpty(communicator.CommunicatorConnections["åå·"]?.ToString())) { cmbType.Items.Add(communicator.CommunicatorConnections["åå·"]?.ToString()); } } public CommunicatorForm(BaseCommunicator communicator, string name) @@ -24,6 +31,14 @@ cmbIP.Enabled = false; txtIP.Enabled = false; txtPort.Enabled = false; lblType.Visible = false; lblAddress.Visible = false; cmbType.Visible = false; txtAddress.Visible = false; this.Text = name; if (communicator is UARTPort) @@ -39,28 +54,50 @@ txtIP.Visible = false; cmbIP.Visible = true; lblType.Visible = false; lblAddress.Visible = false; cmbType.Visible = false; txtAddress.Visible = false; lblIP.Text = "COMå£"; lblPort.Text = "æ³¢ç¹ç"; } else if (communicator is TCPClient || communicator is TCPServer) { txtIP.Text = communicator.CommunicatorConnections["å°å"]?.ToString(); txtPort.Text = communicator.CommunicatorConnections["端å£"]?.ToString(); txtPort.SelectedText = communicator.CommunicatorConnections["端å£"]?.ToString(); txtIP.Visible = true; cmbIP.Visible = false; lblType.Visible = false; lblAddress.Visible = false; cmbType.Visible = false; txtAddress.Visible = false; lblIP.Text = "å°å"; lblPort.Text = "端å£"; } else if (communicator is LocalMonitor) else if (communicator is SiemensLBS7) { txtIP.Text = communicator.CommunicatorConnections["å°å"]?.ToString(); txtPort.Text = communicator.CommunicatorConnections["端å£"]?.ToString(); cmbType.Items.Clear(); if (!string.IsNullOrEmpty(communicator.CommunicatorConnections["åå·"]?.ToString())) { cmbType.Items.Add(communicator.CommunicatorConnections["åå·"]?.ToString()); } cmbType.Text = communicator.CommunicatorConnections["åå·"]?.ToString(); txtIP.Visible = true; cmbIP.Visible = false; lblIP.Text = "çæ§æä»¶"; lblPort.Text = "åå ¥æä»¶"; lblType.Visible = true; lblAddress.Visible = true; cmbType.Visible = true; txtAddress.Visible = true; lblIP.Text = "IP"; lblPort.Text = "æ§½"; } this.communicator = communicator; LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorForm.resx
@@ -117,4 +117,28 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="themeForm_Communicator.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO vAAADrwBlbxySQAAA+JJREFUWEftVkuIHGUQbt34iMEoq2S2q3p3yTJsuqpnJ+L6WBRdwaigohfFgEou BkVBUPCBCEG8BXNQ48GLeImCehIJxMsqhsSZruod46K4HtSIGjU+4iOr0c1I9fSsM3/PLNtCPO0H36m/ evz/X11VnreKVRTAHPOZumkY6lFwqURws3BwZ8ywTQnuiCP/+iTCzY1qaUPzdm/Atf3PaHre6XPsjyQM 2xLGV4XwIyX4QRj+UMK/lPFvJTyhBMeV8IgQ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pwUX7sAAAAA SUVORK5CYII= </value> </data> </root> LB_SmartVision/Forms/Pages/CommunicatorPage/CreateCommunicatorForm.Designer.cs
@@ -28,6 +28,7 @@ /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreateCommunicatorForm)); uiLabelIP = new Label(); uiLabelPort = new Label(); uiButtonCancel = new Button(); @@ -40,14 +41,18 @@ uiComboBoxPort = new ComboBox(); uiIPTextBox = new TextBox(); uiTextBoxPath = new TextBox(); rButtonMonitor = new RadioButton(); rButtonS7 = new RadioButton(); themeForm1 = new ReaLTaiizor.Forms.ThemeForm(); uiLabelS7Type = new Label(); uiComboBoxS7Type = new ComboBox(); themeForm1.SuspendLayout(); SuspendLayout(); // // uiLabelIP // uiLabelIP.Font = new Font("å®ä½", 12F); uiLabelIP.ForeColor = Color.FromArgb(48, 48, 48); uiLabelIP.Location = new Point(84, 111); uiLabelIP.ForeColor = SystemColors.Control; uiLabelIP.Location = new Point(84, 169); uiLabelIP.Name = "uiLabelIP"; uiLabelIP.Size = new Size(100, 23); uiLabelIP.TabIndex = 1; @@ -56,8 +61,8 @@ // uiLabelPort // uiLabelPort.Font = new Font("å®ä½", 12F); uiLabelPort.ForeColor = Color.FromArgb(48, 48, 48); uiLabelPort.Location = new Point(84, 177); uiLabelPort.ForeColor = SystemColors.Control; uiLabelPort.Location = new Point(84, 235); uiLabelPort.Name = "uiLabelPort"; uiLabelPort.Size = new Size(100, 23); uiLabelPort.TabIndex = 2; @@ -66,7 +71,8 @@ // uiButtonCancel // uiButtonCancel.Font = new Font("å®ä½", 12F); uiButtonCancel.Location = new Point(343, 234); uiButtonCancel.ForeColor = SystemColors.Control; uiButtonCancel.Location = new Point(343, 351); uiButtonCancel.MinimumSize = new Size(1, 1); uiButtonCancel.Name = "uiButtonCancel"; uiButtonCancel.Size = new Size(100, 35); @@ -77,7 +83,7 @@ // uiTextBoxPort // uiTextBoxPort.Font = new Font("å®ä½", 12F); uiTextBoxPort.Location = new Point(191, 175); uiTextBoxPort.Location = new Point(191, 233); uiTextBoxPort.Margin = new Padding(4, 5, 4, 5); uiTextBoxPort.MinimumSize = new Size(1, 16); uiTextBoxPort.Name = "uiTextBoxPort"; @@ -88,7 +94,8 @@ // rButtonUART // rButtonUART.Font = new Font("å®ä½", 12F); rButtonUART.Location = new Point(51, 12); rButtonUART.ForeColor = SystemColors.Control; rButtonUART.Location = new Point(51, 71); rButtonUART.MinimumSize = new Size(1, 1); rButtonUART.Name = "rButtonUART"; rButtonUART.Size = new Size(150, 29); @@ -99,7 +106,8 @@ // rButtonTCPServer // rButtonTCPServer.Font = new Font("å®ä½", 12F); rButtonTCPServer.Location = new Point(51, 47); rButtonTCPServer.ForeColor = SystemColors.Control; rButtonTCPServer.Location = new Point(51, 106); rButtonTCPServer.MinimumSize = new Size(1, 1); rButtonTCPServer.Name = "rButtonTCPServer"; rButtonTCPServer.Size = new Size(150, 29); @@ -110,7 +118,8 @@ // rButtonTCPClient // rButtonTCPClient.Font = new Font("å®ä½", 12F); rButtonTCPClient.Location = new Point(293, 47); rButtonTCPClient.ForeColor = SystemColors.Control; rButtonTCPClient.Location = new Point(293, 106); rButtonTCPClient.MinimumSize = new Size(1, 1); rButtonTCPClient.Name = "rButtonTCPClient"; rButtonTCPClient.Size = new Size(150, 29); @@ -122,7 +131,8 @@ // uiButtonCreate.Enabled = false; uiButtonCreate.Font = new Font("å®ä½", 12F); uiButtonCreate.Location = new Point(191, 234); uiButtonCreate.ForeColor = SystemColors.Control; uiButtonCreate.Location = new Point(191, 351); uiButtonCreate.MinimumSize = new Size(1, 1); uiButtonCreate.Name = "uiButtonCreate"; uiButtonCreate.Size = new Size(100, 35); @@ -133,7 +143,8 @@ // uiButtonTest // uiButtonTest.Font = new Font("å®ä½", 12F); uiButtonTest.Location = new Point(31, 234); uiButtonTest.ForeColor = SystemColors.Control; uiButtonTest.Location = new Point(31, 351); uiButtonTest.MinimumSize = new Size(1, 1); uiButtonTest.Name = "uiButtonTest"; uiButtonTest.Size = new Size(100, 35); @@ -144,7 +155,7 @@ // uiComboBoxPort // uiComboBoxPort.Font = new Font("å®ä½", 12F); uiComboBoxPort.Location = new Point(191, 108); uiComboBoxPort.Location = new Point(191, 167); uiComboBoxPort.Margin = new Padding(4, 5, 4, 5); uiComboBoxPort.MinimumSize = new Size(63, 0); uiComboBoxPort.Name = "uiComboBoxPort"; @@ -155,7 +166,7 @@ // uiIPTextBox // uiIPTextBox.Font = new Font("å®ä½", 12F); uiIPTextBox.Location = new Point(191, 108); uiIPTextBox.Location = new Point(191, 168); uiIPTextBox.Margin = new Padding(4, 5, 4, 5); uiIPTextBox.MinimumSize = new Size(1, 1); uiIPTextBox.Name = "uiIPTextBox"; @@ -166,31 +177,74 @@ // uiTextBoxPath // uiTextBoxPath.Font = new Font("å®ä½", 12F); uiTextBoxPath.Location = new Point(191, 108); uiTextBoxPath.Location = new Point(191, 168); uiTextBoxPath.Margin = new Padding(4, 5, 4, 5); uiTextBoxPath.MinimumSize = new Size(1, 16); uiTextBoxPath.Name = "uiTextBoxPath"; uiTextBoxPath.Size = new Size(205, 26); uiTextBoxPath.TabIndex = 13; // // rButtonMonitor // rButtonS7 // rButtonMonitor.Font = new Font("å®ä½", 12F); rButtonMonitor.Location = new Point(293, 12); rButtonMonitor.MinimumSize = new Size(1, 1); rButtonMonitor.Name = "rButtonMonitor"; rButtonMonitor.Size = new Size(150, 29); rButtonMonitor.TabIndex = 14; rButtonMonitor.Text = "æ¬å°çæ§"; rButtonMonitor.CheckedChanged += rButtonMonitor_CheckedChanged; rButtonS7.Font = new Font("å®ä½", 12F); rButtonS7.ForeColor = SystemColors.Control; rButtonS7.Location = new Point(293, 71); rButtonS7.MinimumSize = new Size(1, 1); rButtonS7.Name = "rButtonS7"; rButtonS7.Size = new Size(150, 29); rButtonS7.TabIndex = 14; rButtonS7.Text = "西é¨åS7"; rButtonS7.CheckedChanged += rButtonS7_CheckedChanged; // // themeForm1 // themeForm1.BackColor = Color.FromArgb(32, 41, 50); themeForm1.Controls.Add(uiLabelS7Type); themeForm1.Controls.Add(uiComboBoxS7Type); themeForm1.Dock = DockStyle.Fill; themeForm1.Font = new Font("Microsoft Sans Serif", 9F); themeForm1.Image = (Image)resources.GetObject("themeForm1.Image"); themeForm1.Location = new Point(0, 0); themeForm1.Name = "themeForm1"; themeForm1.Padding = new Padding(10, 70, 10, 9); themeForm1.RoundCorners = true; themeForm1.Sizable = true; themeForm1.Size = new Size(480, 413); themeForm1.SmartBounds = true; themeForm1.StartPosition = FormStartPosition.WindowsDefaultLocation; themeForm1.TabIndex = 15; themeForm1.Text = "å建é讯"; // // uiLabelS7Type // uiLabelS7Type.Font = new Font("å®ä½", 12F); uiLabelS7Type.ForeColor = SystemColors.Control; uiLabelS7Type.Location = new Point(84, 302); uiLabelS7Type.Name = "uiLabelS7Type"; uiLabelS7Type.Size = new Size(100, 23); uiLabelS7Type.TabIndex = 2; uiLabelS7Type.Text = "åå·"; // // uiComboBoxS7Type // uiComboBoxS7Type.DropDownStyle = ComboBoxStyle.DropDownList; uiComboBoxS7Type.Font = new Font("å®ä½", 12F); uiComboBoxS7Type.Location = new Point(191, 299); uiComboBoxS7Type.Margin = new Padding(4, 5, 4, 5); uiComboBoxS7Type.MinimumSize = new Size(63, 0); uiComboBoxS7Type.Name = "uiComboBoxS7Type"; uiComboBoxS7Type.Size = new Size(205, 24); uiComboBoxS7Type.TabIndex = 11; uiComboBoxS7Type.SelectedIndexChanged += uiComboBoxS7Type_SelectedIndexChanged; uiComboBoxS7Type.MouseClick += uiComboBoxPort_MouseClick; // // CreateCommunicatorForm // AutoScaleDimensions = new SizeF(96F, 96F); AutoScaleMode = AutoScaleMode.Dpi; ClientSize = new Size(484, 285); ClientSize = new Size(480, 413); ControlBox = false; Controls.Add(rButtonMonitor); Controls.Add(rButtonS7); Controls.Add(uiTextBoxPath); Controls.Add(uiIPTextBox); Controls.Add(uiComboBoxPort); @@ -203,10 +257,15 @@ Controls.Add(uiButtonCancel); Controls.Add(uiLabelPort); Controls.Add(uiLabelIP); Controls.Add(themeForm1); FormBorderStyle = FormBorderStyle.None; MaximizeBox = false; MinimizeBox = false; MinimumSize = new Size(261, 61); Name = "CreateCommunicatorForm"; Text = "å建é讯"; TransparencyKey = Color.Fuchsia; themeForm1.ResumeLayout(false); ResumeLayout(false); PerformLayout(); } @@ -224,6 +283,9 @@ private ComboBox uiComboBoxPort; private TextBox uiIPTextBox; private TextBox uiTextBoxPath; private RadioButton rButtonMonitor; private RadioButton rButtonS7; private ReaLTaiizor.Forms.ThemeForm themeForm1; private Label uiLabelS7Type; private ComboBox uiComboBoxS7Type; } } LB_SmartVision/Forms/Pages/CommunicatorPage/CreateCommunicatorForm.cs
@@ -1,4 +1,6 @@ using LB_VisionProcesses.Communicators; using LB_SmartVisionCommon; using LB_VisionProcesses.Communicators; using LB_VisionProcesses.Communicators.SiemensS7; using LB_VisionProcesses.Communicators.TCom; using RJCP.IO.Ports; using System; @@ -30,17 +32,18 @@ communicator = new UARTPort(); rButtonUART.Checked = true; uiLabelS7Type.Visible = false; uiComboBoxS7Type.Visible = false; uiButtonCreate.Enabled = false; } private void uiButtonTest_Click(object sender, EventArgs e) { uiButtonCreate.Enabled = false; rButtonUART.Enabled = false; rButtonTCPServer.Enabled = false; rButtonTCPClient.Enabled = false; rButtonMonitor.Enabled = false; rButtonS7.Enabled = false; if (communicator != null) communicator.Disconnect(); @@ -51,6 +54,8 @@ IP = uiComboBoxPort.Text; PORT = uiTextBoxPort.Text; communicator.CommunicatorConnections.Add("å°å", IP); communicator.CommunicatorConnections.Add("端å£", PORT); } else if (rButtonTCPServer.Checked) { @@ -58,6 +63,8 @@ IP = uiIPTextBox.Text; PORT = uiTextBoxPort.Text; communicator.CommunicatorConnections.Add("å°å", IP); communicator.CommunicatorConnections.Add("端å£", PORT); } else if (rButtonTCPClient.Checked) { @@ -65,23 +72,66 @@ IP = uiIPTextBox.Text; PORT = uiTextBoxPort.Text; communicator.CommunicatorConnections.Add("å°å", IP); communicator.CommunicatorConnections.Add("端å£", PORT); } else if (rButtonMonitor.Checked) else if (rButtonS7.Checked) { communicator = new LocalMonitor(); communicator = new SiemensLBS7(); IP = uiTextBoxPath.Text; PORT = uiTextBoxPort.Text; switch (uiComboBoxS7Type.Text) { case "S7200": { cpuType = S7.Net.CpuType.S7200; break; } case "Logo0BA8": { cpuType = S7.Net.CpuType.Logo0BA8; break; } case "S7200Smart": { cpuType = S7.Net.CpuType.S7200Smart; break; } case "S7300": { cpuType = S7.Net.CpuType.S7300; break; } case "S7400": { cpuType = S7.Net.CpuType.S7400; break; } case "S71200": { cpuType = S7.Net.CpuType.S71200; break; } case "S71500": { cpuType = S7.Net.CpuType.S71500; break; } default: cpuType = S7.Net.CpuType.S71500; break; } communicator.CommunicatorConnections.Add("å°å", IP); communicator.CommunicatorConnections.Add("端å£", PORT); communicator.CommunicatorConnections.Add("åå·", cpuType); } else { MessageBox.Show("æªéæ©é讯类å!", "å¼å¸¸"); return; } communicator.CommunicatorConnections.Add("å°å", IP); communicator.CommunicatorConnections.Add("端å£", PORT); if (communicator.Connect()) if (!communicator.Connect()) { uiButtonCreate.Enabled = true; communicator.Disconnect(); @@ -92,10 +142,11 @@ public string IP = string.Empty; public string PORT = string.Empty; public S7.Net.CpuType cpuType = S7.Net.CpuType.S71500; private void uiButtonCreate_Click(object sender, EventArgs e) { if (communicator.Connect()) if (!communicator.Connect()) { bCreate = true; this.Close(); @@ -131,6 +182,10 @@ uiLabelPort.Text = "æ³¢ç¹ç"; uiTextBoxPort.Visible = true; uiLabelS7Type.Visible = false; uiComboBoxS7Type.Visible = false; uiButtonCreate.Enabled = false; } } @@ -153,6 +208,9 @@ uiLabelPort.Text = "端å£"; uiTextBoxPort.Visible = true; uiLabelS7Type.Visible = false; uiComboBoxS7Type.Visible = false; uiButtonCreate.Enabled = false; } } @@ -174,26 +232,39 @@ uiLabelPort.Visible = true; uiLabelPort.Text = "端å£"; uiTextBoxPort.Visible = true; uiLabelS7Type.Visible = false; uiComboBoxS7Type.Visible = false; } } private void rButtonMonitor_CheckedChanged(object sender, EventArgs e) private void rButtonS7_CheckedChanged(object sender, EventArgs e) { uiButtonCreate.Enabled = false; if (communicator != null) communicator.Disconnect(); if (rButtonMonitor.Checked) if (rButtonS7.Checked) { uiLabelIP.Visible = true; uiLabelIP.Text = "çæ§æä»¶"; uiLabelIP.Text = "å°å"; uiIPTextBox.Visible = false; uiComboBoxPort.Visible = false; uiTextBoxPath.Visible = true; uiLabelPort.Visible = true; uiLabelPort.Text = "åå ¥æä»¶"; uiLabelPort.Text = "æ§½"; uiTextBoxPort.Visible = true; uiLabelS7Type.Visible = true; uiComboBoxS7Type.Visible = true; uiComboBoxS7Type.Items.Clear(); foreach (var c in Enum.GetValues(typeof(S7.Net.CpuType))) { uiComboBoxS7Type.Items.Add(c.ToString()); } } } @@ -219,5 +290,50 @@ { uiButtonCreate.Enabled = false; } private void uiComboBoxS7Type_SelectedIndexChanged(object sender, EventArgs e) { switch (uiComboBoxS7Type.Text) { case "S7200": { cpuType = S7.Net.CpuType.S7200; break; } case "Logo0BA8": { cpuType = S7.Net.CpuType.Logo0BA8; break; } case "S7200Smart": { cpuType = S7.Net.CpuType.S7200Smart; break; } case "S7300": { cpuType = S7.Net.CpuType.S7300; break; } case "S7400": { cpuType = S7.Net.CpuType.S7400; break; } case "S71200": { cpuType = S7.Net.CpuType.S71200; break; } case "S71500": { cpuType = S7.Net.CpuType.S71500; break; } default: cpuType = S7.Net.CpuType.S71500; break; } } } } LB_SmartVision/Forms/Pages/CommunicatorPage/CreateCommunicatorForm.resx
@@ -117,4 +117,170 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="themeForm1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAABGdBTUEAALGPC/xhBQAAJVRJREFUeF7t 1csOcP85huFvVGdA/UvnJmh1F7uBROwrqTZK0mjjYGiLcAT2BGdEKEGCobHiAK75782dPCvXaM1WVt77 +fDzP/y9aV/53Edpv/WTP5j21S98Is0vavnyZz9K+8ZPfzLti5/6eNoHk9piUls86RaT2uIXtZjUFpPa YlJbNgDHPOkWk9riF7WY1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJb NgDHPOkWk9riF7WY1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDH POkWk9riF7WY1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkW k9riF7WY1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9ri F7WY1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY 1BaT2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY1BaT 2mJSWzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY1BaT2mJS WzYAxzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY1BaT2mJSWzYA xzzpFpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY1BaT2mJSWzYAxzzp FpPa4he1mNQWk9piUls2AMc86RaT2uIXtZjUFpPaYlJbNgDHPOkWk9riF7WY1BaT2mJSWzYAxzzpFpPa 4he1mNQWk9piUls2A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JS WzYAx49JbfGPtJjUFpPaYlJbTGrLBuD4Makt/pEWk9piUltMaotJbdkAHD8mtcU/0mJSW0xqi0ltMakt G4Djx6S2+EdaTGqLSW0xqS0mtWUDcPyY1Bb/SItJbTGpLSa1xaS2bACOH5Pa4h9pMaktJrXFpLaY1JYN wPFjUlv8Iy0mtcWktpjUFpPasgE4fkxqi3+kxaS2mNQWk9piUls++Krl3/70m2n/9GffSvuvv/ujtH// 6z9I+5e/+Hbaf/3l76X9w5/8btoG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACO mdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltM aotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1 xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9pi UltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGp LRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACO mdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltM aotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1 xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9pi UltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGp LRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACO mdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltM aotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1 xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9pi UltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGp LRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACO mdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltM aotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1 xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9pi UltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGp LR9+/fOfSPvHP/tm2nf+/Ftpv/ypj6d9Me6f/+Lbaf/xN3+Y9pXPfZS2AThmUltMaotJbTGpLSa1xaS2 bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThm UltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGp LSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQW k9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJ bTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2 bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThm UltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGp LSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQW k9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJ bTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2 bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThm UltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGp LSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQW k9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJ bTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2 bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThm UltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQWk9piUltMassG4JhJbTGp LSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJbTGpLRuAYya1xaS2mNQW k9piUltMassG4JhJbTGpLSa1xaS2mNQWk9qyAThmUltMaotJbTGpLSa1xaS2bACOmdQWk9piUltMaotJ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aotJbTFJ89IG4JhJbTGpLSa1xaS2mKR5aQNwzKS2mNQWk9piUltM0ry0AThmUltMaotJ bTGpLSZpXtoAHDOpLSa1xaS2mNQWkzQvbQCOmdQWk9piUltMaotJmpc2AMdMaotJbTGpLSa1xSTNSxuA Yya1xaS2mNQWk9pikualDcAxk9piUltMaotJbTFJ89IG4JhJbTGpLSa1xaS2mKR5aQNwzKS2mNQWk9pi UltM0ry0AThmUltMaotJbTGpLSZpXtoAHDOpLSa1xaS2mNQWkzQvbQCOmdQWk9piUltMaotJmpc2AMdM aotJbTGpLSa1xSTNSxuAYya1xaS2mNQWk9pikualDcAxk9piUltMaotJbTFJ89IG4JhJbTGpLSa1xaS2 mKR5aQNwzKS2mNQWk9piUltM0ry0AThmUltMaotJbTGpLSZpXtoAHDOpLSa1xaS2mNQWkzQvbQCOmdQW k9piUltMaotJmpc2AMdMaotJbTGpLSa1xSTNSxuAYya1xaS2mNQWk9pikualDcAxk9piUltMaotJbTFJ 89IG4JhJbTGpLSa1xaS2mKR5aQNwzKS2mNQWk9piUltM0ry0AThmUltMaotJbTGpLSZpXtoAHDOpLSa1 xaS2mNQWkzQvbQCOmdQWk9piUltMaotJmpc2AMdMaotJbTGpLSa1xSTNSxuAYya1xaS2mNQWk9pikual DcAxk9piUltMaotJbTFJ89IG4JhJbTGpLSa1xaS2mKR5aQNwzKS2mNQWk9piUltM0ry0AThmUltMaotJ bTGpLSZpXvp/N+2H12uZAHMAAAAASUVORK5CYII= </value> </data> </root> LB_SmartVision/VisionForm.Designer.cs
@@ -89,7 +89,7 @@ // sc_VisionForm.Panel2.Controls.Add(grb_Info); sc_VisionForm.Size = new Size(1416, 781); sc_VisionForm.SplitterDistance = 596; sc_VisionForm.SplitterDistance = 593; sc_VisionForm.SplitterWidth = 5; sc_VisionForm.TabIndex = 1; // @@ -108,7 +108,7 @@ tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Absolute, 39F)); tlp_MainView.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tlp_MainView.Size = new Size(1416, 596); tlp_MainView.Size = new Size(1416, 593); tlp_MainView.TabIndex = 1; tlp_MainView.TagString = null; // @@ -122,7 +122,7 @@ materialTabControl.MouseState = MaterialSkin.MouseState.HOVER; materialTabControl.Name = "materialTabControl"; materialTabControl.SelectedIndex = 0; materialTabControl.Size = new Size(1412, 493); materialTabControl.Size = new Size(1412, 490); materialTabControl.TabIndex = 0; // // tlp_VisionMainOperator @@ -248,7 +248,7 @@ grb_Info.MinimumSize = new Size(1, 1); grb_Info.Name = "grb_Info"; grb_Info.Padding = new Padding(0, 40, 0, 0); grb_Info.Size = new Size(1416, 180); grb_Info.Size = new Size(1416, 183); grb_Info.TabIndex = 1; grb_Info.Text = "æ¥å¿æ¾ç¤ºåºï¼"; grb_Info.TextAlignment = ContentAlignment.MiddleLeft; @@ -264,7 +264,7 @@ rich_Info.Name = "rich_Info"; rich_Info.Padding = new Padding(2); rich_Info.ShowText = false; rich_Info.Size = new Size(1416, 140); rich_Info.Size = new Size(1416, 143); rich_Info.TabIndex = 0; rich_Info.TextAlignment = ContentAlignment.MiddleLeft; // LB_SmartVision/VisionForm.cs
@@ -16,6 +16,7 @@ using LB_VisionProcesses; using LB_VisionProcesses.Cameras; using LB_VisionProcesses.Cameras.HRCameras; using LB_VisionProcesses.Cameras.LBCameras; using LB_VisionProcesses.Communicators; using LB_VisionProcesses.Communicators.TCom; using LB_VisionProcesses.Forms; LB_SmartVision/VisionForm.resx
@@ -121,24 +121,24 @@ <data name="theme_VisionForm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO vAAADrwBlbxySQAAA+xJREFUWEftV0loFUkYbvcNFzJi0lWdBEPQruqXKEYdcRgz4AYqeplBwYiXEU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LzgvTkvwvDA+5wsU4nhG/m9AUoBD/F HFzWN4H0XQn2vF8eXN8Z3FAPYasl59oUYjuB+sTImDB+nhfgYQ39STf4fmu1DHtz+oIUgiM1KkWtwcFw sOujVT3hrnaL7UQc+hcL5W+sKIXhw0OVjaW0iwnBc47gqIQ45QY32PKRzv8eTguRYM9SS5YouEEZjv37 EffbzbjBDdZyxZYQ12EB2qS0bWrJqRVazPDWkojwZbuZrsgZtDJ0iY1g12khEtTicMTvclwn2CKE32YJ 7G5PORfZ1HtMCH7MOV4BrQ3XCe92+4onk5Nn2PolDAvWXnuOzAwzo6Nnx4Q3SrojwqfKeMxWMpsXWVs+ 2WrfKRdbW1W6Hf0shM/33Y7my4PrleFZIfhAaWjU/e5ivlw+y3S2FySMtynjvcrwsFiLJv/RhPBB2ws1 hK2WcBLBFf1qawlplwvxaQlxe786OOU4PBWsjSO85mBlQ8n99r/BisSdAas4FfgHpdEUZpwUX7sAAAAA SUVORK5CYII= </value> </data> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> LB_SmartVisionCameraDevice/PHM6000/PHM6000Sensor.cs
@@ -1,4 +1,4 @@ using LB_SmartVisionCameraSDK; using LB_SmartVisionCameraSDK; using LB_SmartVisionCameraSDK.PHM6000; using LB_SmartVisionCommon; using Newtonsoft.Json; @@ -1227,4 +1227,4 @@ } } } } } LB_SmartVisionCameraSDK/PHM6000/PHM6000Profiler.cs
@@ -318,8 +318,8 @@ /// <param name="szModuleType">模åå, char* szModuleType</param> /// <param name="szSerialNumber">åºåå·, char* szSerialNumber</param> /// <returns>è·å失败è¿å-1ï¼å¦åè¿å0ã</returns> [DllImport("PHM6000API", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCameraInformation")] public static extern int GetCameraInformation(IntPtr pHandle, int nIndex, IntPtr szModuleType, IntPtr szSerialNumber); //[DllImport("PHM6000API", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCameraInformation")] //public static extern int GetCameraInformation(IntPtr pHandle, int nIndex, IntPtr szModuleType, IntPtr szSerialNumber); //PHM6000_API(int) GetCameraInformation(void* pHandle, int nIndex, char* szModuleType, char* szSerialNumber); /// <summary> /// è·åç §ç¸æºä¿¡æ¯ @@ -342,8 +342,8 @@ /// <param name="szAddress">IPå°åå符串, char* szAddress</param> /// <param name="nPort">端å£å·, int* nPort</param> /// <returns>è·å失败è¿å-1ï¼å¦åè¿å0ã</returns> [DllImport("PHM6000API", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCameraAddress")] public static extern int GetCameraAddress(IntPtr pHandle, int nIndex, IntPtr szAddress, IntPtr nPort); //[DllImport("PHM6000API", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetCameraAddress")] //public static extern int GetCameraAddress(IntPtr pHandle, int nIndex, IntPtr szAddress, IntPtr nPort); //PHM6000_API(int) GetCameraAddress(void* pHandle, int nIndex, char* szAddress, int* nPort); /// <summary> /// å¾å°è¿æ¥çIP LB_VisionProcesses/Cameras/2DCameraForm.Designer.cs
@@ -104,18 +104,20 @@ // cmbBrand.Dock = DockStyle.Fill; cmbBrand.FormattingEnabled = true; cmbBrand.Location = new Point(53, 3); cmbBrand.Location = new Point(66, 4); cmbBrand.Margin = new Padding(4); cmbBrand.Name = "cmbBrand"; cmbBrand.Size = new Size(296, 25); cmbBrand.Size = new Size(369, 28); cmbBrand.TabIndex = 0; // // cmbSN // cmbSN.Dock = DockStyle.Fill; cmbSN.FormattingEnabled = true; cmbSN.Location = new Point(53, 3); cmbSN.Location = new Point(66, 4); cmbSN.Margin = new Padding(4); cmbSN.Name = "cmbSN"; cmbSN.Size = new Size(296, 25); cmbSN.Size = new Size(369, 28); cmbSN.TabIndex = 1; cmbSN.SelectedIndexChanged += cmbSN_SelectedIndexChanged; cmbSN.MouseDown += cmbSN_MouseDown; @@ -124,9 +126,10 @@ // label1.AutoSize = true; label1.Dock = DockStyle.Fill; label1.Location = new Point(3, 0); label1.Location = new Point(4, 0); label1.Margin = new Padding(4, 0, 4, 0); label1.Name = "label1"; label1.Size = new Size(44, 34); label1.Size = new Size(54, 42); label1.TabIndex = 2; label1.Text = "åç"; label1.TextAlign = ContentAlignment.MiddleCenter; @@ -135,9 +138,10 @@ // label2.AutoSize = true; label2.Dock = DockStyle.Fill; label2.Location = new Point(3, 0); label2.Location = new Point(4, 0); label2.Margin = new Padding(4, 0, 4, 0); label2.Name = "label2"; label2.Size = new Size(44, 34); label2.Size = new Size(54, 42); label2.TabIndex = 3; label2.Text = "SN"; label2.TextAlign = ContentAlignment.MiddleCenter; @@ -146,9 +150,10 @@ // btnStartGrab.Dock = DockStyle.Fill; btnStartGrab.ForeColor = SystemColors.ControlText; btnStartGrab.Location = new Point(91, 3); btnStartGrab.Location = new Point(113, 4); btnStartGrab.Margin = new Padding(4); btnStartGrab.Name = "btnStartGrab"; btnStartGrab.Size = new Size(82, 28); btnStartGrab.Size = new Size(101, 34); btnStartGrab.TabIndex = 5; btnStartGrab.Text = "è¿ç»éé"; btnStartGrab.UseVisualStyleBackColor = true; @@ -158,9 +163,10 @@ // btnCloseGrab.Dock = DockStyle.Fill; btnCloseGrab.ForeColor = SystemColors.Desktop; btnCloseGrab.Location = new Point(179, 3); btnCloseGrab.Location = new Point(222, 4); btnCloseGrab.Margin = new Padding(4); btnCloseGrab.Name = "btnCloseGrab"; btnCloseGrab.Size = new Size(82, 28); btnCloseGrab.Size = new Size(101, 34); btnCloseGrab.TabIndex = 6; btnCloseGrab.Text = "å ³ééé"; btnCloseGrab.UseVisualStyleBackColor = true; @@ -170,9 +176,10 @@ // btnGrabOnce.Dock = DockStyle.Fill; btnGrabOnce.ForeColor = SystemColors.ControlText; btnGrabOnce.Location = new Point(3, 3); btnGrabOnce.Location = new Point(4, 4); btnGrabOnce.Margin = new Padding(4); btnGrabOnce.Name = "btnGrabOnce"; btnGrabOnce.Size = new Size(82, 28); btnGrabOnce.Size = new Size(101, 34); btnGrabOnce.TabIndex = 7; btnGrabOnce.Text = "åå¼ éé"; btnGrabOnce.UseVisualStyleBackColor = true; @@ -182,9 +189,10 @@ // btnOpen.Dock = DockStyle.Fill; btnOpen.ForeColor = SystemColors.ControlText; btnOpen.Location = new Point(3, 3); btnOpen.Location = new Point(4, 4); btnOpen.Margin = new Padding(4); btnOpen.Name = "btnOpen"; btnOpen.Size = new Size(82, 28); btnOpen.Size = new Size(101, 34); btnOpen.TabIndex = 8; btnOpen.Text = "æå¼"; btnOpen.UseVisualStyleBackColor = true; @@ -194,9 +202,10 @@ // btnClose.Dock = DockStyle.Fill; btnClose.ForeColor = SystemColors.ControlText; btnClose.Location = new Point(91, 3); btnClose.Location = new Point(113, 4); btnClose.Margin = new Padding(4); btnClose.Name = "btnClose"; btnClose.Size = new Size(82, 28); btnClose.Size = new Size(101, 34); btnClose.TabIndex = 9; btnClose.Text = "å ³é"; btnClose.UseVisualStyleBackColor = true; @@ -206,9 +215,10 @@ // label5.AutoSize = true; label5.Dock = DockStyle.Fill; label5.Location = new Point(3, 0); label5.Location = new Point(4, 0); label5.Margin = new Padding(4, 0, 4, 0); label5.Name = "label5"; label5.Size = new Size(114, 34); label5.Size = new Size(142, 42); label5.TabIndex = 15; label5.Text = "å徿°éï¼"; label5.TextAlign = ContentAlignment.MiddleCenter; @@ -217,9 +227,10 @@ // lblPicCount.AutoSize = true; lblPicCount.Dock = DockStyle.Fill; lblPicCount.Location = new Point(123, 0); lblPicCount.Location = new Point(154, 0); lblPicCount.Margin = new Padding(4, 0, 4, 0); lblPicCount.Name = "lblPicCount"; lblPicCount.Size = new Size(226, 34); lblPicCount.Size = new Size(281, 42); lblPicCount.TabIndex = 16; lblPicCount.Text = "0"; lblPicCount.TextAlign = ContentAlignment.MiddleLeft; @@ -227,18 +238,20 @@ // txtGain // txtGain.Dock = DockStyle.Fill; txtGain.Location = new Point(53, 3); txtGain.Location = new Point(66, 4); txtGain.Margin = new Padding(4); txtGain.Name = "txtGain"; txtGain.Size = new Size(296, 23); txtGain.Size = new Size(369, 27); txtGain.TabIndex = 21; txtGain.TextChanged += txtGain_TextChanged; // // txtExp // txtExp.Dock = DockStyle.Fill; txtExp.Location = new Point(53, 3); txtExp.Location = new Point(66, 4); txtExp.Margin = new Padding(4); txtExp.Name = "txtExp"; txtExp.Size = new Size(296, 23); txtExp.Size = new Size(369, 27); txtExp.TabIndex = 20; txtExp.TextChanged += txtExp_TextChanged; // @@ -246,9 +259,10 @@ // label4.AutoSize = true; label4.Dock = DockStyle.Fill; label4.Location = new Point(3, 0); label4.Location = new Point(4, 0); label4.Margin = new Padding(4, 0, 4, 0); label4.Name = "label4"; label4.Size = new Size(44, 34); label4.Size = new Size(54, 42); label4.TabIndex = 19; label4.Text = "å¢ç"; label4.TextAlign = ContentAlignment.MiddleCenter; @@ -257,9 +271,10 @@ // label3.AutoSize = true; label3.Dock = DockStyle.Fill; label3.Location = new Point(3, 0); label3.Location = new Point(4, 0); label3.Margin = new Padding(4, 0, 4, 0); label3.Name = "label3"; label3.Size = new Size(44, 34); label3.Size = new Size(54, 42); label3.TabIndex = 18; label3.Text = "æå "; label3.TextAlign = ContentAlignment.MiddleCenter; @@ -271,8 +286,10 @@ groupBox1.Dock = DockStyle.Fill; groupBox1.ForeColor = SystemColors.Control; groupBox1.Location = new Point(0, 0); groupBox1.Margin = new Padding(4); groupBox1.Name = "groupBox1"; groupBox1.Size = new Size(487, 591); groupBox1.Padding = new Padding(4); groupBox1.Size = new Size(610, 739); groupBox1.TabIndex = 17; groupBox1.TabStop = false; groupBox1.Text = "宿¶éé"; @@ -280,18 +297,20 @@ // panel_Picture // panel_Picture.Dock = DockStyle.Fill; panel_Picture.Location = new Point(3, 19); panel_Picture.Location = new Point(4, 24); panel_Picture.Margin = new Padding(4); panel_Picture.Name = "panel_Picture"; panel_Picture.Size = new Size(481, 569); panel_Picture.Size = new Size(602, 711); panel_Picture.TabIndex = 0; // // radioButtonSoft // radioButtonSoft.AutoSize = true; radioButtonSoft.Dock = DockStyle.Fill; radioButtonSoft.Location = new Point(3, 123); radioButtonSoft.Location = new Point(4, 154); radioButtonSoft.Margin = new Padding(4); radioButtonSoft.Name = "radioButtonSoft"; radioButtonSoft.Size = new Size(352, 34); radioButtonSoft.Size = new Size(439, 42); radioButtonSoft.TabIndex = 23; radioButtonSoft.TabStop = true; radioButtonSoft.Text = "软触å"; @@ -302,9 +321,10 @@ // radioButtonHard.AutoSize = true; radioButtonHard.Dock = DockStyle.Fill; radioButtonHard.Location = new Point(3, 203); radioButtonHard.Location = new Point(4, 254); radioButtonHard.Margin = new Padding(4); radioButtonHard.Name = "radioButtonHard"; radioButtonHard.Size = new Size(352, 34); radioButtonHard.Size = new Size(439, 42); radioButtonHard.TabIndex = 24; radioButtonHard.TabStop = true; radioButtonHard.Text = "硬触å"; @@ -313,7 +333,8 @@ // splitContainer1 // splitContainer1.Dock = DockStyle.Fill; splitContainer1.Location = new Point(5, 5); splitContainer1.Location = new Point(6, 6); splitContainer1.Margin = new Padding(4); splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 @@ -323,8 +344,9 @@ // splitContainer1.Panel2 // splitContainer1.Panel2.Controls.Add(groupBox1); splitContainer1.Size = new Size(855, 591); splitContainer1.SplitterDistance = 364; splitContainer1.Size = new Size(1070, 739); splitContainer1.SplitterDistance = 455; splitContainer1.SplitterWidth = 5; splitContainer1.TabIndex = 19; // // groupBox2 @@ -334,9 +356,11 @@ groupBox2.Dock = DockStyle.Fill; groupBox2.ForeColor = SystemColors.Control; groupBox2.Location = new Point(0, 0); groupBox2.MinimumSize = new Size(261, 61); groupBox2.Margin = new Padding(4); groupBox2.MinimumSize = new Size(326, 76); groupBox2.Name = "groupBox2"; groupBox2.Size = new Size(364, 591); groupBox2.Padding = new Padding(4); groupBox2.Size = new Size(455, 739); groupBox2.TabIndex = 0; groupBox2.TabStop = false; groupBox2.Text = "ç¸æºåæ°"; @@ -360,7 +384,8 @@ tableLayoutPanel2.Controls.Add(tableLayoutPanel9, 0, 10); tableLayoutPanel2.Controls.Add(tableLayoutPanel10, 0, 9); tableLayoutPanel2.Dock = DockStyle.Fill; tableLayoutPanel2.Location = new Point(3, 19); tableLayoutPanel2.Location = new Point(4, 24); tableLayoutPanel2.Margin = new Padding(4); tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.RowCount = 14; tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 7.14301062F)); @@ -377,38 +402,40 @@ tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 7.14301062F)); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 7.143011F)); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 7.14086771F)); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableLayoutPanel2.Size = new Size(358, 569); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F)); tableLayoutPanel2.Size = new Size(447, 711); tableLayoutPanel2.TabIndex = 25; // // tableLayoutPanel3 // tableLayoutPanel3.ColumnCount = 2; tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F)); tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 62F)); tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel3.Controls.Add(label1, 0, 0); tableLayoutPanel3.Controls.Add(cmbBrand, 1, 0); tableLayoutPanel3.Dock = DockStyle.Fill; tableLayoutPanel3.Location = new Point(3, 3); tableLayoutPanel3.Location = new Point(4, 4); tableLayoutPanel3.Margin = new Padding(4); tableLayoutPanel3.Name = "tableLayoutPanel3"; tableLayoutPanel3.RowCount = 1; tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel3.Size = new Size(352, 34); tableLayoutPanel3.Size = new Size(439, 42); tableLayoutPanel3.TabIndex = 0; // // tableLayoutPanel4 // tableLayoutPanel4.ColumnCount = 2; tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F)); tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 62F)); tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel4.Controls.Add(label2, 0, 0); tableLayoutPanel4.Controls.Add(cmbSN, 1, 0); tableLayoutPanel4.Dock = DockStyle.Fill; tableLayoutPanel4.Location = new Point(3, 43); tableLayoutPanel4.Location = new Point(4, 54); tableLayoutPanel4.Margin = new Padding(4); tableLayoutPanel4.Name = "tableLayoutPanel4"; tableLayoutPanel4.RowCount = 1; tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel4.Size = new Size(352, 34); tableLayoutPanel4.Size = new Size(439, 42); tableLayoutPanel4.TabIndex = 1; // // tableLayoutPanel5 @@ -422,11 +449,12 @@ tableLayoutPanel5.Controls.Add(btnClose, 1, 0); tableLayoutPanel5.Controls.Add(btnEdit, 3, 0); tableLayoutPanel5.Dock = DockStyle.Fill; tableLayoutPanel5.Location = new Point(3, 83); tableLayoutPanel5.Location = new Point(4, 104); tableLayoutPanel5.Margin = new Padding(4); tableLayoutPanel5.Name = "tableLayoutPanel5"; tableLayoutPanel5.RowCount = 1; tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel5.Size = new Size(352, 34); tableLayoutPanel5.Size = new Size(439, 42); tableLayoutPanel5.TabIndex = 2; // // btnEdit @@ -434,9 +462,10 @@ btnEdit.Dock = DockStyle.Fill; btnEdit.Enabled = false; btnEdit.ForeColor = SystemColors.ControlText; btnEdit.Location = new Point(267, 3); btnEdit.Location = new Point(331, 4); btnEdit.Margin = new Padding(4); btnEdit.Name = "btnEdit"; btnEdit.Size = new Size(82, 28); btnEdit.Size = new Size(104, 34); btnEdit.TabIndex = 10; btnEdit.Text = "ç¼è¾"; btnEdit.UseVisualStyleBackColor = true; @@ -454,21 +483,22 @@ tableLayoutPanel6.Controls.Add(btnCloseGrab, 2, 0); tableLayoutPanel6.Controls.Add(btnSaveImage, 3, 0); tableLayoutPanel6.Dock = DockStyle.Fill; tableLayoutPanel6.Location = new Point(3, 163); tableLayoutPanel6.Location = new Point(4, 204); tableLayoutPanel6.Margin = new Padding(4); tableLayoutPanel6.Name = "tableLayoutPanel6"; tableLayoutPanel6.RowCount = 1; tableLayoutPanel6.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel6.Size = new Size(352, 34); tableLayoutPanel6.Size = new Size(439, 42); tableLayoutPanel6.TabIndex = 24; // // btnSaveImage // btnSaveImage.Dock = DockStyle.Fill; btnSaveImage.ForeColor = SystemColors.Desktop; btnSaveImage.Location = new Point(266, 2); btnSaveImage.Location = new Point(329, 2); btnSaveImage.Margin = new Padding(2); btnSaveImage.Name = "btnSaveImage"; btnSaveImage.Size = new Size(84, 30); btnSaveImage.Size = new Size(108, 38); btnSaveImage.TabIndex = 8; btnSaveImage.Text = "ä¿åå¾ç"; btnSaveImage.UseVisualStyleBackColor = true; @@ -477,31 +507,33 @@ // tableLayoutPanel7 // tableLayoutPanel7.ColumnCount = 2; tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F)); tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 62F)); tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel7.Controls.Add(label3, 0, 0); tableLayoutPanel7.Controls.Add(txtExp, 1, 0); tableLayoutPanel7.Dock = DockStyle.Fill; tableLayoutPanel7.Location = new Point(3, 283); tableLayoutPanel7.Location = new Point(4, 354); tableLayoutPanel7.Margin = new Padding(4); tableLayoutPanel7.Name = "tableLayoutPanel7"; tableLayoutPanel7.RowCount = 1; tableLayoutPanel7.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel7.Size = new Size(352, 34); tableLayoutPanel7.Size = new Size(439, 42); tableLayoutPanel7.TabIndex = 25; // // tableLayoutPanel8 // tableLayoutPanel8.ColumnCount = 2; tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F)); tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 62F)); tableLayoutPanel8.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel8.Controls.Add(label4, 0, 0); tableLayoutPanel8.Controls.Add(txtGain, 1, 0); tableLayoutPanel8.Dock = DockStyle.Fill; tableLayoutPanel8.Location = new Point(3, 323); tableLayoutPanel8.Location = new Point(4, 404); tableLayoutPanel8.Margin = new Padding(4); tableLayoutPanel8.Name = "tableLayoutPanel8"; tableLayoutPanel8.RowCount = 1; tableLayoutPanel8.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel8.Size = new Size(352, 34); tableLayoutPanel8.Size = new Size(439, 42); tableLayoutPanel8.TabIndex = 26; // // tableLayoutPanel1 @@ -514,19 +546,21 @@ tableLayoutPanel1.Controls.Add(ckbUpParams, 1, 0); tableLayoutPanel1.Controls.Add(ckbRegrab, 2, 0); tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel1.Location = new Point(3, 243); tableLayoutPanel1.Location = new Point(4, 304); tableLayoutPanel1.Margin = new Padding(4); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 1; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.Size = new Size(352, 34); tableLayoutPanel1.Size = new Size(439, 42); tableLayoutPanel1.TabIndex = 29; // // btnStartHard // btnStartHard.Dock = DockStyle.Fill; btnStartHard.Location = new Point(3, 3); btnStartHard.Location = new Point(4, 4); btnStartHard.Margin = new Padding(4); btnStartHard.Name = "btnStartHard"; btnStartHard.Size = new Size(64, 28); btnStartHard.Size = new Size(79, 34); btnStartHard.TabIndex = 22; btnStartHard.Text = "çå¾ è§¦å"; btnStartHard.UseVisualStyleBackColor = true; @@ -536,9 +570,10 @@ // ckbUpParams.AutoSize = true; ckbUpParams.Dock = DockStyle.Fill; ckbUpParams.Location = new Point(73, 3); ckbUpParams.Location = new Point(91, 4); ckbUpParams.Margin = new Padding(4); ckbUpParams.Name = "ckbUpParams"; ckbUpParams.Size = new Size(134, 28); ckbUpParams.Size = new Size(167, 34); ckbUpParams.TabIndex = 23; ckbUpParams.Text = "æ¯å¦æ¯æ¬¡åå ¥åæ°"; ckbUpParams.UseVisualStyleBackColor = true; @@ -547,9 +582,10 @@ // ckbRegrab.AutoSize = true; ckbRegrab.Dock = DockStyle.Fill; ckbRegrab.Location = new Point(213, 3); ckbRegrab.Location = new Point(266, 4); ckbRegrab.Margin = new Padding(4); ckbRegrab.Name = "ckbRegrab"; ckbRegrab.Size = new Size(136, 28); ckbRegrab.Size = new Size(169, 34); ckbRegrab.TabIndex = 24; ckbRegrab.Text = "æ¯å¦å¤±è´¥éæ°åå¾"; ckbRegrab.UseVisualStyleBackColor = true; @@ -557,25 +593,27 @@ // tableLayoutPanel12 // tableLayoutPanel12.ColumnCount = 2; tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F)); tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 150F)); tableLayoutPanel12.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel12.Controls.Add(lblCapTime, 1, 0); tableLayoutPanel12.Controls.Add(label7, 0, 0); tableLayoutPanel12.Dock = DockStyle.Fill; tableLayoutPanel12.Location = new Point(3, 523); tableLayoutPanel12.Location = new Point(4, 654); tableLayoutPanel12.Margin = new Padding(4); tableLayoutPanel12.Name = "tableLayoutPanel12"; tableLayoutPanel12.RowCount = 1; tableLayoutPanel12.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel12.Size = new Size(352, 43); tableLayoutPanel12.Size = new Size(439, 53); tableLayoutPanel12.TabIndex = 31; // // lblCapTime // lblCapTime.AutoSize = true; lblCapTime.Dock = DockStyle.Fill; lblCapTime.Location = new Point(123, 0); lblCapTime.Location = new Point(154, 0); lblCapTime.Margin = new Padding(4, 0, 4, 0); lblCapTime.Name = "lblCapTime"; lblCapTime.Size = new Size(226, 43); lblCapTime.Size = new Size(281, 53); lblCapTime.TabIndex = 16; lblCapTime.Text = "0ms"; lblCapTime.TextAlign = ContentAlignment.MiddleLeft; @@ -584,9 +622,10 @@ // label7.AutoSize = true; label7.Dock = DockStyle.Fill; label7.Location = new Point(3, 0); label7.Location = new Point(4, 0); label7.Margin = new Padding(4, 0, 4, 0); label7.Name = "label7"; label7.Size = new Size(114, 43); label7.Size = new Size(142, 53); label7.TabIndex = 15; label7.Text = "å徿¶é´ï¼"; label7.TextAlign = ContentAlignment.MiddleCenter; @@ -594,16 +633,17 @@ // tableLayoutPanel11 // tableLayoutPanel11.ColumnCount = 2; tableLayoutPanel11.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F)); tableLayoutPanel11.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 150F)); tableLayoutPanel11.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel11.Controls.Add(label5, 0, 0); tableLayoutPanel11.Controls.Add(lblPicCount, 1, 0); tableLayoutPanel11.Dock = DockStyle.Fill; tableLayoutPanel11.Location = new Point(3, 483); tableLayoutPanel11.Location = new Point(4, 604); tableLayoutPanel11.Margin = new Padding(4); tableLayoutPanel11.Name = "tableLayoutPanel11"; tableLayoutPanel11.RowCount = 1; tableLayoutPanel11.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel11.Size = new Size(352, 34); tableLayoutPanel11.Size = new Size(439, 42); tableLayoutPanel11.TabIndex = 30; // // cmbImagesPath @@ -612,9 +652,10 @@ cmbImagesPath.Dock = DockStyle.Fill; cmbImagesPath.ForeColor = SystemColors.ControlText; cmbImagesPath.FormattingEnabled = true; cmbImagesPath.Location = new Point(3, 443); cmbImagesPath.Location = new Point(4, 554); cmbImagesPath.Margin = new Padding(4); cmbImagesPath.Name = "cmbImagesPath"; cmbImagesPath.Size = new Size(352, 25); cmbImagesPath.Size = new Size(439, 28); cmbImagesPath.TabIndex = 0; cmbImagesPath.SelectedIndexChanged += cmbImagesPath_SelectedIndexChanged; cmbImagesPath.MouseHover += cmbImagesPath_MouseHover; @@ -629,20 +670,22 @@ tableLayoutPanel9.Controls.Add(btnAddImages, 1, 0); tableLayoutPanel9.Controls.Add(btnLocalGrab, 2, 0); tableLayoutPanel9.Dock = DockStyle.Fill; tableLayoutPanel9.Location = new Point(3, 403); tableLayoutPanel9.Location = new Point(4, 504); tableLayoutPanel9.Margin = new Padding(4); tableLayoutPanel9.Name = "tableLayoutPanel9"; tableLayoutPanel9.RowCount = 1; tableLayoutPanel9.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel9.Size = new Size(352, 34); tableLayoutPanel9.Size = new Size(439, 42); tableLayoutPanel9.TabIndex = 27; // // ckbLocalTest // ckbLocalTest.AutoSize = true; ckbLocalTest.Dock = DockStyle.Fill; ckbLocalTest.Location = new Point(3, 3); ckbLocalTest.Location = new Point(4, 4); ckbLocalTest.Margin = new Padding(4); ckbLocalTest.Name = "ckbLocalTest"; ckbLocalTest.Size = new Size(111, 28); ckbLocalTest.Size = new Size(138, 34); ckbLocalTest.TabIndex = 0; ckbLocalTest.Text = "æ¬å°åå¾"; ckbLocalTest.UseVisualStyleBackColor = true; @@ -651,9 +694,10 @@ // btnAddImages.Dock = DockStyle.Fill; btnAddImages.ForeColor = SystemColors.Desktop; btnAddImages.Location = new Point(120, 3); btnAddImages.Location = new Point(150, 4); btnAddImages.Margin = new Padding(4); btnAddImages.Name = "btnAddImages"; btnAddImages.Size = new Size(111, 28); btnAddImages.Size = new Size(138, 34); btnAddImages.TabIndex = 1; btnAddImages.Text = "æ·»å å¾ç"; btnAddImages.UseVisualStyleBackColor = true; @@ -663,9 +707,10 @@ // btnLocalGrab.Dock = DockStyle.Fill; btnLocalGrab.ForeColor = SystemColors.Desktop; btnLocalGrab.Location = new Point(237, 3); btnLocalGrab.Location = new Point(296, 4); btnLocalGrab.Margin = new Padding(4); btnLocalGrab.Name = "btnLocalGrab"; btnLocalGrab.Size = new Size(112, 28); btnLocalGrab.Size = new Size(139, 34); btnLocalGrab.TabIndex = 2; btnLocalGrab.Text = "æ¬å°åå¾"; btnLocalGrab.UseVisualStyleBackColor = true; @@ -674,25 +719,27 @@ // tableLayoutPanel10 // tableLayoutPanel10.ColumnCount = 2; tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F)); tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 62F)); tableLayoutPanel10.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel10.Controls.Add(label6, 0, 0); tableLayoutPanel10.Controls.Add(txtTimeout, 1, 0); tableLayoutPanel10.Dock = DockStyle.Fill; tableLayoutPanel10.Location = new Point(3, 363); tableLayoutPanel10.Location = new Point(4, 454); tableLayoutPanel10.Margin = new Padding(4); tableLayoutPanel10.Name = "tableLayoutPanel10"; tableLayoutPanel10.RowCount = 1; tableLayoutPanel10.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel10.Size = new Size(352, 34); tableLayoutPanel10.Size = new Size(439, 42); tableLayoutPanel10.TabIndex = 32; // // label6 // label6.AutoSize = true; label6.Dock = DockStyle.Fill; label6.Location = new Point(3, 0); label6.Location = new Point(4, 0); label6.Margin = new Padding(4, 0, 4, 0); label6.Name = "label6"; label6.Size = new Size(44, 34); label6.Size = new Size(54, 42); label6.TabIndex = 0; label6.Text = "è¶ æ¶"; label6.TextAlign = ContentAlignment.MiddleCenter; @@ -700,9 +747,10 @@ // txtTimeout // txtTimeout.Dock = DockStyle.Fill; txtTimeout.Location = new Point(53, 3); txtTimeout.Location = new Point(66, 4); txtTimeout.Margin = new Padding(4); txtTimeout.Name = "txtTimeout"; txtTimeout.Size = new Size(296, 23); txtTimeout.Size = new Size(369, 27); txtTimeout.TabIndex = 1; // // theme_2DCameraForm @@ -715,11 +763,12 @@ theme_2DCameraForm.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); theme_2DCameraForm.Image = (Image)resources.GetObject("theme_2DCameraForm.Image"); theme_2DCameraForm.Location = new Point(0, 0); theme_2DCameraForm.Margin = new Padding(4); theme_2DCameraForm.Name = "theme_2DCameraForm"; theme_2DCameraForm.Padding = new Padding(10, 70, 10, 9); theme_2DCameraForm.Padding = new Padding(12, 88, 12, 11); theme_2DCameraForm.RoundCorners = true; theme_2DCameraForm.Sizable = true; theme_2DCameraForm.Size = new Size(885, 680); theme_2DCameraForm.Size = new Size(1106, 850); theme_2DCameraForm.SmartBounds = true; theme_2DCameraForm.StartPosition = FormStartPosition.WindowsDefaultLocation; theme_2DCameraForm.TabIndex = 20; @@ -736,7 +785,8 @@ controlBox1.EnableMaximizeButton = false; controlBox1.EnableMinimizeButton = false; controlBox1.ForeColor = Color.FromArgb(155, 155, 155); controlBox1.Location = new Point(785, 18); controlBox1.Location = new Point(981, 18); controlBox1.Margin = new Padding(4); controlBox1.MaximizeHoverColor = Color.FromArgb(74, 74, 74); controlBox1.MinimizeHoverColor = Color.FromArgb(63, 63, 65); controlBox1.Name = "controlBox1"; @@ -750,22 +800,24 @@ panel_2DCameraForm.Controls.Add(splitContainer1); panel_2DCameraForm.Dock = DockStyle.Fill; panel_2DCameraForm.EdgeColor = Color.FromArgb(32, 41, 50); panel_2DCameraForm.Location = new Point(10, 70); panel_2DCameraForm.Location = new Point(12, 88); panel_2DCameraForm.Margin = new Padding(4); panel_2DCameraForm.Name = "panel_2DCameraForm"; panel_2DCameraForm.Padding = new Padding(5); panel_2DCameraForm.Size = new Size(865, 601); panel_2DCameraForm.Padding = new Padding(6); panel_2DCameraForm.Size = new Size(1082, 751); panel_2DCameraForm.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality; panel_2DCameraForm.TabIndex = 20; panel_2DCameraForm.Text = "panel2"; // // CameraForm // AutoScaleDimensions = new SizeF(96F, 96F); AutoScaleDimensions = new SizeF(120F, 120F); AutoScaleMode = AutoScaleMode.Dpi; ClientSize = new Size(885, 680); ClientSize = new Size(1106, 850); Controls.Add(theme_2DCameraForm); FormBorderStyle = FormBorderStyle.None; MinimumSize = new Size(261, 61); Margin = new Padding(4); MinimumSize = new Size(326, 76); Name = "CameraForm"; Text = "2Dç¸æºè®¾ç½®çé¢"; TransparencyKey = Color.Fuchsia; LB_VisionProcesses/Cameras/2DCameraForm.cs
@@ -166,7 +166,7 @@ camera = new HRCamera(); break; case CameraBrand.LBCamera: camera = new PHM6000Camera(); camera = new LBCamera(); break; default: Debug.WriteLine("æªç¥åç"); @@ -242,7 +242,7 @@ switch (brand) { case CameraBrand.LBCamera: camera = new PHM6000Camera(); camera = new LBCamera(); break; case CameraBrand.HRCamera: camera = new HRCamera(); @@ -316,7 +316,7 @@ PropertyGrid pg = new PropertyGrid(); pg.Dock = DockStyle.Fill; if (camera is PHM6000Camera phmCamera) if (camera is LBCamera phmCamera) { pg.SelectedObject = phmCamera.GetSensorConfig(); pg.PropertyValueChanged += (s, ev) => LB_VisionProcesses/Cameras/LBCameras/LBCamera.cs
@@ -1,9 +1,15 @@ using OpenCvSharp; using System; using System.Collections.Generic; using System.Linq; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; using LB_SmartVisionCameraSDK.PHM6000; using LB_VisionProcesses.Cameras; using LB_SmartVisionCommon; using LB_SmartVisionCameraDevice.PHM6000; namespace LB_VisionProcesses.Cameras.LBCameras { @@ -11,124 +17,350 @@ /// LB3Då·¥ä¸ç¸æºå®ç°ç±» /// åºäºPHM6000ç³»åå°è£ /// </summary> internal class LBCamera : BaseCamera public class LBCamera : BaseCamera { public override bool AutoBalanceWhite() private IntPtr _cameraHandle = IntPtr.Zero; private PHM6000SensorConfig _sensorConfig; private AcquisitionCallbackZA _acquisitionCallback; private AcquisitionCompletedCallback _acquisitionCompletedCallback; private bool _isConnected = false; // å¾åç¼å² private List<byte[]> _lineDataBuffer = new List<byte[]>(); private readonly object _bufferLock = new object(); private int _currentLineCount = 0; public LBCamera() { return true; Brand = CameraBrand.LBCamera; _sensorConfig = new PHM6000SensorConfig(); } #region ICamera Implementation public override bool InitDevice(string sn, object handle = null) { IntPtr tempHandle = IntPtr.Zero; try { SN = sn; // 1. å建临æ¶å¥æç¨äºåç°è®¾å¤ tempHandle = PHM6000Profiler.CreateCameraEntry(); if (tempHandle == IntPtr.Zero) return false; // 2. åç°ç¸æº int cameraCount = PHM6000Profiler.DiscoverCameras(tempHandle); if (cameraCount <= 0) { PHM6000Profiler.DestroyCameraEntry(tempHandle); return false; } string targetIp = string.Empty; int targetPort = 0; bool found = false; // 3. éåç¸æºå¯»æ¾å¹é çSN for (int i = 0; i < cameraCount; i++) { byte[] moduleTypeBytes = new byte[64]; byte[] serialNumberBytes = new byte[64]; if (PHM6000Profiler.GetCameraInformation(tempHandle, i, moduleTypeBytes, serialNumberBytes) == 0) { string currentSn = Encoding.UTF8.GetString(serialNumberBytes).TrimEnd('\0'); // å¦æä¼ å ¥ç sn æ¯ IP å°åï¼åç´æ¥å°è¯å¹é IP // æè å¹é åºåå· if (currentSn == sn || sn.Contains(currentSn)) // ç®åå¹é é»è¾ { byte[] addressBytes = new byte[64]; int port = 0; if (PHM6000Profiler.GetCameraAddress(tempHandle, i, addressBytes, ref port) == 0) { targetIp = Encoding.UTF8.GetString(addressBytes).TrimEnd('\0'); targetPort = port; found = true; break; } } } } // 鿝䏴æ¶å¥æ PHM6000Profiler.DestroyCameraEntry(tempHandle); tempHandle = IntPtr.Zero; if (!found) { // å¦ææ²¡æ¾å°ä½ sn æ¬èº«çèµ·æ¥å IPï¼å°è¯ç´æ¥è¿æ¥ï¼å ¼å®¹æ§é»è¾ï¼ if (System.Net.IPAddress.TryParse(sn, out _)) { targetIp = sn; targetPort = 5577; // é»è®¤ç«¯å£ } else { AsyncLogHelper.Error($"LBCamera: æªæ¾å°SN为 {sn} çç¸æº"); return false; } } // 4. å建æ£å¼ç¸æºå¥æå¹¶è¿æ¥ _cameraHandle = PHM6000Profiler.CreateCameraEntry(); if (_cameraHandle == IntPtr.Zero) return false; var addr = Encoding.ASCII.GetBytes(targetIp); int result = PHM6000Profiler.ConnectToCamera(_cameraHandle, addr, targetPort); if (result == 0) { _isConnected = true; // å è½½ç¸æºå½ååæ°å° _sensorConfig SyncConfigFromCamera(); // åå§ååè° _acquisitionCallback = new AcquisitionCallbackZA(OnLineReceived); _acquisitionCompletedCallback = new AcquisitionCompletedCallback(OnAcquisitionCompleted); PHM6000Profiler.SetAcquisitionCallbackZA(_cameraHandle, _acquisitionCallback, IntPtr.Zero); PHM6000Profiler.RegisterAcquisitionCompletedCallback(_cameraHandle, _acquisitionCompletedCallback, IntPtr.Zero); return true; } } catch (Exception ex) { AsyncLogHelper.Error($"LBCamera: InitDeviceå¼å¸¸ - {ex.Message}"); if (tempHandle != IntPtr.Zero) PHM6000Profiler.DestroyCameraEntry(tempHandle); } return false; } public override bool CloseDevice() { return true; } public override bool GetExpouseTime(out double value) { value = 0; return true; } public override bool GetGain(out double gain) { gain = 0; return true; } public override bool GetLineStatus(IOLines line, out LineStatus lineStatus) { lineStatus = LineStatus.Hight; if (_isConnected && _cameraHandle != IntPtr.Zero) { StopGrabbing(); PHM6000Profiler.DestroyCameraEntry(_cameraHandle); _cameraHandle = IntPtr.Zero; _isConnected = false; } return true; } public override List<string> GetListEnum() { return new List<string>(); List<string> cameraList = new List<string>(); IntPtr tempHandle = IntPtr.Zero; try { tempHandle = PHM6000Profiler.CreateCameraEntry(); if (tempHandle != IntPtr.Zero) { int count = PHM6000Profiler.DiscoverCameras(tempHandle); for (int i = 0; i < count; i++) { byte[] moduleTypeBytes = new byte[64]; byte[] serialNumberBytes = new byte[64]; if (PHM6000Profiler.GetCameraInformation(tempHandle, i, moduleTypeBytes, serialNumberBytes) == 0) { string sn = Encoding.UTF8.GetString(serialNumberBytes).TrimEnd('\0'); string type = Encoding.UTF8.GetString(moduleTypeBytes).TrimEnd('\0'); // æ ¼å¼åèï¼PHM6000[SN123456] if (!string.IsNullOrEmpty(sn)) { cameraList.Add(sn); } } } } } catch (Exception ex) { AsyncLogHelper.Error($"LBCamera: GetListEnumå¼å¸¸ - {ex.Message}"); } finally { if (tempHandle != IntPtr.Zero) PHM6000Profiler.DestroyCameraEntry(tempHandle); } return cameraList; } public override bool GetTriggerDelay(out double delay) public override bool StartGrabbing() { delay = 0; return true; if (!_isConnected) return false; lock (_bufferLock) { _lineDataBuffer.Clear(); _currentLineCount = 0; } // 设置é鿍¡å¼ï¼1=æ«ææ¨¡å¼ï¼1=è¿ç»æ¨¡å¼ PHM6000Profiler.SetAcquisitionMode(_cameraHandle, 1, 1); int result = PHM6000Profiler.StartAcquisition(_cameraHandle, 0, 0, 0.0); if (result == 0) { isGrabbing = true; return true; } return false; } public override bool GetTriggerFliter(out double flitertime) public override bool StopGrabbing() { flitertime = 0; return true; } public override bool GetTriggerMode(out TriggerMode mode, out TriggerSource source) { mode = TriggerMode.On; source = TriggerSource.Line0; return true; } public override bool GetTriggerPolarity(out TriggerPolarity polarity) { polarity = TriggerPolarity.RisingEdge; return true; } public override bool InitDevice(string SN, object Handle = null) { return true; } public override bool SetExpouseTime(double value) { return true; } public override bool SetGain(double gain) { return true; } public override bool SetLineMode(IOLines line, LineMode mode) { return true; } public override bool SetLineStatus(IOLines line, LineStatus linestatus) { return true; } public override bool SetTriggerDelay(double delay) { return true; } public override bool SetTriggerFliter(double flitertime) { return true; } public override bool SetTriggerMode(TriggerMode mode, TriggerSource triggerEnum = TriggerSource.Line0) { return true; } public override bool SetTriggerPolarity(TriggerPolarity polarity) { if (!_isConnected) return true; PHM6000Profiler.StopAcquisition(_cameraHandle); isGrabbing = false; return true; } public override bool SoftTrigger() { // 线æ«ç¸æºé常ä¸éè¦ä¼ ç»è½¯è§¦åï¼ä½å¨æäºæ¨¡å¼ä¸å¯æ¨¡æ return true; } public override bool StartGrabbing() #region åæ°è®¾ç½®æ å° public override bool SetExpouseTime(double value) => SetParam(EnumNameId.ExposureTime, (float)value); public override bool GetExpouseTime(out double value) { float v; bool r = GetParam(EnumNameId.ExposureTime, out v); value = v; return r; } public override bool SetGain(double gain) => SetParam(EnumNameId.AnalogGain, (float)gain); public override bool GetGain(out double gain) { float v; bool r = GetParam(EnumNameId.AnalogGain, out v); gain = v; return r; } // å ¶ä»æ¥å£å ä½å®ç° public override bool SetTriggerMode(TriggerMode mode, TriggerSource triggerEnum = TriggerSource.Line0) => true; public override bool GetTriggerMode(out TriggerMode mode, out TriggerSource source) { mode = TriggerMode.Off; source = TriggerSource.Software; return true; } public override bool SetTriggerPolarity(TriggerPolarity polarity) => true; public override bool GetTriggerPolarity(out TriggerPolarity polarity) { polarity = TriggerPolarity.RisingEdge; return true; } public override bool SetTriggerFliter(double flitertime) => true; public override bool GetTriggerFliter(out double flitertime) { flitertime = 0; return true; } public override bool SetTriggerDelay(double delay) => true; public override bool GetTriggerDelay(out double delay) { delay = 0; return true; } public override bool SetLineMode(IOLines line, LineMode mode) => true; public override bool SetLineStatus(IOLines line, LineStatus linestatus) => true; public override bool GetLineStatus(IOLines line, out LineStatus lineStatus) { lineStatus = LineStatus.Low; return true; } public override bool AutoBalanceWhite() => true; public PHM6000SensorConfig GetSensorConfig() { return true; SyncConfigFromCamera(); return _sensorConfig; } public override bool StopGrabbing() public void UpdateSensorConfig(PHM6000SensorConfig config) { return true; _sensorConfig = config; // ç®å示ä¾ï¼è®¾ç½®æå åå¢ç SetExpouseTime(config.ExposureTime); SetGain((double)config.AnalogGain); // æ´å¤åæ°åæ¥é»è¾åºå¨æ¤å¤å®ç° } #endregion #endregion #region Private Callback & Helpers private void OnLineReceived(IntPtr pInstance, IntPtr buffer, int points) { // 宿¶åè°å¤çï¼ç´¯ç§¯è¡æ°æ® if (!isGrabbing) return; int lineSize = points * Marshal.SizeOf(typeof(LBPointZA)); byte[] lineData = new byte[lineSize]; Marshal.Copy(buffer, lineData, 0, lineSize); lock (_bufferLock) { _lineDataBuffer.Add(lineData); _currentLineCount++; } } private void OnAcquisitionCompleted(IntPtr pInstance, int nOption) { // nOption: 0=䏿¹æ°æ®ç»æ, 1=å ¨é¨å®æ, 2=ç¹äºå°±ç»ª if (nOption == 1 || nOption == 0) { GenerateIntensityMap(); } } private void GenerateIntensityMap() { if (_cameraHandle == IntPtr.Zero) return; int width = 0; int height = 0; // ç´æ¥ä» SDK è·ååå¹¶åçå¼ºåº¦æ°æ®æé (unsigned char*) IntPtr pIntensity = PHM6000Profiler.GetIntensityData(_cameraHandle, ref width, ref height); if (pIntensity == IntPtr.Zero || width <= 0 || height <= 0) return; try { Bitmap bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed); // 设置ç°åº¦è°è²æ¿ ColorPalette palette = bmp.Palette; for (int i = 0; i < 256; i++) palette.Entries[i] = Color.FromArgb(i, i, i); bmp.Palette = palette; BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed); // 髿§è½å åæ·è´ int size = width * height; byte[] managedData = new byte[size]; Marshal.Copy(pIntensity, managedData, 0, size); Marshal.Copy(managedData, 0, bmpData.Scan0, size); bmp.UnlockBits(bmpData); // 触åäºä»¶éç¥ UI æ´æ°äº®åº¦å¾ ImageGrabbed?.Invoke(this, new CameraEventArgs(SN, bmp)); } catch (Exception ex) { AsyncLogHelper.Error($"LBCamera: çæäº®åº¦å¾å¼å¸¸ - {ex.Message}"); } } private void SyncConfigFromCamera() { // ä»ç¸æºè¯»åææåæ°å¹¶å¡«å å° _sensorConfig foreach (EnumNameId id in Enum.GetValues(typeof(EnumNameId))) { int iVal = 0; double dVal = 0; int eVal = 0; if (PHM6000Profiler.GetProfilerParameter(_cameraHandle, (int)id, ref iVal, ref dVal, ref eVal) == 0) { // å®é 项ç®ä¸åºä½¿ç¨åå°å°å¼åå _sensorConfig } } } private bool SetParam(EnumNameId id, float value) { if (!_isConnected) return false; return PHM6000Profiler.SetProfilerParameter(_cameraHandle, (int)id, 0, value, 0) == 0; } private bool GetParam(EnumNameId id, out float value) { value = 0; if (!_isConnected) return false; int iVal = 0; double dVal = 0; int eVal = 0; if (PHM6000Profiler.GetProfilerParameter(_cameraHandle, (int)id, ref iVal, ref dVal, ref eVal) == 0) { value = (float)dVal; return true; } return false; } #endregion } } LB_VisionProcesses/Cameras/LBCameras/PHM6000Camera.cs
ÎļþÒÑɾ³ý LB_VisionProcesses/Communicators/CommunicatorForm.cs
@@ -1,4 +1,7 @@ using System; using LB_VisionProcesses.Communicators.SiemensS7; using LB_VisionProcesses.Communicators.TCom; using RJCP.IO.Ports; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; @@ -11,8 +14,6 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using LB_VisionProcesses.Communicators.TCom; using RJCP.IO.Ports; namespace LB_VisionProcesses.Communicators { @@ -135,6 +136,20 @@ txtIP.Text = communicator.CommunicatorConnections["å°å"].ToString(); txtPort.Text = communicator.CommunicatorConnections["端å£"].ToString(); } else if (communicator is SiemensLBS7) { btnSend.Enabled = communicator.bConnected; btnRuleSend.Enabled = communicator.bConnected; cmbIP.Visible = false; txtIP.Visible = true; lblIP.Text = "IP"; lblIP.Text = "æ§½"; txtIP.Text = communicator.CommunicatorConnections["å°å"].ToString(); txtPort.Text = communicator.CommunicatorConnections["æ§½"].ToString(); } else { btnSend.Enabled = communicator.bConnected; LB_VisionProcesses/Communicators/MES/LBMES.cs
@@ -6,7 +6,21 @@ namespace LB_VisionProcesses.Communicators.MES { internal class LBMES internal class LBMES : BaseCommunicator { public override bool Connect() { throw new NotImplementedException(); } public override bool Disconnect() { throw new NotImplementedException(); } public override bool SendMessage(string message) { throw new NotImplementedException(); } } } LB_VisionProcesses/Communicators/SiemensS7/SiemensLBS7.cs
@@ -1,4 +1,6 @@ using System; using LB_SmartVisionCommon; using S7.Net; using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +8,82 @@ namespace LB_VisionProcesses.Communicators.SiemensS7 { internal class SiemensLBS7 public class SiemensLBS7 : BaseCommunicator { private Plc plc; public string variable = string.Empty; /// <summary> /// /// </summary> /// <param name="name"></param> public SiemensLBS7(string name = "西é¨åS7") { CommunicatorConnections.Add("å°å", "127.0.0.1"); CommunicatorConnections.Add("端å£", "1"); CommunicatorConnections.Add("åå·", S7.Net.CpuType.S71500); CommunicatorBrand = CommunicatorBrand.SiemensS7; CommunicatorName = name; } public override bool Connect() { try { string IP = CommunicatorConnections["å°å"].ToString(); short slot; short.TryParse(CommunicatorConnections["端å£"].ToString(), out slot); S7.Net.CpuType cpuType = (CpuType)CommunicatorConnections["åå·"]; plc = new Plc(cpuType, IP, 0, slot); plc.Open(); return true; } catch { return false; } } public override bool Disconnect() { try { plc?.Close(); return true; } catch { return false; } } public override bool SendMessage(string message) { try { plc.Write(variable, message); return true; } catch { return false; } } public override void Dispose() { try { AsyncLogHelper.Info($"Device:[{CommunicatorName}],Dispose()"); plc = null; // Suppress finalization. GC.SuppressFinalize(this); } catch (Exception ex) { AsyncLogHelper.Error($"Device:[{CommunicatorName}],Dispose(),Error" + ex); } } } }