版本-v1.2.3 更新mark类型和线宽补偿

This commit is contained in:
CPL 2024-01-05 08:36:58 +08:00
parent 2d8f0488c8
commit addcb8633a
6 changed files with 178 additions and 23 deletions

View File

@ -47,6 +47,7 @@ namespace ProductionControl
public static int Light_PortNum = 1;//COM端口号 public static int Light_PortNum = 1;//COM端口号
public static int Tension_PortNum = 7;//COM端口号 public static int Tension_PortNum = 7;//COM端口号
public static double Tension_Offset = 0;//张力偏移值 public static double Tension_Offset = 0;//张力偏移值
public static string SmallAxis_ComName = "COM2";//COM端口号 public static string SmallAxis_ComName = "COM2";//COM端口号
public static string HeightDev_IP = "192.168.3.35"; public static string HeightDev_IP = "192.168.3.35";
public static int HeightDev_Port = 64000; public static int HeightDev_Port = 64000;
@ -63,6 +64,9 @@ namespace ProductionControl
public static string Defect_SavePath, Defect_Compress_SavePath, Defect_Small_SavePath; public static string Defect_SavePath, Defect_Compress_SavePath, Defect_Small_SavePath;
public static double Defect_SavePath_AutoClear =-1,Defect_Compress_SavePath_AutoClear=-1,Defect_Small_SavePath_AutoClear=-1; public static double Defect_SavePath_AutoClear =-1,Defect_Compress_SavePath_AutoClear=-1,Defect_Small_SavePath_AutoClear=-1;
public static bool SaveAllDefectImg, MakeTag; public static bool SaveAllDefectImg, MakeTag;
public static double PT_Offset = 0;//PT偏移值
public static double LineWidth_Offset = 0;//线宽偏移值
//尺寸配置 //尺寸配置
//public static string Size_LoadPath, Size_FileName; //public static string Size_LoadPath, Size_FileName;
@ -290,6 +294,18 @@ namespace ProductionControl
SizeBmp_Zoom_Image_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath"); SizeBmp_Zoom_Image_SavePath = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath");
lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear"); lsTmp = Util.ReadIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear");
if (Util.IsNumber(lsTmp)) SizeBmp_Zoom_Image_SavePath_AutoClear = Convert.ToDouble(lsTmp); if (Util.IsNumber(lsTmp)) SizeBmp_Zoom_Image_SavePath_AutoClear = Convert.ToDouble(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "PT_Offset");
if (string.IsNullOrEmpty(lsTmp))
Config.PT_Offset = 0;
else
Config.PT_Offset = double.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "LineWidth_Offset");
if (string.IsNullOrEmpty(lsTmp))
Config.LineWidth_Offset = 0;
else
Config.LineWidth_Offset = double.Parse(lsTmp);
//DB //DB
DBConStr = Util.ReadIniValue(configPath, "DB", "DBConStr"); DBConStr = Util.ReadIniValue(configPath, "DB", "DBConStr");
//HTTP //HTTP

View File

@ -1206,7 +1206,7 @@ namespace ProductionControl
{ {
lock (lstPT) lock (lstPT)
{ {
lstPT.Add(Math.Round(res.PT1, 4)); lstPT.Add(Math.Round(res.PT1 + Config.PT_Offset, 4));
updatePTValueTest(model.PTBaseValue + model.PTUpFloatValue, model.PTBaseValue - model.PTDownFloatValue); updatePTValueTest(model.PTBaseValue + model.PTUpFloatValue, model.PTBaseValue - model.PTDownFloatValue);
} }
} }
@ -1227,7 +1227,7 @@ namespace ProductionControl
lock (lstLineWidth) lock (lstLineWidth)
{ {
lstLineWidth.Add(res.Shanxian > 0 ? Math.Round(res.Shanxian, 2) : 0); lstLineWidth.Add(res.Shanxian > 0 ? Math.Round(res.Shanxian + Config.LineWidth_Offset, 2) : 0);
updateLineWidthValue(model.LineWidthBaseValue + model.LineWidthUpFloatValue, model.LineWidthBaseValue - model.LineWidthDownFloatValue); updateLineWidthValue(model.LineWidthBaseValue + model.LineWidthUpFloatValue, model.LineWidthBaseValue - model.LineWidthDownFloatValue);
} }
} }

View File

