Commit a2bfff0b 贾鹏旭

页面更改、添加出料口上升限制

1 个父辈 913215eb
...@@ -63,10 +63,10 @@ namespace AutoScanAndLabel ...@@ -63,10 +63,10 @@ namespace AutoScanAndLabel
{ {
int days = Convert.ToInt32(strArray[2]); int days = Convert.ToInt32(strArray[2]);
int seconds = Convert.ToInt32(strArray[3]); int seconds = Convert.ToInt32(strArray[3]);
DateTime d1 = DateTime.Parse("2024-01-25"); DateTime d1 = DateTime.Parse("2024-06-06");
var newData = d1.AddDays(days); //var newData = d1.AddDays(days);
newData = newData.AddSeconds(seconds * 2); //newData = newData.AddSeconds(seconds * 2);
updatetime = $"{crc.GetString("Res0220", "最后更新时间:")}" + newData.ToString("yyyy-MM-dd HH:mm:ss"); updatetime = $"{crc.GetString("Res0220", "最后更新时间:")}" + d1.ToString("yyyy-MM-dd HH:mm:ss");
} }
if (attributes.Length == 0) if (attributes.Length == 0)
......
...@@ -108,6 +108,12 @@ ...@@ -108,6 +108,12 @@
<Compile Include="FrmLabelEdit.Designer.cs"> <Compile Include="FrmLabelEdit.Designer.cs">
<DependentUpon>FrmLabelEdit.cs</DependentUpon> <DependentUpon>FrmLabelEdit.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmLabelSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmLabelSettings.Designer.cs">
<DependentUpon>FrmLabelSettings.cs</DependentUpon>
</Compile>
<Compile Include="IOControl.cs"> <Compile Include="IOControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -165,6 +171,9 @@ ...@@ -165,6 +171,9 @@
<EmbeddedResource Include="FrmLabelEdit.resx"> <EmbeddedResource Include="FrmLabelEdit.resx">
<DependentUpon>FrmLabelEdit.cs</DependentUpon> <DependentUpon>FrmLabelEdit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmLabelSettings.resx">
<DependentUpon>FrmLabelSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControl.resx"> <EmbeddedResource Include="IOControl.resx">
<DependentUpon>IOControl.cs</DependentUpon> <DependentUpon>IOControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -76,8 +76,8 @@ namespace AutoScanAndLabel ...@@ -76,8 +76,8 @@ namespace AutoScanAndLabel
listView1.Columns[2].Text = crc.GetString("Res0003", "信息"); listView1.Columns[2].Text = crc.GetString("Res0003", "信息");
stateView.Columns[1].Text = crc.GetString("Res0005", "模块"); stateView.Columns[1].Text = crc.GetString("Res0005", "模块");
stateView.Columns[2].Text = crc.GetString("Res0006", "步骤"); //stateView.Columns[2].Text = crc.GetString("Res0006", "步骤");
stateView.Columns[3].Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息"); stateView.Columns[2].Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息");
设备操作ToolStripMenuItem.Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "启用配置模式") : crc.GetString("Res0012", "停用配置模式"); 设备操作ToolStripMenuItem.Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "启用配置模式") : crc.GetString("Res0012", "停用配置模式");
...@@ -134,15 +134,15 @@ namespace AutoScanAndLabel ...@@ -134,15 +134,15 @@ namespace AutoScanAndLabel
c2.Width = 100; c2.Width = 100;
ColumnHeader c3 = new ColumnHeader(); ColumnHeader c3 = new ColumnHeader();
c3.Text = crc.GetString("Res0006", "步骤"); c3.Text = crc.GetString("Res0006", "步骤");
c3.Width = 100; c3.Width = 480;
ColumnHeader c4 = new ColumnHeader(); //ColumnHeader c4 = new ColumnHeader();
c4.Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息"); //c4.Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息");
c4.Width = 400; //c4.Width = 400;
stateView.Columns.Add(c1); stateView.Columns.Add(c1);
stateView.Columns.Add(c2); stateView.Columns.Add(c2);
stateView.Columns.Add(c3); stateView.Columns.Add(c3);
stateView.Columns.Add(c4); //stateView.Columns.Add(c4);
stateView.ColumnWidthChanging += listView_ColumnWidthChanging; stateView.ColumnWidthChanging += listView_ColumnWidthChanging;
#endregion #endregion
...@@ -268,14 +268,14 @@ namespace AutoScanAndLabel ...@@ -268,14 +268,14 @@ namespace AutoScanAndLabel
{ {
continue; continue;
} }
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), moveInfo.GetStateStr() }); // ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), moveInfo.GetStateStr() });
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.GetStateStr() });
stateView.Items.Add(lvi); stateView.Items.Add(lvi);
} }
var printstatus = PrinterHelper.LastPrintStatus; var printstatus = PrinterHelper.LastPrintStatus;
ListViewItem lvi1 = new ListViewItem(new string[] { "", crc.GetString("Res0216", "打印机"), (printstatus == CustPrinterStatus.Unknown) ? "Wait" : printstatus.ToString(), ConfigHelper.Config.Get(Setting_Init.PrinterName) }); ListViewItem lvi1 = new ListViewItem(new string[] { "", crc.GetString("Res0216", "打印机"), (printstatus == CustPrinterStatus.Unknown) ? "Wait" : printstatus.ToString(), ConfigHelper.Config.Get(Setting_Init.PrinterName) });
stateView.Items.Add(lvi1); stateView.Items.Add(lvi1);
this.ResumeLayout(true); this.ResumeLayout(true);
} }
private void AddForm(string id, string text, UserControl form) private void AddForm(string id, string text, UserControl form)
{ {
...@@ -680,22 +680,22 @@ namespace AutoScanAndLabel ...@@ -680,22 +680,22 @@ namespace AutoScanAndLabel
panel1.Controls.Clear(); panel1.Controls.Clear();
RobotManage.IsDebug = RobotManage.IsDebug ? false : true; RobotManage.IsDebug = RobotManage.IsDebug ? false : true;
(sender as ToolStripMenuItem).Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "设备操作") : crc.GetString("Res0012", "停用配置模式"); //(sender as ToolStripMenuItem).Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "设备操作") : crc.GetString("Res0012", "停用配置模式");
if (RobotManage.IsDebug) //if (RobotManage.IsDebug)
{ //{
RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config); // RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
addTablePage(); // addTablePage();
RobotManage.LoadDebug(); // RobotManage.LoadDebug();
} //}
else //else
{ //{
var tc = tabControl1.TabPages.Count; // var tc = tabControl1.TabPages.Count;
for (int i = 1; i <tc; i++) // for (int i = 1; i <tc; i++)
{ // {
tabControl1.TabPages[tc - i].Parent = null; // tabControl1.TabPages[tc - i].Parent = null;
} // }
} //}
} }
private void 退出ToolStripMenuItem1_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem1_Click(object sender, EventArgs e)
...@@ -777,6 +777,29 @@ namespace AutoScanAndLabel ...@@ -777,6 +777,29 @@ namespace AutoScanAndLabel
} }
} }
#endregion #endregion
private void 打印设置ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmLabelSettings frmLabelSettings = new FrmLabelSettings();
frmLabelSettings.StartPosition = FormStartPosition.CenterParent;
frmLabelSettings.ShowDialog();
}
private void 打开ToolStripMenuItem_Click(object sender, EventArgs e)
{
RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
addTablePage();
RobotManage.LoadDebug();
}
private void 关闭ToolStripMenuItem_Click(object sender, EventArgs e)
{
var tc = tabControl1.TabPages.Count;
for (int i = 1; i < tc; i++)
{
tabControl1.TabPages[tc - i].Parent = null;
}
}
} }
} }
\ No newline at end of file \ No newline at end of file
namespace AutoScanAndLabel
{
partial class FrmLabelSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLabelSettings));
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btn_labeledit = new System.Windows.Forms.Button();
this.cb_labelselect = new System.Windows.Forms.ComboBox();
this.cb_printerselect = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// label2
//
this.label2.Location = new System.Drawing.Point(28, 84);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(106, 20);
this.label2.TabIndex = 2;
this.label2.Text = "标签名";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Location = new System.Drawing.Point(28, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(106, 20);
this.label1.TabIndex = 2;
this.label1.Text = "打印机";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btn_labeledit
//
this.btn_labeledit.Location = new System.Drawing.Point(163, 122);
this.btn_labeledit.Name = "btn_labeledit";
this.btn_labeledit.Size = new System.Drawing.Size(107, 31);
this.btn_labeledit.TabIndex = 1;
this.btn_labeledit.Text = "标签编辑";
this.btn_labeledit.UseVisualStyleBackColor = true;
this.btn_labeledit.Click += new System.EventHandler(this.btn_labeledit_Click);
//
// cb_labelselect
//
this.cb_labelselect.FormattingEnabled = true;
this.cb_labelselect.Location = new System.Drawing.Point(143, 84);
this.cb_labelselect.Name = "cb_labelselect";
this.cb_labelselect.Size = new System.Drawing.Size(198, 20);
this.cb_labelselect.TabIndex = 0;
this.cb_labelselect.SelectedIndexChanged += new System.EventHandler(this.cb_labelselect_SelectedIndexChanged);
//
// cb_printerselect
//
this.cb_printerselect.FormattingEnabled = true;
this.cb_printerselect.Location = new System.Drawing.Point(143, 31);
this.cb_printerselect.Name = "cb_printerselect";
this.cb_printerselect.Size = new System.Drawing.Size(198, 20);
this.cb_printerselect.TabIndex = 0;
this.cb_printerselect.SelectedIndexChanged += new System.EventHandler(this.cb_printerselect_SelectedIndexChanged);
//
// FrmLabelSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(444, 189);
this.Controls.Add(this.btn_labeledit);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cb_printerselect);
this.Controls.Add(this.cb_labelselect);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmLabelSettings";
this.Text = "标签设置";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_labeledit;
private System.Windows.Forms.ComboBox cb_labelselect;
private System.Windows.Forms.ComboBox cb_printerselect;
}
}
\ No newline at end of file \ No newline at end of file
using ConfigHelper;
using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AutoScanAndLabel
{
public partial class FrmLabelSettings : Form
{
public FrmLabelSettings()
{
InitializeComponent();
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
crc.LanguageProcess(this, this.GetType().Name);
RobotManage_LoadFinishEvent(true,"");
}
private void btn_labeledit_Click(object sender, EventArgs e)
{
var keys = File.ReadAllLines(Application.StartupPath + "\\NeoScan\\Config\\MacroKey.txt");
PrintLabel.FrmLabel frmLabel = new PrintLabel.FrmLabel();
frmLabel.Text = crc.GetString("FrmLabel_Text", "标签编辑");
crc.LanguageProcess(frmLabel, "FrmLabel");
frmLabel.KeyWord.AddRange(keys);
frmLabel.Show();
RobotManage_LoadFinishEvent(true, "");
RobotManage.LoadPrintSetting();
}
private void RobotManage_LoadFinishEvent(bool state, string msg)
{
if (!state)
return;
cb_printerselect.Items.Clear();
cb_labelselect.Items.Clear();
foreach (string sPrint in System.Drawing.Printing.PrinterSettings.InstalledPrinters)//获取所有打印机名称
{
cb_printerselect.Items.Add(sPrint);
}
if (RobotManage.printerHelper != null)
{
foreach (string labelname in RobotManage.printerHelper.GetLabelList())
{
cb_labelselect.Items.Add(labelname);
}
}
string PrintName = ConfigHelper.Config.Get(Setting_Init.PrinterName);
string labelName = ConfigHelper.Config.Get(Setting_Init.LabelName);
cb_printerselect.Text = PrintName;
cb_labelselect.Text = labelName;
}
private void cb_printerselect_SelectedIndexChanged(object sender, EventArgs e)
{
Config.Set(Setting_Init.PrinterName, (sender as ComboBox).Text);
RobotManage.LoadPrintSetting();
}
private void cb_labelselect_SelectedIndexChanged(object sender, EventArgs e)
{
Config.Set(Setting_Init.LabelName, (sender as ComboBox).Text);
RobotManage.LoadPrintSetting();
}
}
}
...@@ -82,12 +82,12 @@ namespace AutoScanAndLabel ...@@ -82,12 +82,12 @@ namespace AutoScanAndLabel
this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 21); this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 17);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(336, 738); this.tableLayoutPanel1.Size = new System.Drawing.Size(336, 742);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// groupBox1 // groupBox1
...@@ -326,7 +326,7 @@ namespace AutoScanAndLabel ...@@ -326,7 +326,7 @@ namespace AutoScanAndLabel
this.txtDOIndex.Location = new System.Drawing.Point(73, 52); this.txtDOIndex.Location = new System.Drawing.Point(73, 52);
this.txtDOIndex.MaxLength = 10; this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex"; this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(70, 27); this.txtDOIndex.Size = new System.Drawing.Size(70, 23);
this.txtDOIndex.TabIndex = 242; this.txtDOIndex.TabIndex = 242;
this.txtDOIndex.Text = "0"; this.txtDOIndex.Text = "0";
// //
...@@ -337,7 +337,7 @@ namespace AutoScanAndLabel ...@@ -337,7 +337,7 @@ namespace AutoScanAndLabel
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(27, 55); this.label14.Location = new System.Drawing.Point(27, 55);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(43, 20); this.label14.Size = new System.Drawing.Size(35, 17);
this.label14.TabIndex = 239; this.label14.TabIndex = 239;
this.label14.Text = "地址:"; this.label14.Text = "地址:";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -348,7 +348,7 @@ namespace AutoScanAndLabel ...@@ -348,7 +348,7 @@ namespace AutoScanAndLabel
this.txtWriteTime.Location = new System.Drawing.Point(242, 52); this.txtWriteTime.Location = new System.Drawing.Point(242, 52);
this.txtWriteTime.MaxLength = 10; this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime"; this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(72, 27); this.txtWriteTime.Size = new System.Drawing.Size(72, 23);
this.txtWriteTime.TabIndex = 238; this.txtWriteTime.TabIndex = 238;
this.txtWriteTime.Text = "0"; this.txtWriteTime.Text = "0";
// //
...@@ -371,7 +371,7 @@ namespace AutoScanAndLabel ...@@ -371,7 +371,7 @@ namespace AutoScanAndLabel
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(162, 55); this.label5.Location = new System.Drawing.Point(162, 55);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(74, 20); this.label5.Size = new System.Drawing.Size(60, 17);
this.label5.TabIndex = 237; this.label5.TabIndex = 237;
this.label5.Text = "定时(ms):"; this.label5.Text = "定时(ms):";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -421,7 +421,7 @@ namespace AutoScanAndLabel ...@@ -421,7 +421,7 @@ namespace AutoScanAndLabel
this.cmbWriteIO.FormattingEnabled = true; this.cmbWriteIO.FormattingEnabled = true;
this.cmbWriteIO.Location = new System.Drawing.Point(24, 18); this.cmbWriteIO.Location = new System.Drawing.Point(24, 18);
this.cmbWriteIO.Name = "cmbWriteIO"; this.cmbWriteIO.Name = "cmbWriteIO";
this.cmbWriteIO.Size = new System.Drawing.Size(278, 32); this.cmbWriteIO.Size = new System.Drawing.Size(278, 27);
this.cmbWriteIO.TabIndex = 234; this.cmbWriteIO.TabIndex = 234;
this.cmbWriteIO.ValueMember = "ProName"; this.cmbWriteIO.ValueMember = "ProName";
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem); this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
...@@ -433,12 +433,12 @@ namespace AutoScanAndLabel ...@@ -433,12 +433,12 @@ namespace AutoScanAndLabel
this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 21); this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17);
this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(292, 738); this.tableLayoutPanel2.Size = new System.Drawing.Size(292, 742);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox4 // groupBox4
......
...@@ -46,6 +46,7 @@ namespace AutoScanAndLabel ...@@ -46,6 +46,7 @@ namespace AutoScanAndLabel
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox(); this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox();
this.cb_IgnoreGratingSignal = new System.Windows.Forms.CheckBox(); this.cb_IgnoreGratingSignal = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.uC_U11 = new AutoScanAndLabel.UC_U1(); this.uC_U11 = new AutoScanAndLabel.UC_U1();
this.listEditControl1 = new AutoScanAndLabel.UC.ListEditControl(); this.listEditControl1 = new AutoScanAndLabel.UC.ListEditControl();
this.listEdit_pn = new AutoScanAndLabel.UC.ListEditControl(); this.listEdit_pn = new AutoScanAndLabel.UC.ListEditControl();
...@@ -62,12 +63,13 @@ namespace AutoScanAndLabel ...@@ -62,12 +63,13 @@ namespace AutoScanAndLabel
this.groupBox1.Controls.Add(this.btn_labeledit); this.groupBox1.Controls.Add(this.btn_labeledit);
this.groupBox1.Controls.Add(this.cb_labelselect); this.groupBox1.Controls.Add(this.cb_labelselect);
this.groupBox1.Controls.Add(this.cb_printerselect); this.groupBox1.Controls.Add(this.cb_printerselect);
this.groupBox1.Location = new System.Drawing.Point(3, 3); this.groupBox1.Location = new System.Drawing.Point(12, 432);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(383, 160); this.groupBox1.Size = new System.Drawing.Size(383, 160);
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "打印设置"; this.groupBox1.Text = "打印设置";
this.groupBox1.Visible = false;
// //
// label2 // label2
// //
...@@ -102,7 +104,7 @@ namespace AutoScanAndLabel ...@@ -102,7 +104,7 @@ namespace AutoScanAndLabel
this.cb_labelselect.FormattingEnabled = true; this.cb_labelselect.FormattingEnabled = true;
this.cb_labelselect.Location = new System.Drawing.Point(134, 75); this.cb_labelselect.Location = new System.Drawing.Point(134, 75);
this.cb_labelselect.Name = "cb_labelselect"; this.cb_labelselect.Name = "cb_labelselect";
this.cb_labelselect.Size = new System.Drawing.Size(198, 26); this.cb_labelselect.Size = new System.Drawing.Size(198, 20);
this.cb_labelselect.TabIndex = 0; this.cb_labelselect.TabIndex = 0;
this.cb_labelselect.SelectedIndexChanged += new System.EventHandler(this.cb_labelselect_SelectedIndexChanged); this.cb_labelselect.SelectedIndexChanged += new System.EventHandler(this.cb_labelselect_SelectedIndexChanged);
// //
...@@ -111,23 +113,23 @@ namespace AutoScanAndLabel ...@@ -111,23 +113,23 @@ namespace AutoScanAndLabel
this.cb_printerselect.FormattingEnabled = true; this.cb_printerselect.FormattingEnabled = true;
this.cb_printerselect.Location = new System.Drawing.Point(134, 37); this.cb_printerselect.Location = new System.Drawing.Point(134, 37);
this.cb_printerselect.Name = "cb_printerselect"; this.cb_printerselect.Name = "cb_printerselect";
this.cb_printerselect.Size = new System.Drawing.Size(198, 26); this.cb_printerselect.Size = new System.Drawing.Size(198, 20);
this.cb_printerselect.TabIndex = 0; this.cb_printerselect.TabIndex = 0;
this.cb_printerselect.SelectedIndexChanged += new System.EventHandler(this.cb_printerselect_SelectedIndexChanged); this.cb_printerselect.SelectedIndexChanged += new System.EventHandler(this.cb_printerselect_SelectedIndexChanged);
// //
// chbAutoRun // chbAutoRun
// //
this.chbAutoRun.AutoSize = true; this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Location = new System.Drawing.Point(3, 169); this.chbAutoRun.Location = new System.Drawing.Point(27, 23);
this.chbAutoRun.Name = "chbAutoRun"; this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(124, 22); this.chbAutoRun.Size = new System.Drawing.Size(48, 16);
this.chbAutoRun.TabIndex = 1; this.chbAutoRun.TabIndex = 1;
this.chbAutoRun.Text = "开机自启动"; this.chbAutoRun.Text = "开机";
this.chbAutoRun.UseVisualStyleBackColor = true; this.chbAutoRun.UseVisualStyleBackColor = true;
// //
// btn_labelDebug // btn_labelDebug
// //
this.btn_labelDebug.Location = new System.Drawing.Point(402, 163); this.btn_labelDebug.Location = new System.Drawing.Point(0, 355);
this.btn_labelDebug.Name = "btn_labelDebug"; this.btn_labelDebug.Name = "btn_labelDebug";
this.btn_labelDebug.Size = new System.Drawing.Size(140, 28); this.btn_labelDebug.Size = new System.Drawing.Size(140, 28);
this.btn_labelDebug.TabIndex = 2; this.btn_labelDebug.TabIndex = 2;
...@@ -162,7 +164,7 @@ namespace AutoScanAndLabel ...@@ -162,7 +164,7 @@ namespace AutoScanAndLabel
// //
this.txt_code.Location = new System.Drawing.Point(6, 24); this.txt_code.Location = new System.Drawing.Point(6, 24);
this.txt_code.Name = "txt_code"; this.txt_code.Name = "txt_code";
this.txt_code.Size = new System.Drawing.Size(264, 28); this.txt_code.Size = new System.Drawing.Size(264, 21);
this.txt_code.TabIndex = 5; this.txt_code.TabIndex = 5;
// //
// btn_codetest // btn_codetest
...@@ -197,7 +199,7 @@ namespace AutoScanAndLabel ...@@ -197,7 +199,7 @@ namespace AutoScanAndLabel
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(36, 553); this.button1.Location = new System.Drawing.Point(0, 389);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23); this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 10; this.button1.TabIndex = 10;
...@@ -209,9 +211,9 @@ namespace AutoScanAndLabel ...@@ -209,9 +211,9 @@ namespace AutoScanAndLabel
// cb_EnableBuzzer // cb_EnableBuzzer
// //
this.cb_EnableBuzzer.AutoSize = true; this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(124, 169); this.cb_EnableBuzzer.Location = new System.Drawing.Point(27, 55);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer"; this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(124, 22); this.cb_EnableBuzzer.Size = new System.Drawing.Size(84, 16);
this.cb_EnableBuzzer.TabIndex = 13; this.cb_EnableBuzzer.TabIndex = 13;
this.cb_EnableBuzzer.Text = "使用蜂鸣器"; this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true; this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
...@@ -220,14 +222,25 @@ namespace AutoScanAndLabel ...@@ -220,14 +222,25 @@ namespace AutoScanAndLabel
// cb_IgnoreGratingSignal // cb_IgnoreGratingSignal
// //
this.cb_IgnoreGratingSignal.AutoSize = true; this.cb_IgnoreGratingSignal.AutoSize = true;
this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(254, 169); this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(27, 89);
this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal"; this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal";
this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(142, 22); this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(96, 16);
this.cb_IgnoreGratingSignal.TabIndex = 11; this.cb_IgnoreGratingSignal.TabIndex = 11;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅"; this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true; this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged); this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged);
// //
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(27, 126);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(168, 16);
this.checkBox1.TabIndex = 14;
this.checkBox1.Text = "忽略安全检查(含安全光栅)";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// uC_U11 // uC_U11
// //
this.uC_U11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.uC_U11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -237,16 +250,17 @@ namespace AutoScanAndLabel ...@@ -237,16 +250,17 @@ namespace AutoScanAndLabel
this.uC_U11.Name = "uC_U11"; this.uC_U11.Name = "uC_U11";
this.uC_U11.Size = new System.Drawing.Size(678, 150); this.uC_U11.Size = new System.Drawing.Size(678, 150);
this.uC_U11.TabIndex = 9; this.uC_U11.TabIndex = 9;
this.uC_U11.Visible = false;
// //
// listEditControl1 // listEditControl1
// //
this.listEditControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.listEditControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listEditControl1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.listEditControl1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listEditControl1.ListFile = "config/qty.list"; this.listEditControl1.ListFile = "config/qty.list";
this.listEditControl1.Location = new System.Drawing.Point(3, 24); this.listEditControl1.Location = new System.Drawing.Point(3, 17);
this.listEditControl1.Margin = new System.Windows.Forms.Padding(5); this.listEditControl1.Margin = new System.Windows.Forms.Padding(5);
this.listEditControl1.Name = "listEditControl1"; this.listEditControl1.Name = "listEditControl1";
this.listEditControl1.Size = new System.Drawing.Size(354, 201); this.listEditControl1.Size = new System.Drawing.Size(354, 208);
this.listEditControl1.TabIndex = 3; this.listEditControl1.TabIndex = 3;
this.listEditControl1.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh); this.listEditControl1.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh);
// //
...@@ -255,16 +269,17 @@ namespace AutoScanAndLabel ...@@ -255,16 +269,17 @@ namespace AutoScanAndLabel
this.listEdit_pn.Dock = System.Windows.Forms.DockStyle.Fill; this.listEdit_pn.Dock = System.Windows.Forms.DockStyle.Fill;
this.listEdit_pn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.listEdit_pn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listEdit_pn.ListFile = "config/pn.list"; this.listEdit_pn.ListFile = "config/pn.list";
this.listEdit_pn.Location = new System.Drawing.Point(3, 24); this.listEdit_pn.Location = new System.Drawing.Point(3, 17);
this.listEdit_pn.Margin = new System.Windows.Forms.Padding(5); this.listEdit_pn.Margin = new System.Windows.Forms.Padding(5);
this.listEdit_pn.Name = "listEdit_pn"; this.listEdit_pn.Name = "listEdit_pn";
this.listEdit_pn.Size = new System.Drawing.Size(354, 151); this.listEdit_pn.Size = new System.Drawing.Size(354, 158);
this.listEdit_pn.TabIndex = 3; this.listEdit_pn.TabIndex = 3;
this.listEdit_pn.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh); this.listEdit_pn.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh);
// //
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.cb_EnableBuzzer); this.Controls.Add(this.cb_EnableBuzzer);
this.Controls.Add(this.cb_IgnoreGratingSignal); this.Controls.Add(this.cb_IgnoreGratingSignal);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
...@@ -310,5 +325,6 @@ namespace AutoScanAndLabel ...@@ -310,5 +325,6 @@ namespace AutoScanAndLabel
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox cb_EnableBuzzer; private System.Windows.Forms.CheckBox cb_EnableBuzzer;
private System.Windows.Forms.CheckBox cb_IgnoreGratingSignal; private System.Windows.Forms.CheckBox cb_IgnoreGratingSignal;
private System.Windows.Forms.CheckBox checkBox1;
} }
} }
...@@ -215,5 +215,10 @@ namespace AutoScanAndLabel ...@@ -215,5 +215,10 @@ namespace AutoScanAndLabel
Config.Set("EnableBuzzer", cb_EnableBuzzer.Checked); Config.Set("EnableBuzzer", cb_EnableBuzzer.Checked);
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked; AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
} }
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
RobotManage.IgnoreSafecheck((sender as CheckBox).Checked);
}
} }
} }
...@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO Write ...@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI List Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI List
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO List Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO List
Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 Label Config. Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机自启动 Auto Start Form1_tabControl1___SettingControl_chbAutoRun_Text 开机 Power On
Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 Printer Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 Label Name Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 Label Name
...@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO List ...@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO List
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 Save All Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 Save All
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 Positions List Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 Positions List
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 Label Config. Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机自启动 Auto Start Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机 Power On
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 Printer Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 Label Name Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 Label Name
...@@ -192,7 +192,7 @@ Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer ...@@ -192,7 +192,7 @@ Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) Ignore Safety Check (Including Light Curtain) Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) Ignore Safety Check (Including Light Curtain)
Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 Running Status Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 Running Status
Form1_tabControl1_tabPage1_Text 信息 Info Form1_tabControl1_tabPage1_Text 状态 Status
FrmCodeDecode_btnAn_Text 变暗 Dimming FrmCodeDecode_btnAn_Text 变暗 Dimming
FrmCodeDecode_btnbarCode_Text 一维码识别 1D Barcode Recognition FrmCodeDecode_btnbarCode_Text 一维码识别 1D Barcode Recognition
FrmCodeDecode_btnCameraImage_Text 相机获取图片 Capture Image From Camera FrmCodeDecode_btnCameraImage_Text 相机获取图片 Capture Image From Camera
...@@ -215,7 +215,7 @@ FrmCodeDecode_lblCount_Text 条码数量: Barcode Quantity ...@@ -215,7 +215,7 @@ FrmCodeDecode_lblCount_Text 条码数量: Barcode Quantity
FrmCodeDecode_Text 二维码识别 QR Barcode Recognition FrmCodeDecode_Text 二维码识别 QR Barcode Recognition
FrmCodeDecode_label6_Text 图片识别结果 Image recognition results: FrmCodeDecode_label6_Text 图片识别结果 Image recognition results:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes
FrmCodeDecode_check_issaveimage_Text 是否保存图片 Is Image Save FrmCodeDecode_check_issaveimage_Text 是否保存图片 Save Image
FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder
FrmLabel_BtnFieldAdd_Text 字段添加 Add Field FrmLabel_BtnFieldAdd_Text 字段添加 Add Field
FrmLabel_BtnFieldDel_Text 字段删除 Delete Field FrmLabel_BtnFieldDel_Text 字段删除 Delete Field
...@@ -332,10 +332,10 @@ Res0004 时间 Time ...@@ -332,10 +332,10 @@ Res0004 时间 Time
Res0005 模块 Module Res0005 模块 Module
Res0006 步骤 Step Res0006 步骤 Step
Res0007 日志 Log Res0007 日志 Log
Res0008 IO调试 IO Config. Res0008 I/O I/O
Res0009 伺服调试 Servo Config. Res0009 伺服调试 Servo Config.
Res0010 相关设置 Related Settings Res0010 相关设置 Related Settings
Res0011 启用配置模式 Enable Config. Mode Res0011 配置模式 Enable Config. Mode
Res0012 停用配置模式 Disable Config. Mode Res0012 停用配置模式 Disable Config. Mode
Res0013 暂停运行 Pause Execution Res0013 暂停运行 Pause Execution
Res0014 恢复运行 Resume Execution Res0014 恢复运行 Resume Execution
...@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 AGV Cannot Be Called Repeatedly. ...@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 AGV Cannot Be Called Repeatedly.
Res0036 移载 Move Res0036 移载 Move
Res0037 温湿度传感器[ Temperature And Humidity Sensor Res0037 温湿度传感器[ Temperature And Humidity Sensor
Res0038 本机IP:[ Local IP: Res0038 本机IP:[ Local IP:
Res0039 入口取料 LP Picking Res0039 入料口 Feed inlet
Res0040 出口空闲中 UP Available Res0040 出口空闲中 UP Available
Res0041 本机IP Local IP Res0041 本机IP Local IP
Res0042 移栽 Remove Res0042 移栽 Remove
...@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继 ...@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Puting Stacker And Press The LP Button. Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Puting Stacker And Press The LP Button.
Res0049 等待出口允许放料 Wait For UP Release Res0049 等待出口允许放料 Wait For UP Release
Res0050 等待吸盘放松 Waiting Sucker Released Res0050 等待吸盘放松 Waiting Sucker Released
Res0051 出口放料 UP Release Res0051 出料口 Discharge port
Res0052 贴标 ReLabel Res0052 贴标 ReLabel
Res0053 重置 Reset Res0053 重置 Reset
Res0054 可能与贴标Y轴干涉 Possible Label Interference Y-Axis Res0054 可能与贴标Y轴干涉 Possible Label Interference Y-Axis
...@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧 ...@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧
Res0098 等待左侧允许放料 Waiting For Left Side To Allow Stacker Placement Res0098 等待左侧允许放料 Waiting For Left Side To Allow Stacker Placement
Res0099 等待料盘取走 Waiting For Reel Removal Res0099 等待料盘取走 Waiting For Reel Removal
Res0100 ,料串已清空. Stacker Empty Res0100 ,料串已清空. Stacker Empty
Res0101 启用配置模式 Config. Mode Res0101 配置模式 Config. Mode
Res0102 吸盘夹紧 Vacumm Gripper Tightened Res0102 吸盘夹紧 Vacumm Gripper Tightened
Res0103 吸盘放松 Vacumm Gripper Released Res0103 吸盘放松 Vacumm Gripper Released
Res0104 等待 Waiting Res0104 等待 Waiting
...@@ -516,4 +516,22 @@ Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayo ...@@ -516,4 +516,22 @@ Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayo
Label_XOffset 贴标X轴偏移量 Labeling X-axis offset Label_XOffset 贴标X轴偏移量 Labeling X-axis offset
Label_YOffset 贴标Y轴偏移量 Labeling Y-axis offset Label_YOffset 贴标Y轴偏移量 Labeling Y-axis offset
Form1_tabControl1_Res0008__IOControl_groupBox3_tableLayoutPanel1_IO_RightCar_Check_label1_Text X11_进料口料车检测 Inspection of feeding port material truck Form1_tabControl1_Res0008__IOControl_groupBox3_tableLayoutPanel1_IO_RightCar_Check_label1_Text X11_进料口料车检测 Inspection of feeding port material truck
Form1_tabControl1_Res0008__IOControl_groupBox4_tableLayoutPanel2_IO_RightMoto_Reverse_label1_Text Y09_进料口电机反转指令 Input port motor reverse command
\ No newline at end of file \ No newline at end of file
Form1_tabControl1_Res0008__IOControl_groupBox4_tableLayoutPanel2_IO_RightMoto_Reverse_label1_Text Y09_进料口电机反转指令 Input port motor reverse command
Form1_tabControl1_tabPage1_groupBox4_Text 入料口 Feed inlet
Form1_tabControl1_tabPage1_groupBox4_btn_releaserightshelf_Text 释放料串 Release Material String
Form1_tabControl1_tabPage1_groupBox4_btn_maulstart_Text 手动上料 Manual Feeding
Form1_tabControl1_tabPage1_groupBox3_Text 出料口 Discharge Port
Form1_tabControl1_tabPage1_groupBox3_btn_releaseleftshelf_Text 释放料串 Release Material String
Form1_tabControl1_tabPage1_groupBox3_btn_leftempty_Text 手动上料 Manual Feeding
menuStrip1_打印设置ToolStripMenuItem_Text 打印设置 Print Settings
设备操作ToolStripMenuItem_打开ToolStripMenuItem_Text 打开 Open
设备操作ToolStripMenuItem_关闭ToolStripMenuItem_Text 关闭 Close
Form1_tabControl1_Res0010__SettingControl_checkBox1_Text 忽略安全检查(含安全光栅) Ignore Safety Check (Including Safety Grating)
AgvRequest_FeedPort 进料口AGV请求应答 Feed Port AGV Request Response
AgvRequest_Outlet 出料口AGV请求应答 Discharge Port AGV Request Response
AxisMoveControl_groupAxis_panel1_cmbAxis_Text 进料提升轴 Feed Lifting Shaft
FrmLabelSettings_FrmLabelSettings_Text 标签设置 Label Settings
FrmLabelSettings_btn_labeledit_Text 标签编辑 Label Editing
FrmLabelSettings_label2_Text 标签名 Label Name
FrmLabelSettings_label1_Text 打印机 Printer
FrmLabel_label7_Text 字段属性 Field Properties
...@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO写入 ...@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO写入
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI列表 Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI列表
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO列表 Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO列表
Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 贴标调试 Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 贴标调试
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机自启动 开机自启动 Form1_tabControl1___SettingControl_chbAutoRun_Text 开机 开机
Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑 Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑
Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 打印机 Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 打印机
Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 标签名 Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 标签名
...@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO列表 ...@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO列表
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 全部保存 Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 全部保存
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 点位列表 Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 点位列表
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 贴标调试 Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 贴标调试
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机自启动 开机自启动 Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机 开机
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑 Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑
Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 打印机 Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 打印机
Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 标签名 Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 标签名
...@@ -191,8 +191,8 @@ Form1_tabControl1_tabPage1_btn_releaserightshelf_Text 安全释放入口料串 ...@@ -191,8 +191,8 @@ Form1_tabControl1_tabPage1_btn_releaserightshelf_Text 安全释放入口料串
Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 使用蜂鸣器 Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 使用蜂鸣器
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 忽略安全光栅 Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 忽略安全光栅
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) 忽略安全检查(含安全光栅) Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) 忽略安全检查(含安全光栅)
Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 运行状态 Form1_tabControl1_tabPage1_groupBox1_Text 硬件状态 硬件状态
Form1_tabControl1_tabPage1_Text 消息 消息 Form1_tabControl1_tabPage1_Text 状态 状态
FrmCodeDecode_btnAn_Text 变暗 变暗 FrmCodeDecode_btnAn_Text 变暗 变暗
FrmCodeDecode_btnbarCode_Text 一维码识别 一维码识别 FrmCodeDecode_btnbarCode_Text 一维码识别 一维码识别
FrmCodeDecode_btnCameraImage_Text 相机获取图片 相机获取图片 FrmCodeDecode_btnCameraImage_Text 相机获取图片 相机获取图片
...@@ -229,7 +229,7 @@ FrmLabel_grpDsc_Text 字段说明 字段说明 ...@@ -229,7 +229,7 @@ FrmLabel_grpDsc_Text 字段说明 字段说明
FrmLabel_Text 标签编辑 标签编辑 FrmLabel_Text 标签编辑 标签编辑
FrmLabel_label_labelsize_Text 标签尺寸: 标签尺寸: FrmLabel_label_labelsize_Text 标签尺寸: 标签尺寸:
FrmLabel_groupBox1_Text 字段说明 字段说明 FrmLabel_groupBox1_Text 字段说明 字段说明
FrmLabel_label5_Text 高: 高: FrmLabel_label5_Text 长: 长:
FrmLabel_label6_Text 宽: 宽: FrmLabel_label6_Text 宽: 宽:
menuStrip1_关于ToolStripMenuItem_Text 关于 关于 menuStrip1_关于ToolStripMenuItem_Text 关于 关于
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 设备操作 menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 设备操作
...@@ -332,10 +332,10 @@ Res0004 时间 时间 ...@@ -332,10 +332,10 @@ Res0004 时间 时间
Res0005 模块 模块 Res0005 模块 模块
Res0006 步骤 步骤 Res0006 步骤 步骤
Res0007 日志 日志 Res0007 日志 日志
Res0008 IO调试 IO调试 Res0008 I/O I/O
Res0009 伺服调试 伺服调试 Res0009 伺服调试 伺服调试
Res0010 相关设置 相关设置 Res0010 相关设置 相关设置
Res0011 启用配置模式 启用配置模式 Res0011 配置模式 配置模式
Res0012 停用配置模式 停用配置模式 Res0012 停用配置模式 停用配置模式
Res0013 暂停运行 暂停运行 Res0013 暂停运行 暂停运行
Res0014 恢复运行 恢复运行 Res0014 恢复运行 恢复运行
...@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 已呼叫AGV,不能重复呼叫 ...@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 已呼叫AGV,不能重复呼叫
Res0036 移载 移载 Res0036 移载 移载
Res0037 温湿度传感器[ 温湿度传感器[ Res0037 温湿度传感器[ 温湿度传感器[
Res0038 本机IP:[ 本机IP:[ Res0038 本机IP:[ 本机IP:[
Res0039 入口取料 入口取料 Res0039 入料口 入料口
Res0040 出口空闲中 出口空闲中 Res0040 出口空闲中 出口空闲中
Res0041 本机IP 本机IP Res0041 本机IP 本机IP
Res0042 移栽 移栽 Res0042 移栽 移栽
...@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继 ...@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续
Res0049 等待出口允许放料 等待出口允许放料 Res0049 等待出口允许放料 等待出口允许放料
Res0050 等待吸盘放松 等待吸盘放松 Res0050 等待吸盘放松 等待吸盘放松
Res0051 出口放料 出口放料 Res0051 出料口 出料口
Res0052 贴标 贴标 Res0052 贴标 贴标
Res0053 重置 重置 Res0053 重置 重置
Res0054 可能与贴标Y轴干涉 可能与贴标Y轴干涉 Res0054 可能与贴标Y轴干涉 可能与贴标Y轴干涉
...@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧 ...@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧
Res0098 等待左侧允许放料 等待左侧允许放料 Res0098 等待左侧允许放料 等待左侧允许放料
Res0099 等待料盘取走 等待料盘取走 Res0099 等待料盘取走 等待料盘取走
Res0100 ,料串已清空. ,料串已清空. Res0100 ,料串已清空. ,料串已清空.
Res0101 启用配置模式 启用配置模式 Res0101 配置模式 配置模式
Res0102 吸盘夹紧 吸盘夹紧 Res0102 吸盘夹紧 吸盘夹紧
Res0103 吸盘放松 吸盘放松 Res0103 吸盘放松 吸盘放松
Res0104 等待 等待 Res0104 等待 等待
......
...@@ -283,13 +283,15 @@ namespace OnlineStore ...@@ -283,13 +283,15 @@ namespace OnlineStore
} }
private static void PreControlLanaguage(Control partentControl, string className) private static void PreControlLanaguage(Control partentControl, string className)
{ {
string newStr = ""; if (className.IndexOf('_') < 0)
//Con_GetTxt(partentControl, out string title); {
//string newStr = GetString(GetTextIdStr(className, partentControl.Name), title); Con_GetTxt(partentControl, out string title);
//if (!newStr.Equals("")) string newStr = GetString(GetTextIdStr(className, partentControl.Name), title);
//{ if (!newStr.Equals(""))
//Con_SetTxt(partentControl, newStr.Replace("\\n", "\n")); {
//} Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
}
}
foreach (Control con in partentControl.Controls) foreach (Control con in partentControl.Controls)
{ {
string txt = ""; string txt = "";
...@@ -302,7 +304,7 @@ namespace OnlineStore ...@@ -302,7 +304,7 @@ namespace OnlineStore
if (Con_GetTxt(con, out txt)) if (Con_GetTxt(con, out txt))
{ {
newStr = GetString(GetTextIdStr(className, con.Name), txt); string newStr = GetString(GetTextIdStr(className, con.Name), txt);
if (!newStr.Equals("")) if (!newStr.Equals(""))
{ {
Con_SetTxt(con, newStr.Replace("\\n", "\n")); Con_SetTxt(con, newStr.Replace("\\n", "\n"));
......
...@@ -7,6 +7,7 @@ using System.Collections.Generic; ...@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Data;
namespace DeviceLibrary namespace DeviceLibrary
{ {
...@@ -45,40 +46,35 @@ namespace DeviceLibrary ...@@ -45,40 +46,35 @@ namespace DeviceLibrary
var currpos = Left_Batch_Axis.GetAclPosition(); var currpos = Left_Batch_Axis.GetAclPosition();
if (currpos <= Config.Left_Batch_P1) if (currpos <= Config.Left_Batch_P1)
{ {
//LeftShelfNoTray = true;
LeftMoveInfo.NextMoveStep(MoveStep.L40_ShelfFull); LeftMoveInfo.NextMoveStep(MoveStep.L40_ShelfFull);
LeftMoveInfo.log($"批量轴已下降到底,料串已满,Left_Batch_P1={Config.Left_Batch_P1},needpos={currpos}"); LeftMoveInfo.log($"批量轴已下降到底,料串已满,Left_Batch_P1={Config.Left_Batch_P1},needpos={currpos}");
} }
else else
{ {
LeftMoveInfo.NextMoveStep(MoveStep.L10_WaitReelPut); LeftMoveInfo.NextMoveStep(MoveStep.L10_WaitReelPut);
//Left_Batch_Axis.AbsMove(LeftMoveInfo, currpos, Config.Left_Batch_P1_speed);
//LeftMoveInfo.log($"批量轴已下降一张料盘位置,等待料盘放入,needpos={currpos}");
} }
break; break;
case MoveStep.L10_WaitReelPut: case MoveStep.L10_WaitReelPut:
Msg.add(crc.GetString("Res0095", "左侧空闲中"), MsgLevel.info); Msg.add(crc.GetString("Res0095", "左侧空闲中"), MsgLevel.info);
break; break;
case MoveStep.L11_ReelPutted: case MoveStep.L11_ReelPutted:
LeftCount++; LeftCount++;
LeftMoveInfo.NextMoveStep(MoveStep.L12); LeftMoveInfo.NextMoveStep(MoveStep.L12);
//LeftBatchAxisToP1();
LeftBatchAxisDown(); LeftBatchAxisDown();
LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone(); LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
//LeftMoveInfo.log($"料盘已放入,批量轴上升,LeftStartMovePosition={LeftStartMovePosition}");
LeftMoveInfo.log($"左侧料盘已放入,批量轴下降固定值"); LeftMoveInfo.log($"左侧料盘已放入,批量轴下降固定值");
break; break;
case MoveStep.L12: case MoveStep.L12:
LeftMoveInfo.NextMoveStep(MoveStep.L13); LeftMoveInfo.NextMoveStep(MoveStep.L13);
LeftBatchAxisToP2(false); //LeftBatchAxisToP2(false);
LeftAxisRiseMax();
LeftMoveInfo.log($"批量轴上升到P2位置,LeftStartMovePosition={LeftStartMovePosition}"); LeftMoveInfo.log($"批量轴上升到P2位置,LeftStartMovePosition={LeftStartMovePosition}");
break; break;
case MoveStep.L13: case MoveStep.L13:
//LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
LeftMoveInfo.NextMoveStep(MoveStep.L20_WaitLabel); LeftMoveInfo.NextMoveStep(MoveStep.L20_WaitLabel);
LeftMoveInfo.log($"批量轴完成上升,等待贴标"); LeftMoveInfo.log($"批量轴完成上升,等待贴标");
break; break;
case MoveStep.L20_WaitLabel: case MoveStep.L20_WaitLabel:
break; break;
case MoveStep.L30_LabelFinish: case MoveStep.L30_LabelFinish:
if (SafeReleaseLeftShelf) if (SafeReleaseLeftShelf)
...@@ -99,7 +95,7 @@ namespace DeviceLibrary ...@@ -99,7 +95,7 @@ namespace DeviceLibrary
LeftShelfNoTray = true; LeftShelfNoTray = true;
LeftMoveInfo.NextMoveStep(MoveStep.LEND); LeftMoveInfo.NextMoveStep(MoveStep.LEND);
Left_Batch_Axis.AbsMove(LeftMoveInfo, Config.Left_Batch_P1, Config.Left_Batch_P1_speed); Left_Batch_Axis.AbsMove(LeftMoveInfo, Config.Left_Batch_P1, Config.Left_Batch_P1_speed);
if (ConfigHelper.Config.Get("UseAGVTransferShelf",false))//是否用AGV运输料串 if (ConfigHelper.Config.Get("UseAGVTransferShelf", false))//是否用AGV运输料串
{ {
LeftMoveInfo.log($"料串已满,批量轴下降到P1位置"); LeftMoveInfo.log($"料串已满,批量轴下降到P1位置");
} }
...@@ -201,7 +197,6 @@ namespace DeviceLibrary ...@@ -201,7 +197,6 @@ namespace DeviceLibrary
LeftMoveInfo.log($"未找到对应步骤:{LeftMoveInfo.MoveStep}"); LeftMoveInfo.log($"未找到对应步骤:{LeftMoveInfo.MoveStep}");
break; break;
} }
} }
string LeftState() string LeftState()
{ {
...@@ -240,7 +235,7 @@ namespace DeviceLibrary ...@@ -240,7 +235,7 @@ namespace DeviceLibrary
} }
LeftMoveInfo.log("BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")"); LeftMoveInfo.log("BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")");
} }
targetSpeed = (int)(Config.Left_Batch_P2_speed*0.7); targetSpeed = (int)(Config.Left_Batch_P2_speed * 0.7);
} }
LeftMoveInfo.TimeOutSeconds = 200; LeftMoveInfo.TimeOutSeconds = 200;
LeftMoveInfo.CanWhileCount = 0; LeftMoveInfo.CanWhileCount = 0;
...@@ -277,12 +272,40 @@ namespace DeviceLibrary ...@@ -277,12 +272,40 @@ namespace DeviceLibrary
{ {
int targetP1 = Left_Batch_Axis.GetAclPosition() - ConfigHelper.Config.Get("LeftAxisDownValue", 50) * Config.Left_Batch_ChangeValue; int targetP1 = Left_Batch_Axis.GetAclPosition() - ConfigHelper.Config.Get("LeftAxisDownValue", 50) * Config.Left_Batch_ChangeValue;
int targetSpeed = Config.Left_Batch_P1_speed; int targetSpeed = Config.Left_Batch_P1_speed;
if (targetP1<=0) if (targetP1 <= 0)
{ {
LeftMoveInfo.log("出料提升机构,下降固定值小于0,设置回到0原点。"); LeftMoveInfo.log("出料提升机构,下降固定值小于0,设置回到0原点。");
targetP1 = 0; targetP1 = 0;
} }
LeftMoveInfo.log($"出料提升机构,下降固定值为{targetP1}脉冲!");
Left_Batch_Axis.AbsMove(LeftMoveInfo, targetP1, targetSpeed); Left_Batch_Axis.AbsMove(LeftMoveInfo, targetP1, targetSpeed);
} }
/// <summary>
/// 下降在上升以后,上升指定阈值,防止感应器失效
/// </summary>
void LeftAxisRiseMax()
{
//1.获取当前私服下降后的脉冲
LeftStartMovePosition = Left_Batch_Axis.GetAclPosition();
//2.获取下降的高度、冗余高度、一毫米的脉冲值
int downvalue = ConfigHelper.Config.Get("LeftAxisDownValue", 50);
int redundancy= ConfigHelper.Config.Get("LeftAxisRiseRedundancyValue", 10);
int change = Config.Left_Batch_ChangeValue;
int totalpulse=(downvalue+ redundancy)*change;
int targetP2 = LeftStartMovePosition + totalpulse;
LeftMoveInfo.log($"下降固定值后提升,感应器亮或提升固定值:当前私服高度={LeftStartMovePosition},下降的固定高度={downvalue}," +
$"上升最大高度={redundancy},每毫米脉冲={change},上升脉冲为{targetP2},P2={Config.Left_Batch_P2}");
int targetSpeed = Config.Left_Batch_P2_speed;
LeftMoveInfo.TimeOutSeconds = 200;
LeftMoveInfo.CanWhileCount = 0;
// 需要增加定时器,获取验证信号并停止伺服
LeftMoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxisMove(Config.Left_Batch_Axis, targetP2, targetSpeed));
Config.Left_Batch_Axis.TargetPosition = targetP2;
Left_Batch_Axis.AbsMove(null, targetP2, targetSpeed);
//开始检测信号
Left_Batch_Axis.BatchAxisStartCheck(IO_Type.LeftTop_Check, IO_VALUE.HIGH);
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -162,7 +162,6 @@ namespace DeviceLibrary ...@@ -162,7 +162,6 @@ namespace DeviceLibrary
MiddleMoveInfo.log("等待左侧允许放料"); MiddleMoveInfo.log("等待左侧允许放料");
Msg.add(crc.GetString("Res0098", "等待左侧允许放料"), MsgLevel.info); Msg.add(crc.GetString("Res0098", "等待左侧允许放料"), MsgLevel.info);
} }
break; break;
case MoveStep.M08: case MoveStep.M08:
MiddleMoveInfo.NextMoveStep(MoveStep.M09); MiddleMoveInfo.NextMoveStep(MoveStep.M09);
......
...@@ -36,16 +36,7 @@ namespace DeviceLibrary ...@@ -36,16 +36,7 @@ namespace DeviceLibrary
RightMoveInfo.log($"批量轴上升到P2位置,二次提升,RightStartMovePosition={RightStartMovePosition}"); RightMoveInfo.log($"批量轴上升到P2位置,二次提升,RightStartMovePosition={RightStartMovePosition}");
break; break;
case MoveStep.R03: case MoveStep.R03:
//if (IOValue(IO_Type.RightOverHead_Check).Equals(IO_VALUE.HIGH))
//{
// RightMoveInfo.NextMoveStep(MoveStep.R02);
// Right_Batch_Axis.AbsMove(RightMoveInfo, RightStartMovePosition, Config.Right_Batch_P2_speed);
// RightMoveInfo.log($"批量轴上升过头,下降到:RightStartMovePosition={RightStartMovePosition}");
//}
//else
{
RightMoveInfo.NextMoveStep(MoveStep.R04); RightMoveInfo.NextMoveStep(MoveStep.R04);
}
break; break;
case MoveStep.R04: case MoveStep.R04:
if (IOValue(IO_Type.RightTop_Check).Equals(IO_VALUE.HIGH) && RightShelfNoTray.Equals(false)) if (IOValue(IO_Type.RightTop_Check).Equals(IO_VALUE.HIGH) && RightShelfNoTray.Equals(false))
...@@ -53,7 +44,6 @@ namespace DeviceLibrary ...@@ -53,7 +44,6 @@ namespace DeviceLibrary
if (MiddleMoveInfo.MoveStep >= MoveStep.M09 || MiddleMoveInfo.MoveStep < MoveStep.M02) if (MiddleMoveInfo.MoveStep >= MoveStep.M09 || MiddleMoveInfo.MoveStep < MoveStep.M02)
{ {
RightMoveInfo.NextMoveStep(MoveStep.R06_GettedReelInfo); RightMoveInfo.NextMoveStep(MoveStep.R06_GettedReelInfo);
//GetHeight();
ScanCode(); ScanCode();
RightMoveInfo.log($"扫码开始");//并获取上一盘料高度,LastHeight={LastHeight} RightMoveInfo.log($"扫码开始");//并获取上一盘料高度,LastHeight={LastHeight}
} }
...@@ -131,7 +121,6 @@ namespace DeviceLibrary ...@@ -131,7 +121,6 @@ namespace DeviceLibrary
if (SafeReleaseRightShelf) if (SafeReleaseRightShelf)
{ {
SafeReleaseRightShelf = false; SafeReleaseRightShelf = false;
RightMoveInfo.NextMoveStep(MoveStep.R12_ShelfNoTray); RightMoveInfo.NextMoveStep(MoveStep.R12_ShelfNoTray);
RightMoveInfo.log($"用户请求释放料架."); RightMoveInfo.log($"用户请求释放料架.");
} }
...@@ -279,9 +268,6 @@ namespace DeviceLibrary ...@@ -279,9 +268,6 @@ namespace DeviceLibrary
void ScanCode() void ScanCode()
{ {
RightMoveInfo.log("开始扫码"); RightMoveInfo.log("开始扫码");
//RightMoveInfo.OneWaitCanEndStep = true;
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
try try
{ {
RightScanTask = Task.Run(new Func<(List<CodeInfo>, Dictionary<string, string>, string, Dictionary<string, int>)>(() => RightScanTask = Task.Run(new Func<(List<CodeInfo>, Dictionary<string, string>, string, Dictionary<string, int>)>(() =>
......
...@@ -76,12 +76,12 @@ namespace DeviceLibrary ...@@ -76,12 +76,12 @@ namespace DeviceLibrary
Config = _config; Config = _config;
RightMoveInfo = new MoveInfo(crc.GetString("Res0039", "右侧取料")); RightMoveInfo = new MoveInfo(crc.GetString("Res0039", "入料口"));
RightMoveInfo.SetStateDelegate(RightState); RightMoveInfo.SetStateDelegate(RightState);
MiddleMoveInfo = new MoveInfo(crc.GetString("Res0042", "移栽")); MiddleMoveInfo = new MoveInfo(crc.GetString("Res0042", "移栽"));
MiddleMoveInfo.SetStateDelegate(MiddleState); MiddleMoveInfo.SetStateDelegate(MiddleState);
LeftMoveInfo = new MoveInfo(crc.GetString("Res0051", "左侧放料")); LeftMoveInfo = new MoveInfo(crc.GetString("Res0051", "出料口"));
LeftMoveInfo.SetStateDelegate(LeftState); LeftMoveInfo.SetStateDelegate(LeftState);
LabelMoveInfo = new MoveInfo(crc.GetString("Res0052", "贴标")); LabelMoveInfo = new MoveInfo(crc.GetString("Res0052", "贴标"));
LabelMoveInfo.SetStateDelegate(LabelState); LabelMoveInfo.SetStateDelegate(LabelState);
......
...@@ -245,7 +245,6 @@ namespace DeviceLibrary ...@@ -245,7 +245,6 @@ namespace DeviceLibrary
{ {
LogUtil.error(" 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + e.ToString()); LogUtil.error(" 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + e.ToString());
Camera._cam.Close(cameraName); Camera._cam.Close(cameraName);
// GC.Collect();
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -263,13 +262,10 @@ namespace DeviceLibrary ...@@ -263,13 +262,10 @@ namespace DeviceLibrary
catch (AccessViolationException e) catch (AccessViolationException e)
{ {
LogUtil.error( " 扫码出现AccessViolationException异常:" + e.ToString()); LogUtil.error( " 扫码出现AccessViolationException异常:" + e.ToString());
//throw new Exception("扫码出现AccessViolationException异常");
// GC.Collect();
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error( " 扫码出错:" + ex.ToString()); LogUtil.error( " 扫码出错:" + ex.ToString());
//throw new Exception("扫码出错");
} }
return (codeList, keyword, bitmapfilename, newpointanlge); return (codeList, keyword, bitmapfilename, newpointanlge);
} }
......
...@@ -16,23 +16,35 @@ namespace DeviceLibrary ...@@ -16,23 +16,35 @@ namespace DeviceLibrary
{ {
public Asa.PrintLabel print; public Asa.PrintLabel print;
ZebraPrinterHelper.ZebraManger zebraManger; ZebraPrinterHelper.ZebraManger zebraManger;
string Port; string Port;
public bool istscprin = ConfigHelper.Config.Get("Hardwareversion", "V2") == "V2"; int dpi = 100;
public static bool istscprin = ConfigHelper.Config.Get("Hardwareversion", "V2")=="V2";
public PrintDevice printDevice = ConfigHelper.Config.Get("PrintDevice", istscprin ? PrintDevice.TSC : PrintDevice.Zebra);
public enum PrintDevice {
TSC,
Zebra,
Windows
}
public PrinterHelper() public PrinterHelper()
{ {
print = new Asa.PrintLabel(Application.StartupPath + "\\Label",300); if (printDevice!= PrintDevice.Windows)
{
dpi = 300;
}
print = new Asa.PrintLabel(Application.StartupPath + "\\Label", dpi);
} }
public static CustPrinterStatus LastPrintStatus = CustPrinterStatus.Unknown; public static CustPrinterStatus LastPrintStatus = CustPrinterStatus.Unknown;
public bool Connection(string port) public bool Connection(string port)
{ {
Port = port; Port = port;
if (istscprin) if (printDevice== PrintDevice.TSC || printDevice== PrintDevice.Windows)
{ {
print = new Asa.PrintLabel(Application.StartupPath + "\\Label", 300); print = new Asa.PrintLabel(Application.StartupPath + "\\Label", dpi);
return true; return true;
} }
else else if (printDevice == PrintDevice.Zebra)
{ {
//默认使用老打印机 //默认使用老打印机
zebraManger = new ZebraPrinterHelper.ZebraManger("", ZebraPrinterHelper.ConnectionType.UsbDirect); zebraManger = new ZebraPrinterHelper.ZebraManger("", ZebraPrinterHelper.ConnectionType.UsbDirect);
...@@ -44,6 +56,7 @@ namespace DeviceLibrary ...@@ -44,6 +56,7 @@ namespace DeviceLibrary
} }
return true; return true;
} }
return false;
} }
public void Close() public void Close()
{ {
...@@ -61,7 +74,7 @@ namespace DeviceLibrary ...@@ -61,7 +74,7 @@ namespace DeviceLibrary
public bool Print(string labelname, Dictionary<string, string> data, out string msg) public bool Print(string labelname, Dictionary<string, string> data, out string msg)
{ {
print.LoadLabel(labelname); print.LoadLabel(labelname);
if (istscprin) if (printDevice==PrintDevice.TSC)
{ {
LogUtil.error($"TSC_打印数据:{JsonHelper.SerializeObject(data)}" ); LogUtil.error($"TSC_打印数据:{JsonHelper.SerializeObject(data)}" );
TscConfig tscConfig = new TscConfig(); TscConfig tscConfig = new TscConfig();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!