Commit 55647fbd 贾鹏旭

1

1 个父辈 c39c8e47
正在显示 62 个修改的文件 包含 3071 行增加1627 行删除
......@@ -50,8 +50,8 @@ namespace AutoScanAndLabel
this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel.Location = new System.Drawing.Point(12, 10);
this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel.Location = new System.Drawing.Point(14, 12);
this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tableLayoutPanel.Name = "tableLayoutPanel";
this.tableLayoutPanel.RowCount = 6;
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
......@@ -60,17 +60,17 @@ namespace AutoScanAndLabel
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.Size = new System.Drawing.Size(556, 306);
this.tableLayoutPanel.Size = new System.Drawing.Size(624, 367);
this.tableLayoutPanel.TabIndex = 0;
//
// labelProductName
//
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(80, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 20);
this.labelProductName.Location = new System.Drawing.Point(90, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 24);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(472, 20);
this.labelProductName.Size = new System.Drawing.Size(530, 24);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "产品名称";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -78,11 +78,11 @@ namespace AutoScanAndLabel
// labelVersion
//
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(80, 30);
this.labelVersion.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 20);
this.labelVersion.Location = new System.Drawing.Point(90, 36);
this.labelVersion.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 24);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(472, 20);
this.labelVersion.Size = new System.Drawing.Size(530, 24);
this.labelVersion.TabIndex = 0;
this.labelVersion.Tag = "not";
this.labelVersion.Text = "版本";
......@@ -92,11 +92,11 @@ namespace AutoScanAndLabel
// labelCopyright
//
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(80, 60);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 20);
this.labelCopyright.Location = new System.Drawing.Point(90, 72);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 24);
this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(472, 20);
this.labelCopyright.Size = new System.Drawing.Size(530, 24);
this.labelCopyright.TabIndex = 21;
this.labelCopyright.Text = "版权";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -104,11 +104,11 @@ namespace AutoScanAndLabel
// labelCompanyName
//
this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCompanyName.Location = new System.Drawing.Point(80, 90);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 20);
this.labelCompanyName.Location = new System.Drawing.Point(90, 108);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 24);
this.labelCompanyName.Name = "labelCompanyName";
this.labelCompanyName.Size = new System.Drawing.Size(472, 20);
this.labelCompanyName.Size = new System.Drawing.Size(530, 24);
this.labelCompanyName.TabIndex = 22;
this.labelCompanyName.Text = "公司名称";
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -116,13 +116,13 @@ namespace AutoScanAndLabel
// textBoxDescription
//
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(80, 124);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(8, 4, 4, 4);
this.textBoxDescription.Location = new System.Drawing.Point(90, 149);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(9, 5, 4, 5);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(472, 145);
this.textBoxDescription.Size = new System.Drawing.Size(530, 173);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "说明";
......@@ -131,10 +131,10 @@ namespace AutoScanAndLabel
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(452, 277);
this.okButton.Margin = new System.Windows.Forms.Padding(4);
this.okButton.Location = new System.Drawing.Point(508, 332);
this.okButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(100, 25);
this.okButton.Size = new System.Drawing.Size(112, 30);
this.okButton.TabIndex = 24;
this.okButton.Text = "确定(&O)";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
......@@ -142,16 +142,16 @@ namespace AutoScanAndLabel
// AboutBox1
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(580, 326);
this.ClientSize = new System.Drawing.Size(652, 391);
this.Controls.Add(this.tableLayoutPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutBox1";
this.Padding = new System.Windows.Forms.Padding(12, 10, 12, 10);
this.Padding = new System.Windows.Forms.Padding(14, 12, 14, 12);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
......
......@@ -63,7 +63,7 @@ namespace AutoScanAndLabel
{
int days = Convert.ToInt32(strArray[2]);
int seconds = Convert.ToInt32(strArray[3]);
DateTime d1 = DateTime.Parse("2023-11-10");
DateTime d1 = DateTime.Parse("2024-01-25");
var newData = d1.AddDays(days);
newData = newData.AddSeconds(seconds * 2);
updatetime = $"{crc.GetString("Res0220", "最后更新时间:")}" + newData.ToString("yyyy-MM-dd HH:mm:ss");
......
......@@ -15,7 +15,7 @@
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/AutoScanAndLabel.log"/>
<file value="logs/NS200.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
......
......@@ -41,19 +41,29 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.PrintLabel">
<HintPath>..\dll\Asa.PrintLabel.dll</HintPath>
<Reference Include="Asa.PrintLabel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PrinLable-2\PrintLabel\bin\Debug\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary">
<HintPath>..\dll\CodeLibrary.dll</HintPath>
<Reference Include="CodeLibrary, Version=1.0.8734.29351, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\CameraLibraryProject\CameraLibraryProject\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper">
<HintPath>..\dll\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="DeviceLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DeviceLibrary\bin\Debug\DeviceLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="MvCameraControl.Net">
<HintPath>..\..\..\CameraLibraryProject\CameraLibraryProject\CodeLibraryProject\编译好的DLL\MvCameraControl.Net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />
<Reference Include="RmaxisV2, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\RmaxisV2\bin\Debug\RmaxisV2.dll</HintPath>
......@@ -98,12 +108,6 @@
<Compile Include="FrmLabelEdit.Designer.cs">
<DependentUpon>FrmLabelEdit.cs</DependentUpon>
</Compile>
<Compile Include="Homepage.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Homepage.Designer.cs">
<DependentUpon>Homepage.cs</DependentUpon>
</Compile>
<Compile Include="IOControl.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -161,9 +165,6 @@
<EmbeddedResource Include="FrmLabelEdit.resx">
<DependentUpon>FrmLabelEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Homepage.resx">
<DependentUpon>Homepage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControl.resx">
<DependentUpon>IOControl.cs</DependentUpon>
</EmbeddedResource>
......@@ -225,10 +226,6 @@
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\DeviceLibrary\DeviceLibrary.csproj">
<Project>{bb23296c-aa1d-45c6-9fa6-5a37b2abfe9b}</Project>
<Name>DeviceLibrary</Name>
</ProjectReference>
<ProjectReference Include="..\DL.StandardRobots\DL.StandardRobots.csproj">
<Project>{F85A7412-B5B3-4291-A448-A10564602E1A}</Project>
<Name>DL.StandardRobots</Name>
......
......@@ -42,25 +42,25 @@ namespace AutoScanAndLabel
this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.退出ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.cb_IgnoreSafecheck = new System.Windows.Forms.CheckBox();
this.btn_PauseBuzzer = new System.Windows.Forms.Button();
this.btn_leftempty = new System.Windows.Forms.Button();
this.btn_maulstart = new System.Windows.Forms.Button();
this.btn_releaserightshelf = new System.Windows.Forms.Button();
this.btn_releaseleftshelf = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.stateView = new System.Windows.Forms.ListView();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.btn_stop = new System.Windows.Forms.Button();
this.btn_run = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panel1 = new System.Windows.Forms.Panel();
this.btn_PauseBuzzer = new System.Windows.Forms.Button();
this.cb_IgnoreSafecheck = new System.Windows.Forms.CheckBox();
this.menuStrip1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabControl1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
......@@ -114,6 +114,7 @@ namespace AutoScanAndLabel
this.条码规则ToolStripMenuItem.Name = "条码规则ToolStripMenuItem";
this.条码规则ToolStripMenuItem.Size = new System.Drawing.Size(106, 31);
this.条码规则ToolStripMenuItem.Text = "条码规则";
this.条码规则ToolStripMenuItem.Click += new System.EventHandler(this.条码规则ToolStripMenuItem_Click);
//
// 语言toolStripMenuItem
//
......@@ -183,17 +184,28 @@ namespace AutoScanAndLabel
this.tabPage1.Text = "信息";
this.tabPage1.UseVisualStyleBackColor = true;
//
// pictureBox1
// cb_IgnoreSafecheck
//
this.pictureBox1.Location = new System.Drawing.Point(600, 26);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(388, 278);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
this.cb_IgnoreSafecheck.AutoSize = true;
this.cb_IgnoreSafecheck.Location = new System.Drawing.Point(8, 310);
this.cb_IgnoreSafecheck.Name = "cb_IgnoreSafecheck";
this.cb_IgnoreSafecheck.Size = new System.Drawing.Size(268, 31);
this.cb_IgnoreSafecheck.TabIndex = 8;
this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)";
this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true;
this.cb_IgnoreSafecheck.CheckedChanged += new System.EventHandler(this.cb_IgnoreSafecheck_CheckedChanged);
//
// btn_PauseBuzzer
//
this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed;
this.btn_PauseBuzzer.Location = new System.Drawing.Point(277, 307);
this.btn_PauseBuzzer.Name = "btn_PauseBuzzer";
this.btn_PauseBuzzer.Size = new System.Drawing.Size(201, 40);
this.btn_PauseBuzzer.TabIndex = 6;
this.btn_PauseBuzzer.Text = "本次暂停警报器响声";
this.btn_PauseBuzzer.UseVisualStyleBackColor = false;
this.btn_PauseBuzzer.Visible = false;
this.btn_PauseBuzzer.Click += new System.EventHandler(this.btn_PauseBuzzer_Click);
//
// btn_leftempty
//
......@@ -201,7 +213,7 @@ namespace AutoScanAndLabel
this.btn_leftempty.Name = "btn_leftempty";
this.btn_leftempty.Size = new System.Drawing.Size(200, 65);
this.btn_leftempty.TabIndex = 3;
this.btn_leftempty.Text = "左侧手动清空";
this.btn_leftempty.Text = "左侧手动上料";
this.btn_leftempty.UseVisualStyleBackColor = true;
this.btn_leftempty.Click += new System.EventHandler(this.btn_leftempty_Click);
//
......@@ -228,7 +240,7 @@ namespace AutoScanAndLabel
// btn_releaseleftshelf
//
this.btn_releaseleftshelf.BackColor = System.Drawing.Color.Transparent;
this.btn_releaseleftshelf.Location = new System.Drawing.Point(12, 350);
this.btn_releaseleftshelf.Location = new System.Drawing.Point(8, 350);
this.btn_releaseleftshelf.Name = "btn_releaseleftshelf";
this.btn_releaseleftshelf.Size = new System.Drawing.Size(200, 65);
this.btn_releaseleftshelf.TabIndex = 3;
......@@ -260,6 +272,18 @@ namespace AutoScanAndLabel
this.stateView.Tag = "not";
this.stateView.UseCompatibleStateImageBehavior = false;
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(600, 26);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(388, 278);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -308,7 +332,6 @@ namespace AutoScanAndLabel
this.listView1.TabIndex = 2;
this.listView1.Tag = "not";
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
// groupBox2
//
......@@ -327,28 +350,6 @@ namespace AutoScanAndLabel
this.panel1.Size = new System.Drawing.Size(1029, 619);
this.panel1.TabIndex = 6;
//
// btn_PauseBuzzer
//
this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed;
this.btn_PauseBuzzer.Location = new System.Drawing.Point(277, 307);
this.btn_PauseBuzzer.Name = "btn_PauseBuzzer";
this.btn_PauseBuzzer.Size = new System.Drawing.Size(201, 40);
this.btn_PauseBuzzer.TabIndex = 6;
this.btn_PauseBuzzer.Text = "本次暂停警报器响声";
this.btn_PauseBuzzer.UseVisualStyleBackColor = false;
this.btn_PauseBuzzer.Visible = false;
this.btn_PauseBuzzer.Click += new System.EventHandler(this.btn_PauseBuzzer_Click);
//
// cb_IgnoreSafecheck
//
this.cb_IgnoreSafecheck.AutoSize = true;
this.cb_IgnoreSafecheck.Location = new System.Drawing.Point(3, 310);
this.cb_IgnoreSafecheck.Name = "cb_IgnoreSafecheck";
this.cb_IgnoreSafecheck.Size = new System.Drawing.Size(268, 31);
this.cb_IgnoreSafecheck.TabIndex = 8;
this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)";
this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F);
......@@ -372,8 +373,8 @@ namespace AutoScanAndLabel
this.menuStrip1.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
......
......@@ -11,6 +11,13 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using AutoScanAndLabel.UC;
using OnlineStore.LoadCSVLibrary;
using System.Diagnostics;
using System.IO;
using System.ComponentModel;
using static RemoteDecodeHelper_mod;
using Newtonsoft.Json;
using System.Drawing.Imaging;
using PrintLabel;
namespace AutoScanAndLabel
{
......@@ -18,6 +25,7 @@ namespace AutoScanAndLabel
{
public Form1()
{
LogUtil.info("开始加载From1");
crc.OpenResourceLog = true;
InitializeComponent();
this.FormClosing += Form1_FormClosing;
......@@ -30,6 +38,7 @@ namespace AutoScanAndLabel
t1.Start();
GC.KeepAlive(t1);
this.Shown += Form1_Shown;
//设计时panel1是在顶层的,所以加载时需要放置底层,否则groupBox2切换显示时会有问题;
panel1.SendToBack();
}
private void SetControlBackColor(Control control, Color color)
......@@ -364,7 +373,7 @@ namespace AutoScanAndLabel
private void btn_run_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning)
{
{
RobotManage.Start();
userpause = false;
if (RobotManage.isRunning)
......@@ -440,7 +449,7 @@ namespace AutoScanAndLabel
CodeLibrary.CodeResourceControl.GetLanguageEvent += Crc_GetLanguageEvent;
CodeLibrary.FrmCodeDecode frm = new CodeLibrary.FrmCodeDecode();
frm.CurrLanguage = Crc_GetLanguageEvent();
frm.chbZxing.Checked = false;
//frm.chbZxing.Checked = false;
try
{
frm.ShowDialog();
......@@ -632,16 +641,16 @@ namespace AutoScanAndLabel
obj.Dock = DockStyle.None;
}
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
#region 新按钮功能
private void aGVToolStripMenuItem_Click(object sender, EventArgs e)
{
//AgvControl agv = new AgvControl();
crc.LanguageProcess(agv);
panel1.BringToFront();
panel1.Controls.Clear();
//crc.GetString("Res0070", "Agv调试");
panel1.Controls.Add(agv);
}
private void 相机条码ToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -650,7 +659,7 @@ namespace AutoScanAndLabel
CodeLibrary.CodeResourceControl.GetLanguageEvent += Crc_GetLanguageEvent;
CodeLibrary.FrmCodeDecode frm = new CodeLibrary.FrmCodeDecode();
frm.CurrLanguage = Crc_GetLanguageEvent();
frm.chbZxing.Checked = false;
//frm.chbZxing.Checked = false;
//设置子窗口不显示为顶级窗口
frm.TopLevel = false;
//设置子窗口的样式,没有上面的标题栏
......@@ -700,13 +709,74 @@ namespace AutoScanAndLabel
RobotManage.Stop();
RobotManage.ShutDown();
Thread.Sleep(2000);
Application.Exit();
KillProcess("Neo Scan");
try
{
Application.Exit();
}
catch (Exception)
{
Environment.Exit(0);
}
}
}
private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e)
private void 条码规则ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
Process proes = new Process();
LogUtil.info("客户点击条码规则,打开Neo Scan;");
var f = ConfigHelper.Config.Get("Display_GetDataAppPath");
string path = Path.Combine(Application.StartupPath,f);
if (!File.Exists(path))
{
LogUtil.error("未找到服务文件!");
return;
}
proes.StartInfo = new ProcessStartInfo
{
FileName = path,
//WorkingDirectory = System.IO.Path.Combine(Application.StartupPath, "\\NeoScan"),
Verb = "runas" // 这里设置为 "runas" 表示以管理员身份运行
};
proes.StartInfo.UseShellExecute = false;
proes.Start();
}
catch (Exception ex)
{
LogUtil.error("启动服务失败:"+ex);
}
}
/// <summary>
/// 退出时关闭ns100exe
/// </summary>
/// <param name="processName"></param>
public static void KillProcess(string processName)
{
try
{
Process[] processes = Process.GetProcessesByName(processName);
if (processes.Length<=0)
{
return;
}
foreach (Process process in processes)
{
process.Kill();
process.WaitForExit(); // 可以加上超时参数
}
}
catch (Win32Exception e)
{
}
catch (InvalidOperationException e)
{
}
}
#endregion
}
}
\ No newline at end of file
......@@ -27,11 +27,13 @@ namespace PrintLabel
string filename = "";
List<CodeInfo> codeinfo = null;
Dictionary<string, string> keyword;
bool[] amatch = null;
Dictionary<string, int> newpointanlge;
private void btnAcquire_Click(object sender, EventArgs e)
{
Task.Factory.StartNew(delegate
{
(codeinfo, keyword, filename)= CodeManager.CameraScan(new List<string>() { comboBox1.SelectedItem.ToString() });
(codeinfo, keyword, filename, newpointanlge) = CodeManager.CameraScan(new List<string>() { comboBox1.SelectedItem.ToString() },7);
if (string.IsNullOrEmpty(filename)) return;
pictureBox1.Image = new Bitmap(filename);
});
......
namespace AutoScanAndLabel
{
partial class Homepage
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.btn_stop = new System.Windows.Forms.Button();
this.btn_run = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btn_PauseBuzzer = new System.Windows.Forms.Button();
this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox();
this.btn_leftempty = new System.Windows.Forms.Button();
this.btn_maulstart = new System.Windows.Forms.Button();
this.btn_releaserightshelf = new System.Windows.Forms.Button();
this.btn_releaseleftshelf = new System.Windows.Forms.Button();
this.cb_IgnoreGratingSignal = new System.Windows.Forms.CheckBox();
this.cb_IgnoreSafecheck = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.stateView = new System.Windows.Forms.ListView();
this.groupBox2.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btn_stop
//
this.btn_stop.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_stop.Location = new System.Drawing.Point(7, 104);
this.btn_stop.Name = "btn_stop";
this.btn_stop.Size = new System.Drawing.Size(105, 37);
this.btn_stop.TabIndex = 6;
this.btn_stop.Text = "停止";
this.btn_stop.UseVisualStyleBackColor = true;
this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);
//
// btn_run
//
this.btn_run.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_run.Location = new System.Drawing.Point(7, 24);
this.btn_run.Name = "btn_run";
this.btn_run.Size = new System.Drawing.Size(105, 37);
this.btn_run.TabIndex = 7;
this.btn_run.Text = "启动";
this.btn_run.UseVisualStyleBackColor = true;
this.btn_run.Click += new System.EventHandler(this.btn_run_Click);
//
// listView1
//
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(3, 21);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.ShowGroups = false;
this.listView1.Size = new System.Drawing.Size(863, 117);
this.listView1.TabIndex = 2;
this.listView1.Tag = "not";
this.listView1.UseCompatibleStateImageBehavior = false;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.listView1);
this.groupBox2.Location = new System.Drawing.Point(131, 3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(869, 141);
this.groupBox2.TabIndex = 8;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "消息";
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(3, 150);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1002, 475);
this.tabControl1.TabIndex = 9;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.pictureBox1);
this.tabPage1.Controls.Add(this.btn_PauseBuzzer);
this.tabPage1.Controls.Add(this.cb_EnableBuzzer);
this.tabPage1.Controls.Add(this.btn_leftempty);
this.tabPage1.Controls.Add(this.btn_maulstart);
this.tabPage1.Controls.Add(this.btn_releaserightshelf);
this.tabPage1.Controls.Add(this.btn_releaseleftshelf);
this.tabPage1.Controls.Add(this.cb_IgnoreGratingSignal);
this.tabPage1.Controls.Add(this.cb_IgnoreSafecheck);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 36);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(994, 435);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "信息";
this.tabPage1.UseVisualStyleBackColor = true;
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(594, 26);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(388, 278);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
//
// btn_PauseBuzzer
//
this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed;
this.btn_PauseBuzzer.Location = new System.Drawing.Point(653, 135);
this.btn_PauseBuzzer.Name = "btn_PauseBuzzer";
this.btn_PauseBuzzer.Size = new System.Drawing.Size(201, 40);
this.btn_PauseBuzzer.TabIndex = 6;
this.btn_PauseBuzzer.Text = "本次暂停警报器响声";
this.btn_PauseBuzzer.UseVisualStyleBackColor = false;
this.btn_PauseBuzzer.Visible = false;
//
// cb_EnableBuzzer
//
this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(653, 42);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(134, 31);
this.cb_EnableBuzzer.TabIndex = 5;
this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
//
// btn_leftempty
//
this.btn_leftempty.Location = new System.Drawing.Point(500, 357);
this.btn_leftempty.Name = "btn_leftempty";
this.btn_leftempty.Size = new System.Drawing.Size(200, 65);
this.btn_leftempty.TabIndex = 3;
this.btn_leftempty.Text = "左侧手动清空";
this.btn_leftempty.UseVisualStyleBackColor = true;
this.btn_leftempty.Click += new System.EventHandler(this.btn_leftempty_Click);
//
// btn_maulstart
//
this.btn_maulstart.Location = new System.Drawing.Point(752, 357);
this.btn_maulstart.Name = "btn_maulstart";
this.btn_maulstart.Size = new System.Drawing.Size(200, 65);
this.btn_maulstart.TabIndex = 4;
this.btn_maulstart.Text = "右侧手动上料";
this.btn_maulstart.UseVisualStyleBackColor = true;
this.btn_maulstart.Click += new System.EventHandler(this.btn_maulstart_Click);
//
// btn_releaserightshelf
//
this.btn_releaserightshelf.Location = new System.Drawing.Point(259, 357);
this.btn_releaserightshelf.Name = "btn_releaserightshelf";
this.btn_releaserightshelf.Size = new System.Drawing.Size(200, 65);
this.btn_releaserightshelf.TabIndex = 3;
this.btn_releaserightshelf.Text = "安全释放右侧料串";
this.btn_releaserightshelf.UseVisualStyleBackColor = true;
this.btn_releaserightshelf.Click += new System.EventHandler(this.btn_releaserightshelf_Click);
//
// btn_releaseleftshelf
//
this.btn_releaseleftshelf.BackColor = System.Drawing.Color.Transparent;
this.btn_releaseleftshelf.Location = new System.Drawing.Point(8, 357);
this.btn_releaseleftshelf.Name = "btn_releaseleftshelf";
this.btn_releaseleftshelf.Size = new System.Drawing.Size(200, 65);
this.btn_releaseleftshelf.TabIndex = 3;
this.btn_releaseleftshelf.Text = "安全释放左侧料串";
this.btn_releaseleftshelf.UseVisualStyleBackColor = false;
this.btn_releaseleftshelf.Click += new System.EventHandler(this.btn_releaseleftshelf_Click);
//
// cb_IgnoreGratingSignal
//
this.cb_IgnoreGratingSignal.AutoSize = true;
this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(653, 104);
this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal";
this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(154, 31);
this.cb_IgnoreGratingSignal.TabIndex = 2;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
//
// cb_IgnoreSafecheck
//
this.cb_IgnoreSafecheck.AutoSize = true;
this.cb_IgnoreSafecheck.Location = new System.Drawing.Point(653, 73);
this.cb_IgnoreSafecheck.Name = "cb_IgnoreSafecheck";
this.cb_IgnoreSafecheck.Size = new System.Drawing.Size(268, 31);
this.cb_IgnoreSafecheck.TabIndex = 2;
this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)";
this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.stateView);
this.groupBox1.Location = new System.Drawing.Point(8, 26);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(583, 278);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "运行状态";
//
// stateView
//
this.stateView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.stateView.Dock = System.Windows.Forms.DockStyle.Fill;
this.stateView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.stateView.HideSelection = false;
this.stateView.Location = new System.Drawing.Point(3, 30);
this.stateView.MultiSelect = false;
this.stateView.Name = "stateView";
this.stateView.Size = new System.Drawing.Size(577, 245);
this.stateView.TabIndex = 0;
this.stateView.Tag = "not";
this.stateView.UseCompatibleStateImageBehavior = false;
//
// Homepage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btn_stop);
this.Controls.Add(this.btn_run);
this.Controls.Add(this.groupBox2);
this.Name = "Homepage";
this.Size = new System.Drawing.Size(1019, 628);
this.groupBox2.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_stop;
private System.Windows.Forms.Button btn_run;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button btn_PauseBuzzer;
private System.Windows.Forms.CheckBox cb_EnableBuzzer;
private System.Windows.Forms.Button btn_leftempty;
private System.Windows.Forms.Button btn_maulstart;
private System.Windows.Forms.Button btn_releaserightshelf;
private System.Windows.Forms.Button btn_releaseleftshelf;
private System.Windows.Forms.CheckBox cb_IgnoreGratingSignal;
private System.Windows.Forms.CheckBox cb_IgnoreSafecheck;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListView stateView;
}
}
using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static AutoScanAndLabel.Form1;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace AutoScanAndLabel
{
public partial class Homepage : UserControl
{
public Homepage()
{
InitializeComponent();
listView1.View = View.Details;
ColumnHeader emptycol = new ColumnHeader();
emptycol.Text = "";
emptycol.Width = 0;
ColumnHeader msgcol = new ColumnHeader();
msgcol.Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息");
msgcol.Width = 600;
ColumnHeader timecol = new ColumnHeader();
timecol.Text = crc.GetString("Res0004", "时间");
timecol.Width = 150;
listView1.Columns.Add(emptycol);
listView1.Columns.Add(timecol);
listView1.Columns.Add(msgcol);
listView1.ColumnWidthChanging += listView_ColumnWidthChanging;
listView1.Columns[1].Text = crc.GetString("Res0004", "时间");
listView1.Columns[2].Text = crc.GetString("Res0003", "信息");
}
private void listView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
e.NewWidth = (sender as ListView).Columns[e.ColumnIndex].Width;
e.Cancel = true;
}
bool userpause = false;
private void btn_run_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning)
{
RobotManage.Start();
userpause = false;
if (RobotManage.isRunning)
{
btn_stop.Enabled = true;
RobotManage_UserPauseSet(this, false);
}
LogUtil.info("用户按下启动");
}
else if (!userpause)
{
userpause = true;
RobotManage.UserPause(userpause);
LogUtil.info("用户按下暂停1");
}
else if (userpause)
{
userpause = false;
RobotManage.UserPause(userpause);
LogUtil.info("用户取消暂停2");
}
}
private void RobotManage_UserPauseSet(object sender, bool e)
{
if (this.InvokeRequired)
{
this.Invoke((EventHandler<bool>)delegate
{
RobotManage_UserPauseSet(sender, e);
}, sender, e);
return;
}
if (e)
{
userpause = true;
(btn_run as Button).Text = crc.GetString("Res0014", "恢复运行");
(btn_run as Button).BackColor = Color.LightGreen;
cb_IgnoreSafecheck.Enabled = true;
}
else
{
userpause = false;
(btn_run as Button).Text = crc.GetString("Res0013", "暂停运行");
(btn_run as Button).BackColor = Color.Yellow;
cb_IgnoreSafecheck.Enabled = false;
}
}
private void btn_releaseleftshelf_Click(object sender, EventArgs e)
{
if (RobotManage.mainMachine.LeftMoveInfo.MoveStep == MoveStep.Wait)
{
MessageBox.Show(crc.GetString("Res0018", "料串已是释放状态"));
return;
}
else if (RobotManage.mainMachine.SafeReleaseLeftShelf)
{
MessageBox.Show(crc.GetString("Res0019", "正在执行料串释放"));
return;
}
else if (RobotManage.mainMachine.LeftMoveInfo.MoveStep < MoveStep.L04 || RobotManage.mainMachine.LeftMoveInfo.MoveStep > MoveStep.L30_LabelFinish)
{
MessageBox.Show(crc.GetString("Res0083", "左侧料串正在提升或下降, 不能释放"));
return;
}
RobotManage.mainMachine.SafeReleaseLeftShelf = true;
btn_releaseleftshelf.BackColor = Color.OrangeRed;
Task.Run(() =>
{
int timeout = 2 * 60;
while (RobotManage.mainMachine.SafeReleaseLeftShelf && timeout > 0)
{
Task.Delay(500).Wait();
timeout--;
if (timeout % 2 == 0)
{
Invoke((EventHandler)delegate
{
btn_releaseleftshelf.Text = string.Format(crc.GetString("Res0084", "左侧料串等待释放中({0})"), timeout / 2);
});
}
if ((RobotManage.mainMachine.LeftMoveInfo.MoveStep == MoveStep.L20_WaitLabel || RobotManage.mainMachine.LeftMoveInfo.MoveStep == MoveStep.L10_WaitReelPut) && (RobotManage.mainMachine.RightMoveInfo.MoveStep == MoveStep.Wait || RobotManage.mainMachine.RightMoveInfo.MoveStep == MoveStep.REND))
{
RobotManage.mainMachine.LeftMoveInfo.NextMoveStep(MoveStep.L30_LabelFinish);
}
}
RobotManage.mainMachine.SafeReleaseLeftShelf = false;
Invoke((EventHandler)delegate
{
btn_releaseleftshelf.BackColor = Color.Transparent;
btn_releaseleftshelf.Text = crc.GetString("Res0085", "安全释放左侧料串");
});
});
}
private void btn_releaserightshelf_Click(object sender, EventArgs e)
{
if (RobotManage.mainMachine.RightMoveInfo.MoveStep == MoveStep.Wait)
{
MessageBox.Show(crc.GetString("Res0018", "料串已是释放状态"));
return;
}
else if (RobotManage.mainMachine.SafeReleaseRightShelf)
{
MessageBox.Show(crc.GetString("Res0019", "正在执行料串释放"));
return;
}
else if (RobotManage.mainMachine.RightMoveInfo.MoveStep < MoveStep.R04 || RobotManage.mainMachine.RightMoveInfo.MoveStep > MoveStep.R11_NextReel)
{
MessageBox.Show(crc.GetString("Res0086", "右侧料串当前没有就位, 不能释放"));
return;
}
RobotManage.mainMachine.SafeReleaseRightShelf = true;
btn_releaserightshelf.BackColor = Color.OrangeRed;
Task.Run(() =>
{
int timeout = 2 * 60;
while (RobotManage.mainMachine.SafeReleaseRightShelf && timeout > 0)
{
Task.Delay(500).Wait();
timeout--;
if (timeout % 2 == 0)
{
Invoke((EventHandler)delegate
{
btn_releaserightshelf.Text = string.Format(crc.GetString("Res0087", "右侧料串等待释放中({0})"), timeout / 2);
});
}
}
RobotManage.mainMachine.SafeReleaseRightShelf = false;
Invoke((EventHandler)delegate
{
btn_releaserightshelf.BackColor = Color.Transparent;
btn_releaserightshelf.Text = crc.GetString("Res0088", "安全释放右侧料串");
});
});
}
private void btn_leftempty_Click(object sender, EventArgs e)
{
if (RobotManage.mainMachine.LeftMoveInfo.MoveStep != MoveStep.Wait
&& RobotManage.mainMachine.LeftMoveInfo.MoveStep != MoveStep.L10_WaitReelPut)
{
MessageBox.Show(crc.GetString("Res0090", "左侧料串正在运行,不能手动上料"));
return;
}
if (RobotManage.mainMachine.IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.LOW))
{
MessageBox.Show(crc.GetString("Res0027", "没有检测到料串,不能手动上料"));
return;
}
RobotManage.mainMachine.LeftMoveInfo.NewMove(MoveStep.L01);
LogUtil.info("手动:左侧已清空,重新上升");
}
private void btn_maulstart_Click(object sender, EventArgs e)
{
if (RobotManage.mainMachine.RightMoveInfo.MoveStep != MoveStep.Wait)
{
MessageBox.Show(crc.GetString("Res0089", "右侧料串正在运行,不能手动上料"));
return;
}
if (RobotManage.mainMachine.IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.LOW))
{
MessageBox.Show(crc.GetString("Res0027", "没有检测到料串,不能手动上料"));
return;
}
RobotManage.mainMachine.RightMoveInfo.NewMove(MoveStep.R01);
LogUtil.info("手动:右侧有新料,准备上料");
}
private void btn_stop_Click(object sender, EventArgs e)
{
RobotManage.UserPause(false);
userpause = false;
Task.Run(() => { RobotManage.Stop(); });
btn_run.Text = crc.GetString("Form1_btn_run_Text", "启动");
btn_run.BackColor = Color.Transparent;
btn_stop.Enabled = false;
}
//void LanguageProcess()
//{
// crc.LanguageProcess(this, this.GetType().Name);
// crc.ProcessListItem(menuStrip1.Items, "menuStrip1");
// this.Text = crc.GetString("App_Title", "自动贴标机");//Config.Get(Setting_Init.App_Title);
// listView1.Columns[1].Text = crc.GetString("Res0004", "时间");
// listView1.Columns[2].Text = crc.GetString("Res0003", "信息");
// stateView.Columns[1].Text = crc.GetString("Res0005", "模块");
// stateView.Columns[2].Text = crc.GetString("Res0006", "步骤");
// stateView.Columns[3].Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息");
// 启用调试模式ToolStripMenuItem.Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "启用配置模式") : crc.GetString("Res0012", "停用配置模式");
//}
void SetMsg(List<Msg> msgs)
{
this.SuspendLayout();
listView1.Items.Clear();
foreach (Msg msg in msgs)
{
ListViewItem lvi = new ListViewItem(new string[] { "", msg.datetime.ToString(), msg.msgtxt });
if (msg.msgLevel == MsgLevel.info)
lvi.ForeColor = Color.DarkGreen;
else
lvi.ForeColor = Color.Red;
listView1.Items.Add(lvi);
}
this.ResumeLayout(true);
}
private void MainMachine_ProcessMsgEvent(List<Msg> msgs)
{
var d = new setmsgdelegate(SetMsg);
if (this.IsHandleCreated)
this.Invoke(d, msgs);
}
private void RobotManage_LoadFinishEvent(bool state, string msg)
{
if (state)
{
btn_run.Enabled = true;
//btn_stop.Enabled = true;
RobotManage.mainMachine.ProcessMsgEvent += MainMachine_ProcessMsgEvent;
RobotManage.mainMachine.ProcessMoveinfoEvent += MainMachine_ProcessMoveinfoEvent;
}
var lm = new List<Msg>();
foreach (string ms in msg.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries))
{
var m = new Msg();
m.datetime = DateTime.Now;
m.msgtxt = ms;
m.msgLevel = state ? MsgLevel.info : MsgLevel.warning;
lm.Add(m);
}
SetMsg(lm);
}
private void MainMachine_ProcessMoveinfoEvent(List<MoveInfo> moveinfoList)
{
//var d = new setstatedelegate(SetState);
//this.Invoke(d, moveinfoList);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -29,6 +29,8 @@ namespace AutoScanAndLabel
/// </summary>
private void InitializeComponent()
{
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnCloseAll = new System.Windows.Forms.Button();
this.btn夹爪回原 = new System.Windows.Forms.Button();
......@@ -55,17 +57,39 @@ namespace AutoScanAndLabel
this.btn左侧电滚筒进入 = new System.Windows.Forms.Button();
this.btn右侧阻挡上升 = new System.Windows.Forms.Button();
this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(342, 762);
this.groupBox3.TabIndex = 106;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1;
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.Location = new System.Drawing.Point(3, 21);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
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.Size = new System.Drawing.Size(336, 738);
this.tableLayoutPanel1.TabIndex = 102;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnCloseAll);
......@@ -94,9 +118,9 @@ namespace AutoScanAndLabel
this.groupBox1.Controls.Add(this.btn右侧阻挡上升);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Location = new System.Drawing.Point(659, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(339, 702);
this.groupBox1.Size = new System.Drawing.Size(317, 762);
this.groupBox1.TabIndex = 108;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -123,6 +147,7 @@ namespace AutoScanAndLabel
this.btn夹爪回原.TabIndex = 297;
this.btn夹爪回原.Text = "夹爪回原";
this.btn夹爪回原.UseVisualStyleBackColor = false;
this.btn夹爪回原.Visible = false;
this.btn夹爪回原.Click += new System.EventHandler(this.btn夹爪回原_Click);
//
// btn夹爪夹紧
......@@ -298,7 +323,7 @@ namespace AutoScanAndLabel
// txtDOIndex
//
this.txtDOIndex.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDOIndex.Location = new System.Drawing.Point(69, 54);
this.txtDOIndex.Location = new System.Drawing.Point(73, 52);
this.txtDOIndex.MaxLength = 10;
this.txtDOIndex.Name = "txtDOIndex";
this.txtDOIndex.Size = new System.Drawing.Size(70, 27);
......@@ -310,7 +335,7 @@ namespace AutoScanAndLabel
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label14.Location = new System.Drawing.Point(20, 57);
this.label14.Location = new System.Drawing.Point(27, 55);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(43, 20);
this.label14.TabIndex = 239;
......@@ -320,7 +345,7 @@ namespace AutoScanAndLabel
// txtWriteTime
//
this.txtWriteTime.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtWriteTime.Location = new System.Drawing.Point(233, 54);
this.txtWriteTime.Location = new System.Drawing.Point(242, 52);
this.txtWriteTime.MaxLength = 10;
this.txtWriteTime.Name = "txtWriteTime";
this.txtWriteTime.Size = new System.Drawing.Size(72, 27);
......@@ -344,7 +369,7 @@ namespace AutoScanAndLabel
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(153, 57);
this.label5.Location = new System.Drawing.Point(162, 55);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(74, 20);
this.label5.TabIndex = 237;
......@@ -402,99 +427,66 @@ namespace AutoScanAndLabel
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
//
// groupBox4
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(262, 3);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(255, 762);
this.groupBox4.TabIndex = 107;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.AutoScroll = true;
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 14);
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 21);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
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.Size = new System.Drawing.Size(249, 742);
this.tableLayoutPanel2.Size = new System.Drawing.Size(292, 738);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
// groupBox4
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(255, 762);
this.groupBox3.TabIndex = 106;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
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.Size = new System.Drawing.Size(244, 742);
this.tableLayoutPanel1.TabIndex = 102;
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.AutoScrollMargin = new System.Drawing.Size(300, 720);
this.panel1.Controls.Add(this.groupBox1);
this.panel1.Location = new System.Drawing.Point(523, 17);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(365, 742);
this.panel1.TabIndex = 303;
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(351, 3);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(298, 762);
this.groupBox4.TabIndex = 107;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
//
// IOControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.panel1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Font = new System.Drawing.Font("新宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "IOControl";
this.Size = new System.Drawing.Size(970, 768);
this.Size = new System.Drawing.Size(979, 768);
this.Load += new System.EventHandler(this.IOControl_Load);
this.groupBox3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Button btn夹爪回原;
private System.Windows.Forms.Button btn夹爪夹紧;
private System.Windows.Forms.Button btn夹爪放松;
private System.Windows.Forms.Button btn右侧电滚筒停止;
private System.Windows.Forms.Button btn左侧电滚筒停止;
private System.Windows.Forms.Button btn右侧电滚筒退出;
private System.Windows.Forms.Button btn左侧电滚筒退出;
private System.Windows.Forms.Button btn关闭设备光源;
private System.Windows.Forms.Button btn关闭相机光源;
private System.Windows.Forms.Button btn打开设备光源;
private System.Windows.Forms.Button btn打开相机光源;
private System.Windows.Forms.Button btn左侧阻挡下降;
......@@ -510,16 +502,7 @@ namespace AutoScanAndLabel
private System.Windows.Forms.Button btn左侧电滚筒进入;
private System.Windows.Forms.Button btn右侧阻挡上升;
private System.Windows.Forms.ComboBox cmbWriteIO;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button btn夹爪夹紧;
private System.Windows.Forms.Button btn关闭设备光源;
private System.Windows.Forms.Button btn关闭相机光源;
private System.Windows.Forms.Button btn右侧电滚筒停止;
private System.Windows.Forms.Button btn左侧电滚筒停止;
private System.Windows.Forms.Button btn夹爪回原;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox4;
}
}
......@@ -72,7 +72,8 @@ namespace AutoScanAndLabel
{
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName);
control.Dock= DockStyle.Top;
control.Width = 20;
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++;
DIControlList.Add(ioValue.ProName, control);
......@@ -90,7 +91,9 @@ namespace AutoScanAndLabel
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName);
control.Click += Control_Click;
control.Dock = DockStyle.Top;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
//this.tableLayoutPanel2.Controls.d
roleindex++;
DOControlList.Add(ioValue.ProName, control);
}
......
......@@ -19,7 +19,7 @@ namespace AutoScanAndLabel
CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
showLogProDelegate = new ShowLogProDelegate(ShowLogPro);
LogUtil.ShowLog += LogUtil_ShowLog;
//LogUtil.ShowLog += LogUtil_ShowLog;
}
delegate void ShowLogProDelegate(string msg, Color color);
......@@ -30,7 +30,6 @@ namespace AutoScanAndLabel
this.Invoke(showLogProDelegate, msg, color);
else
ShowLogPro(msg, color);
}
private List<string> logList = new List<string>();
......
......@@ -19,41 +19,46 @@ namespace AutoScanAndLabel
[STAThread]
static void Main()
{
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
DeviceLibrary.LabelParam labelParam = new DeviceLibrary.LabelParam();
labelParam.codeInfos = new List<CodeLibrary.CodeInfo>();
//##340093060037##01410000441770##012100000224##Q3000
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Y38072732TLP785(D4GHTR6,F (C 2000A0132G0 2000ZUY0HG1U8501F2A Y0HG1U 2124 2124TWCN 69 T2", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("[)>P1PTLV7022DGKR6P2PAQ25000V00333171T0557736ZEW4WTKYD210631T1032393ASH20LRFB21LUSA22LASH23LCHNEG43Z1/260C/UNLIM;//;022121L18087KN01", 0, 0));
labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("99700736000619EM6H38.125008625", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("CK7T0H.125002115", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Y38073304TLP385(D4GREETRE (T 00003000A0149T 03000WT0HBGCC8210B3F-5595 2009 2009JPTH 00 67 91432487 02Q", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("01410000441770", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("012100000224", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Q3000", 0, 0));
labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("340093060037", 0, 0, "Code 128"));
DeviceLibrary.Common.codeProcess(labelParam, out string debugmsg);
Console.WriteLine(debugmsg);
_ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret)
try
{
IntPtr formhwnd = FindWindow(null, Config.Get(Setting_Init.App_Title));
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Environment.CurrentDirectory = Application.StartupPath;
XmlConfigurator.Configure();
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//DeviceLibrary.LabelParam labelParam = new DeviceLibrary.LabelParam();
//labelParam.codeInfos = new List<CodeLibrary.CodeInfo>();
////##340093060037##01410000441770##012100000224##Q3000
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Y38072732TLP785(D4GHTR6,F (C 2000A0132G0 2000ZUY0HG1U8501F2A Y0HG1U 2124 2124TWCN 69 T2", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("[)>P1PTLV7022DGKR6P2PAQ25000V00333171T0557736ZEW4WTKYD210631T1032393ASH20LRFB21LUSA22LASH23LCHNEG43Z1/260C/UNLIM;//;022121L18087KN01", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("99700736000619EM6H38.125008625", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("CK7T0H.125002115", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Y38073304TLP385(D4GREETRE (T 00003000A0149T 03000WT0HBGCC8210B3F-5595 2009 2009JPTH 00 67 91432487 02Q", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("01410000441770", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("012100000224", 0, 0));
////labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("Q3000", 0, 0));
//labelParam.codeInfos.Add(new CodeLibrary.CodeInfo("340093060037", 0, 0, "Code 128"));
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
//DeviceLibrary.Common.codeProcess(labelParam, out string debugmsg);
//Console.WriteLine(debugmsg);
_ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret)
{
IntPtr formhwnd = FindWindow(null, Config.Get(Setting_Init.App_Title));
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Environment.CurrentDirectory = Application.StartupPath;
XmlConfigurator.Configure();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
catch (Exception ex)
{
LogUtil.error(ex.Message);
throw new Exception(ex.Message); ;
}
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
......
......@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyVersion("2.3.*")]
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
......@@ -44,11 +44,11 @@ namespace AutoScanAndLabel
this.label_matchdebugstring = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox();
this.cb_IgnoreGratingSignal = new System.Windows.Forms.CheckBox();
this.uC_U11 = new AutoScanAndLabel.UC_U1();
this.listEditControl1 = new AutoScanAndLabel.UC.ListEditControl();
this.listEdit_pn = new AutoScanAndLabel.UC.ListEditControl();
this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox();
this.cb_IgnoreGratingSignal = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -102,7 +102,7 @@ namespace AutoScanAndLabel
this.cb_labelselect.FormattingEnabled = true;
this.cb_labelselect.Location = new System.Drawing.Point(134, 75);
this.cb_labelselect.Name = "cb_labelselect";
this.cb_labelselect.Size = new System.Drawing.Size(198, 23);
this.cb_labelselect.Size = new System.Drawing.Size(198, 26);
this.cb_labelselect.TabIndex = 0;
this.cb_labelselect.SelectedIndexChanged += new System.EventHandler(this.cb_labelselect_SelectedIndexChanged);
//
......@@ -111,23 +111,23 @@ namespace AutoScanAndLabel
this.cb_printerselect.FormattingEnabled = true;
this.cb_printerselect.Location = new System.Drawing.Point(134, 37);
this.cb_printerselect.Name = "cb_printerselect";
this.cb_printerselect.Size = new System.Drawing.Size(198, 23);
this.cb_printerselect.Size = new System.Drawing.Size(198, 26);
this.cb_printerselect.TabIndex = 0;
this.cb_printerselect.SelectedIndexChanged += new System.EventHandler(this.cb_printerselect_SelectedIndexChanged);
//
// chbAutoRun
//
this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Location = new System.Drawing.Point(3, 185);
this.chbAutoRun.Location = new System.Drawing.Point(3, 169);
this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(104, 19);
this.chbAutoRun.Size = new System.Drawing.Size(124, 22);
this.chbAutoRun.TabIndex = 1;
this.chbAutoRun.Text = "开机自启动";
this.chbAutoRun.UseVisualStyleBackColor = true;
//
// btn_labelDebug
//
this.btn_labelDebug.Location = new System.Drawing.Point(154, 551);
this.btn_labelDebug.Location = new System.Drawing.Point(402, 163);
this.btn_labelDebug.Name = "btn_labelDebug";
this.btn_labelDebug.Size = new System.Drawing.Size(140, 28);
this.btn_labelDebug.TabIndex = 2;
......@@ -162,7 +162,7 @@ namespace AutoScanAndLabel
//
this.txt_code.Location = new System.Drawing.Point(6, 24);
this.txt_code.Name = "txt_code";
this.txt_code.Size = new System.Drawing.Size(264, 25);
this.txt_code.Size = new System.Drawing.Size(264, 28);
this.txt_code.TabIndex = 5;
//
// btn_codetest
......@@ -197,7 +197,7 @@ namespace AutoScanAndLabel
//
// button1
//
this.button1.Location = new System.Drawing.Point(41, 556);
this.button1.Location = new System.Drawing.Point(36, 553);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 10;
......@@ -206,14 +206,36 @@ namespace AutoScanAndLabel
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// cb_EnableBuzzer
//
this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(124, 169);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(124, 22);
this.cb_EnableBuzzer.TabIndex = 13;
this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
this.cb_EnableBuzzer.CheckedChanged += new System.EventHandler(this.cb_EnableBuzzer_CheckedChanged);
//
// cb_IgnoreGratingSignal
//
this.cb_IgnoreGratingSignal.AutoSize = true;
this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(254, 169);
this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal";
this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(142, 22);
this.cb_IgnoreGratingSignal.TabIndex = 11;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged);
//
// uC_U11
//
this.uC_U11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.uC_U11.Location = new System.Drawing.Point(3, 246);
this.uC_U11.Location = new System.Drawing.Point(0, 198);
this.uC_U11.Margin = new System.Windows.Forms.Padding(4);
this.uC_U11.Name = "uC_U11";
this.uC_U11.Size = new System.Drawing.Size(591, 187);
this.uC_U11.Size = new System.Drawing.Size(678, 150);
this.uC_U11.TabIndex = 9;
//
// listEditControl1
......@@ -221,10 +243,10 @@ namespace AutoScanAndLabel
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.ListFile = "config/qty.list";
this.listEditControl1.Location = new System.Drawing.Point(3, 21);
this.listEditControl1.Location = new System.Drawing.Point(3, 24);
this.listEditControl1.Margin = new System.Windows.Forms.Padding(5);
this.listEditControl1.Name = "listEditControl1";
this.listEditControl1.Size = new System.Drawing.Size(354, 204);
this.listEditControl1.Size = new System.Drawing.Size(354, 201);
this.listEditControl1.TabIndex = 3;
this.listEditControl1.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh);
//
......@@ -233,35 +255,13 @@ namespace AutoScanAndLabel
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.ListFile = "config/pn.list";
this.listEdit_pn.Location = new System.Drawing.Point(3, 21);
this.listEdit_pn.Location = new System.Drawing.Point(3, 24);
this.listEdit_pn.Margin = new System.Windows.Forms.Padding(5);
this.listEdit_pn.Name = "listEdit_pn";
this.listEdit_pn.Size = new System.Drawing.Size(354, 154);
this.listEdit_pn.Size = new System.Drawing.Size(354, 151);
this.listEdit_pn.TabIndex = 3;
this.listEdit_pn.DataRefresh += new System.EventHandler(this.listEdit_pn_DataRefresh);
//
// cb_EnableBuzzer
//
this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(403, 13);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(104, 19);
this.cb_EnableBuzzer.TabIndex = 13;
this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
this.cb_EnableBuzzer.CheckedChanged += new System.EventHandler(this.cb_EnableBuzzer_CheckedChanged);
//
// cb_IgnoreGratingSignal
//
this.cb_IgnoreGratingSignal.AutoSize = true;
this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(403, 44);
this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal";
this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(119, 19);
this.cb_IgnoreGratingSignal.TabIndex = 11;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged);
//
// SettingControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -276,7 +276,7 @@ namespace AutoScanAndLabel
this.Controls.Add(this.chbAutoRun);
this.Controls.Add(this.groupBox1);
this.Name = "SettingControl";
this.Size = new System.Drawing.Size(1024, 740);
this.Size = new System.Drawing.Size(1280, 925);
this.Load += new System.EventHandler(this.SettingControl_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
......
......@@ -3,6 +3,7 @@ using ConfigHelper;
using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.Common.util;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -51,8 +52,6 @@ namespace AutoScanAndLabel
string labelName = ConfigHelper.Config.Get(Setting_Init.LabelName);
cb_printerselect.Text = PrintName;
cb_labelselect.Text = labelName;
}
......@@ -75,15 +74,15 @@ namespace AutoScanAndLabel
private void btn_labeledit_Click(object sender, EventArgs e)
{
var keys = File.ReadAllLines("NeoScan\\Config\\MacroKey.txt");
var keys = File.ReadAllLines(Application.StartupPath+ "\\NeoScan\\Config\\MacroKey.txt");
//RobotManage.PrintBean.EditLabel();
PrintLabel.FrmLabel frmLabel = new PrintLabel.FrmLabel();
//crc.CurrLanguage = "";
frmLabel.Text = crc.GetString("FrmLabel_Text", "标签编辑");
crc.LanguageProcess(frmLabel, "FrmLabel");
//frmLabel.KeyWord.AddRange(keys);
frmLabel.ShowDialog();
frmLabel.KeyWord.AddRange(keys);
frmLabel.Show();
RobotManage_LoadFinishEvent(true, "");
RobotManage.LoadPrintSetting();
}
......@@ -125,29 +124,59 @@ namespace AutoScanAndLabel
private void btn_labelDebug_Click(object sender, EventArgs e)
{
LabelParam la = new LabelParam();
Common.RenderedImage(la, new Point(500,500), new Point(1000,1000));
//UnifiedDataHandler.RecordPrintNg(false,true,out string[] s);
//UnifiedDataHandler.RecordEmsData(false,"78945699999");
//Dictionary<string, string> dic = new Dictionary<string, string>();
//dic.Add("cid","NS01_1");
//Bitmap bitmap = new Bitmap("C:\\Users\\Neotel\\Desktop\\lQLPKdvOHVK-69fNAdjNAsSwG8ONhvwwiG8Fi4NMZw68AQ_708_472.png");
//_ = UnifiedDataHandler.PostSmfImageAsync(bitmap, dic, bitmap.Width, bitmap.Height);
//Bitmap bitmap1 = new Bitmap("C:\\Users\\Neotel\\Desktop\\lQLPJyGyZ6lafJfNDkDNFUCwiSqya_VMap0Fi4NMZw68AA_5440_3648.png");
//Dictionary<string, string> dic1 = new Dictionary<string, string>();
//dic1.Add("cid", "NS01_2");
//_ = UnifiedDataHandler.PostSmfImageAsync(bitmap1, dic1);
//Bitmap bitmap = new Bitmap("16-51-26-94.bmp");
//List<CodeInfo> tlci = EyemDecode2.Decoder(ref bitmap);
//bitmap.Dispose();
List<CodeInfo> tlci = new List<CodeInfo>();
tlci.Add(new CodeInfo("", 413, 1809));
LabelParam labelParam = new LabelParam();
labelParam.codeInfos = tlci;
labelParam.bitmapfilename = @"D:\logs\827\15-02-40-402.bmp";
//bitmap.Dispose();622-X:1928;Y:1231
//4781-x: 1838; y: 2292
//List<CodeInfo> tlci = new List<CodeInfo>();
//tlci.Add(new CodeInfo("", 1928, 1231));
////tlci.Add(new CodeInfo("", 3110, 1654));
//LabelParam labelParam = new LabelParam();
//labelParam.codeInfos = tlci;
//labelParam.PlateW = 15;
//labelParam.bitmapfilename = "D:\\Desktop\\软件日志\\ns200苏州工厂\\12-29-贴标是歪的\\2023-12-29-16-12-27622.bmp";
//LabelParam aaa = labelParam.clone();
//Point Right_Batch_Point = new Point(RobotManage.Config.Right_Batch_X, RobotManage.Config.Right_Batch_Y);
////Point p = Common.CalcLabelPoint(labelParam, Right_Batch_Point, RobotManage.Config.Label_R_Offset, RobotManage.Config.Label_R_Angle_Diff, out int labelAngle);
//Point p = Common.Customlabeling(labelParam, Right_Batch_Point, out int labelAngle);
LabelParam aaa = labelParam.clone();
Point Right_Batch_Point = new Point(RobotManage.Config.Right_Batch_X, RobotManage.Config.Right_Batch_Y);
// //计算贴标角度的脉冲值
// int labelAxisPos = RobotManage.Config.Label_R_360 / 360 * labelAngle;
Point p = Common.CalcLabelPoint(labelParam, Right_Batch_Point, RobotManage.Config.Label_R_Offset, RobotManage.Config.Label_R_Angle_Diff, out int labelAngle);
// //计算像素点位与中心点的差
// Point p1 = new Point(p.X - Right_Batch_Point.X, p.Y - Right_Batch_Point.Y);
// //计算像素*脉冲像素比得到脉冲值+中心点基准脉冲
// p1.X = (int)(p1.X * RobotManage.Config.Cam_Pixel_X_Ratio) + RobotManage.Config.Label_X_Base;
// p1.Y = (int)(p1.Y * RobotManage.Config.Cam_Pixel_Y_Ratio) + RobotManage.Config.Label_Y_Base;
//计算贴标角度的脉冲值
int labelAxisPos = RobotManage.Config.Label_R_360 / 360 * labelAngle;
}
static bool IsPointInTriangle(Point p, Point[] triangle)
{
int s1 = (triangle[0].X * (triangle[1].Y - triangle[2].Y) + triangle[1].X * (triangle[2].Y - triangle[0].Y) + triangle[2].X * (triangle[0].Y - triangle[1].Y)) / 2;
int s2 = (p.X * (triangle[1].Y - triangle[2].Y) + triangle[1].X * (triangle[2].Y - p.Y) + triangle[2].X * (p.Y - triangle[1].Y)) / 2;
int s3 = (triangle[0].X * (p.Y - triangle[2].Y) + p.X * (triangle[2].Y - triangle[0].Y) + triangle[2].X * (triangle[0].Y - p.Y)) / 2;
int s4 = (triangle[0].X * (triangle[1].Y - p.Y) + triangle[1].X * (p.Y - triangle[0].Y) + p.X * (triangle[0].Y - triangle[1].Y)) / 2;
//计算像素点位与中心点的差
Point p1 = new Point(p.X - Right_Batch_Point.X, p.Y - Right_Batch_Point.Y);
//计算像素*脉冲像素比得到脉冲值+中心点基准脉冲
p1.X = (int)(p1.X * RobotManage.Config.Cam_Pixel_X_Ratio) + RobotManage.Config.Label_X_Base;
p1.Y = (int)(p1.Y * RobotManage.Config.Cam_Pixel_Y_Ratio) + RobotManage.Config.Label_Y_Base;
int totalArea = Math.Abs(s1 + s2 + s3 + s4);
return totalArea == s1 + s2 + s3 + s4; // 如果点在三角形内,两者应该相等
}
private void listEdit_pn_DataRefresh(object sender, EventArgs e)
......@@ -167,7 +196,7 @@ namespace AutoScanAndLabel
private void button1_Click(object sender, EventArgs e)
{
RemoteDecodeHelper_mod.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper_mod.RemoteDecodeParam();
var bmp = new Bitmap("d:\\17-09-05-154.bmp");
var bmp = new Bitmap("D:\\Desktop\\001.jpg");
var cc = RemoteDecodeHelper_mod.DecodeRequest(bmp, remoteDecodeParam);
}
......
......@@ -280,6 +280,9 @@ namespace AutoScanAndLabel
}
}
CSVConfigReader.SaveConfig(Config.ConfigFilePath, Config);
Config.DIList.Clear();
Config.DOList.Clear();
RobotManage.mainMachine.Config = (Robot_Config)CSVConfigReader.LoadConfig(Config);
}
}
}
\ No newline at end of file
......@@ -41,11 +41,14 @@ namespace AutoScanAndLabel
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Location = new System.Drawing.Point(4, 4);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(628, 461);
this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox3.Size = new System.Drawing.Size(942, 692);
this.groupBox3.TabIndex = 108;
this.groupBox3.TabStop = false;
this.groupBox3.Tag = "not";
this.groupBox3.Text = "点位列表";
//
// tableLayoutPanel1
......@@ -60,19 +63,21 @@ namespace AutoScanAndLabel
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
this.tableLayoutPanel1.Location = new System.Drawing.Point(9, 21);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(616, 441);
this.tableLayoutPanel1.Size = new System.Drawing.Size(924, 662);
this.tableLayoutPanel1.TabIndex = 102;
//
// btnSavePos
//
this.btnSavePos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSavePos.Location = new System.Drawing.Point(3, 470);
this.btnSavePos.Location = new System.Drawing.Point(4, 705);
this.btnSavePos.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnSavePos.Name = "btnSavePos";
this.btnSavePos.Size = new System.Drawing.Size(133, 31);
this.btnSavePos.Size = new System.Drawing.Size(200, 46);
this.btnSavePos.TabIndex = 109;
this.btnSavePos.Text = "全部保存";
this.btnSavePos.UseVisualStyleBackColor = true;
......@@ -80,12 +85,13 @@ namespace AutoScanAndLabel
//
// ConfigControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.btnSavePos);
this.Controls.Add(this.groupBox3);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "ConfigControl";
this.Size = new System.Drawing.Size(1096, 504);
this.Size = new System.Drawing.Size(1644, 756);
this.Load += new System.EventHandler(this.ConfigControl_Load);
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
......
......@@ -42,20 +42,20 @@ namespace AutoScanAndLabel
this.label_dir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label_dir.AutoSize = true;
this.label_dir.Location = new System.Drawing.Point(4, 66);
this.label_dir.Location = new System.Drawing.Point(4, 57);
this.label_dir.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label_dir.Name = "label_dir";
this.label_dir.Size = new System.Drawing.Size(105, 15);
this.label_dir.Size = new System.Drawing.Size(125, 18);
this.label_dir.TabIndex = 16;
this.label_dir.Text = "图像保存目录:";
//
// btn_selectdir
//
this.btn_selectdir.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_selectdir.Location = new System.Drawing.Point(480, 92);
this.btn_selectdir.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_selectdir.Location = new System.Drawing.Point(541, 80);
this.btn_selectdir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btn_selectdir.Name = "btn_selectdir";
this.btn_selectdir.Size = new System.Drawing.Size(87, 29);
this.btn_selectdir.Size = new System.Drawing.Size(98, 28);
this.btn_selectdir.TabIndex = 15;
this.btn_selectdir.Text = "浏览";
this.btn_selectdir.UseVisualStyleBackColor = true;
......@@ -63,11 +63,11 @@ namespace AutoScanAndLabel
//
// txt_reelphotodir
//
this.txt_reelphotodir.Location = new System.Drawing.Point(4, 92);
this.txt_reelphotodir.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txt_reelphotodir.Location = new System.Drawing.Point(8, 80);
this.txt_reelphotodir.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_reelphotodir.Name = "txt_reelphotodir";
this.txt_reelphotodir.ReadOnly = true;
this.txt_reelphotodir.Size = new System.Drawing.Size(460, 25);
this.txt_reelphotodir.Size = new System.Drawing.Size(517, 28);
this.txt_reelphotodir.TabIndex = 14;
//
// cb_exportreephoto
......@@ -75,10 +75,10 @@ namespace AutoScanAndLabel
this.cb_exportreephoto.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cb_exportreephoto.AutoSize = true;
this.cb_exportreephoto.Location = new System.Drawing.Point(8, 25);
this.cb_exportreephoto.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cb_exportreephoto.Location = new System.Drawing.Point(9, 30);
this.cb_exportreephoto.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_exportreephoto.Name = "cb_exportreephoto";
this.cb_exportreephoto.Size = new System.Drawing.Size(330, 19);
this.cb_exportreephoto.Size = new System.Drawing.Size(394, 22);
this.cb_exportreephoto.TabIndex = 13;
this.cb_exportreephoto.Text = "自动拍摄并保存料盘图像. 勾选后仅本次有效";
this.cb_exportreephoto.UseVisualStyleBackColor = true;
......@@ -91,22 +91,22 @@ namespace AutoScanAndLabel
this.gb.Controls.Add(this.txt_reelphotodir);
this.gb.Dock = System.Windows.Forms.DockStyle.Fill;
this.gb.Location = new System.Drawing.Point(0, 0);
this.gb.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gb.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.gb.Name = "gb";
this.gb.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gb.Size = new System.Drawing.Size(575, 185);
this.gb.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.gb.Size = new System.Drawing.Size(647, 222);
this.gb.TabIndex = 17;
this.gb.TabStop = false;
this.gb.Text = "料盘图像导出";
//
// UC_U1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.gb);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "UC_U1";
this.Size = new System.Drawing.Size(575, 185);
this.Size = new System.Drawing.Size(647, 222);
this.Load += new System.EventHandler(this.UC_U1_Load);
this.gb.ResumeLayout(false);
this.gb.PerformLayout();
......
AboutBox1_tableLayoutPanel_labelCompanyName_Text 上海挚锦科技有限公司 Neotel Technology Co., Ltd
AboutBox1_tableLayoutPanel_labelProductName_Text 自动扫码贴标机 Neo Scan Plus
AboutBox1_tableLayoutPanel_labelVersion_Text 版本 Version
AboutBox1_tableLayoutPanel_okButton_Text 确定 Ok
AxisMoveControl_groupAxis_groupBox1_btnGetAlarm_Text 读报状态 Reading Status
AxisMoveControl_groupAxis_groupBox1_label10_Text 忙碌状态: Busy State:
AxisMoveControl_groupAxis_groupBox1_label11_Text 回零状态: Reset To Zero
AxisMoveControl_groupAxis_groupBox1_label22_Text 正极限信号: Positive Limit Signal:
AxisMoveControl_groupAxis_groupBox1_label24_Text 负极限信号: Negative Limit Signal:
AxisMoveControl_groupAxis_groupBox1_label3_Text 报警状态: Alarm Status
AxisMoveControl_groupAxis_groupBox1_label5_Text 伺服状态: Servo Info
AxisMoveControl_groupAxis_groupBox1_label6_Text 原点信号: Home Signal:
AxisMoveControl_groupAxis_groupBox1_Text 状态 Status:
AxisMoveControl_groupAxis_groupBox2_label2_Text 实际加速度: Acceleration:
AxisMoveControl_groupAxis_groupBox2_label4_Text 回原状态: Return To Home:
AxisMoveControl_groupAxis_groupBox2_label50_Text 规划模式: PLM:
AxisMoveControl_groupAxis_groupBox2_label52_Text 规划位置: Planning Position:
AxisMoveControl_groupAxis_groupBox2_label53_Text 规划速度: Planning Velocity
AxisMoveControl_groupAxis_groupBox2_label55_Text 实际位置: Actual Location:
AxisMoveControl_groupAxis_groupBox2_label56_Text 实际速度: Actual Velocity:
AxisMoveControl_groupAxis_groupBox2_lblAlarmcode_Text 错误码:160 Error Code:160
AxisMoveControl_groupAxis_groupBox2_lblALM_Text 报警 Alarm
AxisMoveControl_groupAxis_groupBox2_lblBUSY_Text 忙碌 Busy
AxisMoveControl_groupAxis_groupBox2_lblEMG_Text 急停 E-Stop
AxisMoveControl_groupAxis_groupBox2_lblinP_Text 到位 In Position
AxisMoveControl_groupAxis_groupBox2_lblNEL_Text 负极限 Minus Limit
AxisMoveControl_groupAxis_groupBox2_lblORG_Text 原点 Home
AxisMoveControl_groupAxis_groupBox2_lblPEL_Text 正极限 Plus Limit
AxisMoveControl_groupAxis_groupBox2_lblSvOn_Text 伺服 Servo
AxisMoveControl_groupAxis_groupBox2_lblWARN_Text 警告 Caution
AxisMoveControl_groupAxis_groupBox2_Text 轴状态监控 Axis Status Monitoring
AxisMoveControl_groupAxis_panel1_btnAddMove_Text 点动+ Jogging +
AxisMoveControl_groupAxis_panel1_btnAxisAMove_Text 绝对运动 Absolute Motion
AxisMoveControl_groupAxis_panel1_btnAxisReturnHome_Text 原点返回 Return To Home
AxisMoveControl_groupAxis_panel1_btnAxisRMove_Text 相对运动 Relative Motion
AxisMoveControl_groupAxis_panel1_btnAxisStop_Text 停止运动 Stop
AxisMoveControl_groupAxis_panel1_btnAxisVMove_Text 匀速运动 Uniform Motion
AxisMoveControl_groupAxis_panel1_btnCloseAxis_Text 关闭伺服 Servo Off
AxisMoveControl_groupAxis_panel1_btnComAlarmClear_Text 清除报警 Clear Alarm
AxisMoveControl_groupAxis_panel1_btnDelMove_Text 点动- Jogging-
AxisMoveControl_groupAxis_panel1_btnOpenAxis_Text 打开伺服 Turn On Servo
AxisMoveControl_groupAxis_panel1_btnReadPosition_Text 读取位置 Position Reading
AxisMoveControl_groupAxis_panel1_label1_Text 点动速度: Jogging Speed
AxisMoveControl_groupAxis_panel1_label45_Text 端口号: Port:
AxisMoveControl_groupAxis_panel1_label46_Text 地址: Address:
AxisMoveControl_groupAxis_panel1_label47_Text 目标速度: Set Velocity
AxisMoveControl_groupAxis_panel1_label48_Text 目标位置: Set Location
AxisMoveControl_groupAxis_panel1_label49_Text AC伺服: Ac Servo:
AxisMoveControl_groupAxis_panel1_label8_Text 实时位置: Live Location
AxisMoveControl_groupAxis_panel1_linkLabel1_Text 复制 Copy
AxisMoveControl_groupAxis_Text 伺服运动 Servo Motion
Form1_btn_run_Text 启动 Start
Form1_btn_stop_Text 停止 Stop
Form1_tabControl1___AgvControl_checkBox1_Text 手动操作 Manual Operation
Form1_tabControl1___AgvControl_groupBox_left_button_Leftleavefull_Text 请求取满料串 Request Loaded Stacker
Form1_tabControl1___AgvControl_groupBox_left_button_leftneedempty_Text 请求送空料串 Request Unloaded Stacker
Form1_tabControl1___AgvControl_groupBox_left_Text 出口 Unloading Port
Form1_tabControl1___AgvControl_groupBox_right_button_rightleavefull_Text 请求取空料串 Request Unloaded Stacker
Form1_tabControl1___AgvControl_groupBox_right_button_rightneedempty_Text 请求送满料串 Request Loaded Stacker
Form1_tabControl1___AgvControl_groupBox_right_Text 入口 Loading Port
Form1_tabControl1___AgvControl_groupBox2_lblCurMissionId_Text 当前的任务 ID Current Task ID
Form1_tabControl1___AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的任务 ID Running Task ID
Form1_tabControl1___AgvControl_groupBox2_lblMissionResult_Text 任务运行结果 Task Run Results
Form1_tabControl1___AgvControl_groupBox2_lblMissionRunstate_Text 任务运行状态 Task Run Status
Form1_tabControl1___AgvControl_groupBox2_Text AGV状态[127.0.0.1] AGV Status [127.0.0.1]
Form1_tabControl1___AgvControl_groupBox3_button1_Text 手动任务测试 Manual Task Test
Form1_tabControl1___AgvControl_groupBox3_button2_Text 重置呼叫状态 Reset Call Status
Form1_tabControl1___AgvControl_groupBox3_label1_Text 待机点任务号 Standby Task ID
Form1_tabControl1___AgvControl_groupBox3_label3_Text 移动到入口的任务编号: Move To LP Task ID:
Form1_tabControl1___AgvControl_groupBox3_label4_Text 移动到出口的任务编号: Move To UP Task ID:
Form1_tabControl1___AgvControl_groupBox3_label5_Text 料串流出AGV的任务编号: AGV Stacker Outflow ID
Form1_tabControl1___AgvControl_groupBox3_label6_Text 料串流入AGV的任务编号: AGV Stacker Inflow ID
Form1_tabControl1___AgvControl_groupBox3_label7_Text 任务编号: Task ID:
Form1_tabControl1___AgvControl_groupBox3_Text 手动发送任务 Manually Send Task
Form1_tabControl1___AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 Save All
Form1_tabControl1___AxisControl_panel1_configControl1_groupBox3_Text 点位列表 Point List
Form1_tabControl1___IOControl_groupBox1_btnCloseAll_Text 关闭所有DO Close All DO
Form1_tabControl1___IOControl_groupBox1_btnCloseDO_Text 关闭 Off
Form1_tabControl1___IOControl_groupBox1_btnOpenDo_Text 打开 On
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒进入_Text 出口电滚筒进入 UP Electric Drum Existence
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒停止_Text 出口电滚筒停止 UP Electric Drum Stop
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒退出_Text 出口电滚筒退出 UP Electric Drum Exit
Form1_tabControl1___IOControl_groupBox1_btn出口阻挡上升_Text 出口阻挡上升 UP Barrier Rising
Form1_tabControl1___IOControl_groupBox1_btn出口阻挡下降_Text 出口阻挡下降 UP Barrier Falling
Form1_tabControl1___IOControl_groupBox1_btn打开设备光源_Text 打开设备光源 Turn On Eqiupment 's Light
Form1_tabControl1___IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 Turn On Camera Light
Form1_tabControl1___IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 Turn Off Eqiupment 's Light
Form1_tabControl1___IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 Turn Off Camera Light
Form1_tabControl1___IOControl_groupBox1_btn夹爪放松_Text 吸盘机构放料 Release
Form1_tabControl1___IOControl_groupBox1_btn夹爪回原_Text 吸盘机构回原 Sucker Reset
Form1_tabControl1___IOControl_groupBox1_btn夹爪夹紧_Text 吸盘机构取料 Picking Operation
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒进入_Text 入口电滚筒进入 LP Electric Drum Existence
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒停止_Text 入口电滚筒停止 LP Electric Drum Stop
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒退出_Text 入口电滚筒退出 LP Electric Drum Exit
Form1_tabControl1___IOControl_groupBox1_btn入口阻挡上升_Text 入口阻挡上升 LP Barrier Rising
Form1_tabControl1___IOControl_groupBox1_btn入口阻挡下降_Text 入口阻挡下降 LP Barrier Falling
Form1_tabControl1___IOControl_groupBox1_label14_Text 地址: Address:
Form1_tabControl1___IOControl_groupBox1_label5_Text 定时(ms): Timing (ms)
Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI List
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO List
Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机自启动 Auto Start
Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 Label Name
Form1_tabControl1___SettingControl_groupBox1_Text 打印设置 Printing Setup
Form1_tabControl1___SettingControl_groupBox2_listEdit_pn_btn_add_Text 添加 Add
Form1_tabControl1___SettingControl_groupBox2_listEdit_pn_btn_cel_Text 取消 Cancel
Form1_tabControl1___SettingControl_groupBox2_listEdit_pn_btn_del_Text 删除 Delete
Form1_tabControl1___SettingControl_groupBox2_Text PN匹配规则 PN Matching
Form1_tabControl1___SettingControl_groupBox3_listEditControl1_btn_add_Text 添加 Add
Form1_tabControl1___SettingControl_groupBox3_listEditControl1_btn_cel_Text 取消 Cancel
Form1_tabControl1___SettingControl_groupBox3_listEditControl1_btn_del_Text 删除 Delete
Form1_tabControl1___SettingControl_groupBox3_Text 数量匹配规则 QTY Matching
Form1_tabControl1___SettingControl_groupBox4_btn_codetest_Text 匹配 Match
Form1_tabControl1___SettingControl_groupBox4_Text 条码匹配测试 Barcode Testing
Form1_tabControl1_Res0008__IOControl_groupBox1_btnCloseAll_Text 关闭所有DO Close All DO
Form1_tabControl1_Res0008__IOControl_groupBox1_btnCloseDO_Text 关闭 Close
Form1_tabControl1_Res0008__IOControl_groupBox1_btnOpenDo_Text 打开 On
Form1_tabControl1_Res0008__IOControl_groupBox1_btn打开设备光源_Text 打开设备光源 Turn On Eqiupment 's Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 Turn On Camera Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 Turn Off Eqiupment 's Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 Turn Off Camera Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪放松_Text 吸盘放松 Sucker Released
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪回原_Text 吸盘回原 Sucker Reset
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪夹紧_Text 吸盘夹紧 Sucker Tightened
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒进入_Text 入口电滚筒进入 LP Electric Drum Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒停止_Text 入口电滚筒停止 LP Electric Drum Stop
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒退出_Text 入口电滚筒退出 LP Electric Drum Exit
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧阻挡上升_Text 入口阻挡上升 LP Barrier Rising
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧阻挡下降_Text 入口阻挡下降 LP Barrier Falling
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒进入_Text 出口电滚筒进入 UP Electric Drum Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒停止_Text 出口电滚筒停止 UP Electric Drum Stop
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒退出_Text 出口电滚筒退出 UP Electric Drum Exit
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧阻挡上升_Text 出口阻挡上升 UP Barrier Rising
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧阻挡下降_Text 出口阻挡下降 UP Barrier Falling
Form1_tabControl1_Res0008__IOControl_groupBox1_label14_Text 地址: Address
Form1_tabControl1_Res0008__IOControl_groupBox1_label5_Text 定时(ms): Timing (ms)
Form1_tabControl1_Res0008__IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1_Res0008__IOControl_groupBox3_Text DI列表 DI List
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_groupBox3_Text 点位列表 Position List
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机自启动 Auto Start
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 Label Name
Form1_tabControl1_Res0010__SettingControl_groupBox1_Text 打印设置 Printing Setup
Form1_tabControl1_Res0010__SettingControl_groupBox2_listEdit_pn_btn_add_Text 追加 Add
Form1_tabControl1_Res0010__SettingControl_groupBox2_listEdit_pn_btn_cel_Text 取消 Cancel
Form1_tabControl1_Res0010__SettingControl_groupBox2_listEdit_pn_btn_del_Text 删除 Delete
Form1_tabControl1_Res0010__SettingControl_groupBox2_Text PN匹配规则 PN Matching
Form1_tabControl1_Res0010__SettingControl_groupBox3_listEditControl1_btn_add_Text 追加 Add
Form1_tabControl1_Res0010__SettingControl_groupBox3_listEditControl1_btn_cel_Text 取消 Cancel
Form1_tabControl1_Res0010__SettingControl_groupBox3_listEditControl1_btn_del_Text 删除 Delete
Form1_tabControl1_Res0010__SettingControl_groupBox3_Text 数量匹配规则 QTY Matching
Form1_tabControl1_Res0010__SettingControl_groupBox4_btn_codetest_Text 匹配 Match
Form1_tabControl1_Res0010__SettingControl_groupBox4_Text 条码匹配测试 Barcode Testing
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_btn_selectdir_Text 浏览 Browsing
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_cb_exportreephoto_Text 自动拍摄并保存料盘图像. 勾选后仅本次有效 Automatically Capture and Save Tray Images. (Checked for this time only)
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_label_dir_Text 图像保存目录: Save Directory
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_Text 料盘图像导出 Entail Reel's Image
Form1_tabControl1_Res0070__AgvControl_checkBox1_Text 手动 Manual
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Retrieve Loaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Insert Unloaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_Text 出口 UP
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Retrieve Unloaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Insert Loaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_Text 入口 LP
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblCurMissionId_Text 当前的任务 ID Current Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的任务 ID Running Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblMissionResult_Text 任务运行结果 Task Result
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblMissionRunstate_Text 任务运行状态 Task Status
Form1_tabControl1_Res0070__AgvControl_groupBox2_Text 任务状态[192.168.101.137] Task Status [192.168.101.137]
Form1_tabControl1_Res0070__AgvControl_groupBox3_button1_Text 任务测试 Task Testing
Form1_tabControl1_Res0070__AgvControl_groupBox3_button2_Text 重置呼叫 Reset Call
Form1_tabControl1_Res0070__AgvControl_groupBox3_label1_Text 去待机点任务编号: Standby Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_label3_Text 去入口任务编号: LP Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_label4_Text 去出口任务编号: Exit Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_label5_Text 流出AGV任务编号: AGV Outflow Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_label6_Text 流入AGV任务编号: AGV Outflow Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_label7_Text 任务编号: Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox3_Text 手动任务 Manual Task
Form1_tabControl1_tabPage1_btn_leftempty_Text 出口\n手动清空 UP\Manual Clear
Form1_tabControl1_tabPage1_btn_maulstart_Text 入口\n手动上料 LP\Manual Loading
Form1_tabControl1_tabPage1_btn_PauseBuzzer_Text 本次暂停警报器响声 Pause Alarm Sound
Form1_tabControl1_tabPage1_btn_releaseleftshelf_Text 安全释放出口料串 Safely Release UP Reel
Form1_tabControl1_tabPage1_btn_releaserightshelf_Text 安全释放入口料串 Safely Release LP Reel
Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
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_groupBox1_Text 运行状态 Running Status
Form1_tabControl1_tabPage1_Text 信息 Info
FrmCodeDecode_btnAn_Text 变暗 Dimming
FrmCodeDecode_btnbarCode_Text 一维码识别 1D Barcode Recognition
FrmCodeDecode_btnCameraImage_Text 相机获取图片 Capture Image From Camera
FrmCodeDecode_btnClearLog_Text 清理日志 Clear Logs
FrmCodeDecode_btnCopyN_Text 复制名称 Copy Name
FrmCodeDecode_btnDCode_Text 二维码识别 QR Barcode Recognition
FrmCodeDecode_btnErZhi_Text 二值化 Binarization
FrmCodeDecode_btnExit_Text 退出 Exit
FrmCodeDecode_btnGray_Text 图像转灰 Convert Image To Grayscale
FrmCodeDecode_btnLearn_Text 学习 Learning
FrmCodeDecode_btnLight_Text 提亮 Brightening
FrmCodeDecode_btnScanTest_Text 新算法解码 New Algorithm Decoding
FrmCodeDecode_btnSelImage_Text 打开本地图片 Turn On Local Image
FrmCodeDecode_chbUseParam_Text 使用参数 Use Parameters
FrmCodeDecode_label1_Text 图片路径 Image Path
FrmCodeDecode_label2_Text 相机列表: Camera List
FrmCodeDecode_label3_Text 条码类型: Barcode Type
FrmCodeDecode_label4_Text 参数路径 Parameter Path
FrmCodeDecode_lblCount_Text 条码数量: Barcode Quantity
FrmCodeDecode_Text 二维码识别 QR Barcode Recognition
FrmCodeDecode_label6_Text 图片识别结果 Image recognition results:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes
FrmCodeDecode_check_issaveimage_Text 是否保存图片 Is Image Save
FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder
FrmLabel_BtnFieldAdd_Text 字段添加 Add Field
FrmLabel_BtnFieldDel_Text 字段删除 Delete Field
FrmLabel_BtnFieldFont_Text 字段字体 Field Font
FrmLabel_BtnLabelDel_Text 删除 Delete
FrmLabel_BtnLabelNew_Text 新建 New
FrmLabel_BtnPrintTest_Text 打印测试 Print Test
FrmLabel_BtnRename_Text 重命名 Rename
FrmLabel_BtnSave_Text 保存 Save
FrmLabel_grpDsc_Text 字段说明 Field Description
FrmLabel_Text 标签编辑 Label Editing
FrmLabel_label_labelsize_Text 标签尺寸: Label size
FrmLabel_groupBox1_Text 字段说明 Description
FrmLabel_label5_Text 高: Height:
FrmLabel_label6_Text 宽: Width:
menuStrip1_关于ToolStripMenuItem_Text 关于 About
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 Config.
menuStrip1_语言toolStripMenuItem_Text 语言 Language
设备操作ToolStripMenuItem_二维码识别调试ToolStripMenuItem_Text 二维码识别调试 QR Barcode Recognition Config.
设备操作ToolStripMenuItem_启用调试模式ToolStripMenuItem_Text 新建 New
设备操作ToolStripMenuItem_退出ToolStripMenuItem_Text 退出 Exit
Airpressure_Check 气压检测 Pressure Detection
Alarm_Buzzer 报警蜂鸣器 Alarm Buzzer
Alarm_HddLed 故障指示灯 Fault Indicator
App_Title 自动贴标机 Neo Scan Plus
AutoRun_HddLed 自动指示灯 Automatic Indicator
Cam_Pixel_X_Ratio 图像/X轴比值 Image/X Axis Ratio
Cam_Pixel_Y_Ratio 图像/Y轴比值 Image/Y Axis Ratio
Camera_Led 相机照明 Camera Illumination
Device_Led 设备照明 Eqiupment Illumination
GratingSignal_Check 光栅信号 Grating Signal
HasNgBox NG料箱检测 NG Box Detection
HasPrinter 打印机到位检测 Printer Position Detection
Label_R_360 贴标R轴360度脉冲 Label R Axis 360° Pulse
Label_R_Angle_Diff 贴标R轴0位角度差 Label R Axis 0 Angle Difference
Label_R_Axis 贴标移栽机构R轴 Label Transplant Mechanism R Axis
Label_R_Offset 贴标R轴偏置距离像素 Label R Axis Offset Distance In Pixels
Label_R_P1 贴标R轴待机点P1 Label R Axis Standby Point P1
Label_R_P2 贴标R轴取标点P2 Label R Axis Label Picking Point P2
Label_X_Axis 贴标移栽机构X轴 Label Transplant Mechanism X Axis
Label_X_P1 贴标X轴待机点P1 Label X Axis Standby Point P1
Label_X_P2 贴标X轴取标点P2 Label X Axis Label Picking Point P2
Label_X_P3 贴标X轴贴标基准点P3 Label X Axis Label Ref. Point P3
Label_Y_Axis 贴标移栽机构Y轴 Label Transplant Mechanism Y Axis
Label_Y_P1 贴标Y轴待机点P1 Label Y Axis Standby Point P1
Label_Y_P2 贴标Y轴取标点P2 Label Y Axis Label Picking Point P2
Label_Y_P3 贴标Y轴贴标基准点P3 Label Y Axis Label Ref. Point P3
Label_Z_Axis 贴标移栽机构Z轴 Label Transplant Mechanism Z Axis
Label_Z_P1 贴标Z轴待机点P1 Label Z Axis Standby Point P1
Label_Z_P2 贴标Z轴取标前点P2 Label Z Axis Label Picking Pre-Point P2
Label_Z_P3 贴标Z轴取标点P3 Label Z Axis Label Picking Point P3
Label_Z_P4 贴标Z轴贴标前点P4 Label Z Axis Pre-Label Point P4
Label_Z_P5 贴标Z轴贴标点P5 Label Z Axis Label Point P5
LabelCylinder_Bck 吸嘴气缸后退端 Nozzle Cylinder Retract End
LabelCylinder_Fwd 吸嘴气缸前进端 Nozzle Cylinder Extend End
LabelCylinder_Work 吸嘴取标 Nozzle Label Picking
Left_Batch_Axis 出料提升轴 Unload Lifting Axis
Left_Batch_P1 出料升轴低点P1 Unload Lifting Axis Low Point P1
Left_Batch_P2 出料升轴高点P2 Unload Lifting Axis High Point P2
Left_BTN 出料口确认按钮 UP Confirm Button
LeftArm_Check 旋转臂出料侧检测 Unloading Side Detection
LeftBackDoor_Check 后门左门禁 Rear Door Left Access Control
LeftCar_Check 出料口料车检测 UP Reel Detection
LeftEnd_Check 出料口料串到位检测 UP Reel In Position Detection
LeftFornt_Check 出料口前端料串检测 UP Stacker In Position Detection
LeftMoto_Reverse 出料口电机反转指令 UP Motor Reverse Command
LeftMoto_Run 出料口电机启动 UP Motor Start
LeftOverHead_Check 出料定位料盘超限检测 Unloading Reel Overlimit Detection
LeftState_Led 出料口状态指示灯 UP Status Indicator
LeftStopDown 出料口阻挡气缸下降端 UP Barrier Cylinder Down End
LeftStopUP 出料口阻挡气缸上升端 UP Barrier Cylinder Up End
LeftTop_Check 出料定位料盘检测 Unload Positioning Reel Detection
Right_Batch_Axis 进料提升轴 Load Lifting Axis
Right_Batch_P1 进料升轴低点P1 Load Lifting Axis Low Point P1
Right_Batch_P2 进料升轴高点P2 Load Lifting Axis High Point P2
Right_Batch_X 入口轴心坐标X LP Axis Center Coordinate X
Right_Batch_Y 入口轴心坐标Y LP Axis Center Coordinate Y
Right_BTN 进料口确认按钮 LP Confirmation Button
RightArm_Check 旋转臂进料侧检测 Loading Port Side Detection
RightBackDoor_Check 后门右门禁 Rear Door Right Access Control
RightCameraName 入口相机名称 LP Camera Name
RightCar_Check 进料口料车检测 LP Trolley Detection
RightEnd_Check 进料口料串到位检测 LP Stacker Ready Detection
RightFornt_Check 进料口前端料串检测 LP Stacker In Position Detection
RightMoto_Reverse 进料口电机反转指令 LP Motor Reverse Command
RightMoto_Run 进料口电机启动 LP Motor Start
RightOverHead_Check 进料定位料盘超限检测 Loading Reel Overlimit Detection
RightState_Led 进料口状态指示灯 LP Status Indicator
RightStopDown 进料口阻挡气缸下降端 LP Barrier Cylinder Down End
RightStopUP 进料口阻挡气缸上升端 LP Barrier Cylinder Up End
RightTop_Check 进料定位料盘检测 Load Positioning Reel Detection
RunSign_HddLed 待机指示灯 Standby Indicator
Sucker_Clamp 吸盘吸料 Suction Cup Loading
Sucker_Release 吸盘放料 Suction Cup Release
SuddenStop_BTN 急停 E-Stop
Take_Middle_Axis 取料旋转轴 Picking(P) Rotation Axis
Take_Middle_P1 取料旋转轴待机点P1 P Rotation Axis Standby Point P1
Take_Middle_P2 取料旋转轴右取料点P2 P Rotation Axis Right Picking Point P2
Take_Middle_P3 取料旋转轴左取料点P3 P Rotation Axis Left Picking Point P3
Take_Middle_P5 取料旋转轴NG放料点P5 P Rotation Axis NG Unload Point P5
Take_UpDown_Axis 取料升降轴 Picking(P) Lift Axis
Take_UpDown_P1 取料升降轴待机点P1 P Lift Axis Standby Point P1
Take_UpDown_P2 取料升降轴取料高点P2 P Lift Axis Picking High Point P2
Take_UpDown_P3 取料升降轴取右料低点P3 P Lift Axis Right Picking Low Point P3
Take_UpDown_P4 取料升降轴取左料低点P4 P Lift Axis Left Picking Low Point P4
Take_UpDown_P5 取料升降轴NG放料点P5 P Lift Axis NG Unload Point P5
TraySize_13 13寸料盘检测 13-Inch Reel Detection
TraySize_15 15寸料盘检测 15-Inch Reel Detection
TraySize_7 吸盘压力检测 Vacumm Pressure Detection
Res0001 关于 {0} About {0}
Res0002 版本 {0} Version {0}
Res0003 信息 Message
Res0004 时间 Time
Res0005 模块 Module
Res0006 步骤 Step
Res0007 日志 Log
Res0008 IO调试 IO Config.
Res0009 伺服调试 Servo Config.
Res0010 相关设置 Related Settings
Res0011 启用配置模式 Enable Configuration Mode
Res0012 停用配置模式 Disable Configuration Mode
Res0013 暂停运行 Pause Execution
Res0014 恢复运行 Resume Execution
Res0015 启动 Start
Res0016 重置 Reset
Res0017 扫码还没完成,无法打开调试!请稍后再试. Waiting For Scan Completion To Do Config.
Res0018 料串已是释放状态 Reel Already Released
Res0019 正在执行料串释放 Reel Releasing
Res0020 出口料串正在提升或下降, 不能释放 UP Stacker Movement,Releasing is Not Allowed.
Res0021 出口料串等待释放中({0}) Waiting For Release {0}
Res0022 安全释放出口料串 Safely Release
Res0023 入口料串当前没有就位, 不能释放 LP Stacker is Not In Position, Releasing is Not Allowed.
Res0024 入口料串等待释放中({0}) Awaiting Release ({0})
Res0025 安全释放入口料串 Safely Release The LP Stacker
Res0026 入口料串正在运行,不能手动上料 LP Stacker is Running, Manual Loading is Not Allowed
Res0027 没有检测到料串,不能手动上料 No Stacker Detected, Manual Loading is Not Allowed.
Res0028 出口料串正在运行,不能手动上料 UP Stacker is Running, Manual Loading is Not Allowed
Res0029 点位列表 Poisition List
Res0030 全部保存 Save All
Res0031 添加 Add
Res0032 修改 Edit
Res0033 确定要删除:\"{0}\"? Confirm Deletion Of "{0}"?
Res0034 警告 Caution
Res0035 已呼叫AGV,不能重复呼叫 AGV Cannot Be Called Repeatedly.
Res0036 移载 Move
Res0037 温湿度传感器[ Temperature And Humidity Sensor
Res0038 本机IP:[ Local IP:
Res0039 入口取料 LP Picking
Res0040 出口空闲中 UP Idle
Res0041 本机IP Local IP
Res0042 移栽 Transfer
Res0043 料串已满 Stacker is Full
Res0044 已使用 Already Used
Res0045 当前ReelID: Current Reel ID:
Res0046 无料串 No Stacker
Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继续 Loading Failed, Please Handle It Manually. Put The Reel Into The NG Box And Press LP Button .
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Handle It Manually. Puting Stacker And Press The LP Button.
Res0049 等待出口允许放料 Wait For UP Release
Res0050 等待吸盘放松 Waiting Sucker Released
Res0051 出口放料 UP Release
Res0052 贴标 ReLabel
Res0053 重置 Reset
Res0054 可能与贴标Y轴干涉 Possible Label Interference Y-Axis
Res0055 可能与旋转轴干涉 Possible Rotational Axis Interference
Res0056 可能与贴标Z轴干涉 Possible Label Interference Z-Axis
Res0057 用户暂停 User Paused
Res0058 安全光栅被遮挡 Safety Light Curtain Barriered
Res0059 入口料串已空,等待取走料串 LP Stacker Empty, Awaiting Removal
Res0060 出口料串已满,等待取走料串 UP Stacker Full, Awaiting Removal
Res0061 [已忽略] Ignored
Res0062 没有检测到NG料箱 No NG Bin Detected
Res0063 没有检测打印机 No Printer Detected
Res0064 左后门没有关闭 Left Rear Door Not Closed
Res0065 右后门没有关闭 Right Rear Door Not Closed
Res0066 急停中 E-Stop
Res0067 系统需要重置 Activated System Requires Reset
Res0068 气压不足 Insufficient Air Pressure
Res0069 有料串,已放置{0}张料盘 Stacker Loaded, {0} Reels Placed
Res0070 AGV调试 AGV Config.
Res0071 任务状态 Task Status
Res0072 标签已打印,当前ReelID: Label Printed, Current Reel ID:
Res0073 等待标签打印 Waiting For Label Printing
Res0074 等待中 Awaiting
Res0075 任务编号: Task ID:
Res0076 运行编号: Run Number:
Res0077 任务状态: Task Status:
Res0078 运行结果: Run Result:
Res0079 机器尚未启动不能呼叫AGV AGV Cannot Be Called Without Running
Res0080 当前有料串不能请求进入料串 Cannot Request Importing Current Stacker
Res0081 当前没有料串不能请求取料串 Cannot Request Stacker Due To No Stacker ,
Res0082 机器尚在运行,不能退出,请先停止运行. Cannot Request Stacker Retrieval Machine In Operation,
Res0083 左侧料串正在提升或下降,不能释放 Left Stacker Movement,Uable to Release
Res0084 左侧料串等待释放中({0}) Left Stacker is Awaiting Release ({0})
Res0085 安全释放左侧料串 Safely Release The Left Stacker
Res0086 右侧料串当前没有就位, 不能释放 Right Stacker Not In Position,Uable to Release
Res0087 右侧料串等待释放中({0}) Right Stacker is Awaiting Release ({0})
Res0088 安全释放右侧料串 Safely Release Right Stacker
Res0089 右侧料串正在运行,不能手动上料 Right Stacker Operating, Manual Loading is Not Allowed.
Res0090 左侧料串正在运行,不能手动上料 Right Stacker Operating, Manual Loading is Not Allowed.
Res0091 请确认是否运动到该位置 Confirm Movement To This Location
Res0092 确定要删除:\"{0}\"? Deletion: "{0}"?
Res0093 右侧料串已空,等待取走料串 Right Stacker Empty, Awaiting Removal
Res0094 左侧料串已满,等待取走料串 Left Stacker Full, Awaiting Removal
Res0095 左侧空闲中 Left Side Idle
Res0096 抓料失败请手动处理,请将料盘放入:NG箱,按右侧按钮继续 Loading Failed, Please Handle It Manually. Place Reel In NG Box And Press Right Button.
Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧按钮继续 Loading Failed, Please Handle It Manually. Place Reel In Left Stacker And Press Right Button
Res0098 等待左侧允许放料 Waiting For Left Side To Allow Stacker Placement
Res0099 等待料盘取走 Waiting For Reel Removal
Res0100 ,料串已清空. Stacker Empty
Res0101 启用配置模式 Configuration Mode
Res0102 吸盘夹紧 Sucker Tightened
Res0103 吸盘放松 Sucker Released
Res0104 等待 Waiting
Res0105 超时 Time Out
Res0106 秒 Second
Res0107.d1e28be6 AGV任务 AGV Task
Res0108.164140b2 状态更新 Update State
Res0109.d647c69c 入料口正在进料 Loading
Res0110.97f61551 入料口正在出料 Unloading
Res0111.bb763c9e 任务类型 Task Type
Res0112.caa9d6a0 不允许使用该操作 This Operation is Not Allowed.
Res0113.15f652b4 出料口正在入料 Importing
Res0114.b6a35f01 出料口正在出料 Unloading
Res0115.75a1fac5 折叠门开门信号未亮,不允许上料 No Door Open Signal, Loading Prohibited
Res0116.23d7e98f 折叠门开门信号未亮,不允许下料 No Door Open Signal, Unloading Prohibited
Res0117.2bf5c941 打开轴 Turn On Axis
Res0118.33d2a704 失败 Failed
Res0119.cbd5d752 清理报警, Clearing The Alarm.
Res0120.405c5a9e ,收到原点完成信号,当前位置[ Home Signal Received, Current Position [
Res0121.6658614e ],误差过大,需要报警 ], Deviation Too Large, Alarm Needed
Res0122.62c858d3 标签取起失败! Failed To Retrieve Label
Res0123.d86f0192 有料串,已提取{0}张料盘 Have Stacker, {0} Retrived
Res0124.84e7c741 批量轴上升到上料点 Batch Axis Rises To Loading Point
Res0125.ed4de1c6 扫码完成 Scan Completed
Res0126.f11b67ff 标签打印机打开失败 Turn On Label Printer Failure
Res0188 电夹爪通讯失败:{0} Electric Gripper Communication Failure:{0}
Res0189 IO板卡初始化失败 IO Card Failed To Initialize.
Res0190 打开配置模式 Turn On Configuration Modo
Res0192 吸盘夹紧 Sucker Tightened
Res0193 吸盘放松 Sucker Released
Res0194 请先选择运动轴 Please Select A Motion Axis First.
Res0195 警告 Warning
Res0196 点动+ Jogging+
Res0197 点动- Jogging-
Res0198 提示 Remind
Res0199 请先输入正确的速度 Please Enter The Correct Speed.
Res0200 状态监控 Condition Monitoring
Res0201 错误码: Error Code:
Res0202 伺服尚未使能 Servo is Disabled.
Res0203 伺服警报状态中 In Servo Alarm State
Res0204 无法操作 Unable To Operate
Res0216 打印机 Printer
Res0217 标签打印机打开失败 Turn On Label Printer Failure
Res0218 有料串,已提取{0}张料盘 Have Stacker, {0} Reels In Place.
Res0219 版权 © 2021 Copyright © 2021
Res0220 最后更新时间: LastUpdate:
Res0221 未检测到打印标签 No printed labels detected
Res0222 贴标时未检测到打印标签 No labels detected during labeling
Res0223 未知数 Unknow
FeedAGV_Feed 进料口AGV送料串请求 LP AGV Sends Stacker Request..
FeedAGV_Receiving 进料口AGV收料串请求 LP AGV Receives Stacker Request.
DischargeAGV_Feeding 出料口AGV送料串请求 UP AGV Sends Stacker Request.
DischargeAGV_Receiving 出料口AGV收料串请求 UP AGV Receives Stacker Request.
AgvRequest_FeedPort 进料口AGV请求应答 LP AGV Responds To Request.
AgvRequest_Outlet 出料口AGV请求应答 UP AGV Responds To Request.
Form1_groupBox2_Text 消息 Message
menuStrip1_相机条码ToolStripMenuItem_Text 条码识别(相机) Barcode recognition (camera)
menuStrip1_条码规则ToolStripMenuItem_Text 条码规则 Barcode Rules
menuStrip1_退出ToolStripMenuItem1_Text 退出 Exit
AgvControl_checkBox1_Text 手动 Manual Operation
AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Request Loaded Stacker
AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Request Loaded Stacker
AgvControl_groupBox_left_Text 出口 Unloading Port
AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Request Unloaded Stacker
AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Request Loaded Stacker
AgvControl_groupBox_right_Text 入口 Loading Port
AgvControl_groupBox2_lblCurMissionId_Text 当前的mission id Current Task ID
AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的mission id Running Task ID
AgvControl_groupBox2_lblMissionResult_Text mission运行结果 Task Run Results
AgvControl_groupBox2_lblMissionRunstate_Text mission运行状态 Task Run Status
AgvControl_groupBox3_button1_Text 任务测试 Manual Task Test
AgvControl_groupBox3_button2_Text 重置呼叫 Reset Call Status
AgvControl_groupBox3_label1_Text 去待机点任务编号: Standby Task ID
AgvControl_groupBox3_label3_Text 去入口任务编号: Move To LP Task ID:
AgvControl_groupBox3_label4_Text 去出口任务编号: Move To UP Task ID:
AgvControl_groupBox3_label5_Text 流出AGV任务编号: AGV Stacker Outflow ID
AgvControl_groupBox3_label6_Text 流入AGV任务编号: AGV Stacker Inflow ID
AgvControl_groupBox3_label7_Text 任务编号: Task ID:
AgvControl_groupBox3_Text 手动任务 Manually Send Task
AgvControl_groupBox2_Text 任务状态[127.0.0.1] AGV Status [127.0.0.1]
AxisMoveControl_groupAxis_groupBox2_lblINP_Text 到位 In place
Form1_tabControl1_Res0010__SettingControl_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
Form1_tabControl1_Res0010__SettingControl_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain
Form1_tabControl1_Res0010__SettingControl_btn_labelDebug_Text 贴标调试 Label Config.
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayoutPanel1_Label_XOffset_Text 贴标X轴偏移量 Labeling X-axis offset
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayoutPanel1_Label_YOffset_Text 贴标Y轴偏移量 Labeling Y-axis offset
Label_XOffset 贴标X轴偏移量 Labeling X-axis offset
Label_YOffset 贴标Y轴偏移量 Labeling Y-axis offset
\ No newline at end of file
......@@ -3,17 +3,17 @@ AboutBox1_tableLayoutPanel_labelProductName_Text 斐 Neo Scan
AboutBox1_tableLayoutPanel_labelVersion_Text 版本 Version
AboutBox1_tableLayoutPanel_okButton_Text 确定 Ok
AxisMoveControl_groupAxis_groupBox1_btnGetAlarm_Text 读报状态 Reading Status
AxisMoveControl_groupAxis_groupBox1_label10_Text 忙碌状态: Busy State:
AxisMoveControl_groupAxis_groupBox1_label11_Text 回零状态: Reset To Zero
AxisMoveControl_groupAxis_groupBox1_label10_Text 忙碌状: Busy State:
AxisMoveControl_groupAxis_groupBox1_label11_Text 回零态: Reset To Zero
AxisMoveControl_groupAxis_groupBox1_label22_Text 正极限信号: Positive Limit Signal:
AxisMoveControl_groupAxis_groupBox1_label24_Text 负极限信号: Negative Limit Signal:
AxisMoveControl_groupAxis_groupBox1_label3_Text 报警状态: Alarm Status
AxisMoveControl_groupAxis_groupBox1_label5_Text 伺服状态: Servo Info
AxisMoveControl_groupAxis_groupBox1_label6_Text 原点信号: Home Signal:
AxisMoveControl_groupAxis_groupBox1_label3_Text 报警状态: Alarm Status
AxisMoveControl_groupAxis_groupBox1_label5_Text 伺服状态: Servo Info
AxisMoveControl_groupAxis_groupBox1_label6_Text 原点信号: Home Signal:
AxisMoveControl_groupAxis_groupBox1_Text 状态 Status:
AxisMoveControl_groupAxis_groupBox2_label2_Text 实际加速度: Acceleration:
AxisMoveControl_groupAxis_groupBox2_label4_Text 回原状态: Return To Home:
AxisMoveControl_groupAxis_groupBox2_label50_Text 规划模式: Planning Mode:
AxisMoveControl_groupAxis_groupBox2_label50_Text 规划模式: PLM:
AxisMoveControl_groupAxis_groupBox2_label52_Text 规划位置: Planning Position:
AxisMoveControl_groupAxis_groupBox2_label53_Text 规划速度: Planning Velocity
AxisMoveControl_groupAxis_groupBox2_label55_Text 实际位置: Actual Location:
......@@ -52,12 +52,12 @@ AxisMoveControl_groupAxis_Text 隡箸 Servo Motion
Form1_btn_run_Text 启动 Start
Form1_btn_stop_Text 停止 Stop
Form1_tabControl1___AgvControl_checkBox1_Text 手动操作 Manual Operation
Form1_tabControl1___AgvControl_groupBox_left_button_Leftleavefull_Text 请求取满料串 Request Loaded Stacker
Form1_tabControl1___AgvControl_groupBox_left_button_leftneedempty_Text 请求送空料串 Request Unloaded Stacker
Form1_tabControl1___AgvControl_groupBox_left_button_Leftleavefull_Text 请求取满料串 Request Full Stacker
Form1_tabControl1___AgvControl_groupBox_left_button_leftneedempty_Text 请求送空料串 Request Empty Stacker
Form1_tabControl1___AgvControl_groupBox_left_Text 出口 Unloading Port
Form1_tabControl1___AgvControl_groupBox_right_button_rightleavefull_Text 请求取空料串 Request Unloaded Stacker
Form1_tabControl1___AgvControl_groupBox_right_button_rightneedempty_Text 请求送满料串 Request Loaded Stacker
Form1_tabControl1___AgvControl_groupBox_right_Text 入口 Loading Port
Form1_tabControl1___AgvControl_groupBox_right_button_rightleavefull_Text 请求取空料串 Request Empty Stacker
Form1_tabControl1___AgvControl_groupBox_right_button_rightneedempty_Text 请求送满料串 Request Full Stacker
Form1_tabControl1___AgvControl_groupBox_right_Text 入口 LP
Form1_tabControl1___AgvControl_groupBox2_lblCurMissionId_Text 当前的任务 ID Current Task ID
Form1_tabControl1___AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的任务 ID Running Task ID
Form1_tabControl1___AgvControl_groupBox2_lblMissionResult_Text 任务运行结果 Task Run Results
......@@ -68,8 +68,8 @@ Form1_tabControl1___AgvControl_groupBox3_button2_Text 蔭 Reset C
Form1_tabControl1___AgvControl_groupBox3_label1_Text 待机点任务号 Standby Task ID
Form1_tabControl1___AgvControl_groupBox3_label3_Text 移动到入口的任务编号: Move To LP Task ID:
Form1_tabControl1___AgvControl_groupBox3_label4_Text 移动到出口的任务编号: Move To UP Task ID:
Form1_tabControl1___AgvControl_groupBox3_label5_Text 料串流出AGV的任务编号: AGV Stacker Departure ID
Form1_tabControl1___AgvControl_groupBox3_label6_Text 料串流入AGV的任务编号: AGV Stacker Arrival ID
Form1_tabControl1___AgvControl_groupBox3_label5_Text 料串流出AGV的任务编号: AGV Stacker Outflow ID
Form1_tabControl1___AgvControl_groupBox3_label6_Text 料串流入AGV的任务编号: AGV Stacker Inflow ID
Form1_tabControl1___AgvControl_groupBox3_label7_Text 任务编号: Task ID:
Form1_tabControl1___AgvControl_groupBox3_Text 手动发送任务 Manually Send Task
Form1_tabControl1___AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 Save All
......@@ -77,25 +77,25 @@ Form1_tabControl1___AxisControl_panel1_configControl1_groupBox3_Text 雿
Form1_tabControl1___IOControl_groupBox1_btnCloseAll_Text 关闭所有DO Close All DO
Form1_tabControl1___IOControl_groupBox1_btnCloseDO_Text 关闭 Off
Form1_tabControl1___IOControl_groupBox1_btnOpenDo_Text 打开 On
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒进入_Text 出口电滚筒进入 UP Electric Drum Existence
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒停止_Text 出口电滚筒停止 UP Electric Drum Stop
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒退出_Text 出口电滚筒退出 UP Electric Drum Exit
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒进入_Text 出口电滚筒进入 UP Electric Cylinder Existence
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒停止_Text 出口电滚筒停止 UP Electric Cylinder Stop
Form1_tabControl1___IOControl_groupBox1_btn出口电滚筒退出_Text 出口电滚筒退出 UP Electric Cylinder Exit
Form1_tabControl1___IOControl_groupBox1_btn出口阻挡上升_Text 出口阻挡上升 UP Barrier Rising
Form1_tabControl1___IOControl_groupBox1_btn出口阻挡下降_Text 出口阻挡下降 tence
Form1_tabControl1___IOControl_groupBox1_btn出口阻挡下降_Text 出口阻挡下降 UP Barrier Falling
Form1_tabControl1___IOControl_groupBox1_btn打开设备光源_Text 打开设备光源 Turn On Eqiupment 's Light
Form1_tabControl1___IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 Turn On Camera Light
Form1_tabControl1___IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 Turn Off Eqiupment 's Light
Form1_tabControl1___IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 Turn Off Camera Light
Form1_tabControl1___IOControl_groupBox1_btn夹爪放松_Text 夹取机构放料 Release
Form1_tabControl1___IOControl_groupBox1_btn夹爪回原_Text 夹取机构回原 Return To Home
Form1_tabControl1___IOControl_groupBox1_btn夹爪夹紧_Text 夹取机构取料 Picking Operation
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒进入_Text 入口电滚筒进入 LP Electric Drum Existence
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒停止_Text 入口电滚筒停止 LP Electric Drum Stop
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒退出_Text 入口电滚筒退出 LP Electric Drum Exit
Form1_tabControl1___IOControl_groupBox1_btn夹爪放松_Text 吸盘机构放料 Release
Form1_tabControl1___IOControl_groupBox1_btn夹爪回原_Text 吸盘机构回原 Vacumm Gripper Reset
Form1_tabControl1___IOControl_groupBox1_btn夹爪夹紧_Text 吸盘机构取料 Picking Operation
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒进入_Text 入口电滚筒进入 LP Electric Cylinder Existence
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒停止_Text 入口电滚筒停止 LP Electric Cylinder Stop
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒退出_Text 入口电滚筒退出 LP Electric Cylinder Exit
Form1_tabControl1___IOControl_groupBox1_btn入口阻挡上升_Text 入口阻挡上升 LP Barrier Rising
Form1_tabControl1___IOControl_groupBox1_btn入口阻挡下降_Text 入口阻挡下降 LP Barrier Falling
Form1_tabControl1___IOControl_groupBox1_label14_Text 地址: Address:
Form1_tabControl1___IOControl_groupBox1_label5_Text 定时(ms): Timing (Ms)
Form1_tabControl1___IOControl_groupBox1_label5_Text 定时(ms): Timing (ms)
Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI List
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO List
......@@ -122,26 +122,26 @@ Form1_tabControl1_Res0008__IOControl_groupBox1_btn霈曉Text
Form1_tabControl1_Res0008__IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 Turn On Camera Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 Turn Off Eqiupment 's Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 Turn Off Camera Light
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪放松_Text 夹爪放松 Loosen Gripper
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪回原_Text 夹爪回原 Gripper Reset
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪夹紧_Text 夹爪夹紧 Tighten Gripper
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒进入_Text 入口电滚筒进入 LP Electric Drum Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒停止_Text 入口电滚筒停止 LP Electric Drum Stop
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒退出_Text 入口电滚筒退出 LP Electric Drum Exit
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪放松_Text 吸盘放松 Vacumm Gripper Released
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪回原_Text 吸盘回原 Vacumm Gripper Reset
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪夹紧_Text 吸盘夹紧 Vacumm Gripper Tightened
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒进入_Text 入口电滚筒进入 LP Electric Cylinder Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒停止_Text 入口电滚筒停止 LP Electric Cylinder Stop
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒退出_Text 入口电滚筒退出 LP Electric Cylinder Exit
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧阻挡上升_Text 入口阻挡上升 LP Barrier Rising
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧阻挡下降_Text 入口阻挡下降 LP Barrier Lowering
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒进入_Text 出口电滚筒进入 UP Electric Drum Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧阻挡下降_Text 入口阻挡下降 LP Barrier Falling
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒进入_Text 出口电滚筒进入 UP Electric Cylinder Existence
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒停止_Text 出口电滚筒停止 UP Electric Drum Stop
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧电滚筒退出_Text 出口电滚筒退出 UP Electric Drum Exit
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧阻挡上升_Text 出口阻挡上升 UP Barrier Rising
Form1_tabControl1_Res0008__IOControl_groupBox1_btn左侧阻挡下降_Text 出口阻挡下降 UP Barrier Falling
Form1_tabControl1_Res0008__IOControl_groupBox1_label14_Text 地址: Address
Form1_tabControl1_Res0008__IOControl_groupBox1_label5_Text 定时(ms): Timing (Ms)
Form1_tabControl1_Res0008__IOControl_groupBox1_label5_Text 定时(ms): Timing (ms)
Form1_tabControl1_Res0008__IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1_Res0008__IOControl_groupBox3_Text DI列表 DI List
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_groupBox3_Text 点位列表 Position List
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 Positions List
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机自启动 Auto Start
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
......@@ -159,15 +159,15 @@ Form1_tabControl1_Res0010__SettingControl_groupBox3_Text QTY
Form1_tabControl1_Res0010__SettingControl_groupBox4_btn_codetest_Text 匹配 Match
Form1_tabControl1_Res0010__SettingControl_groupBox4_Text 条码匹配测试 Barcode Testing
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_btn_selectdir_Text 浏览 Browsing
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_cb_exportreephoto_Text 自动拍摄并保存料盘图像. 勾选后仅本次有效 Auto Save Image
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_cb_exportreephoto_Text 自动拍摄并保存料盘图像. 勾选后仅本次有效 Automatically Capture and Save Tray Images. (Checked for this time only)
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_label_dir_Text 图像保存目录: Save Directory
Form1_tabControl1_Res0010__SettingControl_uC_U11_gb_Text 料盘图像导出 Entail Reel's Image
Form1_tabControl1_Res0070__AgvControl_checkBox1_Text 手动 Manual
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Retrieve Loaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Insert Unloaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Retrieve Full Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Insert Empty Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_left_Text 出口 UP
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Retrieve Unloaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Insert Loaded Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Retrieve Empty Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Insert Full Stacker
Form1_tabControl1_Res0070__AgvControl_groupBox_right_Text 入口 LP
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblCurMissionId_Text 当前的任务 ID Current Task ID
Form1_tabControl1_Res0070__AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的任务 ID Running Task ID
......@@ -213,6 +213,10 @@ FrmCodeDecode_label3_Text 掩 Barcode Type
FrmCodeDecode_label4_Text 参数路径 Parameter Path
FrmCodeDecode_lblCount_Text 条码数量: Barcode Quantity
FrmCodeDecode_Text 二维码识别 QR Barcode Recognition
FrmCodeDecode_label6_Text 图片识别结果 Image recognition results:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes
FrmCodeDecode_check_issaveimage_Text 是否保存图片 Is Image Save
FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder
FrmLabel_BtnFieldAdd_Text 字段添加 Add Field
FrmLabel_BtnFieldDel_Text 字段删除 Delete Field
FrmLabel_BtnFieldFont_Text 字段字体 Field Font
......@@ -223,8 +227,12 @@ FrmLabel_BtnRename_Text Rename
FrmLabel_BtnSave_Text 保存 Save
FrmLabel_grpDsc_Text 字段说明 Field Description
FrmLabel_Text 标签编辑 Label Editing
FrmLabel_label_labelsize_Text 标签尺寸: Label size
FrmLabel_groupBox1_Text 字段说明 Description
FrmLabel_label5_Text 高: Height:
FrmLabel_label6_Text 宽: Width:
menuStrip1_关于ToolStripMenuItem_Text 关于 About
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 Eqiupment Operation
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 Config.
menuStrip1_语言toolStripMenuItem_Text 语言 Language
设备操作ToolStripMenuItem_二维码识别调试ToolStripMenuItem_Text 二维码识别调试 QR Barcode Recognition Config.
设备操作ToolStripMenuItem_启用调试模式ToolStripMenuItem_Text 新建 New
......@@ -250,11 +258,11 @@ Label_R_P2 韐湔頧游P2 Label R Axis Label Picking Point P2
Label_X_Axis 贴标移栽机构X轴 Label Transplant Mechanism X Axis
Label_X_P1 贴标X轴待机点P1 Label X Axis Standby Point P1
Label_X_P2 贴标X轴取标点P2 Label X Axis Label Picking Point P2
Label_X_P3 贴标X轴贴标基准点P3 Label X Axis Label Reference Point P3
Label_X_P3 贴标X轴贴标基准点P3 Label X Axis Label Ref. Point P3
Label_Y_Axis 贴标移栽机构Y轴 Label Transplant Mechanism Y Axis
Label_Y_P1 贴标Y轴待机点P1 Label Y Axis Standby Point P1
Label_Y_P2 贴标Y轴取标点P2 Label Y Axis Label Picking Point P2
Label_Y_P3 贴标Y轴贴标基准点P3 Label Y Axis Label Reference Point P3
Label_Y_P3 贴标Y轴贴标基准点P3 Label Y Axis Label Ref. Point P3
Label_Z_Axis 贴标移栽机构Z轴 Label Transplant Mechanism Z Axis
Label_Z_P1 贴标Z轴待机点P1 Label Z Axis Standby Point P1
Label_Z_P2 贴标Z轴取标前点P2 Label Z Axis Label Picking Pre-Point P2
......@@ -267,15 +275,15 @@ LabelCylinder_Work Nozzle Label Picking
Left_Batch_Axis 出料提升轴 Unload Lifting Axis
Left_Batch_P1 出料升轴低点P1 Unload Lifting Axis Low Point P1
Left_Batch_P2 出料升轴高点P2 Unload Lifting Axis High Point P2
Left_BTN 出料口确认按钮 Unloading Port Confirmation Button
LeftArm_Check 旋转臂出料侧检测 Rotating Arm Unload Side Detection
Left_BTN 出料口确认按钮 UP Confirm Button
LeftArm_Check 旋转臂出料侧检测 Unloading Side Detection
LeftBackDoor_Check 后门左门禁 Rear Door Left Access Control
LeftCar_Check 出料口料车检测 UP Reel Detection
LeftEnd_Check 出料口料串到位检测 UP Reel In Position Detection
LeftFornt_Check 出料口前端料串检测 UP Front End Reel In Position Detection
LeftFornt_Check 出料口前端料串检测 UP Stacker In Position Detection
LeftMoto_Reverse 出料口电机反转指令 UP Motor Reverse Command
LeftMoto_Run 出料口电机启动 UP Motor Start
LeftOverHead_Check 出料定位料盘超限检测 Unload Positioning Reel Overlimit Detection
LeftOverHead_Check 出料定位料盘超限检测 Unloading Reel Overlimit Detection
LeftState_Led 出料口状态指示灯 UP Status Indicator
LeftStopDown 出料口阻挡气缸下降端 UP Barrier Cylinder Down End
LeftStopUP 出料口阻挡气缸上升端 UP Barrier Cylinder Up End
......@@ -286,40 +294,40 @@ Right_Batch_P2 餈蓬擃P2 Load Lifting Axis High Point P2
Right_Batch_X 入口轴心坐标X LP Axis Center Coordinate X
Right_Batch_Y 入口轴心坐标Y LP Axis Center Coordinate Y
Right_BTN 进料口确认按钮 LP Confirmation Button
RightArm_Check 旋转臂进料侧检测 Rotating Arm Loading Port Side Detection
RightArm_Check 旋转臂进料侧检测 Loading Port Side Detection
RightBackDoor_Check 后门右门禁 Rear Door Right Access Control
RightCameraName 入口相机名称 LP Camera Name
RightCar_Check 进料口料车检测 LP Reel Detection
RightEnd_Check 进料口料串到位检测 LP Reel In Position Detection
RightFornt_Check 进料口前端料串检测 LP Front End Reel In Position Detection
RightCar_Check 进料口料车检测 LP Trolley Detection
RightEnd_Check 进料口料串到位检测 LP Stacker Ready Detection
RightFornt_Check 进料口前端料串检测 LP Stacker In Position Detection
RightMoto_Reverse 进料口电机反转指令 LP Motor Reverse Command
RightMoto_Run 进料口电机启动 LP Motor Start
RightOverHead_Check 进料定位料盘超限检测 Load Positioning Reel Overlimit Detection
RightOverHead_Check 进料定位料盘超限检测 Loading Reel Overlimit Detection
RightState_Led 进料口状态指示灯 LP Status Indicator
RightStopDown 进料口阻挡气缸下降端 LP Barrier Cylinder Down End
RightStopUP 进料口阻挡气缸上升端 LP Barrier Cylinder Up End
RightTop_Check 进料定位料盘检测 Load Positioning Reel Detection
RunSign_HddLed 待机指示灯 Standby Indicator
Sucker_Clamp 吸盘吸料 Suction Cup Loading
Sucker_Release 吸盘放料 Suction Cup Release
Sucker_Clamp 吸盘吸料 Vacumm Gripper Loading
Sucker_Release 吸盘放料 Vacumm Gripper Release
SuddenStop_BTN 急停 E-Stop
Take_Middle_Axis 取料旋转轴 Picking Rotation Axis
Take_Middle_P1 取料旋转轴待机点P1 Picking Rotation Axis Standby Point P1
Take_Middle_P2 取料旋转轴右取料点P2 Picking Rotation Axis Right Picking Point P2
Take_Middle_P3 取料旋转轴左取料点P3 Picking Rotation Axis Left Picking Point P3
Take_Middle_P5 取料旋转轴NG放料点P5 Picking Rotation Axis NG Unload Point P5
Take_UpDown_Axis 取料升降轴 Picking Lift Axis
Take_UpDown_P1 取料升降轴待机点P1 Picking Lift Axis Standby Point P1
Take_UpDown_P2 取料升降轴取料高点P2 Picking Lift Axis Picking High Point P2
Take_UpDown_P3 取料升降轴取右料低点P3 Picking Lift Axis Right Picking Low Point P3
Take_UpDown_P4 取料升降轴取左料低点P4 Picking Lift Axis Left Picking Low Point P4
Take_UpDown_P5 取料升降轴NG放料点P5 Picking Lift Axis NG Unload Point P5
Take_Middle_Axis 取料旋转轴 Picking(P) Rotation Axis
Take_Middle_P1 取料旋转轴待机点P1 P Rotation Axis Standby Point P1
Take_Middle_P2 取料旋转轴右取料点P2 P Rotation Axis Right Picking Point P2
Take_Middle_P3 取料旋转轴左取料点P3 P Rotation Axis Left Picking Point P3
Take_Middle_P5 取料旋转轴NG放料点P5 P Rotation Axis NG Unload Point P5
Take_UpDown_Axis 取料升降轴 Picking(P) Lift Axis
Take_UpDown_P1 取料升降轴待机点P1 P Lift Axis Standby Point P1
Take_UpDown_P2 取料升降轴取料高点P2 P Lift Axis Picking High Point P2
Take_UpDown_P3 取料升降轴取右料低点P3 P Lift Axis Right Picking Low Point P3
Take_UpDown_P4 取料升降轴取左料低点P4 P Lift Axis Left Picking Low Point P4
Take_UpDown_P5 取料升降轴NG放料点P5 P Lift Axis NG Unload Point P5
TraySize_13 13寸料盘检测 13-Inch Reel Detection
TraySize_15 15寸料盘检测 15-Inch Reel Detection
TraySize_7 吸盘压力检测 Suction Cup Pressure Detection
TraySize_7 吸盘压力检测 Vacumm Stress Detection
Res0001 关于 {0} About {0}
Res0002 版本 {0} Version {0}
Res0003 信息 Info
Res0003 信息 Message
Res0004 时间 Time
Res0005 模块 Module
Res0006 步骤 Step
......@@ -327,8 +335,8 @@ Res0007 敹 Log
Res0008 IO调试 IO Config.
Res0009 伺服调试 Servo Config.
Res0010 相关设置 Related Settings
Res0011 启用配置模式 Enable Configuration Mode
Res0012 停用配置模式 Disable Configuration Mode
Res0011 启用配置模式 Enable Config. Mode
Res0012 停用配置模式 Disable Config. Mode
Res0013 暂停运行 Pause Execution
Res0014 恢复运行 Resume Execution
Res0015 启动 Start
......@@ -356,17 +364,17 @@ Res0036 蝘餉蝸 Move
Res0037 温湿度传感器[ Temperature And Humidity Sensor
Res0038 本机IP:[ Local IP:
Res0039 入口取料 LP Picking
Res0040 出口空闲中 UP Idle
Res0040 出口空闲中 UP Available
Res0041 本机IP Local IP
Res0042 移栽 Transfer
Res0042 移栽 Remove
Res0043 料串已满 Stacker is Full
Res0044 已使用 Already Used
Res0045 当前ReelID: Current Reel ID:
Res0046 无料串 No Stacker
Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继续 Loading Failed, Please Handle It Manually. Put The Reel Into The NG Box And Press LP Button .
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Handle It Manually. Puting Stacker And Press The LP Button.
Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继续 Loading Failed, Please Putting The Reel Into The NG Box And Press LP Button .
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Puting Stacker And Press The LP Button.
Res0049 等待出口允许放料 Wait For UP Release
Res0050 等待夹爪放松 Loosen Gripper
Res0050 等待吸盘放松 Waiting Sucker Released
Res0051 出口放料 UP Release
Res0052 贴标 ReLabel
Res0053 重置 Reset
......@@ -375,8 +383,8 @@ Res0055 銝蓮頧游僕瘨 Possible Rotational Axis Interference
Res0056 可能与贴标Z轴干涉 Possible Label Interference Z-Axis
Res0057 用户暂停 User Paused
Res0058 安全光栅被遮挡 Safety Light Curtain Barriered
Res0059 入口料串已空,等待取走料串 LP Stacker Empty, Awaiting Removal
Res0060 出口料串已满,等待取走料串 UP Stacker Full, Awaiting Removal
Res0059 入口料串已空,等待取走料串 LP Stacker Empty, Awaiting Remove
Res0060 出口料串已满,等待取走料串 UP Stacker Full, Awaiting Remove
Res0061 [已忽略] Ignored
Res0062 没有检测到NG料箱 No NG Bin Detected
Res0063 没有检测打印机 No Printer Detected
......@@ -391,11 +399,11 @@ Res0071 隞餃 Task Status
Res0072 标签已打印,当前ReelID: Label Printed, Current Reel ID:
Res0073 等待标签打印 Waiting For Label Printing
Res0074 等待中 Awaiting
Res0075 任务编号: Task ID:
Res0076 运行编号: Run Number:
Res0077 任务状态: Task Status:
Res0078 运行结果: Run Result:
Res0079 机器尚未启动不能呼叫AGV AGV Cannot Be Called Without Running
Res0075 任务编号: Task ID:
Res0076 运行编: Run Number:
Res0077 任务状态: Task Status:
Res0078 运行结: Run Result:
Res0079 机器尚未启动能呼叫AGV AGV Cannot Be Called Without Running
Res0080 当前有料串不能请求进入料串 Cannot Request Importing Current Stacker
Res0081 当前没有料串不能请求取料串 Cannot Request Stacker Due To No Stacker ,
Res0082 机器尚在运行,不能退出,请先停止运行. Cannot Request Stacker Retrieval Machine In Operation,
......@@ -409,46 +417,46 @@ Res0089 靘扳葡甇餈,銝銝 Right Stacker Operating, Man
Res0090 左侧料串正在运行,不能手动上料 Right Stacker Operating, Manual Loading is Not Allowed.
Res0091 请确认是否运动到该位置 Confirm Movement To This Location
Res0092 确定要删除:\"{0}\"? Deletion: "{0}"?
Res0093 右侧料串已空,等待取走料串 Right Stacker Empty, Awaiting Removal
Res0094 左侧料串已满,等待取走料串 Left Stacker Full, Awaiting Removal
Res0095 左侧空闲中 Left Side Idle
Res0093 右侧料串已空,等待取走料串 Right Stacker Empty, Awaiting Remove
Res0094 左侧料串已满,等待取走料串 Left Stacker Full, Awaiting Remove
Res0095 左侧空闲中 Left Side Available
Res0096 抓料失败请手动处理,请将料盘放入:NG箱,按右侧按钮继续 Loading Failed, Please Handle It Manually. Place Reel In NG Box And Press Right Button.
Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧按钮继续 Loading Failed, Please Handle It Manually. Place Reel In Left Stacker And Press Right Button
Res0098 等待左侧允许放料 Waiting For Left Side To Allow Stacker Placement
Res0099 等待料盘取走 Waiting For Reel Removal
Res0100 ,料串已清空. Stacker Empty
Res0101 启用配置模式 Configuration Mode
Res0102 夹爪夹紧 Tighten Gripper
Res0103 夹爪放松 Loosen Gripper
Res0100 ,料串已清空. Stacker Empty
Res0101 启用配置模式 Config. Mode
Res0102 吸盘夹紧 Vacumm Gripper Tightened
Res0103 吸盘放松 Vacumm Gripper Released
Res0104 等待 Waiting
Res0105 超时 Time Out
Res0106 秒 Second
Res0107.d1e28be6 AGV任务 AGV Task
Res0108.164140b2 状态更新 Update State
Res0109.d647c69c 入料口正在进料 Loading
Res0110.97f61551 入料口正在出料 Unloading
Res0109.d647c69c 入料口正在进料 Occupied
Res0110.97f61551 入料口正在出料 Occupied
Res0111.bb763c9e 任务类型 Task Type
Res0112.caa9d6a0 不允许使用该操作 This Operation is Not Allowed.
Res0113.15f652b4 出料口正在入料 Importing
Res0113.15f652b4 出料口正在入料 Loading
Res0114.b6a35f01 出料口正在出料 Unloading
Res0115.75a1fac5 折叠门开门信号未亮,不允许上料 No Door Open Signal, Loading Prohibited
Res0116.23d7e98f 折叠门开门信号未亮,不允许下料 No Door Open Signal, Unloading Prohibited
Res0117.2bf5c941 打开轴 Turn On Axis
Res0118.33d2a704 失败 Failed
Res0119.cbd5d752 清理报警, Clearing The Alarm.
Res0120.405c5a9e ,收到原点完成信号,当前位置[ Home Signal Received, Current Position [
Res0120.405c5a9e ,收到原点完成号,当前位置[ Home Signal Received, Current Position [
Res0121.6658614e ],误差过大,需要报警 ], Deviation Too Large, Alarm Needed
Res0122.62c858d3 标签取起失败! Failed To Retrieve Label
Res0123.d86f0192 有料串,已提取{0}张料盘 Have Stacker, {0} Reels Retrieved
Res0123.d86f0192 有料串,已提取{0}张料盘 Have Stacker, {0} Retrived
Res0124.84e7c741 批量轴上升到上料点 Batch Axis Rises To Loading Point
Res0125.ed4de1c6 扫码完成 Scan Completed
Res0126.f11b67ff 标签打印机打开失败 Turn On Label Printer Failure
Res0188 电夹爪通讯失败:{0} Electric Gripper Communication Failure:{0}
Res0188 电夹爪通讯失败:{0} Electric Gripper Communication Failure:{0}
Res0189 IO板卡初始化失败 IO Card Failed To Initialize.
Res0190 打开配置模式 Turn On Configuration Modo
Res0192 夹爪夹紧 Loosen Gripper
Res0193 夹爪放松 Tighten Gripper
Res0194 请先选择运动轴 Please Select A Motion Axis First.
Res0192 吸盘夹紧 Vacumm Gripper Tightened
Res0193 吸盘放松 Vacumm Gripper Released
Res0194 请先选择运轴 Please Select A Motion Axis First.
Res0195 警告 Warning
Res0196 点动+ Jogging+
Res0197 点动- Jogging-
......@@ -457,16 +465,55 @@ Res0199 霂瑕甇&漲 Please Enter The Correct Speed.
Res0200 状态监控 Condition Monitoring
Res0201 错误码: Error Code:
Res0202 伺服尚未使能 Servo is Disabled.
Res0203 伺服警报状态中 In Servo Alarm State
Res0203 伺服警报状中 In Servo Alarm State
Res0204 无法操作 Unable To Operate
Res0216 打印机 Printer
Res0217 标签打印机打开失败 Turn On Label Printer Failure
Res0218 有料串,已提取{0}张料盘 Have Stacker, {0} Reels In Place.
Res0219 版权 © 2021 Copyright © 2021
Res0220 最后更新时间: LastUpdate:
Res0221 未检测到打印标签 No printed labels detected
Res0222 贴标时未检测到打印标签 No labels detected during labeling
Res0223 未知数 Unknow
Res0224 上一个标签尚未移走 Previous label not removed
FeedAGV_Feed 进料口AGV送料串请求 LP AGV Sends Stacker Request..
FeedAGV_Receiving 进料口AGV收料串请求 LP AGV Receives Stacker Request.
DischargeAGV_Feeding 出料口AGV送料串请求 UP AGV Sends Stacker Request.
DischargeAGV_Receiving 出料口AGV收料串请求 UP AGV Receives Stacker Request.
AgvRequest_ FeedPort 进料口AGV请求应答 LP AGV Responds To Request.
AgvRequest_ Outlet 出料口AGV请求应答 UP AGV Responds To Request.
\ No newline at end of file
AgvRequest_FeedPort 进料口AGV请求应答 LP AGV Responds To Request.
AgvRequest_Outlet 出料口AGV请求应答 UP AGV Responds To Request.
Form1_groupBox2_Text 消息 Message
menuStrip1_相机条码ToolStripMenuItem_Text 条码识别(相机) Barcode recognition (camera)
menuStrip1_条码规则ToolStripMenuItem_Text 条码规则 Barcode Rules
menuStrip1_退出ToolStripMenuItem1_Text 退出 Exit
AgvControl_checkBox1_Text 手动 Manual Operation
AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Request Full Stacker
AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Request Full Stacker
AgvControl_groupBox_left_Text 出口 Unloading Port
AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Request Empty Stacker
AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Request Full Stacker
AgvControl_groupBox_right_Text 入口 LP
AgvControl_groupBox2_lblCurMissionId_Text 当前的mission id Current Task ID
AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的mission id Running Task ID
AgvControl_groupBox2_lblMissionResult_Text mission运行结果 Task Run Results
AgvControl_groupBox2_lblMissionRunstate_Text mission运行状态 Task Run Status
AgvControl_groupBox3_button1_Text 任务测试 Manual Task Test
AgvControl_groupBox3_button2_Text 重置呼叫 Reset Call Status
AgvControl_groupBox3_label1_Text 去待机点任务编号: Standby Task ID
AgvControl_groupBox3_label3_Text 去入口任务编号: Move To LP Task ID:
AgvControl_groupBox3_label4_Text 去出口任务编号: Move To UP Task ID:
AgvControl_groupBox3_label5_Text 流出AGV任务编号: AGV Stacker Outflow ID
AgvControl_groupBox3_label6_Text 流入AGV任务编号: AGV Stacker Inflow ID
AgvControl_groupBox3_label7_Text 任务编号: Task ID:
AgvControl_groupBox3_Text 手动任务 Manually Send Task
AgvControl_groupBox2_Text 任务状态[127.0.0.1] AGV Status [127.0.0.1]
AxisMoveControl_groupAxis_groupBox2_lblINP_Text 到位 In place
Form1_tabControl1_Res0010__SettingControl_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
Form1_tabControl1_Res0010__SettingControl_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain
Form1_tabControl1_Res0010__SettingControl_btn_labelDebug_Text 贴标调试 Label Config.
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayoutPanel1_Label_XOffset_Text 贴标X轴偏移量 Labeling X-axis offset
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayoutPanel1_Label_YOffset_Text 贴标Y轴偏移量 Labeling Y-axis offset
Label_XOffset 贴标X轴偏移量 Labeling X-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_groupBox4_tableLayoutPanel2_IO_RightMoto_Reverse_label1_Text Y09_进料口电机反转指令 Input port motor reverse command
\ No newline at end of file
......@@ -192,7 +192,7 @@ Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 ブザーを起
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 セーフティライトカーテンを無視する
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) セーフティチックを無視する(セーフティライトカーテン含み)
Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 実行状況
Form1_tabControl1_tabPage1_Text 信息 情報
Form1_tabControl1_tabPage1_Text 信息 メッセージ
FrmCodeDecode_btnAn_Text 变暗 暗くする
FrmCodeDecode_btnbarCode_Text 一维码识别 1次元バーコードの認識
FrmCodeDecode_btnCameraImage_Text 相机获取图片 カメラから画像
......@@ -213,6 +213,10 @@ FrmCodeDecode_label3_Text 条码类型: バーコードタイプ:
FrmCodeDecode_label4_Text 参数路径 パスパラメータ
FrmCodeDecode_lblCount_Text 条码数量: バーコード数:
FrmCodeDecode_Text 二维码识别 QRコード識別
FrmCodeDecode_label6_Text 图片识别结果 Image recognition results:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes
FrmCodeDecode_check_issaveimage_Text 是否保存图片 Is Image Save
FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder
FrmLabel_BtnFieldAdd_Text 字段添加 フィールド追加
FrmLabel_BtnFieldDel_Text 字段删除 フィールド削除
FrmLabel_BtnFieldFont_Text 字段字体 フィールド字体
......@@ -223,6 +227,8 @@ FrmLabel_BtnRename_Text 重命名 重命名
FrmLabel_BtnSave_Text 保存 保存
FrmLabel_grpDsc_Text 字段说明 フィールド説明
FrmLabel_Text 标签编辑 ラベル編集
FrmLabel_label_labelsize_Text 标签尺寸: Label size
FrmLabel_groupBox1_Text 字段说明 Description
menuStrip1_关于ToolStripMenuItem_Text 关于 詳しい情報
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 操作
menuStrip1_语言toolStripMenuItem_Text 语言 言語
......@@ -464,9 +470,42 @@ Res0217 标签打印机打开失败 ラベルプリンタを開くのに失敗
Res0218 有料串,已提取{0}张料盘 リール串がシリアルで、{0}枚のリールが提出されました
Res0219 版权 © 2021 著作権© 2021
Res0220 最后更新时间: 最終更新日時:
Res0221 未检测到打印标签 印刷ラベルが検出されませんでした
Res0222 贴标时未检测到打印标签 ラベルがラベルで検出されませんでした
Res0223 未知数 未知数
Res0224 上一个标签尚未移走 前のラベルは移動されていません
FeedAGV_Feed 进料口AGV送料串请求 フィードポートAGVフィードストリング要求
FeedAGV_Receiving 进料口AGV收料串请求 供給口AGV受入ストリング要求
DischargeAGV_Feeding 出料口AGV送料串请求 排出口AGV送り列要求
DischargeAGV_Receiving 出料口AGV收料串请求 排出口AGV受入ストリング要求
AgvRequest_ FeedPort 进料口AGV请求应答 供給口AGV要求応答
AgvRequest_ Outlet 出料口AGV请求应答 排出口AGV要求応答
AgvRequest_FeedPort 进料口AGV请求应答 供給口AGV要求応答
AgvRequest_Outlet 出料口AGV请求应答 排出口AGV要求応答
Form1_groupBox2_Text 消息 Message
menuStrip1_相机条码ToolStripMenuItem_Text 条码识别(相机) Barcode recognition (camera)
menuStrip1_条码规则ToolStripMenuItem_Text 条码规则 Barcode Rules
menuStrip1_退出ToolStripMenuItem1_Text 退出 Exit
AgvControl_checkBox1_Text 手动 Manual Operation
AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 Request Loaded Stacker
AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 Request Loaded Stacker
AgvControl_groupBox_left_Text 出口 Unloading Port
AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 Request Unloaded Stacker
AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 Request Loaded Stacker
AgvControl_groupBox_right_Text 入口 Loading Port
AgvControl_groupBox2_lblCurMissionId_Text 当前的mission id Current Task ID
AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的mission id Running Task ID
AgvControl_groupBox2_lblMissionResult_Text mission运行结果 Task Run Results
AgvControl_groupBox2_lblMissionRunstate_Text mission运行状态 Task Run Status
AgvControl_groupBox3_button1_Text 任务测试 Manual Task Test
AgvControl_groupBox3_button2_Text 重置呼叫 Reset Call Status
AgvControl_groupBox3_label1_Text 去待机点任务编号: Standby Task ID
AgvControl_groupBox3_label3_Text 去入口任务编号: Move To LP Task ID:
AgvControl_groupBox3_label4_Text 去出口任务编号: Move To UP Task ID:
AgvControl_groupBox3_label5_Text 流出AGV任务编号: AGV Stacker Outflow ID
AgvControl_groupBox3_label6_Text 流入AGV任务编号: AGV Stacker Inflow ID
AgvControl_groupBox3_label7_Text 任务编号: Task ID:
AgvControl_groupBox3_Text 手动任务 Manually Send Task
AgvControl_groupBox2_Text 任务状态[127.0.0.1] AGV Status [127.0.0.1]
AxisMoveControl_groupAxis_groupBox2_lblINP_Text 到位 In place
Form1_tabControl1_Res0010__SettingControl_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
Form1_tabControl1_Res0010__SettingControl_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain
Form1_tabControl1_Res0010__SettingControl_btn_labelDebug_Text 贴标调试 Label Config.
......@@ -86,9 +86,9 @@ Form1_tabControl1___IOControl_groupBox1_btn打开设备光源_Text 打开设备
Form1_tabControl1___IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 打开相机光源
Form1_tabControl1___IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 关闭设备光源
Form1_tabControl1___IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 关闭相机光源
Form1_tabControl1___IOControl_groupBox1_btn夹爪放松_Text 夹取机构放料 夹取机构放料
Form1_tabControl1___IOControl_groupBox1_btn夹爪回原_Text 夹取机构回原 夹取机构回原
Form1_tabControl1___IOControl_groupBox1_btn夹爪夹紧_Text 夹取机构取料 夹取机构取料
Form1_tabControl1___IOControl_groupBox1_btn夹爪放松_Text 吸盘机构放料 吸盘机构放料
Form1_tabControl1___IOControl_groupBox1_btn夹爪回原_Text 吸盘机构回原 吸盘机构回原
Form1_tabControl1___IOControl_groupBox1_btn夹爪夹紧_Text 吸盘机构取料 吸盘机构取料
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒进入_Text 入口电滚筒进入 入口电滚筒进入
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒停止_Text 入口电滚筒停止 入口电滚筒停止
Form1_tabControl1___IOControl_groupBox1_btn入口电滚筒退出_Text 入口电滚筒退出 入口电滚筒退出
......@@ -122,9 +122,9 @@ Form1_tabControl1_Res0008__IOControl_groupBox1_btn打开设备光源_Text 打开
Form1_tabControl1_Res0008__IOControl_groupBox1_btn打开相机光源_Text 打开相机光源 打开相机光源
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭设备光源_Text 关闭设备光源 关闭设备光源
Form1_tabControl1_Res0008__IOControl_groupBox1_btn关闭相机光源_Text 关闭相机光源 关闭相机光源
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪放松_Text 夹爪放松 夹爪放松
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪回原_Text 夹爪回原 夹爪回原
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪夹紧_Text 夹爪夹紧 夹爪夹紧
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪放松_Text 吸盘放料 吸盘放料
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪回原_Text 吸盘回原 吸盘回原
Form1_tabControl1_Res0008__IOControl_groupBox1_btn夹爪夹紧_Text 吸盘吸料 吸盘吸料
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒进入_Text 入口电滚筒进入 入口电滚筒进入
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒停止_Text 入口电滚筒停止 入口电滚筒停止
Form1_tabControl1_Res0008__IOControl_groupBox1_btn右侧电滚筒退出_Text 入口电滚筒退出 入口电滚筒退出
......@@ -183,7 +183,7 @@ Form1_tabControl1_Res0070__AgvControl_groupBox3_label5_Text 流出AGV任务编
Form1_tabControl1_Res0070__AgvControl_groupBox3_label6_Text 流入AGV任务编号: 流入AGV任务编号:
Form1_tabControl1_Res0070__AgvControl_groupBox3_label7_Text 任务编号: 任务编号:
Form1_tabControl1_Res0070__AgvControl_groupBox3_Text 手动任务 手动任务
Form1_tabControl1_tabPage1_btn_leftempty_Text 出口\n手动清空 出口\n手动清空
Form1_tabControl1_tabPage1_btn_leftempty_Text 出口\n手动上料 出口\n手动上料
Form1_tabControl1_tabPage1_btn_maulstart_Text 入口\n手动上料 入口\n手动上料
Form1_tabControl1_tabPage1_btn_PauseBuzzer_Text 本次暂停警报器响声 本次暂停警报器响声
Form1_tabControl1_tabPage1_btn_releaseleftshelf_Text 安全释放出口料串 安全释放出口料串
......@@ -192,7 +192,7 @@ Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 使用蜂鸣器
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 忽略安全光栅
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) 忽略安全检查(含安全光栅)
Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 运行状态
Form1_tabControl1_tabPage1_Text 信息 信
Form1_tabControl1_tabPage1_Text 消息 消
FrmCodeDecode_btnAn_Text 变暗 变暗
FrmCodeDecode_btnbarCode_Text 一维码识别 一维码识别
FrmCodeDecode_btnCameraImage_Text 相机获取图片 相机获取图片
......@@ -213,6 +213,10 @@ FrmCodeDecode_label3_Text 条码类型: 条码类型:
FrmCodeDecode_label4_Text 参数路径 参数路径
FrmCodeDecode_lblCount_Text 条码数量: 条码数量:
FrmCodeDecode_Text 二维码识别 二维码识别
FrmCodeDecode_label6_Text 图片识别结果 图片识别结果:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 获取相机图片及条码
FrmCodeDecode_check_issaveimage_Text 是否保存图片 是否保存图片
FrmCodeDecode_button_optionfeil_Text 选择文件夹 选择文件夹
FrmLabel_BtnFieldAdd_Text 字段添加 字段添加
FrmLabel_BtnFieldDel_Text 字段删除 字段删除
FrmLabel_BtnFieldFont_Text 字段字体 字段字体
......@@ -223,6 +227,10 @@ FrmLabel_BtnRename_Text 重命名 重命名
FrmLabel_BtnSave_Text 保存 保存
FrmLabel_grpDsc_Text 字段说明 字段说明
FrmLabel_Text 标签编辑 标签编辑
FrmLabel_label_labelsize_Text 标签尺寸: 标签尺寸:
FrmLabel_groupBox1_Text 字段说明 字段说明
FrmLabel_label5_Text 高: 高:
FrmLabel_label6_Text 宽: 宽:
menuStrip1_关于ToolStripMenuItem_Text 关于 关于
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 设备操作
menuStrip1_语言toolStripMenuItem_Text 语言 语言
......@@ -366,7 +374,7 @@ Res0046 无料串 无料串
Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继续 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继续
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续
Res0049 等待出口允许放料 等待出口允许放料
Res0050 等待夹爪放松 等待夹爪放松
Res0050 等待吸盘放松 等待吸盘放松
Res0051 出口放料 出口放料
Res0052 贴标 贴标
Res0053 重置 重置
......@@ -418,8 +426,8 @@ Res0098 等待左侧允许放料 等待左侧允许放料
Res0099 等待料盘取走 等待料盘取走
Res0100 ,料串已清空. ,料串已清空.
Res0101 启用配置模式 启用配置模式
Res0102 夹爪夹紧 夹爪夹紧
Res0103 夹爪放松 夹爪放松
Res0102 吸盘夹紧 吸盘夹紧
Res0103 吸盘放松 吸盘放松
Res0104 等待 等待
Res0105 超时 超时
Res0106 秒 秒
......@@ -446,8 +454,8 @@ Res0126.f11b67ff 标签打印机打开失败 标签打印机打开失败
Res0188 电夹爪通讯失败:{0} 电夹爪通讯失败:{0}
Res0189 IO板卡初始化失败 IO板卡初始化失败
Res0190 打开配置模式 打开配置模式
Res0192 夹爪夹紧 夹爪夹紧
Res0193 夹爪放松 夹爪放松
Res0192 吸盘夹紧 吸盘夹紧
Res0193 吸盘放松 吸盘放松
Res0194 请先选择运动轴 请先选择运动轴
Res0195 警告 警告
Res0196 点动+ 点动+
......@@ -464,9 +472,65 @@ Res0217 标签打印机打开失败 标签打印机打开失败
Res0218 有料串,已提取{0}张料盘 有料串,已提取{0}张料盘
Res0219 版权 © 2021 版权 © 2021
Res0220 最后更新时间: 最后更新时间:
FeedAGV_Feed 进料口AGV送料串请求 进料口AGV送料串请求
FeedAGV_Receiving 进料口AGV收料串请求 进料口AGV收料串请求
DischargeAGV_Feeding 出料口AGV送料串请求 出料口AGV送料串请求
DischargeAGV_Receiving 出料口AGV收料串请求 出料口AGV收料串请求
AgvRequest_ FeedPort 进料口AGV请求应答 进料口AGV请求应答
AgvRequest_ Outlet 出料口AGV请求应答 出料口AGV请求应答
\ No newline at end of file
Res0221 未检测到打印标签 未检测到打印标签
Res0222 贴标时未检测到标签 贴标时未检测到标签
Res0223 未知数 未知数
Res0224 上一个标签尚未移走 上一个标签尚未移走
FeedAGV_Feed 进料口AGV送料串请求 进料口AGV送料串请求
FeedAGV_Receiving 进料口AGV收料串请求 进料口AGV收料串请求
DischargeAGV_Feeding 出料口AGV送料串请求 出料口AGV送料串请求
DischargeAGV_Receiving 出料口AGV收料串请求 出料口AGV收料串请求
AgvRequest_ FeedPort 进料口AGV请求应答 进料口AGV请求应答
AgvRequest_ Outlet 出料口AGV请求应答 出料口AGV请求应答
Form1_groupBox2_Text 消息 消息
menuStrip1_相机条码ToolStripMenuItem_Text 条码识别(相机) 条码识别(相机)
menuStrip1_条码规则ToolStripMenuItem_Text 条码规则 条码规则
menuStrip1_退出ToolStripMenuItem1_Text 退出 退出
AgvControl_checkBox1_Text 手动 手动
AgvControl_groupBox_left_button_Leftleavefull_Text 满料串取出 满料串取出
AgvControl_groupBox_left_button_leftneedempty_Text 空料串送入 空料串送入
AgvControl_groupBox_left_Text 出口 出口
AgvControl_groupBox_right_button_rightleavefull_Text 空料串取出 空料串取出
AgvControl_groupBox_right_button_rightneedempty_Text 满料串送入 满料串送入
AgvControl_groupBox_right_Text 入口 入口
AgvControl_groupBox2_lblCurMissionId_Text 当前的任务 id 当前的任务 id
AgvControl_groupBox2_lblCurRunMissionId_Text 正在运行的任务 id 正在运行的任务 id
AgvControl_groupBox2_lblMissionResult_Text 任务运行结果 任务运行结果
AgvControl_groupBox2_lblMissionRunstate_Text 任务运行状态 任务运行状态
AgvControl_groupBox3_button1_Text 任务测试 任务测试
AgvControl_groupBox3_button2_Text 重置呼叫 重置呼叫
AgvControl_groupBox3_label1_Text 去待机点任务编号: 去待机点任务编号:
AgvControl_groupBox3_label3_Text 去入口任务编号: 去入口任务编号:
AgvControl_groupBox3_label4_Text 去出口任务编号: 去出口任务编号:
AgvControl_groupBox3_label5_Text 流出AGV任务编号: 流出AGV任务编号:
AgvControl_groupBox3_label6_Text 流入AGV任务编号: 流入AGV任务编号:
AgvControl_groupBox3_label7_Text 任务编号: 任务编号:
AgvControl_groupBox3_Text 手动任务 手动任务
AgvControl_groupBox2_Text 任务状态[127.0.0.1] 任务状态[127.0.0.1]
AxisMoveControl_groupAxis_groupBox2_lblINP_Text 到位 到位
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_Text DO写入 DO写入
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btnCloseAll_Text 关闭所有DO 关闭所有DO
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn夹爪回原_Text 吸盘回原 吸盘回原
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn夹爪夹紧_Text 吸盘吸料 吸盘吸料
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn夹爪放松_Text 吸盘放料 吸盘放料
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn右侧电滚筒停止_Text 右侧电滚筒停止 右侧电滚筒停止
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn左侧电滚筒停止_Text 左侧电滚筒停止 左侧电滚筒停止
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn右侧电滚筒退出_Text 右侧电滚筒退出 右侧电滚筒退出
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn左侧电滚筒退出_Text 左侧电滚筒退出 左侧电滚筒退出
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn关闭设备光源_Text 关闭设备光源 关闭设备光源
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn关闭相机光源_Text 关闭相机光源 关闭相机光源
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn打开设备光源_Text 打开设备光源 打开设备光源
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn打开相机光源_Text 打开相机光源 打开相机光源
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn左侧阻挡下降_Text 左侧阻挡下降 左侧阻挡下降
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn左侧阻挡上升_Text 左侧阻挡上升 左侧阻挡上升
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btnOpenDo_Text 打开 打开
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btnCloseDO_Text 关闭 关闭
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_label14_Text 地址: 地址:
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn右侧阻挡下降_Text 右侧阻挡下降 右侧阻挡下降
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_label5_Text 定时(ms): 定时(ms):
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn右侧电滚筒进入_Text 右侧电滚筒进入 右侧电滚筒进入
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn左侧电滚筒进入_Text 左侧电滚筒进入 左侧电滚筒进入
Form1_tabControl1_Res0008__IOControl_panel1_groupBox1_btn右侧阻挡上升_Text 右侧阻挡上升 右侧阻挡上升
Form1_tabControl1_Res0010__SettingControl_cb_EnableBuzzer_Text 使用蜂鸣器 使用蜂鸣器
Form1_tabControl1_Res0010__SettingControl_cb_IgnoreGratingSignal_Text 忽略安全光栅 忽略安全光栅
Form1_tabControl1_Res0010__SettingControl_btn_labelDebug_Text 贴标调试 贴标调试
\ No newline at end of file
......@@ -33,6 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ConfigHelper">
<HintPath>..\dll\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
......@@ -43,6 +46,7 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
......@@ -68,6 +72,7 @@
<Compile Include="util\CTcpClient.cs" />
<Compile Include="util\TcpServer.cs" />
<Compile Include="util\UdpServer.cs" />
<Compile Include="util\UnifiedDataHandler.cs" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
......
......@@ -2,11 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
namespace OnlineStore.Common
{
public class LineGetPosOp
{
public LineGetPosOp(string cids, string code)
......@@ -72,11 +72,11 @@ namespace OnlineStore.Common
get { return _data; }
set { _data = value; }
}
public Dictionary<String, Dictionary<String, String>> mimoOpMap = new Dictionary<string, Dictionary<string, string>>();
//public Dictionary<String, Dictionary<String, String>> mimoOpMap = new Dictionary<string, Dictionary<string, string>>();
/// <summary>
/// agv的日志信息
/// </summary>
public List<AgvLogInfo> logList = new List<AgvLogInfo>();
//public List<AgvLogInfo> logList = new List<AgvLogInfo>();
/// <summary>
/// 整体料仓状态
/// 1=正常运行中
......@@ -94,7 +94,7 @@ namespace OnlineStore.Common
/// 警告:出库盘到达工位但是没有工人操作
/// </summary>
public string msg { get; set; }
// public Dictionary<string, string> msgData { get; set; } = new Dictionary<string, string>() { {"zh","" },{ "en", "" }, { "jp", "" } };
//public Dictionary<string, string> msgData { get; set; } = new Dictionary<string, string>() { {"zh","" },{ "en", "" }, { "jp", "" } };
public Dictionary<string, string> msgData { get; set; } = new Dictionary<string, string>();
public string msgParam { get; set; }
public string msgCode { get; set; }
......@@ -103,11 +103,14 @@ namespace OnlineStore.Common
/// <summary>
/// 包含的多个 BOX 的状态信息
/// </summary>
public Dictionary<int, BoxStatus> boxStatus = new Dictionary<int, BoxStatus>();
//public Dictionary<int, BoxStatus> boxStatus = new Dictionary<int, BoxStatus>();
/// <summary>
/// 报警集合
/// </summary>
public List<AlarmInfo> alarmList = new List<AlarmInfo>();
public List<EquipMsg> showLogs = new List<EquipMsg>();
public String type { get; set; } = "NEOSCAN";
}
/**
* agv日志信息
......@@ -173,6 +176,7 @@ namespace OnlineStore.Common
/// <summary>
/// 操作相关数据,
/// 出库完成后发送posId库位编号给服务器
/// 需要将打印数量和ng数量发送给服务器
/// </summary>
private Dictionary<string, string> _data = new Dictionary<string, string>();
public Dictionary<string, string> data
......@@ -310,4 +314,59 @@ namespace OnlineStore.Common
public static string disable = "disable";
public static string enable = "enable";
}
/// <summary>
/// 步骤消息类
/// </summary>
public class EquipMsg
{
/// <summary>
/// 设备模块
/// </summary>
public String module;
/// <summary>
/// 消息类型,为:INFO,WARNING,ERROR,DATA
/// </summary>
//private String type;
/// <summary>
/// 中英文字符串 key
/// </summary>
public String msgCode;
/// <summary>
/// 消息内容
/// </summary>
public String msg;
/// <summary>
/// 参数
/// </summary>
public String[] msgParams;
}
public class NsMesInfo
{
private String status = "OK";
private DateTime time;
private String request = "";
private String response = "";
}
public enum ShelfEnum
{
IDLE ,//= 空闲;
LOADING,//= 入库中;
UNLOADING,//= 出库中;
NEED_EMPTY,//= 需要空料串出库;
EMPTY_OUT,//= 空料串需要取走
FULL_OUT,//= 满料串需要取走
}
public enum ShelfType
{
smallReel,
bigReel,
tray
}
}
using System;
using System.Configuration;
using System.Threading;
using System.Xml;
using System.Windows.Forms;
using System.Xml;
namespace OnlineStore.Common
{
......@@ -204,6 +204,6 @@ namespace OnlineStore.Common
{
LogUtil.error( "SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + ",",ex);
}
}
}
}
}
......@@ -14,7 +14,7 @@ namespace OnlineStore.Common
/// </summary>
/// <param name="o">对象</param>
/// <returns>json字符串</returns>
public static string SerializeObject(object o)
public static string SerializeObject (object o)
{
string json = JsonConvert.SerializeObject(o);
return json;
......
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.Common.util
{
public static class UnifiedDataHandler
{
private static string server = "service/video/upload";
private static object lockRecordPrintNg = new object();
/// <summary>
/// 记录当天打印和ng数量
/// </summary>
/// <param name="isquery">为true时,只查询不修改</param>
/// <param name="isPrint">true增加打印数量,反之增加ng数量</param>
/// <param name="ints">返回打印和ng数量</param>
/// <returns></returns>
public static int RecordPrintNg(bool isquery, bool isPrint, out string[] strarrys)
{
lock (lockRecordPrintNg)
{
strarrys = new string[2];
try
{
int cut = 0;
string txtpath = Path.Combine(Application.StartupPath, ConfigHelper.Config.Get("RecordPrintNg", "Config\\RecordPrintNg.txt"));
//0日期;1打印数量;2ng数量
string[] strs = { DateTime.Today.ToString("dd-MM-yyyy"), "0", "0" };
if (File.Exists(txtpath))
{
string json = File.ReadAllText(txtpath);
if (!string.IsNullOrWhiteSpace(json))
{
string[] strings = JsonConvert.DeserializeObject<string[]>(json);
if (strings[0] == DateTime.Today.ToString("dd-MM-yyyy"))
{
strs[0] = strings[0];
strs[1] = strings[1];
strs[2] = strings[2];
}
}
}
if (!isquery)
{
cut = isPrint ? int.Parse(strs[1]) + 1 : int.Parse(strs[2]) + 1;
strs[isPrint ? 1 : 2] = cut.ToString();
}
strarrys[0] = strs[1];
strarrys[1] = strs[2];
string updatedJson = JsonConvert.SerializeObject(strs);
File.WriteAllText(txtpath, updatedJson);
return cut;
}
catch (Exception ex)
{
LogUtil.error($"写入print和ng数量出错:{ex}");
strarrys[0] = null;
strarrys[1] = null;
return 0;
}
}
}
private static object lockRecordEmsData = new object();
/// <summary>
/// 写入mes通信数据
/// </summary>
/// <param name="isquery">是否查询数据</param>
/// <param name="str">保存内容</param>
/// <returns></returns>
public static string RecordEmsData(bool isquery, string str = null)
{
lock (lockRecordEmsData)
{
try
{
string strs = null;
string txtpath = Path.Combine(Application.StartupPath, ConfigHelper.Config.Get("RecordEmsData", "Config\\RecordEmsData.txt"));
if (File.Exists(txtpath))
{
strs = File.ReadAllText(txtpath);
}
if (!isquery)
{
File.WriteAllText(txtpath, str);
strs = str;
}
return strs;
}
catch (Exception ex)
{
LogUtil.error($"写入ems通信数据出错:{ex}");
return null;
}
}
}
/// <summary>
/// 向服务器请求类添加ng、打印、ems请求数据
/// </summary>
/// <returns></returns>
public static Dictionary<string, string> PrintNgMESData()
{
Dictionary<string, string> valuePairs = new Dictionary<string, string>();
try
{
RecordPrintNg(true, true, out string[] strarrys);
string mesdata = RecordEmsData(true);
valuePairs.Add("tPCount", strarrys[0]);
valuePairs.Add("tNGCount", strarrys[1]);
valuePairs.Add("MES", mesdata);
return valuePairs;
}
catch (Exception ex)
{
LogUtil.error($"向服务器传输ng和print,出错:{ex}");
return valuePairs;
}
}
/// <summary>
/// 检查料串状态
/// </summary>
/// <param name="isright">true右侧步骤判断</param>
/// <param name="mostop"></param>
/// <returns></returns>
public static string ShelfStatus(bool isright,int mostop)
{
if (mostop==0)
{
return "IDLE";
}
if (isright)
{
if (mostop >= 24 && mostop <= 28)//出料中
{
return "EMPTY_OUT";
}
if (mostop >= 30 && mostop <= 35)//入料中
{
return "LOADING";
}
if (mostop == 20 || mostop == 23)//料串已清空,等待取走料串
{
return "EMPTY_OUT";
}
return "LOADING";//运行中-入库中
}
else
{
if (mostop>=49&&mostop<=54)//出料中
{
return "FULL_OUT";
}
if (mostop >= 55 && mostop <= 60)//入料中
{
return "UNLOADING";
}
if (mostop == 47 || mostop == 48)//料串已满,等待取走料串
{
return "FULL_OUT";
}
return "UNLOADING";//运行中-出库中
}
}
private static string BitMapToBase64(Bitmap bitmap, int width, int height, int quality)
{
try
{
if (bitmap == null) return "";
using (MemoryStream ms = new MemoryStream())
{
var tarbmp = ZoomImage(bitmap, height, width, quality);
tarbmp.Save(ms, ImageFormat.Jpeg);
byte[] bytes = ms.GetBuffer();
string base64 = Convert.ToBase64String(bytes);
// tarbmp.Save($".\\test_BitMapToBase64.bmp",ImageFormat.Jpeg);
//File.WriteAllText("E:\\Neotel\\Codes\\DLL\\IPCamera\\WindowsFormsApp1\\bin\\Debug\\test_BitMapToBase64.txt", base64);
//Base64ToBitmap(base64);
return base64;
}
}
catch (Exception e)
{
LogUtil.error("图片转base64失败原因:", e);
}
return "";
}
/// <summary>
/// 不管多大的图片都能在指定大小picturebox控件中显示
/// </summary>
/// <param name="bitmap">图片</param>
/// <param name="destHeight">picturebox控件高</param>
/// <param name="destWidth">picturebox控件宽</param>
/// <returns></returns>
private static Image ZoomImage(Image bitmap, int destHeight, int destWidth, int quality = 100)
{
try
{
System.Drawing.Image sourImage = bitmap;
int width = 0, height = 0;
//按比例缩放
int sourWidth = sourImage.Width;
int sourHeight = sourImage.Height;
if (sourHeight > destHeight || sourWidth > destWidth)
{
if ((sourWidth * destHeight) > (sourHeight * destWidth))
{
width = destWidth;
height = (destWidth * sourHeight) / sourWidth;
}
else
{
height = destHeight;
width = (sourWidth * destHeight) / sourHeight;
}
}
else
{
width = sourWidth;
height = sourHeight;
}
Bitmap destBitmap = new Bitmap(destWidth, destHeight);
Graphics g = Graphics.FromImage(destBitmap);
g.Clear(Color.Transparent);
//设置画布的描绘质量
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
g.DrawImage(sourImage, new Rectangle((destWidth - width) / 2, (destHeight - height) / 2, width, height), 0, 0, sourImage.Width, sourImage.Height, GraphicsUnit.Pixel);
//g.DrawImage(sourImage, new Rectangle(0, 0, destWidth, destHeight), new Rectangle(0, 0, sourImage.Width, sourImage.Height), GraphicsUnit.Pixel);
g.Dispose();
//设置压缩质量
System.Drawing.Imaging.EncoderParameters encoderParams = new System.Drawing.Imaging.EncoderParameters();
long[] qualitys = new long[1];
qualitys[0] = quality;
System.Drawing.Imaging.EncoderParameter encoderParam = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, qualitys);
encoderParams.Param[0] = encoderParam;
sourImage.Dispose();
return destBitmap;
}
catch (Exception ex)
{
LogUtil.error("图片压缩失败:" + ex);
return bitmap;
}
}
public static async Task PostSmfImageAsync(Bitmap bitmap, Dictionary<string,string> dic,int w=1920,int h=1080)
{
try
{
string http = ConfigHelper.Config.Get("http_server");
if (!http.StartsWith("http"))
{
return;
}
string imgbase64 = BitMapToBase64(bitmap, w, h, 100);
string url = http + server;
dic.Add("img",imgbase64);
string json = JsonConvert.SerializeObject(dic);
await PostAsync(url, json);
}
catch (Exception ex)
{
Common.LogUtil.error($"向smf发送图片失败:{ex}");
}
}
/// <summary>
/// post请求
/// </summary>
/// <param name="url"></param>
/// <param name="json"></param>
/// <param name="timeout">秒</param>
/// <param name="contentType"></param>
/// <returns></returns>
private static async Task PostAsync(string url,string json,int timeout=1,string contentType = "application/json")
{
try
{
using (HttpClient client = new HttpClient())
{
client.Timeout = TimeSpan.FromSeconds(timeout);
using (HttpContent content = new StringContent(json))
{
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
HttpResponseMessage response = await client.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
Common.LogUtil.info("上传smf图片完成");
}
else
{
Common.LogUtil.info($"上传smf图片失败,错误码:{response.StatusCode}");
}
}
}
}
catch (Exception ex)
{
Common.LogUtil.info($"上传smf图片失败,原因:{ex.Message}");
}
}
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
namespace DL.Utils
{
......@@ -51,7 +46,5 @@ namespace DL.Utils
return false;
}
}
}
}
......@@ -4,95 +4,95 @@ using Newtonsoft.Json;
namespace DL.Utils
{
/// <summary>
/// Json帮助类
/// </summary>
public class JsonHelper
{
/// <summary>
/// Json帮助类
/// 将对象序列化为JSON格式
/// </summary>
public class JsonHelper
/// <param name="o">对象</param>
/// <returns>json字符串</returns>
public static string SerializeObject(object o)
{
/// <summary>
/// 将对象序列化为JSON格式
/// </summary>
/// <param name="o">对象</param>
/// <returns>json字符串</returns>
public static string SerializeObject(object o)
{
string json = JsonConvert.SerializeObject(o);
return json;
}
string json = JsonConvert.SerializeObject(o);
return json;
}
/// <summary>
/// 解析JSON字符串生成对象实体
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json字符串(eg.{"ID":"112","Name":"石子儿"})</param>
/// <returns>对象实体</returns>
public static T DeserializeJsonToObject<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T));
T t = o as T;
return t;
}
/// <summary>
/// 解析JSON字符串生成对象实体
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json字符串(eg.{"ID":"112","Name":"石子儿"})</param>
/// <returns>对象实体</returns>
public static T DeserializeJsonToObject<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T));
T t = o as T;
return t;
}
/// <summary>
/// 解析JSON数组生成对象实体集合
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json数组字符串(eg.[{"ID":"112","Name":"石子儿"}])</param>
/// <returns>对象实体集合</returns>
public static List<T> DeserializeJsonToList<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List<T>));
List<T> list = o as List<T>;
return list;
}
/// <summary>
/// 解析JSON数组生成对象实体集合
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json数组字符串(eg.[{"ID":"112","Name":"石子儿"}])</param>
/// <returns>对象实体集合</returns>
public static List<T> DeserializeJsonToList<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List<T>));
List<T> list = o as List<T>;
return list;
}
/// <summary>
/// 反序列化JSON到给定的匿名对象.
/// </summary>
/// <typeparam name="T">匿名对象类型</typeparam>
/// <param name="json">json字符串</param>
/// <param name="anonymousTypeObject">匿名对象</param>
/// <returns>匿名对象</returns>
public static T DeserializeAnonymousType<T>(string json, T anonymousTypeObject)
{
T t = JsonConvert.DeserializeAnonymousType(json, anonymousTypeObject);
return t;
}
/// <summary>
/// 反序列化JSON到给定的匿名对象.
/// </summary>
/// <typeparam name="T">匿名对象类型</typeparam>
/// <param name="json">json字符串</param>
/// <param name="anonymousTypeObject">匿名对象</param>
/// <returns>匿名对象</returns>
public static T DeserializeAnonymousType<T>(string json, T anonymousTypeObject)
{
T t = JsonConvert.DeserializeAnonymousType(json, anonymousTypeObject);
return t;
}
///// <summary>
///// 与服务器通信用对象
///// </summary>
//public class Operation
//{
// private string _cid = "";
// public string cid
// {
// get { return _cid; }
// set { _cid = value; }
// }
}
///// <summary>
///// 与服务器通信用对象
///// </summary>
//public class Operation
//{
// private string _cid = "";
// public string cid
// {
// get { return _cid; }
// set { _cid = value; }
// }
// public int seq { get; set; }
// public int op { get; set; }
// public int status { get; set; }
// private string _error = "";
// public string error
// {
// get { return _error; }
// set { _error = value; }
// }
// public int seq { get; set; }
// public int op { get; set; }
// public int status { get; set; }
// private Dictionary<string, string> _data = new Dictionary<string,string>();
// public Dictionary<string, string> data {
// get { return _data; }
// set { _data = value; }
// }
// private string _error = "";
// public string error
// {
// get { return _error; }
// set { _error = value; }
// }
// private Dictionary<string, string> _data = new Dictionary<string,string>();
// public Dictionary<string, string> data {
// get { return _data; }
// set { _data = value; }
// }
//}
//}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DL.Com.Protocol.Modbus
{
......
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using static System.Net.Mime.MediaTypeNames;
namespace DL.Utils
{
......@@ -45,8 +48,7 @@ namespace DL.Utils
stringBuilder.Append(data.ToString("x2"));
stringBuilder.Append("】");
return stringBuilder.ToString();
}
}
public static byte[] StrToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");
......@@ -116,6 +118,6 @@ namespace DL.Utils
}
sb.Append("}");
return sb.ToString();
}
}
}
}
......@@ -245,7 +245,7 @@ namespace DeviceLibrary
/// 判断轴运动是否安全
/// </summary>
/// <returns></returns>
public bool IsSafe(int Targetpos,out string msg) {
public bool IsSafe(int Targetpos,out string msg){
msg = "";
if (interference == null)
return true;
......@@ -254,7 +254,6 @@ namespace DeviceLibrary
return !result;
}
#region 匀速上升处理
private System.Timers.Timer axisCheckTimer = null;
internal string TargetIoType = "";
......@@ -269,7 +268,7 @@ namespace DeviceLibrary
{
axisCheckTimer = new System.Timers.Timer();
axisCheckTimer.AutoReset = true;
axisCheckTimer.Interval += 30;
axisCheckTimer.Interval += 15;
axisCheckTimer.Elapsed += CheckTimer_Elapsed;
axisCheckTimer.Enabled = false;
}
......@@ -296,7 +295,6 @@ namespace DeviceLibrary
if (IsInProcess && pan.TotalMilliseconds < 100) { return; }
try
{
IsInProcess = true;
lastOkTime = DateTime.Now;
if (IOManager.IOValue(TargetIoType).Equals(TargetIoValue))
......@@ -349,7 +347,6 @@ namespace DeviceLibrary
Thread.Sleep(10);
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using ConfigHelper;
using DeviceLibrary.AutoScanAndLabel;
using Newtonsoft.Json.Linq;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
......@@ -11,6 +14,9 @@ using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace DeviceLibrary
{
......@@ -113,6 +119,7 @@ namespace DeviceLibrary
public static Point CalcLabelPoint(LabelParam labelParam, Point org, int Label_R_Offset, int Label_R_Angle_Diff, out int labelAngle)
{
bool singlefeature = ConfigHelper.Config.Get("UseSingleFeatureCode", true);
singlefeature = false;
if (singlefeature)
return calcSinglePrimaryLabelPoint(labelParam, org, Label_R_Offset, Label_R_Angle_Diff, out labelAngle);
else
......@@ -214,15 +221,28 @@ namespace DeviceLibrary
LogUtil.info($"labelAngle5:{labelAngle}");
g.FillEllipse(yeelow, new Rectangle(p2, pointsize));
g.Save();
g.Dispose();
string dir = "/image/labeldebug/";
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
string filepath = dir + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".jpg";
bitmap.Save(filepath, ImageFormat.Jpeg);
g.Dispose();
string filepath =Application.StartupPath+ "\\image\\Labeling\\" ;
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
else if (Directory.GetFiles(filepath).Length > 100)
{
try
{
Directory.Delete(filepath, true);
Directory.CreateDirectory(filepath);
}
catch (Exception)
{
LogUtil.info($"删除失败:{filepath}");
}
}
Bitmap bitmaps = (Bitmap)bitmap.Clone();
bitmaps.Save(filepath+ DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond + ".jpg");
LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bitmap.Clone() });
bitmap.Dispose();
return p2;
}
......@@ -384,10 +404,11 @@ namespace DeviceLibrary
}
Bitmap bitmap = new Bitmap(srcbitmap.Width, srcbitmap.Height, PixelFormat.Format32bppArgb);
//Bitmap bitmap = new Bitmap(srcbitmap.Width, srcbitmap.Height, PixelFormat.Format32bppArgb);
Bitmap bitmap = new Bitmap(srcbitmap);
Graphics g = Graphics.FromImage(bitmap);
g.DrawImage(srcbitmap, 0, 0);
// g.DrawImage(srcbitmap, 0, 0);
int srcbitmap_Width = srcbitmap.Width;
srcbitmap.Dispose();
......@@ -397,35 +418,62 @@ namespace DeviceLibrary
g.FillEllipse(red, new Rectangle(Right_Batch_Point, pointsize));
List<int> angles = new List<int>();
List<int> widthOffsets = new List<int>();
labelParam.codeInfos.ForEach((c) =>
foreach (var c in labelParam.codeInfos)
{
if (true)
{
Point op = new Point(c.X, c.Y);
g.FillEllipse(blue, new Rectangle(op, pointsize));
g.DrawString($"{angles.Count + 1}", font, white, c.X + 5, c.Y);
var a = (int)getAngle(Right_Batch_Point, op);
a = a < 0 ? 360 + a : a;
angles.Add(a);
widthOffset = (int)Common.distance(org, op);
widthOffsets.Add(widthOffset);
LogUtil.info($"angles:{a}, widthOffset:{widthOffset}");
}
});
Point op = new Point(c.X, c.Y);
g.FillEllipse(blue, new Rectangle(op, pointsize));
g.DrawString($"{angles.Count + 1}", font, white, c.X + 5, c.Y);
var a = (int)getAngle(Right_Batch_Point, op);
a = a < 0 ? 360 + a : a;
angles.Add(a);
widthOffset = (int)Common.distance(org, op);
widthOffsets.Add(widthOffset);
LogUtil.info($"angles:{a}, widthOffset:{widthOffset}");
}
//if (labelParam.codeInfos != null)
//{
// labelParam.codeInfos.ForEach((c) =>
// {
// Point op = new Point(c.X, c.Y);
// g.FillEllipse(blue, new Rectangle(op, pointsize));
// g.DrawString($"{angles.Count + 1}", font, white, c.X + 5, c.Y);
// var a = (int)getAngle(Right_Batch_Point, op);
// a = a < 0 ? 360 + a : a;
// angles.Add(a);
// widthOffset = (int)Common.distance(org, op);
// widthOffsets.Add(widthOffset);
// LogUtil.info($"angles:{a}, widthOffset:{widthOffset}");
// });
//}
if (angles.Count == 0)
{
labelAngle = 0;
return Point.Empty;
}
labelAngle=GetPasteAngle(angles, angles[0]);
int index = 0;
//if (labelParam.AMatch!=null)
//{
// index = Array.IndexOf(labelParam.AMatch,true);
// LogUtil.info($"匹配成功条码顺序:{index}");
// if (index==-1)
// {
// index = 0;
// }
//}
labelAngle =GetPasteAngle(angles, angles[index]);
widthOffset = (widthOffsets.Min() + widthOffsets.Max()) / 2;
LogUtil.info($"use widthOffset:{widthOffset},angle:{labelAngle}");
LogUtil.info($"use widthOffset:{widthOffset},angle:{labelAngle}");
labelAngle = labelAngle > 360 ? labelAngle - 360 : labelAngle;
labelAngle = labelAngle > 360 ? labelAngle - 360 : labelAngle;
var p1 = PointWithAngle(org, labelAngle, widthOffset);
g.FillEllipse(tmpPlace, new Rectangle(p1, pointsize));
//判断如果是7寸料盘加60度
if (labelParam.PlateW==7)
{
labelAngle += 60;
}
//匹配照片角度与贴标旋转轴的角度差--左右两侧角度
labelAngle += 83;
LogUtil.info($"labelAngle2:{labelAngle}");
......@@ -433,7 +481,10 @@ namespace DeviceLibrary
//贴标坐标
var p2 = PointWithAngle(org, labelAngle, widthOffset);
if (labelParam.PlateW == 7&&labelParam.codeInfos.Count!=1)
{
p2=new Point(p2.X-180,p2.Y-180);
}
//贴标偏移
var p3 = PointWithAngle(p2, labelAngle, Label_R_Offset);
labelAngle = labelAngle > 360 ? labelAngle - 360 : labelAngle;
......@@ -456,38 +507,49 @@ namespace DeviceLibrary
LogUtil.info($"labelAngle3:{labelAngle}");
g.FillEllipse(yeelow, new Rectangle(p3, pointsize));
g.Save();
g.Dispose();
string dir = "/image/labeldebug/";
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
else if(Directory.GetFiles(dir).Length>100)
g.Dispose();
string filepath = Application.StartupPath + "\\image\\Labeling\\";
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
else if (Directory.GetFiles(filepath).Length > 100)
{
try
{
Directory.Delete(dir, true);
}catch (Exception)
Directory.Delete(filepath, true);
Directory.CreateDirectory(filepath);
}
catch (Exception)
{
LogUtil.info($"删除失败:{dir}");
LogUtil.info($"删除失败:{filepath}");
}
}
string filepath = dir + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".jpg";
bitmap.Save(filepath, ImageFormat.Jpeg);
Bitmap bitmaps = (Bitmap)bitmap.Clone();
bitmaps.Save(filepath + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond + ".jpg");
LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bitmap.Clone() });
bitmap.Dispose();
return p2;
}
static IdWorker id = new IdWorker(1, 1);
static string[] pnreglist;
static string[] qtyreglist;
static string[] qtyreglist;
public static void LoadMatchList()
{
pnreglist = File.ReadAllLines("config\\pn.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
qtyreglist = File.ReadAllLines("config\\qty.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
pnreglist = File.ReadAllLines(Application.StartupPath+"config\\pn.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
qtyreglist = File.ReadAllLines(Application.StartupPath+"config\\qty.list").ToList().FindAll((s) => { return !string.IsNullOrWhiteSpace(s); }).ToArray();
}
public static bool codeProcess(LabelParam labelParam, out string debugmsg)
{
{
string materid = ConfigHelper.Config.Get("MateRidName","RID");
if (labelParam.Keyword!=null)
{
if (labelParam.Keyword.TryGetValue(materid, out string value))
{
labelParam.WareCode = value != null ? value : "";
}
}
debugmsg = "";
return labelParam.codeInfos.Count > 0;
if (pnreglist == null)
......@@ -573,7 +635,7 @@ namespace DeviceLibrary
/// </summary>
/// <param name="angles">所有标签角度</param>
/// <param name="rightangle">需要避开的码角度</param>
/// <returns></returns>
/// <returns></returns>
public static int GetPasteAngle(List<int> angles, int rightangle)
{
Dictionary<int, List<int>> angleblock = new Dictionary<int, List<int>>();
......@@ -608,7 +670,7 @@ namespace DeviceLibrary
if (angleblock[120].Count > 0)
return GetAngleAvg(angleblock[120]);
else
return rightangle + 120;
return rightangle + 120;
}
else if (angleblock[180].Count > 0)
{
......@@ -658,6 +720,184 @@ namespace DeviceLibrary
}
return dstobject;
}
/// <summary>
/// 覆盖识别到条码算法
/// </summary>
/// <param name="labelParam"></param>
/// <param name="centrality"></param>
/// <param name="angle"></param>
/// <returns></returns>
public static Point Overlaylabel(LabelParam labelParam,Point centrality,int idenx,out int angle)
{
//标签位置
SolidBrush blue = new SolidBrush(Color.DarkBlue);
//料盘中心点
SolidBrush red = new SolidBrush(Color.Red);
//贴标位置
SolidBrush yeelow = new SolidBrush(Color.Yellow);
Bitmap srcbitmap;
if (File.Exists(labelParam.bitmapfilename))
{
srcbitmap = new Bitmap(labelParam.bitmapfilename);
}
else
{
srcbitmap = new Bitmap(3648, 3648);
}
Bitmap bitmap = new Bitmap(srcbitmap);
Graphics g = Graphics.FromImage(bitmap);
Size pointsize = new Size(60, 60);
g.FillEllipse(red, new Rectangle(centrality, pointsize));
//LogUtil.info($"识别结果选中:{string.Join(",", labelParam.AMatch)}");
//int idenx =Array.FindIndex(labelParam.AMatch, x=>x);
if (idenx<0)
{
idenx = 0;
}
int angles = (int)labelParam.codeInfos[idenx].Orientation;
LogUtil.info($"标签原角度{angles},索引{idenx}");
double rotationAngle = 83;
if (angles<0&&angles!=0)
{
angle = (int)(Math.Abs(angles) + rotationAngle);
}
else
{
if (angles<=83)
{
angle = (int)Math.Abs(angles - rotationAngle);
}
else
{
angle = 350-(int)(angles - rotationAngle);
}
}
angle += 90;
LogUtil.info($"计算完成角度{angle}");
if (angle>344)
{
angle -= 344;
}
LogUtil.info($"计算完成角度{angle}");
Point CalPoint = new Point(labelParam.codeInfos[idenx].X, labelParam.codeInfos[idenx].Y);
g.FillEllipse(blue, new Rectangle(CalPoint, pointsize));
// 将坐标减去中心坐标
double CalPointPrimeX = CalPoint.X - centrality.X;
double CalPointPrimeY = CalPoint.Y - centrality.Y;
// 将角度转换为弧度
double theta = Math.PI * rotationAngle / 180.0;
// 计算旋转后的新坐标
double CalPointDoublePrimeX = Math.Cos(theta) * CalPointPrimeX - Math.Sin(theta) * CalPointPrimeY;
double CalPointDoublePrimeY = Math.Sin(theta) * CalPointPrimeX + Math.Cos(theta) * CalPointPrimeY;
// 将结果加上中心坐标
double CalPointNewX = CalPointDoublePrimeX + centrality.X;
double CalPointNewY = CalPointDoublePrimeY + centrality.Y;
Point newxy = new Point((int)CalPointNewX, (int)CalPointNewY);
LogUtil.info($"贴标覆盖旋转后坐标:{newxy.X},{newxy.Y};");
int Xoffset = RobotManage.Config.Label_XOffset;
int Yoffset = RobotManage.Config.Label_YOffset;
newxy = new Point(newxy.X-Xoffset,newxy.Y-Yoffset);
LogUtil.info($"贴标偏移量坐标:{newxy.X},{newxy.Y};");
g.FillEllipse(yeelow, new Rectangle(newxy, pointsize));
g.Save();
g.Dispose();
string filepath = Application.StartupPath + "\\image\\Labeling\\";
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
else if (Directory.GetFiles(filepath).Length > 100)
{
try
{
Directory.Delete(filepath, true);
Directory.CreateDirectory(filepath);
}
catch (Exception)
{
LogUtil.info($"删除失败:{filepath}");
}
}
Bitmap bitmaps = (Bitmap)bitmap.Clone();
bitmaps.Save(filepath + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond + ".jpg");
LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bitmap.Clone() });
bitmap.Dispose();
return newxy;
}
public static void RenderedImage(LabelParam labelParam, Point centrality,Point point)
{
try
{
//标签位置
SolidBrush blue = new SolidBrush(Color.DarkBlue);
//料盘中心点
SolidBrush red = new SolidBrush(Color.Red);
//贴标位置
SolidBrush yeelow = new SolidBrush(Color.Yellow);
Bitmap srcbitmap;
if (File.Exists(labelParam.bitmapfilename))
{
srcbitmap = new Bitmap(labelParam.bitmapfilename);
}
else
{
srcbitmap = new Bitmap(3648, 3648);
}
Bitmap bitmap = new Bitmap(srcbitmap);
Graphics g = Graphics.FromImage(bitmap);
Size pointsize = new Size(60, 60);
g.FillEllipse(red, new Rectangle(centrality, pointsize));
int idnex = 0;
labelParam.NewXYAngle.TryGetValue("IsCodeUsed", out idnex);
Point CalPoint = new Point(labelParam.codeInfos[idnex].X, labelParam.codeInfos[idnex].Y);
g.FillEllipse(blue, new Rectangle(CalPoint, pointsize));
g.FillEllipse(yeelow, new Rectangle(point, pointsize));
g.Save();
g.Dispose();
string filepath = Application.StartupPath + "\\image\\Labeling\\";
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
else if (Directory.GetFiles(filepath).Length > 100)
{
try
{
Directory.Delete(filepath, true);
Directory.CreateDirectory(filepath);
}
catch (Exception)
{
LogUtil.info($"删除失败:{filepath}");
}
}
Bitmap bitmaps = (Bitmap)bitmap.Clone();
bitmaps.Save(filepath + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond + ".jpg");
LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bitmap.Clone() });
bitmap.Dispose();
}
catch (Exception ex)
{
LogUtil.error($"保存新坐标图片失败{ex.Message}");
}
}
public static Point Customlabeling(LabelParam labelParam, Point centrality, out int angle)
{
Point point=LabelingPosition.MultipleChoiceLabeling(labelParam, centrality, out angle,out Bitmap bit);
LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bit.Clone() });
bit.Dispose();
return point;
}
}
public class LabelResult : EventArgs
{
......@@ -699,7 +939,6 @@ namespace DeviceLibrary
}
public enum MsgLevel
{
warning,
info
}
......
using CodeLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
......@@ -37,6 +38,7 @@ namespace DeviceLibrary
public List<CodeInfo> codeInfos { get; set; }
public Dictionary<string,string> Keyword { get; set; }
public Dictionary<string, int> NewXYAngle { get; set; }
/// <summary>
/// 料盘高度
/// </summary>
......@@ -101,7 +103,5 @@ namespace DeviceLibrary
return "[" + WareCode + "], [" + PlateW + "x" + PlateH + "]";
}
}
}
}
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DeviceLibrary.AutoScanAndLabel
{
public static class LabelingPosition
{
public static Point MultipleChoiceLabeling(LabelParam labelParam, Point centrality, out int angle,out Bitmap bitmaps)
{
//7寸XY偏移量
int Xpianyilian_7 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_7", 0);
int Ypianyilian_7 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_7", 0);
//13寸XY偏移量
int Xpianyilian_13 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_13", 0);
int Ypianyilian_13 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_13", 0);
//15寸XY偏移量
int Xpianyilian_15 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_15", 0);
int Ypianyilian_15 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_15", 0);
//7寸朝那个方向贴标true顺时针,false逆时针
bool istoward_7 = ConfigHelper.Config.Get<bool>("Labeling_istoward_7", true);
int degree_7 = ConfigHelper.Config.Get<int>("Labeling_degree_7", 90);
//13寸朝那个方向贴标true顺时针,false逆时针
bool istoward_13 = ConfigHelper.Config.Get<bool>("Labeling_istoward_13", true);
int degree_13 = ConfigHelper.Config.Get<int>("Labeling_degree_13", 90);
//15寸朝那个方向贴标true顺时针,false逆时针
bool istoward_15 = ConfigHelper.Config.Get<bool>("Labeling_istoward_15", true);
int degree_15 = ConfigHelper.Config.Get<int>("Labeling_degree_15", 90);
//7寸标签旋转多少度
int Scalerotationdegree_7 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_7", 90);
//13寸标签旋转多少度
int Scalerotationdegree_13 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_13", 90);
//15寸标签旋转多少度
int Scalerotationdegree_15 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_15", 90);
#region 数据
//标签位置
SolidBrush blue = new SolidBrush(Color.DarkBlue);
//料盘中心点
SolidBrush red = new SolidBrush(Color.Red);
//贴标位置
SolidBrush yeelow = new SolidBrush(Color.Yellow);
Bitmap srcbitmap;
if (File.Exists(labelParam.bitmapfilename))
{
srcbitmap = new Bitmap(labelParam.bitmapfilename);
}
else
{
srcbitmap = new Bitmap(3648, 3648);
}
Bitmap bitmap = new Bitmap(srcbitmap);
Graphics g = Graphics.FromImage(bitmap);
Size pointsize = new Size(60, 60);
g.FillEllipse(red, new Rectangle(centrality, pointsize));
int idenx = 0; //Array.FindIndex(labelParam.AMatch, x => x);
if (idenx == -1)
{
idenx = 0;
}
int angles = (int)labelParam.codeInfos[idenx].Orientation;
Point CalPoint = new Point(labelParam.codeInfos[idenx].X, labelParam.codeInfos[idenx].Y);
g.FillEllipse(blue, new Rectangle(CalPoint, pointsize));
#endregion
LogUtil.info($"标签坐标x={CalPoint.X},y={CalPoint.Y},中心点x={centrality.X},y={centrality.Y}");
Point point = new Point();
switch (labelParam.PlateW)
{
case 13:
point = LabelingAngle_13(CalPoint, centrality, out angle);
break;
case 15:
point = LabelingAngle_15(CalPoint, centrality, out angle);
break;
default:
point = LabelingAngle_7(CalPoint, centrality, out angle);
break;
}
g.FillEllipse(yeelow, new Rectangle(point, pointsize));
g.Save();
g.Dispose();
ImageSave(bitmap);
bitmaps = bitmap;
return point;
}
public static Point LabelingAngle_7(Point lable, Point centrality, out int angle)
{
//7寸XY偏移量
int Xpianyilian_7 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_7", 100);
int Ypianyilian_7 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_7", 100);
//7寸朝那个方向贴标true顺时针,false逆时针
bool istoward_7 = ConfigHelper.Config.Get<bool>("Labeling_istoward_7", true);
int degree_7 = ConfigHelper.Config.Get<int>("Labeling_degree_7", 90);
//7寸标签旋转多少度
int Scalerotationdegree_7 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_7", 90);
Point point = lable;
LogUtil.info($"7寸料盘,原标签角度={lable};中心点={centrality};");
if (istoward_7)
{
point = ClockwiseRotation(lable, centrality, degree_7);
}
else
{
point = CounterclockwiseRotation(lable, centrality, degree_7);
}
Point Newpoint = new Point(point.X + Xpianyilian_7, point.Y + Ypianyilian_7);
LogUtil.info($"7寸料盘,xy轴偏移后位置,x={Newpoint.X},y={Newpoint.Y}");
angle = Scalerotationdegree_7;
return Newpoint;
}
public static Point LabelingAngle_13(Point lable, Point centrality, out int angle)
{
//13寸XY偏移量
int Xpianyilian_13 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_13", 100);
int Ypianyilian_13 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_13", 100);
//13寸朝那个方向贴标true顺时针,false逆时针
bool istoward_13 = ConfigHelper.Config.Get<bool>("Labeling_istoward_13", true);
int degree_13 = ConfigHelper.Config.Get<int>("Labeling_degree_13", 90);
//13寸标签旋转多少度
int Scalerotationdegree_13 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_13", 90);
Point point = lable;
LogUtil.info($"13寸料盘,原标签角度={lable};中心点={centrality};");
if (istoward_13)
{
point = ClockwiseRotation(lable, centrality, degree_13);
}
else
{
point = CounterclockwiseRotation(lable, centrality, degree_13);
}
Point Newpoint = new Point(point.X + Xpianyilian_13, point.Y + Ypianyilian_13);
LogUtil.info($"13寸料盘,xy轴偏移后位置,x={Newpoint.X},y={Newpoint.Y}");
angle = Scalerotationdegree_13;
return Newpoint;
}
public static Point LabelingAngle_15(Point lable, Point centrality, out int angle)
{
//15寸XY偏移量
int Xpianyilian_15 = ConfigHelper.Config.Get<int>("Labeling_Xpianyilian_15", 100);
int Ypianyilian_15 = ConfigHelper.Config.Get<int>("Labeling_Ypianyilian_15", 100);
//15寸朝那个方向贴标true顺时针,false逆时针
bool istoward_15 = ConfigHelper.Config.Get<bool>("Labeling_istoward_15", true);
int degree_15 = ConfigHelper.Config.Get<int>("Labeling_degree_15", 90);
//15寸标签旋转多少度
int Scalerotationdegree_15 = ConfigHelper.Config.Get<int>("Labeling_Scalerotationdegree_15", 90);
Point point = lable;
LogUtil.info($"15寸料盘,原标签角度={lable};中心点={centrality};");
if (istoward_15)
{
point = ClockwiseRotation(lable, centrality, degree_15);
}
else
{
point = CounterclockwiseRotation(lable, centrality, degree_15);
}
Point Newpoint = new Point(point.X + Xpianyilian_15, point.Y + Ypianyilian_15);
LogUtil.info($"15寸料盘,xy轴偏移后位置,x={Newpoint.X},y={Newpoint.Y}");
angle = Scalerotationdegree_15;
return Newpoint;
}
/// <summary>
/// 顺时针旋转
/// </summary>
/// <param name="lable">标签坐标</param>
/// <param name="center">中心点</param>
/// <param name="angle">旋转角度</param>
/// <returns></returns>
static Point ClockwiseRotation(Point lable, Point center, double angle)
{
angle += 83;
double theta = angle * Math.PI / 180;
//double x, double y, double h, double k, double angle
//double x_new = (x - h) * Math.Cos(theta) - (y - k) * Math.Sin(theta) + h;
//double y_new = (x - h) * Math.Sin(theta) + (y - k) * Math.Cos(theta) + k;
double x_new = (lable.X - center.X) * Math.Cos(theta) - (lable.Y - center.Y) * Math.Sin(theta) + center.X;
double y_new = (lable.X - center.X) * Math.Sin(theta) + (lable.Y - center.Y) * Math.Cos(theta) + center.Y;
LogUtil.info($"顺时针旋转{angle}度,x={x_new},y={y_new};");
return new Point((int)x_new, (int)y_new);
}
/// <summary>
/// 逆时针旋转
/// </summary>
/// <param name="lable">标签坐标</param>
/// <param name="center">中心点</param>
/// <param name="angle">旋转角度</param>
/// <returns></returns>
static Point CounterclockwiseRotation(Point lable, Point center, double angle)
{
angle += 83;
double theta = angle * Math.PI / 180;
//double x, double y, double h, double k, double angle
//double x_new = (x - h) * Math.Cos(theta) + (y - k) * Math.Sin(theta) + h;
//double y_new = -(x - h) * Math.Sin(theta) + (y - k) * Math.Cos(theta) + k;
double x_new = (lable.X - center.X) * Math.Cos(theta) + (lable.Y - center.Y) * Math.Sin(theta) + center.X;
double y_new = -(lable.X - center.X) * Math.Sin(theta) + (lable.Y - center.Y) * Math.Cos(theta) + center.Y;
LogUtil.info($"逆时针旋转{angle}度,x={x_new},y={y_new};");
return new Point((int)x_new, (int)y_new);
}
static void ImageSave(Bitmap bitmap)
{
string filepath = Application.StartupPath + "\\image\\Labeling\\";
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
else if (Directory.GetFiles(filepath).Length > 100)
{
try
{
Directory.Delete(filepath, true);
Directory.CreateDirectory(filepath);
}
catch (Exception)
{
LogUtil.info($"删除失败:{filepath}");
}
}
Bitmap bitmaps = (Bitmap)bitmap.Clone();
bitmaps.Save(filepath + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond + ".jpg");
//LabelResult?.Invoke(new LabelResult() { Bitmap = (Bitmap)bitmap.Clone() });
//bitmap.Dispose();
}
}
}
......@@ -14,39 +14,71 @@ namespace DeviceLibrary
partial class MainMachine
{
void BtnProcess()
{
//右侧按钮按下,有料,出料
if (RightMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightCar_Check).Equals(IO_VALUE.HIGH))
{
string isskiptest = ConfigHelper.Config.Get("Hardwareversion","V2");
if (isskiptest=="V2")
{
RightMoveInfo.NewMove(MoveStep.R30_OutShelf);
}
//右侧按钮按下,无料,阻挡下降
else if (RightMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.RightStopUP).Equals(IO_VALUE.LOW))
{
CylinderMove(null, IO_Type.RightStopUP, IO_Type.RightStopDown);
}
if (LeftMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftCar_Check).Equals(IO_VALUE.HIGH))
{
LeftMoveInfo.NewMove(MoveStep.L50_OutShelf);
//硬件v2版本,已经去除料车检测X11的io
if ((RightMoveInfo.IsStep(MoveStep.Wait)|| RightMoveInfo.IsStep(MoveStep.REND))
&& IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH))
{
//有料,出料,无料,进料
if (IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH))
{
RightMoveInfo.NewMove(MoveStep.R30_OutShelf);
}
else
{
RightMoveInfo.NewMove(MoveStep.R40_InShelf);
}
}
if ((LeftMoveInfo.IsStep(MoveStep.Wait) || LeftMoveInfo.IsStep(MoveStep.REND))
&& IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH))
{
if (IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH))
{
LeftMoveInfo.NewMove(MoveStep.L50_OutShelf);
}
else
{
LeftMoveInfo.NewMove(MoveStep.L60_InShelf);
}
}
}
else if (LeftMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.LeftStopUP).Equals(IO_VALUE.LOW))
else
{
CylinderMove(null, IO_Type.LeftStopUP, IO_Type.LeftStopDown);
}
//右侧按钮按下,有料,出料
if (RightMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightCar_Check).Equals(IO_VALUE.HIGH))
{
RightMoveInfo.NewMove(MoveStep.R30_OutShelf);
}
//右侧按钮按下,无料,阻挡下降
else if (RightMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.RightStopUP).Equals(IO_VALUE.LOW))
{
CylinderMove(null, IO_Type.RightStopUP, IO_Type.RightStopDown);
}
if (LeftMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftCar_Check).Equals(IO_VALUE.HIGH))
{
LeftMoveInfo.NewMove(MoveStep.L50_OutShelf);
}
else if (LeftMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.LeftStopUP).Equals(IO_VALUE.LOW))
{
CylinderMove(null, IO_Type.LeftStopUP, IO_Type.LeftStopDown);
}
}
}
}
}
......@@ -24,7 +24,6 @@ namespace DeviceLibrary
public void OpenAllServo()
{
AxisBean.RunMultiAxis(true, out _, AxisBean.List);
}
int logType = 1000;
string WarnMsg = "";
......@@ -58,6 +57,7 @@ namespace DeviceLibrary
string msg = "";
if (wait.IsHomeMove)
{
LogUtil.info($"回原记录:{wait.ToStr()}");
wait.IsEnd = AxisBean.HomeMoveIsEnd(MoveInfo, wait.AxisInfo, out msg);
}
else
......@@ -151,7 +151,7 @@ namespace DeviceLibrary
}
}
if (wait.IsEnd)
{
{
if (MoveInfo.OneWaitCanEndStep)
{
isOk = true;
......@@ -174,6 +174,7 @@ namespace DeviceLibrary
}
else if (span.TotalSeconds > MoveInfo.TimeOutSeconds)
{
LogUtil.error($"MoveInfo.MoveStep:{span.TotalSeconds}>{MoveInfo.TimeOutSeconds}");
WarnMsg = Name + "[" + MoveInfo.MoveStep + "]"+crc.GetString("Res0104","等待") + NotOkMsg + crc.GetString("Res0105","超时")+"[" + Math.Round(span.TotalSeconds, 1) + "]"+crc.GetString("Res0106","秒");
int second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10;
......@@ -284,8 +285,5 @@ namespace DeviceLibrary
});
}
}
}
}
\ No newline at end of file
using OnlineStore;
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DeviceLibrary
{
......@@ -16,6 +8,38 @@ namespace DeviceLibrary
{
void IOMonitor()
{
//agv感应io处理逻辑
string isskiptest = ConfigHelper.Config.Get("Hardwareversion", "V2");
if (isskiptest == "V2")
{
if ((RightMoveInfo.IsStep(MoveStep.Wait) || RightMoveInfo.IsStep(MoveStep.REND)))
{
// && IOValue(IO_Type.FeedAGV_Feed).Equals(IO_VALUE.LOW) && IOValue(IO_Type.FeedAGV_Feed).Equals(IO_VALUE.LOW)
if (IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.FeedAGV_Feed).Equals(IO_VALUE.LOW))
{
//Msg.add("入料口有料串,请将料串先取出!", MsgLevel.warning);
RightMoveInfo.NewMove(MoveStep.R40_InShelf);
}
else if(IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.FeedAGV_Receiving).Equals(IO_VALUE.LOW))
{
RightMoveInfo.NewMove(MoveStep.R30_OutShelf);
}
}
if ((LeftMoveInfo.IsStep(MoveStep.Wait) || LeftMoveInfo.IsStep(MoveStep.REND)))
{
//&& && IOValue(IO_Type.DischargeAGV_Receiving).Equals(IO_VALUE.LOW)
if (IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.LOW)&& IOValue(IO_Type.DischargeAGV_Feeding).Equals(IO_VALUE.LOW))
{
LeftMoveInfo.NewMove(MoveStep.L60_InShelf);
}
else if(IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.DischargeAGV_Receiving).Equals(IO_VALUE.LOW))
{
LeftMoveInfo.NewMove(MoveStep.L50_OutShelf);
}
}
}
if (RightMoveInfo.IsStep(MoveStep.Wait)
&& IOValue(IO_Type.RightFornt_Check).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.LOW))
......
......@@ -7,9 +7,10 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Timers;
using System.IO;
namespace DeviceLibrary
{
......@@ -41,12 +42,25 @@ namespace DeviceLibrary
LabelMoveInfo.log("Label_X转到取标点,等待标签打印完毕");
break;
case MoveStep.Lbl_WaitPrint:
var isPrinted = RobotManage.printerHelper.IsLabelOnPeeler();
isPrinted.Wait();
if (isPrinted.Result.Item1)
string version = ConfigHelper.Config.Get("Hardwareversion", "V2");
if (version == "V2")
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl_Printted);
Thread.Sleep(500);
Thread.Sleep(1000);
if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.HIGH))
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl_Printted);
Thread.Sleep(500);
}
}
else
{
var isPrinted = RobotManage.printerHelper.IsLabelOnPeeler();
isPrinted.Wait();
if (isPrinted.Result.Item1)
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl_Printted);
Thread.Sleep(500);
}
}
break;
case MoveStep.Lbl_Printted:
......@@ -54,7 +68,6 @@ namespace DeviceLibrary
IOMove(IO_Type.LabelCylinder_Work, IO_VALUE.HIGH);
Label_Z_Axis.AbsMove(LabelMoveInfo, Config.Label_Z_P3, Config.Label_Z_P3_speed);
//CylinderMove(LabelMoveInfo, IO_Type.LabelCylinder_Bck, IO_Type.LabelCylinder_Fwd);
LabelMoveInfo.log("标签打印完毕,取标气缸下降,开始吸气.");
break;
case MoveStep.Lbl03:
......@@ -68,53 +81,118 @@ namespace DeviceLibrary
LabelMoveInfo.log("标签打印完毕,取标气缸上升,取起标签.");
break;
case MoveStep.Lbl05:
var ip = RobotManage.printerHelper.IsLabelOnPeeler();
ip.Wait();
var r = ip.Result;
if (r.Item1)
string versions = ConfigHelper.Config.Get("Hardwareversion", "V2");
if (versions == "V2")
{
Msg.add(crc.GetString("Res0122.62c858d3","标签取起失败!"), MsgLevel.warning);
Thread.Sleep(1000);
if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.LOW))
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl06);
}
else
{
Msg.add(crc.GetString("Res0122.62c858d3", "标签取起失败!"), MsgLevel.warning);
}
}
else
LabelMoveInfo.NextMoveStep(MoveStep.Lbl06);
break;
case MoveStep.Lbl06:
if (LeftMoveInfo.MoveStep == MoveStep.L20_WaitLabel)
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl10);
}
else if (LabelMoveInfo.IsTimeOut(60))
{
LabelMoveInfo.log("等待左侧料串可贴标.");
var ip = RobotManage.printerHelper.IsLabelOnPeeler();
ip.Wait();
var r = ip.Result;
if (r.Item1)
{
Msg.add(crc.GetString("Res0122.62c858d3", "标签取起失败!"), MsgLevel.warning);
}
else
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl06);
}
}
break;
case MoveStep.Lbl06:
//if (LeftMoveInfo.MoveStep == MoveStep.L20_WaitLabel)
//{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl10);
//}
//else if (LabelMoveInfo.IsTimeOut(60))
//{
// LabelMoveInfo.log("等待左侧料串可贴标.");
//}
break;
case MoveStep.Lbl10:
if (!Label_Y_Axis.IsSafe(Config.Label_Y_P3, out string msg))
{
Msg.add(msg, MsgLevel.warning);
return;
}
if (LabelMoveInfo.MoveParam.codeInfos==null&&LabelMoveInfo.MoveParam.codeInfos.Count==0)
{
break;
}
Point p = new Point(LabelMoveInfo.MoveParam.codeInfos[0].X, LabelMoveInfo.MoveParam.codeInfos[0].X);
int labelAngle = 0;
//照片中料盘中心点像素位置
Point Right_Batch_Point = new Point(RobotManage.Config.Right_Batch_X, RobotManage.Config.Right_Batch_Y);
//不同尺寸料盘需要在照片上便宜的贴标像素
int widthOffset = Config.Label_Offset_Pixel_7;
switch (LabelMoveInfo.MoveParam.PlateW)
bool isthiscount = ConfigHelper.Config.Get<bool>("Labeling_isthiscount", false);
if (isthiscount)
{
case 13:
widthOffset = Config.Label_Offset_Pixel_13;
break;
case 15:
widthOffset = Config.Label_Offset_Pixel_15;
break;
//不同尺寸料盘需要在照片上便宜的贴标像素
int widthOffset = Config.Label_Offset_Pixel_7;
switch (LabelMoveInfo.MoveParam.PlateW)
{
case 13:
widthOffset = Config.Label_Offset_Pixel_13;
break;
case 15:
widthOffset = Config.Label_Offset_Pixel_15;
break;
}
//计算照片中贴标的像素位置
bool isOverlaylabel = ConfigHelper.Config.Get<bool>("Labeling_isOverlaylabel", true);
if (isOverlaylabel)
{
//bool isCustom = ConfigHelper.Config.Get<bool>("Labeling_isCustom", false);
//if (isCustom)
//{
// p = Common.Customlabeling(LabelMoveInfo.MoveParam, Right_Batch_Point, out labelAngle);
//}
//else
//{ }
LabelMoveInfo.MoveParam.NewXYAngle.TryGetValue("IsCodeUsed", out int idnex);
if (idnex==-1)
{
idnex = 0;
}
p = Common.Overlaylabel(LabelMoveInfo.MoveParam, Right_Batch_Point, idnex, out labelAngle);
}
else
{
p = Common.CalcLabelPoint(LabelMoveInfo.MoveParam, Right_Batch_Point, Config.Label_R_Offset, Config.Label_R_Angle_Diff, out labelAngle);
}
LogUtil.info($"NS200计算贴标位置{p};角度={labelAngle}");
}
else
{
var newpoint = LabelMoveInfo.MoveParam.NewXYAngle;
if (newpoint.TryGetValue("PointX", out var pointX) && newpoint.TryGetValue("PointY", out var pointY))
{
p = new Point(pointX, pointY);
}
if (newpoint.TryGetValue("Angle", out var Angle))
{
labelAngle = Angle;
}
Common.RenderedImage(LabelMoveInfo.MoveParam, Right_Batch_Point, p);
LogUtil.info($"NS200接收贴标位置{p};角度={labelAngle}");
}
//计算照片中贴标的像素位置
Point p = Common.CalcLabelPoint(LabelMoveInfo.MoveParam, Right_Batch_Point, Config.Label_R_Offset, Config.Label_R_Angle_Diff, out int labelAngle);
if (labelAngle > 350)
labelAngle = 350;
//计算贴标角度的脉冲值
int labelAxisPos = Config.Label_R_360 / 350 * labelAngle;
LogUtil.info($"完整贴标脉冲{labelAxisPos}");
//计算像素点位与中心点的差
Label_p3 = new Point(p.X - Right_Batch_Point.X, p.Y - Right_Batch_Point.Y);
//计算像素*脉冲像素比得到脉冲值+中心点基准脉冲
......@@ -122,8 +200,13 @@ namespace DeviceLibrary
int yDiff = (int)(Label_p3.Y * Config.Cam_Pixel_Y_Ratio);
Label_p3.X = xDiff + Config.Label_X_P3;
Label_p3.Y = yDiff + Config.Label_Y_P3;
LabelMoveInfo.log($"计算贴标像素点位为{p},轴点位为{Label_p3},X脉冲差值={xDiff},Y脉冲差值={yDiff},角度{labelAngle},R轴{labelAxisPos},盘宽{LabelMoveInfo.MoveParam.PlateW}");
if (Label_p3.Y > 710000)
{
LabelMoveInfo.log($"计算Y轴脉冲:{Label_p3.Y};");
Label_p3.Y = 710000;
}
//labelAxisPos += 85700;
LabelMoveInfo.log($"计算贴标像素点位为{p},轴点位为{Label_p3},X脉冲差值={xDiff},Y脉冲差值={yDiff},角度{labelAngle},R轴{labelAxisPos},盘宽{LabelMoveInfo.MoveParam.PlateW};角度脉冲{labelAxisPos}");
LabelMoveInfo.NextMoveStep(MoveStep.Lbl10_1);
Label_X_Axis.AbsMove(LabelMoveInfo, Config.Label_X_P1, Config.Label_X_P1_speed);
Label_R_Axis.AbsMove(LabelMoveInfo, labelAxisPos, Config.Label_R_P2_speed);
......@@ -131,9 +214,16 @@ namespace DeviceLibrary
LabelMoveInfo.log("Label_X到待机点,Z转到贴标点.");
break;
case MoveStep.Lbl10_1:
LabelMoveInfo.NextMoveStep(MoveStep.Lbl10_2);
Label_Y_Axis.AbsMove(LabelMoveInfo, Label_p3.Y, Config.Label_Y_P3_speed);
LabelMoveInfo.log("Label_Y到贴标点.");
if (LeftMoveInfo.MoveStep == MoveStep.L20_WaitLabel)
{
LabelMoveInfo.NextMoveStep(MoveStep.Lbl10_2);
Label_Y_Axis.AbsMove(LabelMoveInfo, Label_p3.Y, Config.Label_Y_P3_speed);
LabelMoveInfo.log("Label_Y到贴标点.");
}
else if (LabelMoveInfo.IsTimeOut(60))
{
LabelMoveInfo.log("等待左侧料串可贴标.");
}
break;
case MoveStep.Lbl10_2:
LabelMoveInfo.NextMoveStep(MoveStep.Lbl11);
......@@ -165,7 +255,6 @@ namespace DeviceLibrary
break;
}
}
string LabelState()
{
string state = "";
......@@ -183,7 +272,5 @@ namespace DeviceLibrary
}
return state;
}
}
}
\ No newline at end of file
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DeviceLibrary
{
......
......@@ -56,7 +56,7 @@ namespace DeviceLibrary
//LeftMoveInfo.log($"批量轴已下降一张料盘位置,等待料盘放入,needpos={currpos}");
}
break;
case MoveStep.L10_WaitReelPut:
case MoveStep.L10_WaitReelPut:
Msg.add(crc.GetString("Res0095", "左侧空闲中"), MsgLevel.info);
break;
case MoveStep.L11_ReelPutted:
......@@ -64,6 +64,7 @@ namespace DeviceLibrary
LeftMoveInfo.NextMoveStep(MoveStep.L12);
//LeftBatchAxisToP1();
LeftBatchAxisDown();
LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
//LeftMoveInfo.log($"料盘已放入,批量轴上升,LeftStartMovePosition={LeftStartMovePosition}");
LeftMoveInfo.log($"左侧料盘已放入,批量轴下降固定值");
break;
......@@ -73,11 +74,11 @@ namespace DeviceLibrary
LeftMoveInfo.log($"批量轴上升到P2位置,LeftStartMovePosition={LeftStartMovePosition}");
break;
case MoveStep.L13:
LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
//LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
LeftMoveInfo.NextMoveStep(MoveStep.L20_WaitLabel);
LeftMoveInfo.log($"批量轴完成上升,等待贴标");
break;
case MoveStep.L20_WaitLabel:
case MoveStep.L20_WaitLabel:
break;
case MoveStep.L30_LabelFinish:
if (SafeReleaseLeftShelf)
......@@ -239,7 +240,7 @@ namespace DeviceLibrary
}
LeftMoveInfo.log("BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")");
}
targetSpeed = Config.Left_Batch_P2_speed;
targetSpeed = (int)(Config.Left_Batch_P2_speed*0.7);
}
LeftMoveInfo.TimeOutSeconds = 200;
LeftMoveInfo.CanWhileCount = 0;
......@@ -276,6 +277,11 @@ namespace DeviceLibrary
{
int targetP1 = Left_Batch_Axis.GetAclPosition() - ConfigHelper.Config.Get("LeftAxisDownValue", 50) * Config.Left_Batch_ChangeValue;
int targetSpeed = Config.Left_Batch_P1_speed;
if (targetP1<=0)
{
LeftMoveInfo.log("出料提升机构,下降固定值小于0,设置回到0原点。");
targetP1 = 0;
}
Left_Batch_Axis.AbsMove(LeftMoveInfo, targetP1, targetSpeed);
}
}
......
......@@ -7,12 +7,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using OnlineStore.Common.util;
namespace DeviceLibrary
{
partial class MainMachine
{
void MiddleProcess()
{
if (CheckWait(MiddleMoveInfo))
......@@ -58,6 +59,9 @@ namespace DeviceLibrary
case MoveStep.M05:
if (clampTool.IsClamp() || IOValue(IO_Type.RightTop_Check).Equals(IO_VALUE.LOW))
{
bool isclamp = clampTool.IsClamp();
bool che = IOValue(IO_Type.RightTop_Check).Equals(IO_VALUE.LOW);
MiddleMoveInfo.log($"取起物料状态{isclamp};io状态{che}");
MiddleMoveInfo.NextMoveStep(MoveStep.M06);
RightMoveInfo.NextMoveStep(MoveStep.R11_NextReel);
MiddleMoveInfo.MoveParam.PlateW = GetTrayWidth();
......@@ -102,9 +106,8 @@ namespace DeviceLibrary
//else if (RightMoveInfo.MoveStep >= MoveStep.R06_GettedReelHigh && RightMoveInfo.MoveStep <= MoveStep.R10_WaitReelLeave)
else //if (LastHeightPos > 0)
{
MiddleMoveInfo.NextMoveStep(MoveStep.M07);
MiddleMoveInfo.NextMoveStep(MoveStep.M07);
MiddleMoveInfo.log($"开始往左侧料串移栽,{MiddleMoveInfo.MoveParam.ToStr()}");
}
//else if (MiddleMoveInfo.IsTimeOut(60))
//{
......@@ -112,30 +115,36 @@ namespace DeviceLibrary
//}
break;
case MoveStep.M07:
if (!Take_Middle_Axis.IsSafe(Config.Take_Middle_P3,out string msg))
if (!Take_Middle_Axis.IsSafe(Config.Take_Middle_P3, out string msg))
{
Msg.add(msg, MsgLevel.info);
}
else if (LeftMoveInfo.MoveStep == MoveStep.L10_WaitReelPut)
else if(LeftMoveInfo.MoveStep == MoveStep.L10_WaitReelPut)
{
if (true || clampTool.IsClamp())
if (clampTool.IsClamp())
{
Take_Middle_Axis.AbsMove(MiddleMoveInfo, Config.Take_Middle_P3, Config.Take_Middle_P3_speed);
MiddleMoveInfo.log("左侧允许放料,旋转轴P3");
//MiddleMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LeftArm_Check, IO_VALUE.HIGH));
//调用标签打印
var kv = MiddleMoveInfo.MoveParam.Keyword.Select(k => $"{k.Key}={k.Value}").ToArray();
LogUtil.info("调用 PrintLabel 打印标签 StartPrintLabel ,[" + string.Join(", ", kv) + "] 开始");
string labelName = ConfigHelper.Config.Get(Setting_Init.LabelName);
if (RobotManage.printerHelper.Print(labelName, MiddleMoveInfo.MoveParam.Keyword, out msg))
MiddleMoveInfo.CanWhileCount--;
if (RobotManage.printerHelper.Print(labelName, MiddleMoveInfo.MoveParam.Keyword, out msg))
{
MiddleMoveInfo.NextMoveStep(MoveStep.M08);
UnifiedDataHandler.RecordPrintNg(false, true, out string[] strarrys);
}
else if (MiddleMoveInfo.CanWhileCount <= 0)
{
RobotManage.UserPause("打印失败超过五次,机器暂停,请检查打印机;");
Msg.add(msg, MsgLevel.warning);
}
else
{
Msg.add(msg, MsgLevel.warning);
}
Take_Middle_Axis.AbsMove(MiddleMoveInfo, Config.Take_Middle_P3, Config.Take_Middle_P3_speed);
MiddleMoveInfo.log("左侧允许放料,旋转轴P3");
LogUtil.info("PrintLabel 打印标签 StartPrintLabel 结束 " + msg);
}
else
......@@ -144,12 +153,16 @@ namespace DeviceLibrary
//Take_UpDown_Axis.AbsMove(MiddleMoveInfo, Config.Take_UpDown_P1, Config.Take_UpDown_P1_speed);
MiddleMoveInfo.log("没有抓到料,继续下一步");
}
bool isclamp = clampTool.IsClamp();
bool che = IOValue(IO_Type.RightTop_Check).Equals(IO_VALUE.LOW);
MiddleMoveInfo.log($"取起物料状态{isclamp};io状态{che}");
}
else if (MiddleMoveInfo.IsTimeOut(60))
{
MiddleMoveInfo.log("等待左侧允许放料");
Msg.add(crc.GetString("Res0098","等待左侧允许放料"), MsgLevel.info);
Msg.add(crc.GetString("Res0098", "等待左侧允许放料"), MsgLevel.info);
}
break;
case MoveStep.M08:
MiddleMoveInfo.NextMoveStep(MoveStep.M09);
......@@ -162,8 +175,8 @@ namespace DeviceLibrary
MiddleMoveInfo.NextMoveStep(MoveStep.M10);
LeftMoveInfo.MoveParam = MiddleMoveInfo.MoveParam.clone();
LeftMoveInfo.NextMoveStep(MoveStep.L11_ReelPutted);
MiddleMoveInfo.log("取料夹爪放松,通知左侧料串已放入,左侧等待3秒");
LeftMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MiddleMoveInfo.log("取料夹爪放松,通知左侧料串已放入,左侧等待1秒");
LeftMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
else if (MiddleMoveInfo.IsTimeOut(10))
{
......@@ -238,6 +251,5 @@ namespace DeviceLibrary
return state;
}
}
}
\ No newline at end of file
using OnlineStore;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.Common.util;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Threading.Tasks;
namespace DeviceLibrary
{
......@@ -57,7 +55,7 @@ namespace DeviceLibrary
RightMoveInfo.NextMoveStep(MoveStep.R06_GettedReelInfo);
//GetHeight();
ScanCode();
RightMoveInfo.log($"开始扫码");//并获取上一盘料高度,LastHeight={LastHeight}
RightMoveInfo.log($"扫码开始");//并获取上一盘料高度,LastHeight={LastHeight}
}
}
else
......@@ -85,7 +83,7 @@ namespace DeviceLibrary
case MoveStep.R06_GettedReelInfo:
if (RightScanTask.IsCompleted)
{
var (x, k, s) = RightScanTask.Result;
var (x, k, s,b) = RightScanTask.Result;
if (ConfigHelper.Config.Get(Setting_Init.SaveReelPhoto, false))
{
string d = ConfigHelper.Config.Get(Setting_Init.ReelPhotoSaveDir);
......@@ -93,18 +91,22 @@ namespace DeviceLibrary
string df = Path.Combine(d, fn);
File.Copy(s, df);
}
if (x.Count == 0)
int pointX=-1; int pointY=-1;
b.TryGetValue("PointX", out pointX);
b.TryGetValue("PointY", out pointY);
if (x.Count == 0|| pointX<=0||pointY<=0)
{
RightMoveInfo.log($"未识别到有效二维码,转入NG箱");
RightMoveInfo.log($"未识别到有效二维码,转入NG箱;pointX={pointX};pointY={pointY}");
RightMoveInfo.MoveParam.IsNg = true;
UnifiedDataHandler.RecordPrintNg(false,false,out string[] strarrys);
}
else
{
RightMoveInfo.MoveParam.IsNg = false;
RightMoveInfo.MoveParam.codeInfos = x;
RightMoveInfo.MoveParam.Keyword = k;
RightMoveInfo.MoveParam.bitmapfilename = s;
RightMoveInfo.MoveParam.NewXYAngle = b;
if (!Common.codeProcess(RightMoveInfo.MoveParam, out string debugmsg))
{
RightMoveInfo.log($"未识别到有效码,转入NG箱" + debugmsg);
......@@ -116,7 +118,7 @@ namespace DeviceLibrary
}
RightMoveInfo.NextMoveStep(MoveStep.R10_WaitReelLeave);
}
else if (RightMoveInfo.IsTimeOut(10))
else if (RightMoveInfo.IsTimeOut(300))
{
RightMoveInfo.log($"等待扫码超时");
}
......@@ -251,17 +253,16 @@ namespace DeviceLibrary
{
state += string.Format(crc.GetString("Res0123.d86f0192","有料串,已提取{0}张料盘"), RightCount);
if (RightShelfNoTray)
state += crc.GetString("Res0100", ",料串已清空. ");
state += crc.GetString("Res0100", ",料串已清空. ")+"\r\n";
else
state += ".";
state += crc.GetString("Res0045", "当前ReelID:") + RightMoveInfo.MoveParam.WareCode;
}
}
else
{
return crc.GetString("Res0046", "无料串");
}
return state;
}
public bool IsScanRunning()
......@@ -274,7 +275,7 @@ namespace DeviceLibrary
/// <summary>
/// 扫码线程
/// </summary>
Task<(List<CodeInfo>, Dictionary<string, string>, string)> RightScanTask;
Task<(List<CodeInfo>, Dictionary<string, string>, string, Dictionary<string, int>)> RightScanTask;
void ScanCode()
{
RightMoveInfo.log("开始扫码");
......@@ -283,26 +284,27 @@ namespace DeviceLibrary
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
try
{
RightScanTask = Task.Run(new Func<(List<CodeInfo>, Dictionary<string, string>, string)>(() =>
RightScanTask = Task.Run(new Func<(List<CodeInfo>, Dictionary<string, string>, string, Dictionary<string, int>)>(() =>
{
IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
string filename;
Task.Delay(10).Wait();
List<CodeInfo> LastCodeList, LastCodeList2;
List<CodeInfo> LastCodeList;
Dictionary<string, string> keyword;
(LastCodeList, keyword, filename) = CodeManager.CameraScan(new List<string> { Config.RightCameraName });
LabelParam labelParam = new LabelParam();
labelParam.codeInfos = new List<CodeInfo>(LastCodeList);
if (!Common.codeProcess(labelParam, out _))
{
Task.Delay(500).Wait();
(LastCodeList2, keyword, filename) = CodeManager.CameraScan(new List<string> { Config.RightCameraName });
LastCodeList.AddRange(LastCodeList2);
}
Dictionary<string, int> newpointangle;
int plantw = GetTrayWidth();
(LastCodeList, keyword, filename, newpointangle) = CodeManager.CameraScan(new List<string> { Config.RightCameraName }, plantw);
//LabelParam labelParam = new LabelParam();
//labelParam.codeInfos = new List<CodeInfo>(LastCodeList);
//if (!Common.codeProcess(labelParam, out _))
//{
// Task.Delay(500).Wait();
// (LastCodeList2, keyword, filename) = CodeManager.CameraScan(new List<string> { Config.RightCameraName });
// LastCodeList.AddRange(LastCodeList2);
//}
//IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
return (LastCodeList, keyword, filename);
return (LastCodeList, keyword, filename, newpointangle);
}));
}
catch (Exception ex)
......@@ -341,7 +343,6 @@ namespace DeviceLibrary
//开始检测信号
Right_Batch_Axis.BatchAxisStartCheck(IO_Type.RightTop_Check, IO_VALUE.HIGH);
}
int RightEndMovePosition = 0;
int RightEndMovePosition = 0;
}
}
\ No newline at end of file
......@@ -34,14 +34,14 @@ namespace DeviceLibrary
public bool UserPause { get; set; } = false;
MoveInfo ResetMoveInfo;
public MoveInfo ResetMoveInfo { get; set; }
/// <summary>
/// 右侧移动信息
/// </summary>
public MoveInfo RightMoveInfo;
public MoveInfo LeftMoveInfo;
MoveInfo LabelMoveInfo;
MoveInfo MiddleMoveInfo;
public MoveInfo RightMoveInfo { get; set; }
public MoveInfo LeftMoveInfo { get; set; }
public MoveInfo LabelMoveInfo { get; set; }
public MoveInfo MiddleMoveInfo { get; set; }
public delegate void ProcessMsg(List<Msg> msg);
public event ProcessMsg ProcessMsgEvent;
......@@ -108,7 +108,8 @@ namespace DeviceLibrary
Label_Y_Axis.interference += Label_Y_Axis_interference;
Take_Middle_Axis.interference += Take_Middle_Axis_interference;
clampTool = RobotManage.clampTool;
CodeManager.LoadCamera(true);
//在LoadConfig中已经加载过了,此处不需要重复加载相机
//CodeManager.LoadCamera(true);
AlarmBuzzer.SetOnOffAction(() => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); });
LedProcessInit();
......@@ -320,6 +321,13 @@ namespace DeviceLibrary
get => LeftMoveInfo.MoveStep >= MoveStep.L60_InShelf || LeftMoveInfo.MoveStep >= MoveStep.L50_OutShelf
|| RightMoveInfo.MoveStep >= MoveStep.R30_OutShelf || RightMoveInfo.MoveStep >= MoveStep.R40_InShelf;
}
bool isManualfeeding
{
get => RightMoveInfo.MoveStep >= MoveStep.R40_InShelf || RightMoveInfo.MoveStep> MoveStep.R30_OutShelf
|| LeftMoveInfo.MoveStep >= MoveStep.L60_InShelf || LeftMoveInfo.MoveStep >= MoveStep.L50_OutShelf;
}
public bool IgnoreSafecheck = false;
public bool IgnoreGratingSignal = false;
......@@ -335,7 +343,7 @@ namespace DeviceLibrary
}
else if (IOValue(IO_Type.GratingSignal_Check).Equals(IO_VALUE.LOW))
{
if (!IgnoreSafecheck && !IgnoreGratingSignal && !isAgvRun
if (!IgnoreSafecheck && !IgnoreGratingSignal && !isAgvRun&&!isManualfeeding
&& IOValue(IO_Type.RightCar_Check).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.LeftCar_Check).Equals(IO_VALUE.LOW))
{
......@@ -343,18 +351,17 @@ namespace DeviceLibrary
DeviceSuddenStop();
}
Msg.add(crc.GetString("Res0058", "安全光栅被遮挡") + (ok ? crc.GetString("Res0061", "[已忽略]") : ""), MsgLevel.warning);
}
if (IOValue(IO_Type.HasNgBox).Equals(IO_VALUE.LOW))
{
Msg.add(crc.GetString("Res0062", "没有检测到NG料箱"), MsgLevel.warning);
ok = false;
}
if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.LOW))
{
Msg.add(crc.GetString("Res0063", "没有检测打印机"), MsgLevel.warning);
ok = false;
}
//if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.LOW))
//{
// Msg.add(crc.GetString("Res0063", "没有检测打印机"), MsgLevel.warning);
// ok = false;
//}
if (IOValue(IO_Type.LeftBackDoor_Check).Equals(IO_VALUE.LOW))
{
if (!IgnoreSafecheck)
......@@ -458,6 +465,5 @@ namespace DeviceLibrary
}
return ok;
}
}
}
\ No newline at end of file
......@@ -105,7 +105,7 @@ namespace DeviceLibrary
TimeSpan span = DateTime.Now - LastSetpTime;
return span;
}
string lastmsg = "";
public string lastmsg = "";
public void log(string msg) {
msg = $"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}";
......
......@@ -32,7 +32,6 @@ namespace DeviceLibrary
try
{
mainMachine = null;
string msg = "";
string configFile = Path.Combine(baseDir, "config\\Config.csv");
Config = new Robot_Config(0, "", configFile);
......@@ -65,7 +64,6 @@ namespace DeviceLibrary
// IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
LoadFinishEvent?.Invoke(IsDebug ? IsDebug : IsLoadOk, msg);
}
catch (Exception ex)
{
......@@ -103,10 +101,14 @@ namespace DeviceLibrary
public static void Stop()
{
LogUtil.info("开始停止系统.");
mainMachine?.ServerCM?.StopConnectServer();
mainMachine?.Stop();
mainMachine.UserPause = false;
isRunning = false;
if (mainMachine!=null)
{
mainMachine?.ServerCM?.StopConnectServer();
mainMachine?.Stop();
mainMachine.UserPause = false;
isRunning = false;
}
}
public static void ShutDown()
{
......
......@@ -34,10 +34,11 @@
<ItemGroup>
<Reference Include="Asa.PrintLabel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\Asa.PrintLabel.dll</HintPath>
<HintPath>..\..\..\PrinLable-2\PrintLabel\bin\Debug\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary">
<HintPath>..\dll\CodeLibrary.dll</HintPath>
<Reference Include="CodeLibrary, Version=1.0.8498.33726, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\CameraLibraryProject\CameraLibraryProject\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper">
<HintPath>..\dll\ConfigHelper.dll</HintPath>
......@@ -98,6 +99,7 @@
<Compile Include="AGVService\Schemas\RtnData.cs" />
<Compile Include="AutoScanAndLabel\AxisBean.cs" />
<Compile Include="AutoScanAndLabel\Common.cs" />
<Compile Include="AutoScanAndLabel\LabelingPosition.cs" />
<Compile Include="AutoScanAndLabel\LabelParam.cs" />
<Compile Include="AutoScanAndLabel\MainMachine _IOMonitor.cs" />
<Compile Include="AutoScanAndLabel\MainMachine _LedProcess.cs" />
......
......@@ -115,6 +115,5 @@ namespace DeviceLibrary
Thread.Sleep(100);
return IOManager.IOValue(IO_Type.Sucker_Release).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Sucker_Clamp).Equals(IO_VALUE.LOW);
}
}
}
......@@ -12,6 +12,12 @@ using CodeLibrary;
using System.Drawing.Imaging;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using ConfigHelper;
using System.Reflection.Emit;
using static RemoteDecodeHelper_mod;
using System.Web;
using log4net;
using OnlineStore.Common.util;
namespace DeviceLibrary
{
......@@ -22,7 +28,8 @@ namespace DeviceLibrary
public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>();
public static List<string> hikNameList = new List<string>();
//是否使用扫码相机
public static bool iscode = Config.Get<bool>("isStartscanningcode", true);
private static char spiltChar = '#';
/// <summary>
/// 初始化摄像机名称和二维码类型
......@@ -46,20 +53,24 @@ namespace DeviceLibrary
}
LoadCamera(false);
codeTypeList = new List<string>();
string[] codeArray = CodeType.Split(spiltChar);
foreach (string str in codeArray)
iscode= Config.Get<bool>("isStartscanningcode", true);
LogUtil.info("加载到扫码相机");
if (!iscode)
{
if (str.Trim().Equals(""))
codeTypeList = new List<string>();
string[] codeArray = CodeType.Split(spiltChar);
foreach (string str in codeArray)
{
continue;
if (str.Trim().Equals(""))
{
continue;
}
string file = GetCodeParamFilePath(str.Trim());
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file);
codeTypeList.Add(str.Trim());
}
string file = GetCodeParamFilePath(str.Trim());
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file);
codeTypeList.Add(str.Trim());
}
CodeLibrary.HDCodeLearnHelper.LoadConfig("", CodeType);
CodeLibrary.HDCodeLearnHelper.LoadConfig("", CodeType);
}
//如果未加载到配置相机,自动配置
if (cameraNameList.Count <= 0 && hikNameList.Count > 0)
{
......@@ -88,9 +99,17 @@ namespace DeviceLibrary
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
string camname = "普通相机";
CameraType cameraType = CameraType.HIK;
if (iscode)
{
cameraType = CameraType.HIKIDMVS;
camname = "扫码相机";
}
Camera.Type = CameraType.HIK;
Camera.Type = cameraType;
Camera._cam.Load();
LogUtil.error($"本次加载相机类型为:{camname}");
}
catch (Exception ex)
{
......@@ -98,8 +117,6 @@ namespace DeviceLibrary
}
}
string[] names = Camera._cam?.Name;
if (names != null)
{
foreach (string n in names)
......@@ -109,14 +126,13 @@ namespace DeviceLibrary
hikNameList.Add(n);
}
}
// hikNameList.AddRange(names);
//hikNameList.AddRange(names);
foreach (string name in hikNameList)
{
LogUtil.info("加载到HIK相机:" + name);
}
}
}
public static void CloseCamera(string cameraName)
{
Camera._cam.Close(cameraName);
......@@ -125,77 +141,105 @@ namespace DeviceLibrary
{
Camera._cam.CloseAll();
}
[HandleProcessCorruptedStateExceptions]
public static (List<CodeInfo>, Dictionary<string, string>, string) CameraScan(List<string> cameraNameList)
public static (List<CodeInfo>, Dictionary<string, string>, string, Dictionary<string, int>) CameraScan(List<string> cameraNameList,int PlateW)
{
List<CodeInfo> codeList = new List<CodeInfo>();
Dictionary<string, string> keyword = new Dictionary<string, string>();
string bitmapfilename = "";
Dictionary<string, int> newpointanlge = new Dictionary<string, int>();
if (cameraNameList == null || cameraNameList.Count <= 0)
{
throw new Exception("CameraScan方法没有传入相机名称.");
}
try
{
LogUtil.info($"是否扫码相机:{iscode};相机名称:{string.Join(",", cameraNameList)};相机数量:{cameraNameList.Count}");
for (int i = 0; i < cameraNameList.Count(); i++)
{
var cameraName = cameraNameList[i];
var cameraName = cameraNameList[i];
if (cameraName.Trim().Equals(""))
{
continue;
}
DateTime startTime = DateTime.Now;
LogUtil.info(" 【" + cameraName + "】开始取图片");
HalconDotNet.HObject ho_Image = null;
Bitmap bmp = null;
try
{
bool nohalcon = true;
_ = Camera._cam.CaptureOnImage(cameraName, out bmp, nohalcon);
//HalconDotNet.HOperatorSet.RotateImage()
_ = Camera._cam.CaptureOnImage(cameraName, out bmp, out List<CodeInfo> codes, nohalcon);
if (bmp == null)
{
LogUtil.error(" 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
LoadCamera(true);
continue;
}
LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码");
string r = "";
RemoteDecodeHelper_mod.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper_mod.RemoteDecodeParam();
var cc = RemoteDecodeHelper_mod.DecodeRequest(bmp, remoteDecodeParam);
if (cc == null)
bitmapfilename = SaveImageToFile("Ns200", cameraName, bmp);
WebResultCode webResult = null;
if (iscode)
{
if (codes.Count==0)
{
throw new FileNotFoundException("扫码相机未扫描到任何条码!");
}
LogUtil.info($"开始请求ns100服务:识别条码为:{string.Join("##", codes.Select(a=>a.CodeStr+$"@@x:{a.X};y:{a.Y};角度{a.Orientation}"))}");
webResult =NeoSacnRequest(bmp, codes, PlateW);
}
else
{
//RemoteDecodeHelper_mod.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper_mod.RemoteDecodeParam();
//webResult = RemoteDecodeHelper_mod.DecodeRequest(bmp, remoteDecodeParam);
webResult = NeoSacnRequest_ordinary(bmp, PlateW);
}
if (webResult == null)
{
LogUtil.info(" 【" + cameraName + "】调用外部转码失败");
}
else if (cc.ErrorCode != 0)
else if (webResult.ErrorCode != 0)
{
LogUtil.info(" 【" + cameraName + "】调用外部转码错误:" + cc.ErrorCode + "," + cc.Msg);
LogUtil.info(" 【" + cameraName + "】调用外部转码错误:" + webResult.ErrorCode + "," + webResult.Msg);
}
else
{
foreach (var code in cc.workCodeInfo)
foreach (var code in webResult.workCodeInfo)
{
codeList.Add(new CodeInfo(code.Text,(int)code.Center.X, (int)code.Center.Y,code.CodeType));
r = r + "##" + code.CodeType +":"+ code.Text;
CodeInfo codeInfo = new CodeInfo()
{
CodeStr = code.Text,
X = (int)code.Center.X,
Y = (int)code.Center.Y,
CodeType = code.CodeType,
Orientation = code.Angle,
};
codeList.Add(codeInfo);
}
foreach (var code in cc.workCodeKeyword)
foreach (var code in webResult.workCodeKeyword)
{
if (!keyword.ContainsKey(code.Key))
{
keyword.Add(code.Key, code.Value);
}
}
}
//if (codeList.Count() == 0)
//{
bitmapfilename =SaveImageToFile("mimo", cameraName, bmp);
// }
LogUtil.info(" 【" + cameraName + "】" + " 扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】 :" + r);
newpointanlge.Add("PointX",webResult.positionAngle.X);
newpointanlge.Add("PointY", webResult.positionAngle.Y);
newpointanlge.Add("Angle", webResult.positionAngle.Angle);
if (webResult.positionAngle.IsCodeUsed!=null)
{
newpointanlge.Add("IsCodeUsed", Array.FindIndex(webResult.positionAngle.IsCodeUsed, x => x)); ;
}
LogUtil.info($"贴标数据X={webResult.positionAngle.X};Y={webResult.positionAngle.Y};角度={webResult.positionAngle.Angle}");
if (bmp!=null)
{
string cid = ConfigHelper.Config.Get("CID");
_ = UnifiedDataHandler.PostSmfImageAsync(bmp,new Dictionary<string, string> { { "cid", cid+"_1" } });
}
LogUtil.info(" 【" + cameraName + "】" + " 扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】" );
}
}
catch (AccessViolationException e)
{
......@@ -209,12 +253,10 @@ namespace DeviceLibrary
}
finally
{
if (ho_Image != null)
{
ho_Image.Dispose();
}
if (bmp != null)
{
bmp.Dispose();
}
}
}
}
......@@ -229,7 +271,7 @@ namespace DeviceLibrary
LogUtil.error( " 扫码出错:" + ex.ToString());
//throw new Exception("扫码出错");
}
return (codeList, keyword, bitmapfilename);
return (codeList, keyword, bitmapfilename, newpointanlge);
}
/// <summary>
///
......@@ -246,8 +288,8 @@ namespace DeviceLibrary
}
private static string SaveImageToFile(string deviceName, string cameraName, Bitmap bitmap)
{
string date = DateTime.Now.ToString("HH-mm-ss-") + DateTime.Now.Millisecond;
string dire = @"\image\" + deviceName.Trim().Replace('_', '-') + @"\" + cameraName.Trim().Replace('_', '-').Replace(':', '-') + @"\";
string date = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + DateTime.Now.Millisecond;
string dire = Application.StartupPath+@"\image\" + deviceName.Trim().Replace('_', '-') + @"\" + cameraName.Trim().Replace('_', '-').Replace(':', '-') + @"\";
string iamgeName = date + ".bmp";
try
{
......@@ -256,6 +298,18 @@ namespace DeviceLibrary
{
Directory.CreateDirectory(dire);
}
else if (Directory.GetFiles(dire).Length > 100)
{
try
{
Directory.Delete(dire, true);
Directory.CreateDirectory(dire);
}
catch (Exception)
{
LogUtil.info($"删除失败:{dire}");
}
}
DelOverDayFile(dire, "*.bmp", 7);
bit.Save(dire + iamgeName, ImageFormat.Bmp);
bit.Dispose();
......@@ -340,6 +394,6 @@ namespace DeviceLibrary
{
return "";
}
}
}
}
}
using OnlineStore.Common;
using Asa;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.Common.util;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -13,24 +17,31 @@ namespace DeviceLibrary
public Asa.PrintLabel print;
ZebraPrinterHelper.ZebraManger zebraManger;
string Port;
public bool istscprin = ConfigHelper.Config.Get("Hardwareversion", "V2") == "V2";
public PrinterHelper()
{
print = new Asa.PrintLabel(Application.StartupPath + "\\Label");
print = new Asa.PrintLabel(Application.StartupPath + "\\Label",300);
}
public static CustPrinterStatus LastPrintStatus = CustPrinterStatus.Unknown;
public bool Connection(string port)
{
Port = port;
//zebraManger = new ZebraPrinterHelper.ZebraManger(Port, ZebraPrinterHelper.ConnectionType.Network);
zebraManger = new ZebraPrinterHelper.ZebraManger("", ZebraPrinterHelper.ConnectionType.UsbDirect);
if (!zebraManger.Connection(out string msg))
if (istscprin)
{
LogUtil.error(msg);
return false;
print = new Asa.PrintLabel(Application.StartupPath + "\\Label", 300);
return true;
}
else
{
print = new Asa.PrintLabel(Application.StartupPath + "\\Label");
{
//默认使用老打印机
zebraManger = new ZebraPrinterHelper.ZebraManger("", ZebraPrinterHelper.ConnectionType.UsbDirect);
//zebraManger = new ZebraPrinterHelper.ZebraManger(Port, ZebraPrinterHelper.ConnectionType.Network);
if (!zebraManger.Connection(out string msg))
{
LogUtil.error(msg);
return false;
}
return true;
}
}
......@@ -49,16 +60,45 @@ namespace DeviceLibrary
public bool Print(string labelname, Dictionary<string, string> data, out string msg)
{
print.LoadLabel(labelname);
var bmp = print.PrintPreview(data);
if (!zebraManger.PrintImage(bmp, out msg))
if (istscprin)
{
LogUtil.error(msg);
return false;
LogUtil.error($"TSC_打印数据:{JsonHelper.SerializeObject(data)}" );
TscConfig tscConfig = new TscConfig();
tscConfig.Offset = ConfigHelper.Config.Get("Tsc_Offset", -17D);
tscConfig.Speed = ConfigHelper.Config.Get("Tsc_Speed", 9);
tscConfig.Density = ConfigHelper.Config.Get("Tsc_Density", 12);
tscConfig.GapOffset = ConfigHelper.Config.Get("Tsc_GapOffset", 0);
tscConfig.Gap = ConfigHelper.Config.Get("Tsc_Gap", 3);
if (!print.PrintToTsc_New(data,tscConfig, out TscStauts tscStauts,out Bitmap bmp))
{
msg = $"打印失败:{tscStauts.ToString()}";
LogUtil.error("打印失败原因:" + tscStauts.ToString());
return false;
}
if (bmp!=null)
{
string cid = ConfigHelper.Config.Get("CID");
_ = UnifiedDataHandler.PostSmfImageAsync(bmp,new Dictionary<string, string> { {"cid",cid+"_2" } }, bmp.Width, bmp.Height);
}
msg = $"打印成功";
return true;
}
bmp.Dispose();
return true;
else
{
var bmp = print.PrintPreview(data);
if (!zebraManger.PrintImage(bmp, out msg))
{
if (msg== "上一个标签尚未移走")
{
msg = crc.GetString("Res0224", "上一个标签尚未移走");
}
LogUtil.error(msg);
return false;
}
bmp.Dispose();
return true;
}
}
public Task<(bool, string)> IsLabelOnPeeler()
......
using CodeLibrary;
using DeviceLibrary;
using HalconDotNet;
using Newtonsoft.Json;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
......@@ -8,15 +11,19 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Serialization;
public class RemoteDecodeHelper_mod
{
static bool IsIDCamera = ConfigHelper.Config.Get<bool>("isStartscanningcode");
static int webclienttimeout = 30 * 1000;
static Process p = new Process();
const string serverhost = "http://127.0.0.1:58137/";
......@@ -75,7 +82,7 @@ public class RemoteDecodeHelper_mod
{
codeInfos = JsonConvert.DeserializeObject<WebResultCode>(ss);
}
catch (Exception ex)
{
......@@ -84,6 +91,185 @@ public class RemoteDecodeHelper_mod
return codeInfos;
}
#region 扫码相机请求ns100方法
public static WebResultCode NeoSacnRequest(Bitmap bitmap, List<CodeInfo> codeInfos,int PlateW)
{
WebResultCode resultCode = null;
try
{
CheckAndRunServer();
BitmapData bitmapData = new BitmapData();
string iamgestr = BitmapToBase64(bitmap);
List<BarcodeInfos> barcodeInfos = new List<BarcodeInfos>();
codeInfos.ForEach(c =>
{
barcodeInfos.Add(new BarcodeInfos
{
Text = c.CodeStr,
CodeType = c.CodeType,
Angle = (float)c.Orientation,
Distance = c.LabelDistance,
X=c.X, Y=c.Y
});
});
bitmapData.ImageData = iamgestr;
bitmapData.BarCodeList = barcodeInfos;
bitmapData.X = RobotManage.Config.Right_Batch_X;
bitmapData.Y = RobotManage.Config.Right_Batch_Y;
bitmapData.IsIDCamera = IsIDCamera;
bitmapData.PlateW = PlateW;
string methodname = "NeoScan/ProcessBitmaps";
string repststr=NeoSacnPost(bitmapData, methodname);
resultCode = JsonConvert.DeserializeObject<WebResultCode>(repststr);
//因为传值时未传入条码中心点,所以在这里,还是用
resultCode.workCodeInfo = new List<BarcodeInfo>();
codeInfos.ForEach((c) => {
resultCode.workCodeInfo.Add(new BarcodeInfo
{
Text = c.CodeStr,
CodeType = c.CodeType,
Angle = (float)c.Orientation,
Center = new PointF(c.X,c.Y),
Distance = c.LabelDistance,
}); ;
});
}
catch (Exception ex)
{
LogUtil.error($"请求错误:{ex.Message}");
}
return resultCode;
}
public static WebResultCode NeoSacnRequest_ordinary(Bitmap bitmap,int PlateW)
{
WebResultCode resultCode = null;
try
{
CheckAndRunServer();
BitmapData bitmapData = new BitmapData();
string iamgestr = BitmapToBase64(bitmap);
List<BarcodeInfos> barcodeInfos = new List<BarcodeInfos>();
bitmapData.ImageData = iamgestr;
bitmapData.BarCodeList = barcodeInfos;
bitmapData.X = RobotManage.Config.Right_Batch_X;
bitmapData.Y = RobotManage.Config.Right_Batch_Y;
bitmapData.IsIDCamera = IsIDCamera;
bitmapData.PlateW = PlateW;
string methodname = "NeoScan/ProcessBitmaps";
string repststr = NeoSacnPost(bitmapData, methodname);
resultCode = JsonConvert.DeserializeObject<WebResultCode>(repststr);
}
catch (Exception ex)
{
LogUtil.error($"请求错误:{ex.Message}");
}
return resultCode;
}
public class BitmapData
{
public string ImageData { get; set; }
public List<BarcodeInfos> BarCodeList { get; set; }
/// <summary>
/// xy轴中心线
/// </summary>
public int X { get; set; }
public int Y { get; set; }
/// <summary>
/// 是否扫码相机
/// </summary>
public bool IsIDCamera { get; set; }
/// <summary>
/// 料盘宽度
/// </summary>
public int PlateW { get; set; }
}
public class BarcodeInfos
{
//
// 摘要:
// 文本
public string Text { get; set; }
//
// 摘要:
// 条码类型
public string CodeType { get; set; }
////
//// 摘要:
//// 中心点
//public PointF Center { get; set; }
/// <summary>
/// 条码xy轴
/// </summary>
public int X { get; set; }
public int Y { get; set; }
////
//// 摘要:
//// 条码尺寸大小
//public SizeF Size { get; set; }
//
// 摘要:
// 角度,3点钟方向0°,逆时针为正,顺时针为负。
public float Angle { get; set; }
//
// 摘要:
// 原点垂直于经过中心点的直线的距离
public float Distance { get; set; }
}
static byte[] BitmapToByteArray(Bitmap bitmap)
{
using (MemoryStream stream = new MemoryStream())
{
// 将 Bitmap 保存到 MemoryStream
bitmap.Save(stream, bitmap.RawFormat);
// 返回 MemoryStream 中的字节数组
return stream.ToArray();
}
}
static string BitmapToBase64(Bitmap bitmap)
{
using (MemoryStream memoryStream = new MemoryStream())
{
// 将Bitmap保存到MemoryStream中
bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg);
// 获取字节数组
byte[] byteArray = memoryStream.ToArray();
// 将字节数组转换为Base64编码的字符串
return Convert.ToBase64String(byteArray);
}
}
public static string NeoSacnPost(BitmapData bitmapData,string methodname)
{
string url = serverhost + methodname;
string jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(bitmapData);
using (HttpClient httpClient = new HttpClient())
{
StringContent content = new StringContent(jsonData, Encoding.UTF8, "application/json");
HttpResponseMessage response = httpClient.PostAsync(url, content).Result;
if (response.IsSuccessStatusCode)
{
string res= response.Content.ReadAsStringAsync().Result;
return res;
}
else
{
LogUtil.error($"请求失败返回状态码:{response.StatusCode};");
return null;
}
}
}
#endregion
/// <summary>
/// 在url中传递base64字符串需要替换加号等符号
/// </summary>
......@@ -100,27 +286,44 @@ public class RemoteDecodeHelper_mod
{
lock (p)
{
Process proes = new Process();
var pss = Process.GetProcessesByName("Neo Scan");
if (pss.Length > 0)
{
LogUtil.info("ns100服务已启动;");
return;
var f = "NeoScan\\Neo Scan.exe";
if (!File.Exists(f))
throw new Exception("找不到扫码服务器文件");
p.StartInfo = new ProcessStartInfo(f);
}
var f = ConfigHelper.Config.Get("Display_GetDataAppPath");
string path = Path.Combine(Application.StartupPath, f);
LogUtil.info("启动ns100服务:"+path);
if (!File.Exists(path))
{
LogUtil.error("找不到扫码服务器文件");
return;
};
p.StartInfo = new ProcessStartInfo(path);
p.StartInfo.Arguments = "hide";
p.Start();
int checkcount = 5;
while (checkcount > 0)
{
checkcount--;
Thread.Sleep(500);
MyWebClient webClient = new MyWebClient(webclienttimeout);
var s = webClient.DownloadString(serverhost + "alive");
if (s.Trim() == "\"1\"")
return;
try
{
checkcount--;
Thread.Sleep(1000);
MyWebClient webClient = new MyWebClient(webclienttimeout);
var s = webClient.DownloadString(serverhost + "alive");
if (s.Trim() == "\"1\"")
{
LogUtil.info("ns100服务启动成功;");
return;
}
}
catch (Exception)
{
}
}
throw new Exception("扫码服务器打开失败");
LogUtil.error("扫码服务器打开失败");
}
}
......@@ -131,23 +334,25 @@ public class RemoteDecodeHelper_mod
public int codeCount;
public int timeout;
}
[Serializable]
public class WebResultCode
{
public int ErrorCode { get; set; }
public string Msg { get; set; }
//public WebCodeText[] Data { get; set; }
public List<KeyValuePair<string,string>> workCodeKeyword;
public List<KeyValuePair<string,string>> workCodeKeyword { get; set; }
public List<BarcodeInfo> workCodeInfo;
public WebResultCode()
{
ErrorCode = 0;
Msg = "OK";
}
/// <summary>
///计算好的角度
/// </summary>
public NewPositionAngle positionAngle { get; set; }
}
//
// 摘要:
......@@ -181,7 +386,6 @@ public class RemoteDecodeHelper_mod
public float Distance { get; set; }
}
public class MyWebClient : WebClient
{
private int _timeout;
......@@ -197,5 +401,14 @@ public class RemoteDecodeHelper_mod
}
}
public class NewPositionAngle
{
public int X { get; set; }
public int Y { get; set; }
public int Angle { get; set; }
public bool[] IsCodeUsed { get; set; }
}
}
using HalconDotNet;
using Newtonsoft.Json;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.Common.util;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Policy;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TrackBar;
namespace DeviceLibrary
{
......@@ -49,7 +57,6 @@ namespace DeviceLibrary
if (!server.StartsWith("http"))
return;
SendLineStatus();
}
public void StartConnectServer()
{
......@@ -73,7 +80,7 @@ namespace DeviceLibrary
lineOperation.status = 1;
lineOperation.data = new Dictionary<string, string>();
lineOperation.data = lineOperation.data.Concat(GetAgvBtnStatus()).ToDictionary(x => x.Key, v => v.Value);
//lineOperation.data = lineOperation.data.Concat(GetAgvBtnStatus()).ToDictionary(x => x.Key, v => v.Value);
lineOperation.status = (int)storeStatus;
BoxStatus boxStatus = new BoxStatus();
......@@ -113,11 +120,13 @@ namespace DeviceLibrary
lineOperation.msgEn = lineOperation.msg;
lineOperation.msgJp = lineOperation.msg;
lineOperation.boxStatus.Add(StoreID, boxStatus);
//lineOperation.boxStatus.Add(StoreID, boxStatus);
lineOperation.data= lineOperation.data.Union(UnifiedDataHandler.PrintNgMESData()).ToDictionary(x=>x.Key,x=>x.Value);
lineOperation.showLogs = StepInformation(out Dictionary<string,string> dic);
lineOperation.data =lineOperation.data.Union(dic).ToDictionary(x => x.Key, x => x.Value);
return lineOperation;
}
private static string api_communication = "rest/djk/labeling/communication"; //流水线状态通信接口
private static string api_communication = "service/equipment/communication"; //流水线状态通信接口
public static string GetPostApi()
{
var host = server;
......@@ -182,14 +191,18 @@ namespace DeviceLibrary
}
public bool SendAgvLog(string msg)
{
if (!server.ToLower().StartsWith("http"))
{
return false;
}
lock (serverclock)
{
Operation operation = getLineBoxStatus();
operation.logList = new List<AgvLogInfo>
{
new AgvLogInfo(msg)
};
//operation.logList = new List<AgvLogInfo>
//{
// new AgvLogInfo(msg)
//};
//LogUtil.info(JsonHelper.SerializeObject(operation));
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 5000);
......@@ -206,18 +219,22 @@ namespace DeviceLibrary
string mimoCid = ConfigHelper.Config.Get("MIMO_CID", "01");
public bool OpMIMO(string msg, Dictionary<string, string> operate)
{
if (!server.ToLower().StartsWith("http"))
{
return false;
}
lock (serverclock)
{
Operation operation = getLineBoxStatus();
operation.mimoOpMap = new Dictionary<string, Dictionary<string, string>>();
//operation.mimoOpMap = new Dictionary<string, Dictionary<string, string>>();
//Dictionary<string, string> op = new Dictionary<string, string>
//{
// { "Y10", "open" }
//};
//operation.mimoOpMap.Add("1", op);
operation.mimoOpMap.Add(mimoCid, operate);
//operation.mimoOpMap.Add(mimoCid, operate);
LogUtil.info(JsonHelper.SerializeObject(operation));
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 1000);
......@@ -292,33 +309,33 @@ namespace DeviceLibrary
}
}
if (resultOperation.mimoOpMap != null)
{
foreach (var item in resultOperation.mimoOpMap)
{
Dictionary<string, string> dataMap = item.Value;
if (dataMap.ContainsKey(ParamDefine.SendEmptyShelf) && dataMap[ParamDefine.SendEmptyShelf].Equals(ParamDefine.doit))
{
AGVManager.CreateAGVTask(STDTaskType.MIMO_UNLOAD);
LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) SendEmptyShelf=doit");
}
else if (dataMap.ContainsKey(ParamDefine.NeedEmptySHelf) && dataMap[ParamDefine.NeedEmptySHelf].Equals(ParamDefine.doit))
{
LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) NeedEmptySHelf=doit 不执行");
}
else if (dataMap.ContainsKey(ParamDefine.SendFullShelf) && dataMap[ParamDefine.SendFullShelf].Equals(ParamDefine.doit))
{
AGVManager.CreateAGVTask(STDTaskType.MIMO_UNLOAD);
LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) SendFullShelf=doit");
}
else if (dataMap.ContainsKey(ParamDefine.NeedFullShelf) && dataMap[ParamDefine.NeedFullShelf].Equals(ParamDefine.doit))
{
AGVManager.CreateAGVTask(STDTaskType.MIMO_LOAD);
LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) NeedFullShelf=doit");
}
}
}
//if (resultOperation.mimoOpMap != null)
//{
// foreach (var item in resultOperation.mimoOpMap)
// {
// Dictionary<string, string> dataMap = item.Value;
// if (dataMap.ContainsKey(ParamDefine.SendEmptyShelf) && dataMap[ParamDefine.SendEmptyShelf].Equals(ParamDefine.doit))
// {
// AGVManager.CreateAGVTask(STDTaskType.MIMO_UNLOAD);
// LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) SendEmptyShelf=doit");
// }
// else if (dataMap.ContainsKey(ParamDefine.NeedEmptySHelf) && dataMap[ParamDefine.NeedEmptySHelf].Equals(ParamDefine.doit))
// {
// LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) NeedEmptySHelf=doit 不执行");
// }
// else if (dataMap.ContainsKey(ParamDefine.SendFullShelf) && dataMap[ParamDefine.SendFullShelf].Equals(ParamDefine.doit))
// {
// AGVManager.CreateAGVTask(STDTaskType.MIMO_UNLOAD);
// LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) SendFullShelf=doit");
// }
// else if (dataMap.ContainsKey(ParamDefine.NeedFullShelf) && dataMap[ParamDefine.NeedFullShelf].Equals(ParamDefine.doit))
// {
// AGVManager.CreateAGVTask(STDTaskType.MIMO_LOAD);
// LogUtil.info(StoreName + $"收到服务器命令:MIMO({item.Key}) NeedFullShelf=doit");
// }
// }
//}
}
......@@ -371,8 +388,60 @@ namespace DeviceLibrary
path = path.Substring(0, path.Length - 1);
return path;
}
/// <summary>
/// 获取模板信息
/// </summary>
/// <returns></returns>
public List<EquipMsg> StepInformation(out Dictionary<string,string> dic)
{
dic = new Dictionary<string,string>();
List<EquipMsg> equipMsgs = new List<EquipMsg>();
try
{
PropertyInfo[] properties = typeof(DeviceLibrary.MainMachine).GetProperties();
foreach (var property in properties)
{
if (property.PropertyType == typeof(MoveInfo))
{
EquipMsg msg = new EquipMsg();
MoveInfo addressValue = (MoveInfo)property.GetValue(RobotManage.mainMachine);
if (addressValue.Name != crc.GetString("Res0053", "重置"))
{
//msg.msgCode = lang;
msg.module = addressValue.Name;
//msg.msg = addressValue.MoveStep.ToString();
//msg.msgParams = new string[1] { addressValue.lastmsg };
//msg.msgParams = new string[] { addressValue.GetStateStr() };
msg.msg = addressValue.GetStateStr();
equipMsgs.Add(msg);
if (addressValue.Name== crc.GetString("Res0039", "右侧取料"))
{
dic.Add("inShelfType", ShelfType.smallReel.ToString());
dic.Add("inShelfStatus", UnifiedDataHandler.ShelfStatus(true,Convert.ToInt32(addressValue.MoveStep)));
}
if (addressValue.Name== crc.GetString("Res0051", "左侧放料"))
{
dic.Add("outShelfType", ShelfType.smallReel.ToString());
dic.Add("outShelfStatus", UnifiedDataHandler.ShelfStatus(false, Convert.ToInt32(addressValue.MoveStep)));
}
}
}
}
var printstatus = PrinterHelper.LastPrintStatus;
EquipMsg equip = new EquipMsg()
{
module = crc.GetString("Res0216", "打印机"),
msg = (printstatus == CustPrinterStatus.Unknown) ? "Wait" : printstatus.ToString(),
};
}
catch (Exception ex)
{
LogUtil.error($"获取模块信息出错:{ex}!");
}
return equipMsgs;
}
}
public class ResultData
{
......
......@@ -197,9 +197,9 @@
// lblINP
//
this.lblINP.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblINP.Location = new System.Drawing.Point(414, 24);
this.lblINP.Location = new System.Drawing.Point(495, 24);
this.lblINP.Name = "lblINP";
this.lblINP.Size = new System.Drawing.Size(56, 30);
this.lblINP.Size = new System.Drawing.Size(60, 30);
this.lblINP.TabIndex = 10;
this.lblINP.Text = "到位";
this.lblINP.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -207,9 +207,9 @@
// lblBUSY
//
this.lblBUSY.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblBUSY.Location = new System.Drawing.Point(356, 24);
this.lblBUSY.Location = new System.Drawing.Point(429, 24);
this.lblBUSY.Name = "lblBUSY";
this.lblBUSY.Size = new System.Drawing.Size(56, 30);
this.lblBUSY.Size = new System.Drawing.Size(60, 30);
this.lblBUSY.TabIndex = 9;
this.lblBUSY.Text = "忙碌";
this.lblBUSY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -217,9 +217,9 @@
// lblNEL
//
this.lblNEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblNEL.Location = new System.Drawing.Point(298, 24);
this.lblNEL.Location = new System.Drawing.Point(348, 24);
this.lblNEL.Name = "lblNEL";
this.lblNEL.Size = new System.Drawing.Size(56, 30);
this.lblNEL.Size = new System.Drawing.Size(75, 30);
this.lblNEL.TabIndex = 8;
this.lblNEL.Text = "负极限";
this.lblNEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -227,9 +227,9 @@
// lblORG
//
this.lblORG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblORG.Location = new System.Drawing.Point(240, 24);
this.lblORG.Location = new System.Drawing.Point(282, 24);
this.lblORG.Name = "lblORG";
this.lblORG.Size = new System.Drawing.Size(56, 30);
this.lblORG.Size = new System.Drawing.Size(60, 30);
this.lblORG.TabIndex = 7;
this.lblORG.Text = "原点";
this.lblORG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -237,9 +237,9 @@
// lblPEL
//
this.lblPEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblPEL.Location = new System.Drawing.Point(182, 24);
this.lblPEL.Location = new System.Drawing.Point(206, 24);
this.lblPEL.Name = "lblPEL";
this.lblPEL.Size = new System.Drawing.Size(56, 30);
this.lblPEL.Size = new System.Drawing.Size(70, 30);
this.lblPEL.TabIndex = 6;
this.lblPEL.Text = "正极限";
this.lblPEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -249,7 +249,7 @@
this.lblSvOn.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblSvOn.Location = new System.Drawing.Point(8, 24);
this.lblSvOn.Name = "lblSvOn";
this.lblSvOn.Size = new System.Drawing.Size(56, 30);
this.lblSvOn.Size = new System.Drawing.Size(60, 30);
this.lblSvOn.TabIndex = 5;
this.lblSvOn.Text = "伺服";
this.lblSvOn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -257,9 +257,9 @@
// lblEMG
//
this.lblEMG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblEMG.Location = new System.Drawing.Point(124, 24);
this.lblEMG.Location = new System.Drawing.Point(140, 24);
this.lblEMG.Name = "lblEMG";
this.lblEMG.Size = new System.Drawing.Size(56, 30);
this.lblEMG.Size = new System.Drawing.Size(60, 30);
this.lblEMG.TabIndex = 4;
this.lblEMG.Text = "急停";
this.lblEMG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -267,9 +267,9 @@
// lblWARN
//
this.lblWARN.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblWARN.Location = new System.Drawing.Point(472, 24);
this.lblWARN.Location = new System.Drawing.Point(561, 24);
this.lblWARN.Name = "lblWARN";
this.lblWARN.Size = new System.Drawing.Size(56, 30);
this.lblWARN.Size = new System.Drawing.Size(60, 30);
this.lblWARN.TabIndex = 3;
this.lblWARN.Text = "警告";
this.lblWARN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -277,9 +277,9 @@
// lblALM
//
this.lblALM.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblALM.Location = new System.Drawing.Point(66, 24);
this.lblALM.Location = new System.Drawing.Point(74, 24);
this.lblALM.Name = "lblALM";
this.lblALM.Size = new System.Drawing.Size(56, 30);
this.lblALM.Size = new System.Drawing.Size(60, 30);
this.lblALM.TabIndex = 2;
this.lblALM.Text = "报警";
this.lblALM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -434,9 +434,9 @@
this.comjSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comjSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comjSpeed.FormattingEnabled = true;
this.comjSpeed.Location = new System.Drawing.Point(161, 207);
this.comjSpeed.Location = new System.Drawing.Point(100, 207);
this.comjSpeed.Name = "comjSpeed";
this.comjSpeed.Size = new System.Drawing.Size(95, 31);
this.comjSpeed.Size = new System.Drawing.Size(156, 31);
this.comjSpeed.TabIndex = 335;
//
// btnComAlarmClear
......@@ -488,9 +488,9 @@
this.cmbAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAxis.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAxis.FormattingEnabled = true;
this.cmbAxis.Location = new System.Drawing.Point(141, 11);
this.cmbAxis.Location = new System.Drawing.Point(99, 11);
this.cmbAxis.Name = "cmbAxis";
this.cmbAxis.Size = new System.Drawing.Size(213, 31);
this.cmbAxis.Size = new System.Drawing.Size(270, 31);
this.cmbAxis.TabIndex = 301;
this.cmbAxis.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
......@@ -499,7 +499,7 @@
this.btnDelMove.BackColor = System.Drawing.Color.White;
this.btnDelMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDelMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelMove.Location = new System.Drawing.Point(486, 199);
this.btnDelMove.Location = new System.Drawing.Point(490, 199);
this.btnDelMove.Name = "btnDelMove";
this.btnDelMove.Size = new System.Drawing.Size(140, 45);
this.btnDelMove.TabIndex = 332;
......@@ -545,7 +545,7 @@
this.btnAddMove.BackColor = System.Drawing.Color.White;
this.btnAddMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddMove.Location = new System.Drawing.Point(291, 199);
this.btnAddMove.Location = new System.Drawing.Point(278, 199);
this.btnAddMove.Name = "btnAddMove";
this.btnAddMove.Size = new System.Drawing.Size(140, 45);
this.btnAddMove.TabIndex = 330;
......@@ -572,7 +572,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(38, 213);
this.label1.Location = new System.Drawing.Point(10, 212);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 20);
this.label1.TabIndex = 329;
......@@ -599,7 +599,7 @@
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(271, 130);
this.btnReadPosition.Location = new System.Drawing.Point(278, 130);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(91, 34);
......@@ -628,7 +628,7 @@
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(10, 131);
this.label8.Location = new System.Drawing.Point(10, 144);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(73, 20);
this.label8.TabIndex = 255;
......@@ -653,10 +653,10 @@
// lblCountPulse
//
this.lblCountPulse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCountPulse.Location = new System.Drawing.Point(138, 133);
this.lblCountPulse.Location = new System.Drawing.Point(99, 133);
this.lblCountPulse.Name = "lblCountPulse";
this.lblCountPulse.ReadOnly = true;
this.lblCountPulse.Size = new System.Drawing.Size(118, 31);
this.lblCountPulse.Size = new System.Drawing.Size(157, 31);
this.lblCountPulse.TabIndex = 38;
//
// btnAxisAMove
......@@ -680,7 +680,7 @@
this.label49.AutoSize = true;
this.label49.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label49.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label49.Location = new System.Drawing.Point(62, 16);
this.label49.Location = new System.Drawing.Point(8, 14);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(64, 20);
this.label49.TabIndex = 233;
......@@ -693,7 +693,7 @@
this.txtAPosition.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtAPosition.Location = new System.Drawing.Point(281, 51);
this.txtAPosition.Location = new System.Drawing.Point(278, 51);
this.txtAPosition.MaxLength = 12;
this.txtAPosition.Name = "txtAPosition";
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
......@@ -746,18 +746,18 @@
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
this.txtAxisValue.Size = new System.Drawing.Size(50, 31);
this.txtAxisValue.Size = new System.Drawing.Size(53, 31);
this.txtAxisValue.TabIndex = 242;
this.txtAxisValue.Text = "0";
//
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(102, 51);
this.txtAxisDeviceName.Location = new System.Drawing.Point(99, 51);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(50, 31);
this.txtAxisDeviceName.Size = new System.Drawing.Size(53, 31);
this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Text = "0";
//
......
......@@ -362,7 +362,7 @@ namespace DeviceLibrary
else
{
string mode = HCBoardManager.AxisPrfMode(modeValue);
lblAxisPrfMode.Text = mode;
lblAxisPrfMode.Text = string.IsNullOrWhiteSpace(mode)&&mode.Length>0?mode[0].ToString().Replace("=",""): crc.GetString("Res0223", "未知数");
}
......@@ -398,7 +398,7 @@ namespace DeviceLibrary
short value = HCBoardManager.GetHomeStatus(axisNo);
string homesstr = HCBoardManager.AxisHomeSts(value);
lblhomeSts.Text = homesstr;
lblhomeSts.Text = homesstr!=null&&homesstr.Length>0?homesstr[0].ToString().Replace("=", "") : crc.GetString("Res0223", "未知数");
}
private void ShowlbSts(Label lbl, int value,bool isAlarm=false )
{
......
......@@ -13,7 +13,7 @@ namespace OnlineStore.LoadCSVLibrary
public class CSVReaderBase
{
public static char Spilt_Char = ',';
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// 获取一个类所有的《字段,AttributeName列名》集合
/// </summary>
......@@ -34,7 +34,6 @@ namespace OnlineStore.LoadCSVLibrary
}
}
}
return proCsvMap;
}
/// <summary>
......@@ -169,5 +168,4 @@ namespace OnlineStore.LoadCSVLibrary
return titleIndex;
}
}
}
......@@ -82,16 +82,16 @@ namespace OnlineStore.LoadCSVLibrary
List<string> checkFiledList = new List<string>(proNameList);
Dictionary<string, int> proIndexMap = new Dictionary<string, int>();
for (int i = 0; i<cvsTitleList.Count; i++)
for (int i = 0; i<cvsTitleList.Count; i++)
{
proIndexMap.Add(cvsTitleList[i], i);
proIndexMap.Add(cvsTitleList[i], i);
}
foreach (string key in cvsTitleList)
foreach (string key in cvsTitleList)
{
try
{
if (allTitleIndex.ContainsKey(key))
{
{
try
{
int titIndex = allTitleIndex[key];
......@@ -138,7 +138,7 @@ namespace OnlineStore.LoadCSVLibrary
public static DeviceConfig LoadConfig(DeviceConfig config)
{
LogUtil.info("开始读取文件:" + config.ConfigFilePath);
LogUtil.info("开始读取文件加载io:" + config.ConfigFilePath);
if (config == null || config.ConfigFilePath.Equals(""))
{
throw new Exception("没有配置配置文件路径");
......
......@@ -172,7 +172,8 @@ namespace OnlineStore.LoadCSVLibrary
{
get
{
return ElectricalDefinition + "-" + Explain + "-" + ProName + "";
//return ElectricalDefinition + "-" + Explain + "-" + ProName + "";
return ElectricalDefinition + "-" + ProName + "";
}
set
{
......
......@@ -262,8 +262,5 @@ namespace OnlineStore.LoadCSVLibrary
public static string OutputDevice = "OutputDevice";
public static string InputDevice = "InputDevice";
}
}
......@@ -131,11 +131,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// DI,0,吸嘴气缸前进端,LabelCylinder_Fwd,25,HC,X25,,,,,,,,,,
/// </summary>
//public static string LabelCylinder_Fwd = "LabelCylinder_Fwd";
public static string LabelCylinder_Fwd = "LabelCylinder_Fwd";
/// <summary>
/// DI,0,吸嘴气缸后退端,LabelCylinder_Bck,26,HC,X26,,,,,,,,,,
/// </summary>
// public static string LabelCylinder_Bck = "LabelCylinder_Bck";
public static string LabelCylinder_Bck = "LabelCylinder_Bck";
#endregion
#region X25/26内容
/// <summary>
......
......@@ -418,6 +418,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("Label_Y_P3_speed")]
public int Label_Y_P3_speed { get; set; }
/// <summary>
/// PRO,0,贴标覆盖X轴偏移量,Label_XOffset,200,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Label_XOffset")]
public int Label_XOffset { get; set; }
/// <summary>
/// PRO,0,贴标覆盖X轴偏移量,Label_YOffset,200,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Label_YOffset")]
public int Label_YOffset { get; set; }
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!