@ -218,6 +218,7 @@
this.chkSizeBmp_SavePath_AutoClear = new System.Windows.Forms.CheckBox(); this.chkSizeBmp_SavePath_AutoClear = new System.Windows.Forms.CheckBox();
this.label43 = new System.Windows.Forms.Label(); this.label43 = new System.Windows.Forms.Label();
this.tabPage9 = new System.Windows.Forms.TabPage(); this.tabPage9 = new System.Windows.Forms.TabPage();
this.cbOpenAxisXCal = new System.Windows.Forms.CheckBox();
this.cbOpenFlawDistribution = new System.Windows.Forms.CheckBox(); this.cbOpenFlawDistribution = new System.Windows.Forms.CheckBox();
this.ckSkipSizeFailed = new System.Windows.Forms.CheckBox(); this.ckSkipSizeFailed = new System.Windows.Forms.CheckBox();
this.chkSkipSmallAxis = new System.Windows.Forms.CheckBox(); this.chkSkipSmallAxis = new System.Windows.Forms.CheckBox();
@ -238,7 +239,12 @@
this.numHttpPort = new System.Windows.Forms.NumericUpDown(); this.numHttpPort = new System.Windows.Forms.NumericUpDown();
this.label49 = new System.Windows.Forms.Label(); this.label49 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.cbOpenAxisXCal = new System.Windows.Forms.CheckBox(); this.groupBox24 = new System.Windows.Forms.GroupBox();
this.panel24 = new System.Windows.Forms.Panel();
this.label60 = new System.Windows.Forms.Label();
this.numPToffset = new System.Windows.Forms.NumericUpDown();
this.label62 = new System.Windows.Forms.Label();
this.numLineWidthoffset = new System.Windows.Forms.NumericUpDown();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
@ -333,6 +339,10 @@
this.groupBox18.SuspendLayout(); this.groupBox18.SuspendLayout();
this.panel18.SuspendLayout(); this.panel18.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).BeginInit();
this.groupBox24.SuspendLayout();
this.panel24.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numPToffset)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numLineWidthoffset)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// toolStrip1 // toolStrip1
@ -2357,6 +2367,7 @@
// //
// tabPage6 // tabPage6
// //
this.tabPage6.Controls.Add(this.groupBox24);
this.tabPage6.Controls.Add(this.groupBox21); this.tabPage6.Controls.Add(this.groupBox21);
this.tabPage6.Controls.Add(this.groupBox20); this.tabPage6.Controls.Add(this.groupBox20);
this.tabPage6.Controls.Add(this.groupBox6); this.tabPage6.Controls.Add(this.groupBox6);
@ -2749,6 +2760,17 @@
this.tabPage9.Text = "功能过滤"; this.tabPage9.Text = "功能过滤";
this.tabPage9.UseVisualStyleBackColor = true; this.tabPage9.UseVisualStyleBackColor = true;
// //
// cbOpenAxisXCal
//
this.cbOpenAxisXCal.AutoSize = true;
this.cbOpenAxisXCal.Location = new System.Drawing.Point(19, 344);
this.cbOpenAxisXCal.Margin = new System.Windows.Forms.Padding(2);
this.cbOpenAxisXCal.Name = "cbOpenAxisXCal";
this.cbOpenAxisXCal.Size = new System.Drawing.Size(90, 16);
this.cbOpenAxisXCal.TabIndex = 13;
this.cbOpenAxisXCal.Text = "启用X轴校准";
this.cbOpenAxisXCal.UseVisualStyleBackColor = true;
//
// cbOpenFlawDistribution // cbOpenFlawDistribution
// //
this.cbOpenFlawDistribution.AutoSize = true; this.cbOpenFlawDistribution.AutoSize = true;
@ -2977,16 +2999,103 @@
this.label49.TabIndex = 4; this.label49.TabIndex = 4;
this.label49.Text = "本机IP"; this.label49.Text = "本机IP";
// //
// cbOpenAxisXCal // groupBox24
// //
this.cbOpenAxisXCal.AutoSize = true; this.groupBox24.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.cbOpenAxisXCal.Location = new System.Drawing.Point(19, 344); | System.Windows.Forms.AnchorStyles.Right)));
this.cbOpenAxisXCal.Margin = new System.Windows.Forms.Padding(2); this.groupBox24.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.cbOpenAxisXCal.Name = "cbOpenAxisXCal"; this.groupBox24.Controls.Add(this.panel24);
this.cbOpenAxisXCal.Size = new System.Drawing.Size(90, 16); this.groupBox24.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbOpenAxisXCal.TabIndex = 13; this.groupBox24.Location = new System.Drawing.Point(2, 290);
this.cbOpenAxisXCal.Text = "启用X轴校准"; this.groupBox24.Margin = new System.Windows.Forms.Padding(2);
this.cbOpenAxisXCal.UseVisualStyleBackColor = true; this.groupBox24.Name = "groupBox24";
this.groupBox24.Padding = new System.Windows.Forms.Padding(2);
this.groupBox24.Size = new System.Drawing.Size(476, 73);
this.groupBox24.TabIndex = 34;
this.groupBox24.TabStop = false;
this.groupBox24.Text = "尺寸补偿";
//
// panel24
//
this.panel24.BackColor = System.Drawing.Color.White;
this.panel24.Controls.Add(this.label62);
this.panel24.Controls.Add(this.numLineWidthoffset);
this.panel24.Controls.Add(this.label60);
this.panel24.Controls.Add(this.numPToffset);
this.panel24.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel24.Location = new System.Drawing.Point(2, 16);
this.panel24.Margin = new System.Windows.Forms.Padding(2);
this.panel24.Name = "panel24";
this.panel24.Size = new System.Drawing.Size(472, 55);
this.panel24.TabIndex = 0;
//
// label60
//
this.label60.AutoSize = true;
this.label60.Location = new System.Drawing.Point(10, 20);
this.label60.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label60.Name = "label60";
this.label60.Size = new System.Drawing.Size(65, 12);
this.label60.TabIndex = 14;
this.label60.Text = "PT补偿(mm)";
//
// numPToffset
//
this.numPToffset.DecimalPlaces = 4;
this.numPToffset.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numPToffset.Location = new System.Drawing.Point(79, 18);
this.numPToffset.Margin = new System.Windows.Forms.Padding(2);
this.numPToffset.Maximum = new decimal(new int[] {
1000000000,
0,
0,
0});
this.numPToffset.Minimum = new decimal(new int[] {
100000000,
0,
0,
-2147483648});
this.numPToffset.Name = "numPToffset";
this.numPToffset.Size = new System.Drawing.Size(117, 21);
this.numPToffset.TabIndex = 13;
//
// label62
//
this.label62.AutoSize = true;
this.label62.Location = new System.Drawing.Point(231, 20);
this.label62.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label62.Name = "label62";
this.label62.Size = new System.Drawing.Size(77, 12);
this.label62.TabIndex = 16;
this.label62.Text = "线宽补偿(um)";
//
// numLineWidthoffset
//
this.numLineWidthoffset.DecimalPlaces = 2;
this.numLineWidthoffset.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numLineWidthoffset.Location = new System.Drawing.Point(312, 18);
this.numLineWidthoffset.Margin = new System.Windows.Forms.Padding(2);
this.numLineWidthoffset.Maximum = new decimal(new int[] {
1000000000,
0,
0,
0});
this.numLineWidthoffset.Minimum = new decimal(new int[] {
100000000,
0,
0,
-2147483648});
this.numLineWidthoffset.Name = "numLineWidthoffset";
this.numLineWidthoffset.Size = new System.Drawing.Size(117, 21);
this.numLineWidthoffset.TabIndex = 15;
// //
// FrmSysSetting // FrmSysSetting
// //
@ -3126,6 +3235,11 @@
this.panel18.ResumeLayout(false); this.panel18.ResumeLayout(false);
this.panel18.PerformLayout(); this.panel18.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numHttpPort)).EndInit();
this.groupBox24.ResumeLayout(false);
this.panel24.ResumeLayout(false);
this.panel24.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numPToffset)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numLineWidthoffset)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -3341,5 +3455,11 @@
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox cbOpenFlawDistribution; private System.Windows.Forms.CheckBox cbOpenFlawDistribution;
private System.Windows.Forms.CheckBox cbOpenAxisXCal; private System.Windows.Forms.CheckBox cbOpenAxisXCal;
private System.Windows.Forms.GroupBox groupBox24;
private System.Windows.Forms.Panel panel24;
private System.Windows.Forms.Label label62;
private System.Windows.Forms.NumericUpDown numLineWidthoffset;
private System.Windows.Forms.Label label60;
private System.Windows.Forms.NumericUpDown numPToffset;
} }
} }

