Commit 0690b6b8 LN

增加打印标签的引用

1 个父辈 14e71c2b
正在显示 29 个修改的文件 包含 495 行增加377 行删除
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.IOModule.AIOBOX</name>
</assembly>
<members>
<member name="T:Asa.IOModule.AIOBOX">
<summary>
零点IO模块操作类
</summary>
</member>
<member name="T:Asa.IOModule.AIOBOX.DIO_Changed">
<summary>
自动读取DI委托
</summary>
<param name="box">AIOBOX</param>
<param name="sta">所有DI状态</param>
</member>
<member name="E:Asa.IOModule.AIOBOX.DI_Changed_Event">
<summary>
自动读取DI事件触发
</summary>
</member>
<member name="E:Asa.IOModule.AIOBOX.DO_Changed_Event">
<summary>
自动读取DO事件触发
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.#ctor(Asa.IOModule.Box_Type,System.Int32,Asa.IOModule.Box_Type,System.Int32)">
<summary>
零点IO模块操作类
</summary>
<param name="input">输入类型</param>
<param name="inputCount">输入数量</param>
<param name="output">输出类型</param>
<param name="outputCount">输出数量</param>
</member>
<member name="P:Asa.IOModule.AIOBOX.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.Upload">
<summary>
输入主动上传
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.IsConn">
<summary>
是否连接
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.ErrInfo">
<summary>
错误信息
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Connect">
<summary>
连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Close">
<summary>
关闭连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta@)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32)">
<summary>
读取单个DI输入状态(ON/OFF)
</summary>
<param name="add">输入地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32,System.Int32)">
<summary>
读取多个DI输入状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32)">
<summary>
读取单个AI模拟量的值
</summary>
<param name="add">模拟量地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32,System.Int32)">
<summary>
读取多个AI模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32)">
<summary>
读取单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32,System.Int32)">
<summary>
读取多个DO输出状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32)">
<summary>
读取单个AO模拟量的值
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32,System.Int32)">
<summary>
读取多个AO模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.WriteDO(System.Int32,Asa.IOModule.Box_Sta)">
<summary>
写入单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Send">
<summary>
发送命令线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetReadDI_Command">
<summary>
获取ReadDI的命令
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetReadDO_Command">
<summary>
获取ReadDO的命令
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Listen">
<summary>
监听网络线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.CommandProcess(System.Byte[])">
<summary>
接收到的命令处理方法,(task多线程)
</summary>
<param name="cmd"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.Reconn">
<summary>
重连线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Open">
<summary>
打开socket建立连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.CheckIP(System.String)">
<summary>
检查IP地址
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoIP(System.String)">
<summary>
自动获取IP地址,未连接前使用,必须在同一网段
</summary>
<param name="localIP">本地IP地址</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetIP">
<summary>
获取IO模块IP地址
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Command">
<summary>
命令,前7个字节
</summary>
<returns></returns>
</member>
<member name="T:Asa.IOModule.Box_Type">
<summary>
IO模块类型
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DI">
<summary>
数字信号输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DO">
<summary>
数字信号输出
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AI">
<summary>
模拟量输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AO">
<summary>
模拟量输出
</summary>
</member>
<member name="T:Asa.IOModule.Box_Sta">
<summary>
IO模块寄存器状态
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.Off">
<summary>
断开,关闭,低电平
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.On">
<summary>
闭合,打开,高电平
</summary>
</member>
</members>
</doc>
<?xml version="1.0"?>
<doc>
<assembly>
<name>zxing.presentation</name>
</assembly>
<members>
<member name="T:ZXing.Presentation.BarcodeReader">
<summary>
A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor(ZXing.Reader,System.Func{System.Windows.Media.Imaging.BitmapSource,ZXing.LuminanceSource},System.Func{ZXing.LuminanceSource,ZXing.Binarizer})">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
<param name="reader">Sets the reader which should be used to find and decode the barcode.
If null then MultiFormatReader is used</param>
<param name="createLuminanceSource">Sets the function to create a luminance source object for a bitmap.
If null, default is used</param>
<param name="createBinarizer">Sets the function to create a binarizer object for a luminance source.
If null then HybridBinarizer is used</param>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor(ZXing.Reader,System.Func{System.Windows.Media.Imaging.BitmapSource,ZXing.LuminanceSource},System.Func{ZXing.LuminanceSource,ZXing.Binarizer},System.Func{System.Byte[],System.Int32,System.Int32,ZXing.RGBLuminanceSource.BitmapFormat,ZXing.LuminanceSource})">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
<param name="reader">Sets the reader which should be used to find and decode the barcode.
If null then MultiFormatReader is used</param>
<param name="createLuminanceSource">Sets the function to create a luminance source object for a bitmap.
If null, default is used</param>
<param name="createBinarizer">Sets the function to create a binarizer object for a luminance source.
If null then HybridBinarizer is used</param>
<param name="createRGBLuminanceSource">The create RGB luminance source.</param>
</member>
<member name="T:ZXing.Presentation.BarcodeWriter">
<summary>
A smart class to encode some content to a barcode image
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeWriter.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeWriter"/> class.
</summary>
</member>
<member name="T:ZXing.Presentation.BarcodeWriterGeometry">
<summary>
A smart class to encode some content to a barcode image into a geometry
Autor: Rob Fonseca-Ensor
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeWriterGeometry.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeWriterGeometry"/> class.
</summary>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.#ctor(System.Int32,System.Int32)">
<summary>
Initializes a new instance of the <see cref="T:ZXing.BitmapSourceLuminanceSource"/> class.
</summary>
<param name="width">The width.</param>
<param name="height">The height.</param>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.#ctor(System.Windows.Media.Imaging.BitmapSource)">
<summary>
Initializes a new instance of the <see cref="T:ZXing.BitmapSourceLuminanceSource"/> class.
</summary>
<param name="bitmap">The bitmap.</param>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.CreateLuminanceSource(System.Byte[],System.Int32,System.Int32)">
<summary>
Should create a new luminance source with the right class type.
The method is used in methods crop and rotate.
</summary>
<param name="newLuminances">The new luminances.</param>
<param name="width">The width.</param>
<param name="height">The height.</param>
<returns></returns>
</member>
<member name="T:ZXing.Rendering.GeometryRenderer">
<summary>
Renders a barcode into a geometry
Autor: Rob Fonseca-Ensor
</summary>
</member>
<member name="M:ZXing.Rendering.GeometryRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<returns></returns>
</member>
<member name="M:ZXing.Rendering.GeometryRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String,ZXing.Common.EncodingOptions)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<param name="options">The options.</param>
<returns></returns>
</member>
<member name="T:ZXing.Rendering.WriteableBitmapRenderer">
<summary>
Renders a <see cref="T:ZXing.Common.BitMatrix" /> to a <see cref="T:System.Windows.Media.Imaging.WriteableBitmap" />
</summary>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.Foreground">
<summary>
Gets or sets the foreground color.
</summary>
<value>
The foreground color.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.Background">
<summary>
Gets or sets the background color.
</summary>
<value>
The background color.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontFamily">
<summary>
Gets or sets the font family.
</summary>
<value>
The font family.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontSize">
<summary>
Gets or sets the size of the font.
</summary>
<value>
The size of the font.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontStretch">
<summary>
Gets or sets the font stretch.
</summary>
<value>
The font stretch.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontStyle">
<summary>
Gets or sets the font style.
</summary>
<value>
The font style.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontWeight">
<summary>
Gets or sets the font weight.
</summary>
<value>
The font weight.
</value>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Rendering.WriteableBitmapRenderer"/> class.
</summary>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<returns></returns>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String,ZXing.Common.EncodingOptions)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<param name="options">The options.</param>
<returns></returns>
</member>
</members>
</doc>
此文件的差异太大,无法显示。
......@@ -7,8 +7,8 @@
<!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="自动点料机" />
<!--Server address-->
<!--<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>-->
<!--<add key="ServerAddr" value="http://localhost/myproject/service/store/emptyPosForPutin"/>-->
<add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" />
......@@ -42,6 +42,10 @@
<!--检测到料串自动取料-->
<add key="AutoInput" value="1" />
<add key ="InoutDefaultPosition" value ="1000"/>
<!--标签文件名称-->
<add key ="LabelName" value ="test2"/>
<!--打印机名称-->
<add key ="PrinterName" value ="ZDesigner GT800 (EPL)"/>
</appSettings>
<log4net>
......
......@@ -55,6 +55,9 @@
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath>
</Reference>
......
......@@ -41,7 +41,6 @@
this.txtShelfID = new System.Windows.Forms.TextBox();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblAgvInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
......@@ -297,7 +296,6 @@
this.groupBox6.Controls.Add(this.txtShelfID);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblAgvInfo);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(3, 3);
this.groupBox6.Name = "groupBox6";
......@@ -462,18 +460,6 @@
this.lblAgvInfo.TabIndex = 276;
this.lblAgvInfo.Text = "AGV 状态";
//
// lblInstoreList
//
this.lblInstoreList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(406, 287);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(881, 109);
this.lblInstoreList.TabIndex = 277;
//
// lblThisSta
//
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -1806,7 +1792,6 @@
internal System.Windows.Forms.Button btnUP1;
private System.Windows.Forms.Label lblAgvInfo;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox8;
......
......@@ -134,21 +134,13 @@ namespace OnlineStore.AutoCountClient
}
btnPutTray.Enabled = false;
}
//if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked)&&(!IsInCheck))
//{
// chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
//}
lblAgvInfo.Text = "AGV-" + equipBean.Config.LeftAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.LeftAgvName).ToString() +
"\t AGV-" + equipBean.Config.RightAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.RightAgvName).ToString() + "";
lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg;
string text = "";
if (!lblInstoreList.Text.Equals(text))
{
lblInstoreList.Text = text;
}
lblMoveInfo.Text = equipBean.GetMoveStr();
}
catch (Exception ex)
......
......@@ -64,13 +64,17 @@
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.btnPrint = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.txtPringNum = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPrintCode = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.comTP = new System.Windows.Forms.ComboBox();
this.comInP = new System.Windows.Forms.ComboBox();
this.chbAutoSend = new System.Windows.Forms.CheckBox();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblTrayNum = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.btnOutStore = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox8 = new System.Windows.Forms.GroupBox();
......@@ -739,9 +743,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(255, 136);
this.lblThisSta.Location = new System.Drawing.Point(255, 60);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(1032, 166);
this.lblThisSta.Size = new System.Drawing.Size(1032, 121);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -775,13 +779,17 @@
this.groupBox6.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.groupBox6.Controls.Add(this.btnPrint);
this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Controls.Add(this.txtPringNum);
this.groupBox6.Controls.Add(this.label3);
this.groupBox6.Controls.Add(this.txtPrintCode);
this.groupBox6.Controls.Add(this.label2);
this.groupBox6.Controls.Add(this.comTP);
this.groupBox6.Controls.Add(this.comInP);
this.groupBox6.Controls.Add(this.chbAutoSend);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Controls.Add(this.btnOutStore);
this.groupBox6.Location = new System.Drawing.Point(3, 3);
......@@ -791,6 +799,60 @@
this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息";
//
// btnPrint
//
this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnPrint.BackColor = System.Drawing.Color.White;
this.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPrint.Location = new System.Drawing.Point(183, 440);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(110, 40);
this.btnPrint.TabIndex = 298;
this.btnPrint.Text = "标签打印测试";
this.btnPrint.UseVisualStyleBackColor = false;
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(18, 463);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 17);
this.label6.TabIndex = 297;
this.label6.Text = "数量:";
//
// txtPringNum
//
this.txtPringNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtPringNum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPringNum.Location = new System.Drawing.Point(69, 458);
this.txtPringNum.MaxLength = 6;
this.txtPringNum.Name = "txtPringNum";
this.txtPringNum.Size = new System.Drawing.Size(100, 26);
this.txtPringNum.TabIndex = 296;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 430);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 295;
this.label3.Text = "条码:";
//
// txtPrintCode
//
this.txtPrintCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtPrintCode.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPrintCode.Location = new System.Drawing.Point(69, 425);
this.txtPrintCode.MaxLength = 6;
this.txtPrintCode.Name = "txtPrintCode";
this.txtPrintCode.Size = new System.Drawing.Size(100, 26);
this.txtPrintCode.TabIndex = 294;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -864,18 +926,6 @@
this.lblTrayNum.TabIndex = 276;
this.lblTrayNum.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblInstoreList
//
this.lblInstoreList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(255, 302);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(1032, 184);
this.lblInstoreList.TabIndex = 277;
//
// btnOutStore
//
this.btnOutStore.BackColor = System.Drawing.Color.White;
......@@ -1929,7 +1979,6 @@
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
......@@ -2035,6 +2084,11 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comTP;
private System.Windows.Forms.ComboBox comInP;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPringNum;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPrintCode;
}
}
......@@ -294,7 +294,7 @@ namespace OnlineStore.AutoCountClient
}
internal override void FormStatus(bool isStart)
{
{
btnStart.Enabled = true;
btnStop.Enabled = true;
if (isStart)
......@@ -730,6 +730,27 @@ namespace OnlineStore.AutoCountClient
LogUtil.info(equipBean.Name + "用户切换 放料完成送出料架 =" + isCheck);
}
}
private void btnPrint_Click(object sender, EventArgs e)
{
try
{
if (RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Print) || RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Printing))
{
MessageBox.Show("正在打印中,请稍后。。。");
return;
}
LogUtil.error("点击:打印标签");
string code = txtPrintCode.Text;
string num = txtPringNum.Text;
equipBean.StartPrintLabel(code, num);
}
catch (Exception ex)
{
LogUtil.error("打印标签错误:" + ex.ToString());
}
}
}
}
......
......@@ -63,6 +63,7 @@
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.标签编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.清空日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
......@@ -357,7 +358,8 @@
this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7,
this.toolStripMenuItem2,
this.toolStripSeparator6});
this.toolStripSeparator6,
this.标签编辑ToolStripMenuItem});
this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem";
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 ";
......@@ -365,27 +367,33 @@
// 二维码学习ToolStripMenuItem
//
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(160, 26);
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(157, 6);
this.toolStripSeparator6.Visible = false;
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
//
// 标签编辑ToolStripMenuItem
//
this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem";
this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.标签编辑ToolStripMenuItem.Text = "标签编辑";
this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click);
//
// 帮助ToolStripMenuItem
//
......@@ -517,6 +525,7 @@
private System.Windows.Forms.ToolStripMenuItem 版本号ToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ToolStripMenuItem 标签编辑ToolStripMenuItem;
}
}
......@@ -22,7 +22,7 @@ namespace OnlineStore.AutoCountClient
internal partial class FrmRobotMain : Form
{
// internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private RobotBean robot = null;
private List<TabPage> tabPageList = new List<TabPage>();
private bool LoadOk = false;
......@@ -38,23 +38,23 @@ namespace OnlineStore.AutoCountClient
}
private void LoadStoreData()
{
{
robot = RobotManager.robot;
if (robot == null)
{
Application.Exit();
}
}
FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip);
AddForm(" " + robot.inputEquip.Name + " ", frm1);
FrmXRay test = new FrmXRay(robot.XrayBean);
AddForm(" " + robot.XrayBean.Name + " ", test);
FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip);
AddForm(" " + robot.outputEquip.Name + " ", frm2);
}
}
private void AddForm(string text, Form form)
{
text = text.PadLeft(10, ' ');
......@@ -89,14 +89,14 @@ namespace OnlineStore.AutoCountClient
this.Text = title;
this.notifyIcon1.Text = title;
int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
chbAutoRun.Checked = autoValue.Equals(1);
chbAutoRun.Checked = autoValue.Equals(1);
LoadStoreData();
LoadListView();
LogUtil.logBox = this.logBox;
LoadOk = true;
// HideForm();
// HideForm();
timer1.Start();
}
......@@ -106,13 +106,13 @@ namespace OnlineStore.AutoCountClient
AddHealder("设备名称", 90);
AddHealder("启用", 50);
AddHealder("报警", 110);
AddHealder("状态", 110);
AddHealder("状态", 110);
AddHealder("料盘信息", listView1.Size.Width - 110 - 110 - 50 - 90 - 10);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
AddRow(robot.inputEquip,robot.inputEquip.IsDebug);
AddRow(robot.inputEquip, robot.inputEquip.IsDebug);
AddRow(robot.XrayBean, robot.XrayBean.IsDebug);
AddRow(robot.outputEquip, robot.outputEquip.IsDebug);
AddRow(robot.outputEquip, robot.outputEquip.IsDebug);
}
private void AddHealder(string name, int widht)
{
......@@ -122,7 +122,7 @@ namespace OnlineStore.AutoCountClient
preSendwire.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listView1.Columns.Add(preSendwire); //将列头添加到ListView控件。
}
private void AddRow(EquipBase equip,bool isDebug)
private void AddRow(EquipBase equip, bool isDebug)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
......@@ -174,23 +174,23 @@ namespace OnlineStore.AutoCountClient
//如果料仓还在运行状态,先关闭料仓
if (!robot.runStatus.Equals(RobotRunStatus.Wait))
{
LogUtil.info( "即将退出程序,停止" + robot.Name + "运行 ");
LogUtil.info("即将退出程序,停止" + robot.Name + "运行 ");
robot.StopRun();
}
foreach (EquipBase equip in robot.equipsMap.Values)
{
if (equip.runStatus > RobotRunStatus.Wait)
{
LogUtil.info( "即将退出程序,停止" + equip.Name + "运行 ");
LogUtil.info("即将退出程序,停止" + equip.Name + "运行 ");
equip.StopRun();
}
}
IOManager.instance.CloseAllConnection();
}
IOManager.instance.CloseAllConnection();
ACServerManager.CloseAllPort();
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
}
System.Environment.Exit(System.Environment.ExitCode);
}
catch (Exception ex)
......@@ -231,7 +231,7 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show(robot.Name + "当前状态:" + robot.runStatus + ",不能启动!");
return;
}
LogUtil.info( "点击 开始启动");
LogUtil.info("点击 开始启动");
startTimer.Interval = 300;
startTimer.Elapsed += timer_Elapsed;
startTimer.AutoReset = false;
......@@ -374,7 +374,7 @@ namespace OnlineStore.AutoCountClient
LogUtil.error("LogM Error: ", ex);
}
}
private string AddMsg(string msg,string warmsg,AlarmType alarmType,DateTime lastTime)
private string AddMsg(string msg, string warmsg, AlarmType alarmType, DateTime lastTime)
{
if (warmsg.Equals("").Equals(false))
{
......@@ -396,14 +396,14 @@ namespace OnlineStore.AutoCountClient
{
return;
}
string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg =robot.WarnMsg;
string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg = robot.WarnMsg;
foreach (EquipBase move in robot.equipsMap.Values)
{
warnMsg= AddMsg(warnMsg, move.WarnMsg, move.alarmType, move.LastAlarmTime);
warnMsg = AddMsg(warnMsg, move.WarnMsg, move.alarmType, move.LastAlarmTime);
if(move is InputEquip)
if (move is InputEquip)
{
BatchMoveBean bean = robot.inputEquip.LeftBatchMove;
warnMsg = AddMsg(warnMsg, robot.inputEquip.LeftBatchMove.WarnMsg, robot.inputEquip.LeftBatchMove.alarmType, robot.inputEquip.LeftBatchMove.LastAlarmTime);
......@@ -411,7 +411,7 @@ namespace OnlineStore.AutoCountClient
}
}
lblWarnMsg.Text = warnMsg;
lblWarnMsg.Text = warnMsg;
if (robot.runStatus > RobotRunStatus.Wait)
{
if (启动AToolStripMenuItem.Enabled.Equals(true))
......@@ -447,7 +447,7 @@ namespace OnlineStore.AutoCountClient
int item_debug_index = 1;
int item_alarm_index = 2;
int item_runStr_index = 3;
int item_move_info_index = 4;
int item_move_info_index = 4;
int i = 0;
foreach (EquipBase equip in robot.equipsMap.Values)
{
......@@ -457,7 +457,7 @@ namespace OnlineStore.AutoCountClient
SetItemColor(i, equip.runStatus, equip.alarmType);
i++;
}
}
private void SetItemColor(int i, RobotRunStatus runStatus, AlarmType alarmType)
{
......@@ -561,7 +561,7 @@ namespace OnlineStore.AutoCountClient
about.ShowDialog();
}
private void 二维码学习ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Camera._cam != null)
......@@ -573,7 +573,7 @@ namespace OnlineStore.AutoCountClient
frm.Dispose();
}
private void 退出ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
......@@ -585,8 +585,8 @@ namespace OnlineStore.AutoCountClient
{
ExitApp();
}
private void logBox_VisibleChanged(object sender, EventArgs e)
{
if (!LoadOk)
......@@ -600,7 +600,7 @@ namespace OnlineStore.AutoCountClient
}
private void 清空日志ToolStripMenuItem_Click(object sender, EventArgs e)
{
{
LogUtil.ClearLog();
}
......@@ -611,7 +611,7 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show("已复制日志到粘贴板!");
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
FrmAgvTest frm = new FrmAgvTest();
......@@ -647,6 +647,17 @@ namespace OnlineStore.AutoCountClient
LogUtil.info("勾选:UseBuzzer =" + RobotManager.UseBuzzer);
ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, (RobotManager.UseBuzzer ? 1 : 0));
}
private void 标签编辑ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
RobotManager.PrintBean.EditLabel();
}
catch (Exception ex)
{
LogUtil.error("标签编辑错误:" + ex.ToString());
}
}
}
}
......@@ -65,7 +65,7 @@ namespace OnlineStore.Common
public static string UseBuzzer = "UseBuzzer";
public static string http_server = "http_server";
public static string ServerAddr = "ServerAddr";
/// <summary>
/// 检测到料架自动入料
......@@ -75,5 +75,8 @@ namespace OnlineStore.Common
/// 进出轴待机点位,进出轴在此位置时,升降和旋转才可以走
/// </summary>
public static string InoutDefaultPosition = "InoutDefaultPosition";
public static string LabelName = "LabelName";
public static string PrinterName = "PrinterName";
}
}
......@@ -41,6 +41,9 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID">
<HintPath>..\..\dll\Asa.RFID.dll</HintPath>
</Reference>
......@@ -113,6 +116,18 @@
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190618151304.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190918140941.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190928122649.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20200520172352.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
......
<?xml version="1.0" encoding="utf-8"?>
<Label Name="test1" Size="50.000,70.000" Offset="0,0">
<Field Type="4" Key="QRCode{ORDERNO};{ORDERNUM};{MATERIALNO};{MATERIALDEC};{LOT};{STORAGE};{QTY};{BATCHNO};{SN}" Rect="1.52,1.522,20,20" Font="宋体,9,," />
<Field Type="5" Key="订单号:{ORDERNO}" Rect="23.368,2.032,25.24,6.698" Font="宋体,9,," />
<Field Type="5" Key="订单行号:{ORDERNUM}" Rect="23.622,10.668,24.986,8.476" Font="宋体,9,," />
<Field Type="5" Key="物料编码:{MATERIALNO}" Rect="1.524,22.606,46.83,4.666" Font="宋体,9,," />
<Field Type="5" Key="物料描述:{MATERIALDEC}" Rect="1.524,29.972,47.084,8.222" Font="宋体,9,," />
<Field Type="5" Key="厂家批次:{LOT}" Rect="1.524,39.37,46.83,4.412" Font="宋体,9,," />
<Field Type="5" Key="库位:{STORAGE}" Rect="1.778,45.212,46.576,5.174" Font="宋体,9,," />
<Field Type="5" Key="数量:{QTY}" Rect="1.778,51.054,46.83,5.174" Font="宋体,9,," />
<Field Type="5" Key="批次号:{BATCHNO}" Rect="1.778,57.658,46.322,10" Font="微软雅黑,12,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="test2" Size="78.000,25.000" Offset="0,0">
<Field Type="4" Key="{vender}_{material}_{batch}_{qty}{sn}" Rect="3.048,0.508,22.112,22.272" Font="宋体,9,," />
<Field Type="5" Key="{aa}_{bb}" Rect="24.638,1.778,51.83,20.75" Font="黑体,12,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="123" Size="50,70" Offset="0,0">
<Field Type="4" Key="{PURCHASEORDERNO};{PURCHASEORDERNUMBER};{MATERIALNO};{MATERIALDEC};{FACTORYLOT};{STORAGE};{SN};{QTY};{BATCHNO}" Rect="1.778,1.778,19.572,18.716" Font="宋体,9,," />
<Field Type="5" Key="采购订单号: {PURCHASEORDERNO}" Rect="22.606,1.778,24.906,17.7" Font="宋体,9,," />
<Field Type="5" Key="数量: {QTY}" Rect="2.286,55.88,45.226,5" Font="宋体,9,," />
<Field Type="5" Key="批次号: {BATCHNO}" Rect="1.778,62.992,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="库位: {STORAGE}" Rect="1.778,49.53,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="厂家批次: {FACTORYLOT}" Rect="2.032,43.18,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="物料描述: {MATERIALDEC}" Rect="2.286,36.322,44.972,5" Font="宋体,9,," />
<Field Type="5" Key="物料编码: {MATERIALNO}" Rect="2.54,29.972,44.464,5" Font="宋体,9,," />
<Field Type="5" Key="订单行号: {PURCHASEORDERNUMBER}" Rect="2.794,22.86,43.956,5" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="x-ray" Size="60.000,25.000" Offset="0,0">
<Field Type="5" Key="测试:{text}" Rect="7.874,7.874,41.496,7.286" Font="宋体,15.75,," />
</Label>
\ No newline at end of file
......@@ -479,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
// msg += "标签信息:" + Out_ReelInfo.ToStr() + " \r\n";
msg += "当前料架:" + WorkShelfId + ",累积出料 "+OutReelCount+" 盘共 "+OutReelHeight+" mm \r\n";
msg += "打印机["+RobotManager.PrintName+"]:" + RobotManager.LastPrintStatus + "\n";
return msg;
}
......
......@@ -356,8 +356,9 @@ namespace OnlineStore.DeviceLibrary
else if (SecMoveInfo.IsStep(StepEnum.OL02_TakeForward))
{
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
SecWorkLog("贴标: 打印标签 ,等待2000ms");
SecWorkLog("贴标: 开始打印标签 ,等待2000ms");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
StartPrintLabel(SecMoveInfo.MoveParam.WareCode, SecMoveInfo.MoveParam.WareCount.ToString());
}
else if (SecMoveInfo.IsStep(StepEnum.OL03_PrintLabel))
{
......@@ -502,7 +503,22 @@ namespace OnlineStore.DeviceLibrary
SecMoveInfo.EndMove();
}
}
#endregion
}
public void StartPrintLabel(string wareCode, string wareCount)
{
try
{
Dictionary<string, string> text = new Dictionary<string, string>();
text.Add("aa", wareCode);
text.Add("bb", wareCount );
RobotManager.PrintBean.Print(text);
}
catch (Exception ex)
{
LogUtil.error("打印标签 StartPrintLabel 错误:" + ex.ToString());
}
}
#endregion
}
}
......@@ -96,18 +96,23 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StepEnum.XR03_LineRun);
WorkLog(" XRay复位: 皮带转动3秒");
if (IOValue(IO_Type.X_InLine_Check).Equals(IO_VALUE.LOW))
if (IOValue(IO_Type.X_ReelCheck).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
if (IOValue(IO_Type.X_InLine_Check).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
}
IOMove(IO_Type.X_MLine_Run, IO_VALUE.HIGH);
}
IOMove(IO_Type.X_MLine_Run, IO_VALUE.HIGH);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.HIGH);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
else if (MoveInfo.IsStep(StepEnum.XR03_LineRun))
{
MoveInfo.NextMoveStep(StepEnum.XR04_LineStop);
WorkLog(" XRay复位: 皮带停止转动");
IOMove(IO_Type.X_InLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_MLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.LOW);
......
......@@ -16,11 +16,10 @@ namespace OnlineStore.DeviceLibrary
public class RobotManager
{
public static bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
private static bool isInit = false;
//public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
private static bool isInit = false;
public static RobotBean robot = null;
public static Robot_Config Config = null;
public static Robot_Config Config = null;
public static Dictionary<int, DeviceConfig> allConfigMap = null;
public RobotManager()
{
......@@ -28,14 +27,14 @@ namespace OnlineStore.DeviceLibrary
public static void CheckEnum(Type type)
{
if (type.IsEnum)
{
{
List<int> valueList = new List<int>();
Array array = Enum.GetValues(type);
foreach (int item in array)
{
if (valueList.Contains(item))
{
LogUtil.error( type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。");
LogUtil.error(type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。");
Application.Exit();
break;
}
......@@ -48,28 +47,27 @@ namespace OnlineStore.DeviceLibrary
try
{
if (!isInit)
{
{
DeviceConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
DeviceConfig.SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
DeviceConfig.ProIOIpMap = new Dictionary<string, string>();
DeviceConfig.ProIOIpMap = new Dictionary<string, string>();
allConfigMap = new Dictionary<int, DeviceConfig>();
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
CheckEnum(typeof(RobotMoveInfo));
// CheckEnum(typeof(LineStatus));
CheckEnum(typeof(RobotMoveInfo));
CheckEnum(typeof(RobotRunStatus));
isInit = true;
string appPath = Application.StartupPath;
string appPath = Application.StartupPath;
string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Robot);
Config = CSVConfigReader.LoadRobotConfig(0, DeviceType.Line, linefilePath);
Config = CSVConfigReader.LoadRobotConfig(0, DeviceType.Line, linefilePath);
Config.SetAxisParam();
allConfigMap.Add(0, Config);
int subType = 1;
string inconfig = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(subType, DeviceType.InputDevice, inconfig);
......@@ -88,7 +86,8 @@ namespace OnlineStore.DeviceLibrary
outconfig.SetIO(subType);
allConfigMap.Add(subType, outconfig);
ACServerManager.LogEvent += ACServerManager_LogEvent;
robot = new RobotBean(Config, inputConfig, XrayConfig, outconfig);
robot = new RobotBean(Config, inputConfig, XrayConfig, outconfig);
InitPrint();
LogUtil.info("加载 完成!");
return true;
......@@ -126,10 +125,10 @@ namespace OnlineStore.DeviceLibrary
public static void SaveXRayConfig(XRay_Config config)
{
try
{
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_XRay);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(XRay_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(XRay_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -137,17 +136,17 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
public static void SaveInputConfig(InputEquip_Config config)
{
try
{
string configpath = Application.StartupPath+ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(InputEquip_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(InputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -155,16 +154,16 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
public static void SaveOutputConfig(OutputEquip_Config config)
{
try
{
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_OutputEquip);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(OutputEquip_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(OutputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -172,16 +171,41 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
private static List<int> trayHeightList = new List<int>() { 8, 12, 16, 24, 32, 44, 56 };
public static List<int> GetTrayList()
{
return trayHeightList;
}
public static string PrintName = ConfigAppSettings.GetValue(Setting_Init.PrinterName);
public static Asa.PrintLabel PrintBean = null;
public static void InitPrint()
{
PrintBean = new Asa.PrintLabel(Application.StartupPath + "\\Label");
PrintBean.PrintStatusChanged += Print_PrintStatusChanged;
string labelName = ConfigAppSettings.GetValue(Setting_Init.LabelName);
PrintBean.LoadLabel(labelName);
PrintBean.Printer(PrintName, false);
LogUtil.info("打印机初始化完成【" + labelName + "】【" + PrintName + "】");
}
public static Asa.PrintLabel.PrinterStatus LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
private static void Print_PrintStatusChanged(Asa.PrintLabel.PrinterStatus sta)
{
if (sta.Equals(LastPrintStatus).Equals(false))
{
LogUtil.info("收到打印机状态:" + sta + ",之前状态【" + LastPrintStatus + "】更新并保存状态");
}
LastPrintStatus = sta;
// MessageBox.Show(sta.ToString());
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!