View File

@ -195,6 +195,19 @@ namespace ProductionControl
ldTmp = Convert.ToDouble(lsTmp); ldTmp = Convert.ToDouble(lsTmp);
chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked = (ldTmp > -1); chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked = (ldTmp > -1);
if (ldTmp > -1) numSizeBmp_Zoom_Image_SavePath_AutoClear.Value = (decimal)ldTmp; if (ldTmp > -1) numSizeBmp_Zoom_Image_SavePath_AutoClear.Value = (decimal)ldTmp;
//线宽PT补偿
lsTmp = Util.ReadIniValue(configPath, "DEV", "PT_Offset");
if (string.IsNullOrWhiteSpace(lsTmp))
this.numPToffset.Value = 0;
else
this.numPToffset.Value = (decimal)double.Parse(lsTmp);
lsTmp = Util.ReadIniValue(configPath, "DEV", "LineWidth_Offset");
if (string.IsNullOrWhiteSpace(lsTmp))
this.numLineWidthoffset.Value = 0;
else
this.numLineWidthoffset.Value = (decimal)double.Parse(lsTmp);
//DB //DB
this.txtDBCon.Text = Util.ReadIniValue(configPath, "DB", "DBConStr"); this.txtDBCon.Text = Util.ReadIniValue(configPath, "DB", "DBConStr");
//HTTP //HTTP
@ -346,6 +359,11 @@ namespace ProductionControl
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear", (chkSizeBmp_Compare_SavePath_AutoClear.Checked ? (double)numSizeBmp_Compare_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Compare_SavePath_AutoClear", (chkSizeBmp_Compare_SavePath_AutoClear.Checked ? (double)numSizeBmp_Compare_SavePath_AutoClear.Value : -1) + "");
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath", this.txtSizeBmp_Zoom_Image_SavePath.Text.Trim()); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath", this.txtSizeBmp_Zoom_Image_SavePath.Text.Trim());
Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear", (chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked ? (double)numSizeBmp_Zoom_Image_SavePath_AutoClear.Value : -1) + ""); Utils.Util.WriteIniValue(configPath, "DEV", "SizeBmp_Zoom_Image_SavePath_AutoClear", (chkSizeBmp_Zoom_Image_SavePath_AutoClear.Checked ? (double)numSizeBmp_Zoom_Image_SavePath_AutoClear.Value : -1) + "");
decimal PT_Offset = this.numPToffset.Value;
decimal LW_Offset = this.numLineWidthoffset.Value;
Utils.Util.WriteIniValue(configPath, "DEV", "PT_Offset", PT_Offset.ToString());
Utils.Util.WriteIniValue(configPath, "DEV", "LineWidth_Offset", LW_Offset.ToString());
//DB //DB
Utils.Util.WriteIniValue(configPath, "DB", "DBConStr", DBConStr); Utils.Util.WriteIniValue(configPath, "DB", "DBConStr", DBConStr);
//HTTP //HTTP

View File

@ -124,16 +124,16 @@
<data name="tsbtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIeSURBVFhH7ZfLShxBFIaPCJKAIuQFghHdCO5MSFCzES/Z YQUAAAA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5Sp3swnLxDPADV2CeeCLg7qh1DEvan0UPQcmTy3P229CiZan9w4I mFienpfgkrp6AUTy0hsWD5LfePq1XOVuNmGZeAY4p0swA/x9n24odcyLWh9FQ8DkT8vz/zehRMvTeweE
OQdC9MMCPtHH/1HjLvjbPqqnH7n6EZ0zQPZHqY36TvDD9RDSyI/mbA6pW8dZVCbNAgTBA1p0VF9UErOz nAYhnsEcPtXH26hxF3z+CdXTj1z9iM4ZIPuj1EZ9J/jheghp5KY5m0Pq1nEWlUmzAEHQRYt264tKYmrq
P2iXp8zZGqhS6aTFL6kf3H+7iiJwUvfFvSwB/AOYeWWRyPCtmgAAAABJRU5ErkJggg== gnZ5zJytgSqVB7R4lPrB/berKALf6b64lyWAG3A0ZYu/HkZSAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="tsbtnClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbtnClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -25,3 +25,4 @@ V1.2.3
1.修复开启比对但比对失败当成无比对bug 1.修复开启比对但比对失败当成无比对bug
2.修复查询显示的时候没有使用缺陷结果显示结果ok等bug 2.修复查询显示的时候没有使用缺陷结果显示结果ok等bug
3.更新上传图纸Mark点选项 3.更新上传图纸Mark点选项
4.增加pt和线宽补偿