Commit 6be77036 LN

增加xraydll。取料贴标bug修改

1 个父辈 8dbedc7b
<?xml version="1.0"?>
<doc>
<assembly>
<name>X-Ray</name>
</assembly>
<members>
<member name="T:Asa.XRay">
<summary>
X-ray Source (AVJ Technologies Company)
</summary>
</member>
<member name="T:Asa.XRay.WarmUpEvent">
<summary>
预热事件委托
</summary>
<param name="state">预热完成的状态</param>
<param name="text">文本</param>
</member>
<member name="E:Asa.XRay.WarmUp">
<summary>
预热事件
</summary>
</member>
<member name="M:Asa.XRay.#ctor(System.String)">
<summary>
X-ray Source
</summary>
<param name="logName"></param>
</member>
<member name="P:Asa.XRay.IsPortOpen">
<summary>
串口打开或关闭状态
</summary>
</member>
<member name="P:Asa.XRay.IsRayOpen">
<summary>
X射线打开或关闭状态
</summary>
</member>
<member name="M:Asa.XRay.Open(System.String,System.String)">
<summary>
打开设备
</summary>
<param name="portName">串口名称</param>
<param name="lastDate">最后使用日期</param>
<returns></returns>
</member>
<member name="M:Asa.XRay.Close">
<summary>
关闭设备
</summary>
</member>
<member name="M:Asa.XRay.SetVC(System.String,System.String)">
<summary>
设置电压电流
</summary>
<param name="voltage">电压kV(除小数点外必须4位数,不够的补0,小数必须1位)</param>
<param name="current">电流uA(必须4位数,没有小数,不够的补0)</param>
</member>
<member name="M:Asa.XRay.Stop">
<summary>
停止
</summary>
<returns></returns>
</member>
<member name="M:Asa.XRay.Start">
<summary>
启动
</summary>
<returns></returns>
</member>
<member name="M:Asa.XRay.WatchDog">
<summary>
看门狗时间,(多线程)
</summary>
</member>
<member name="M:Asa.XRay.WarmUpProcess(System.Object)">
<summary>
预热处理,(多线程)
</summary>
<param name="obj">天数</param>
</member>
</members>
</doc>
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
<add key ="PrinterName" value ="ZDesigner GT800-300dpi EPL"/> <add key ="PrinterName" value ="ZDesigner GT800-300dpi EPL"/>
<!--是否启用打印标签--> <!--是否启用打印标签-->
<add key ="NeedPrintLabel" value ="0"/> <add key ="NeedPrintLabel" value ="0"/>
<!--XRay射线最后一次使用时间-->
<add key ="XRay_Data" value =""/>
</appSettings> </appSettings>
<log4net> <log4net>
...@@ -70,6 +72,16 @@ ...@@ -70,6 +72,16 @@
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="XRay" type="log4net.Appender.RollingFileAppender">
<file value="logs/XRay.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
<level value="Info" /> <level value="Info" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
...@@ -78,6 +90,10 @@ ...@@ -78,6 +90,10 @@
<level value="Info" /> <level value="Info" />
<appender-ref ref="TheRFID" /> <appender-ref ref="TheRFID" />
</logger> </logger>
<logger name="XRay">
<level value="Info" />
<appender-ref ref="XRay" />
</logger>
<!--<root> <!--<root>
<level value="Info" /> <level value="Info" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
......
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.chbMoveStop = new System.Windows.Forms.CheckBox(); this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.chbPrint = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -779,6 +780,7 @@ ...@@ -779,6 +780,7 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.chbPrint);
this.groupBox6.Controls.Add(this.btnPrint); this.groupBox6.Controls.Add(this.btnPrint);
this.groupBox6.Controls.Add(this.label6); this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Controls.Add(this.txtPringNum); this.groupBox6.Controls.Add(this.txtPringNum);
...@@ -1923,6 +1925,18 @@ ...@@ -1923,6 +1925,18 @@
this.chbMoveStop.UseVisualStyleBackColor = true; this.chbMoveStop.UseVisualStyleBackColor = true;
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged); this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
// //
// chbPrint
//
this.chbPrint.AutoSize = true;
this.chbPrint.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbPrint.Location = new System.Drawing.Point(1062, 25);
this.chbPrint.Name = "chbPrint";
this.chbPrint.Size = new System.Drawing.Size(112, 24);
this.chbPrint.TabIndex = 299;
this.chbPrint.Text = "启用标签打印";
this.chbPrint.UseVisualStyleBackColor = true;
this.chbPrint.CheckedChanged += new System.EventHandler(this.chbPrint_CheckedChanged);
//
// FrmOutputEquip // FrmOutputEquip
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -2089,6 +2103,7 @@ ...@@ -2089,6 +2103,7 @@
private System.Windows.Forms.TextBox txtPringNum; private System.Windows.Forms.TextBox txtPringNum;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPrintCode; private System.Windows.Forms.TextBox txtPrintCode;
private System.Windows.Forms.CheckBox chbPrint;
} }
} }
...@@ -39,7 +39,7 @@ namespace OnlineStore.AutoCountClient ...@@ -39,7 +39,7 @@ namespace OnlineStore.AutoCountClient
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
chbPrint.Checked = ConfigAppSettings.GetIntValue(Setting_Init.NeedPrintLabel).Equals(1);
lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus); lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
...@@ -751,6 +751,20 @@ namespace OnlineStore.AutoCountClient ...@@ -751,6 +751,20 @@ namespace OnlineStore.AutoCountClient
LogUtil.error("打印标签错误:" + ex.ToString()); LogUtil.error("打印标签错误:" + ex.ToString());
} }
} }
private void chbPrint_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (!chbPrint.Checked.Equals(equipBean.AutoSendShelfOut))
{
bool isCheck = chbPrint.Checked;
ConfigAppSettings.SaveValue(Setting_Init.NeedPrintLabel,( isCheck ? 1 : 0));
LogUtil.info(equipBean.Name + "用户切换 启用标签打印 =" + isCheck);
}
}
} }
} }
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblData = new System.Windows.Forms.Label();
this.lblCom = new System.Windows.Forms.Label();
this.lblDiany = new System.Windows.Forms.Label();
this.lblDianl = new System.Windows.Forms.Label();
this.lblInoutInfo = new System.Windows.Forms.Label(); this.lblInoutInfo = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label(); this.lblInstoreList = new System.Windows.Forms.Label();
...@@ -59,10 +64,13 @@ ...@@ -59,10 +64,13 @@
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.txtSlaveId = new System.Windows.Forms.TextBox(); this.txtSlaveId = new System.Windows.Forms.TextBox();
this.cmbWriteIO = new System.Windows.Forms.ComboBox(); this.cmbWriteIO = new System.Windows.Forms.ComboBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.lblLastS = new System.Windows.Forms.Label();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
...@@ -172,6 +180,7 @@ ...@@ -172,6 +180,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(5, 51); this.tabControl1.Location = new System.Drawing.Point(5, 51);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
...@@ -193,17 +202,73 @@ ...@@ -193,17 +202,73 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.groupBox2);
this.groupBox6.Controls.Add(this.lblInoutInfo); this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(3, 3); this.groupBox6.Location = new System.Drawing.Point(3, 3);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(1299, 483); this.groupBox6.Size = new System.Drawing.Size(1308, 480);
this.groupBox6.TabIndex = 279; this.groupBox6.TabIndex = 279;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
// //
// groupBox2
//
this.groupBox2.Controls.Add(this.lblLastS);
this.groupBox2.Controls.Add(this.lblData);
this.groupBox2.Controls.Add(this.lblCom);
this.groupBox2.Controls.Add(this.lblDiany);
this.groupBox2.Controls.Add(this.lblDianl);
this.groupBox2.Location = new System.Drawing.Point(12, 41);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(309, 149);
this.groupBox2.TabIndex = 282;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "X射线信息";
this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
//
// lblData
//
this.lblData.AutoSize = true;
this.lblData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblData.Location = new System.Drawing.Point(12, 99);
this.lblData.Name = "lblData";
this.lblData.Size = new System.Drawing.Size(92, 17);
this.lblData.TabIndex = 3;
this.lblData.Text = "最后使用时间:";
//
// lblCom
//
this.lblCom.AutoSize = true;
this.lblCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCom.Location = new System.Drawing.Point(12, 24);
this.lblCom.Name = "lblCom";
this.lblCom.Size = new System.Drawing.Size(56, 17);
this.lblCom.TabIndex = 2;
this.lblCom.Text = "端口号:";
//
// lblDiany
//
this.lblDiany.AutoSize = true;
this.lblDiany.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDiany.Location = new System.Drawing.Point(12, 74);
this.lblDiany.Name = "lblDiany";
this.lblDiany.Size = new System.Drawing.Size(68, 17);
this.lblDiany.TabIndex = 1;
this.lblDiany.Text = "电压信息:";
//
// lblDianl
//
this.lblDianl.AutoSize = true;
this.lblDianl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDianl.Location = new System.Drawing.Point(12, 49);
this.lblDianl.Name = "lblDianl";
this.lblDianl.Size = new System.Drawing.Size(68, 17);
this.lblDianl.TabIndex = 0;
this.lblDianl.Text = "电流信息:";
//
// lblInoutInfo // lblInoutInfo
// //
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green; this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
...@@ -211,14 +276,14 @@ ...@@ -211,14 +276,14 @@
this.lblInoutInfo.Name = "lblInoutInfo"; this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(1280, 22); this.lblInoutInfo.Size = new System.Drawing.Size(1280, 22);
this.lblInoutInfo.TabIndex = 281; this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前出入库:"; this.lblInoutInfo.Text = "当前点料信息:";
// //
// lblMoveInfo // lblMoveInfo
// //
this.lblMoveInfo.AutoSize = true; this.lblMoveInfo.AutoSize = true;
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblMoveInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblMoveInfo.Location = new System.Drawing.Point(13, 47); this.lblMoveInfo.Location = new System.Drawing.Point(13, 198);
this.lblMoveInfo.Name = "lblMoveInfo"; this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(68, 17); this.lblMoveInfo.Size = new System.Drawing.Size(68, 17);
this.lblMoveInfo.TabIndex = 280; this.lblMoveInfo.TabIndex = 280;
...@@ -231,9 +296,9 @@ ...@@ -231,9 +296,9 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green; this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(274, 180); this.lblInstoreList.Location = new System.Drawing.Point(331, 185);
this.lblInstoreList.Name = "lblInstoreList"; this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(1019, 115); this.lblInstoreList.Size = new System.Drawing.Size(971, 115);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
// //
// lblThisSta // lblThisSta
...@@ -243,9 +308,9 @@ ...@@ -243,9 +308,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(274, 64); this.lblThisSta.Location = new System.Drawing.Point(327, 41);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(1019, 132); this.lblThisSta.Size = new System.Drawing.Size(975, 149);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
...@@ -612,6 +677,25 @@ ...@@ -612,6 +677,25 @@
this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem); this.cmbWriteIO.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbWriteIO_DrawItem);
this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged); this.cmbWriteIO.SelectedIndexChanged += new System.EventHandler(this.cmbWriteIO_SelectedIndexChanged);
// //
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(1315, 486);
this.tabPage2.TabIndex = 3;
this.tabPage2.Text = " X光射线 ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// lblLastS
//
this.lblLastS.AutoSize = true;
this.lblLastS.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLastS.Location = new System.Drawing.Point(12, 124);
this.lblLastS.Name = "lblLastS";
this.lblLastS.Size = new System.Drawing.Size(68, 17);
this.lblLastS.TabIndex = 4;
this.lblLastS.Text = "点料机状态";
//
// FrmXRay // FrmXRay
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -633,6 +717,8 @@ ...@@ -633,6 +717,8 @@
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox6.ResumeLayout(false); this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout(); this.groupBox6.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
...@@ -687,6 +773,13 @@ ...@@ -687,6 +773,13 @@
private System.Windows.Forms.Button X_StopCylinder_Up; private System.Windows.Forms.Button X_StopCylinder_Up;
private System.Windows.Forms.Button X_Lock_On; private System.Windows.Forms.Button X_Lock_On;
private System.Windows.Forms.CheckBox chbMoveStop; private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label lblData;
private System.Windows.Forms.Label lblCom;
private System.Windows.Forms.Label lblDiany;
private System.Windows.Forms.Label lblDianl;
private System.Windows.Forms.Label lblLastS;
} }
} }
...@@ -37,7 +37,11 @@ namespace OnlineStore.AutoCountClient ...@@ -37,7 +37,11 @@ namespace OnlineStore.AutoCountClient
{ {
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
lblCom.Text = "X射线端口号:" + equipBean.Config.XRay_Port;
lblDianl.Text = "电流值:" + equipBean.Config.XRay_Electricity;
lblDiany.Text = "电压值:" + equipBean.Config.XRay_Voltage;
lblData.Text = "最后使用时间:" + ConfigAppSettings.GetValue(Setting_Init.XRay_Data);
lblData.Text = equipBean.LastXRayState;
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
IsLoad = true; IsLoad = true;
} }
...@@ -97,7 +101,7 @@ namespace OnlineStore.AutoCountClient ...@@ -97,7 +101,7 @@ namespace OnlineStore.AutoCountClient
} }
ReadIOList(); ReadIOList();
ReadBtnDO(); ReadBtnDO();
lblData.Text = equipBean.LastXRayState;
if (equipBean.runStatus > RobotRunStatus.Wait) if (equipBean.runStatus > RobotRunStatus.Wait)
{ {
lblName.BackColor = Color.Green; lblName.BackColor = Color.Green;
...@@ -361,6 +365,11 @@ namespace OnlineStore.AutoCountClient ...@@ -361,6 +365,11 @@ namespace OnlineStore.AutoCountClient
equipBean.MoveStop = chbMoveStop.Checked; equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop); LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
} }
private void groupBox2_Enter(object sender, EventArgs e)
{
}
} }
} }
......
...@@ -25,5 +25,32 @@ IO模块更新。 ...@@ -25,5 +25,32 @@ IO模块更新。
尺寸信息传到出口 尺寸信息传到出口
复位是Xray入口若有料,入口皮带线不转。 复位是Xray入口若有料,入口皮带线不转。
出料料串最后一个料盘,没有贴标就把料串送出了。 出料料串最后一个料盘,没有贴标就把料串送出了。
20200529
X射线模块:
增加配置:
电流
电压
X射线COM口:COM6
上次打开的日期
调用步骤:
软件启动Open
接收事件,等待可以start后,设置电压电流
每次需要点料的时候
Start
调用取图片方法
Stop
获取点料结果
软件退出时调用Close
...@@ -79,5 +79,7 @@ namespace OnlineStore.Common ...@@ -79,5 +79,7 @@ namespace OnlineStore.Common
public static string LabelName = "LabelName"; public static string LabelName = "LabelName";
public static string PrinterName = "PrinterName"; public static string PrinterName = "PrinterName";
public static string NeedPrintLabel = "NeedPrintLabel"; public static string NeedPrintLabel = "NeedPrintLabel";
public static string XRay_Data = "XRay_Data";
} }
} }
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="X-Ray">
<HintPath>..\..\..\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="agvClient\AgvClient.cs" /> <Compile Include="agvClient\AgvClient.cs" />
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,左入料线体相机名称,LeftCamera,GigE:MV-CE200-10GC (00E02588201),,,,, PRO,0,左入料线体相机名称,LeftCamera,GigE:MV-CE200-10GC (00E02588201),,,,,
PRO,0,右入料线体相机名称,RightCamera,GigE:MV-CE200-10GC (00E02588199),,,,, PRO,0,右入料线体相机名称,RightCamera,GigE:MV-CE200-10GC (00E02588199),,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,空料串入口AGV站号名称,AgvInName,D1,,,,, PRO,0,空料串入口AGV站号名称,AgvInName,D1,,,,,
PRO,0,料串出口AGV站号名称,AgvOutName,D2,,,,, PRO,0,料串出口AGV站号名称,AgvOutName,D2,,,,,
...@@ -16,8 +16,8 @@ PRO,0,出料提升轴P3速度,BatchAxis_P3Speed,1500,,,,, ...@@ -16,8 +16,8 @@ PRO,0,出料提升轴P3速度,BatchAxis_P3Speed,1500,,,,,
PRO,0,出料提升轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,10446,,,,, PRO,0,出料提升轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,10446,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料X轴待机点-P1,MoveX_P1,2001,,,,, PRO,0,取料X轴待机点-P1,MoveX_P1,2001,,,,,
PRO,0,取料X轴-取料点-P2集合,MoveX_P2List,0=15900;8=150000;12=150000;16=150000;24=150000;32=140000;44=120000;56=100000;13=4710;15=1350;11=10120;7=15900,,,,, PRO,0,取料X轴-取料点-P2集合,MoveX_P2List,0=15950;8=150000;12=150000;16=150000;24=150000;32=140000;44=120000;56=100000;13=4710;15=1350;11=10120;7=15950,,,,,
PRO,0,取料X轴-放料点-P3,MoveX_P3,77100,,,,, PRO,0,取料X轴-放料点-P3,MoveX_P3,77200,,,,,
PRO,0,取料X轴P1速度,MoveX_P1Speed,500,,,,, PRO,0,取料X轴P1速度,MoveX_P1Speed,500,,,,,
PRO,0,取料X轴P2速度,MoveX_P2Speed,500,,,,, PRO,0,取料X轴P2速度,MoveX_P2Speed,500,,,,,
PRO,0,取料X轴P3速度,MoveX_P3Speed,500,,,,, PRO,0,取料X轴P3速度,MoveX_P3Speed,500,,,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,XRay端口号,XRay_Port,COM6,,,,,
PRO,0,XRay射线设置电流值,XRay_Electricity,0.87,,,,,
PRO,0,XRay射线设置电压值,XRay_Voltage,567,,,,,
...@@ -62,6 +62,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,6 +62,12 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
if(SecMoveInfo.MoveType.Equals(RobotMoveType.Labelling)&&SecMoveInfo.MoveStep<= StepEnum.OL12_XYToP3)
{
LogUtil.error(MoveInfo.Name + "StartWorking 失败 , SecMoveInfo 上个贴标还在等待中 " + SecMoveInfo.MoveType + "_" + SecMoveInfo.MoveStep);
return false;
}
if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW))
{ {
MoveInfo.NewMove(RobotMoveType.Working, StepEnum.OT01_WaitCheck); MoveInfo.NewMove(RobotMoveType.Working, StepEnum.OT01_WaitCheck);
...@@ -193,6 +199,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -193,6 +199,7 @@ namespace OnlineStore.DeviceLibrary
{ {
bool shelfOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.ShelfPro) && ShelfMoveInfo.IsStep(StepEnum.OS_18_ShelfReady); bool shelfOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.ShelfPro) && ShelfMoveInfo.IsStep(StepEnum.OS_18_ShelfReady);
bool debugOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.None) && MoveInfo.MoveParam.IsTest; bool debugOk = ShelfMoveInfo.MoveType.Equals(RobotMoveType.None) && MoveInfo.MoveParam.IsTest;
if (shelfOk || debugOk) if (shelfOk || debugOk)
{ {
MoveInfo.NextMoveStep(StepEnum.OT12_MoveXToP3); MoveInfo.NextMoveStep(StepEnum.OT12_MoveXToP3);
...@@ -443,11 +450,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -443,11 +450,11 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsStep(StepEnum.OL11_WaitCanLabel)) else if (SecMoveInfo.IsStep(StepEnum.OL11_WaitCanLabel))
{ {
bool canLabel = (MoveInfo.MoveType.Equals(RobotMoveType.None)||(MoveInfo.MoveType.Equals(RobotMoveType.Working)&& MoveInfo.MoveStep<=(StepEnum.OT11_WaitShelfOk))) bool canLabel = MoveInfo.MoveType.Equals(RobotMoveType.None) ||
&& ShelfMoveInfo.IsStep(StepEnum.OS_25_WaitLabel ); ; ((MoveInfo.MoveType.Equals(RobotMoveType.Working) && MoveInfo.MoveStep <= StepEnum.OT05_GetImage));
bool isTest = ShelfMoveInfo.MoveType.Equals(RobotMoveType.None) && MoveInfo.MoveType.Equals(RobotMoveType.None) && SecMoveInfo.MoveParam.IsTest; bool isTest = ShelfMoveInfo.MoveType.Equals(RobotMoveType.None) && MoveInfo.MoveType.Equals(RobotMoveType.None) && SecMoveInfo.MoveParam.IsTest;
if (canLabel || isTest) if (canLabel && ShelfMoveInfo.IsStep(StepEnum.OS_25_WaitLabel))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL12_XYToP3); SecMoveInfo.NextMoveStep(StepEnum.OL12_XYToP3);
SecWorkLog("贴标: XY轴移动到P3点"); SecWorkLog("贴标: XY轴移动到P3点");
......
using OnlineStore.Common; using Asa;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -18,6 +19,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,6 +19,11 @@ namespace OnlineStore.DeviceLibrary
public XRay_Config Config; public XRay_Config Config;
private XRay xRay = new XRay("XRay");
private bool xRayCanStart = false;
public string LastXRayState = "";
public X_RAY_Equip(string cid, XRay_Config config) public X_RAY_Equip(string cid, XRay_Config config)
{ {
this.DeviceID = config.Id; this.DeviceID = config.Id;
...@@ -25,7 +31,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,7 +31,7 @@ namespace OnlineStore.DeviceLibrary
baseConfig = config; baseConfig = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = (" " + "XRay" + " ").ToUpper(); Name = (" " + "XRay" + " ").ToUpper();
xRay.WarmUp += XRay_WarmUp;
Init(); Init();
ledProcessTimer.Elapsed += LedProcess; ledProcessTimer.Elapsed += LedProcess;
IoCheckTimer.Elapsed += IoCheckTimerProcess; IoCheckTimer.Elapsed += IoCheckTimerProcess;
...@@ -33,6 +39,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -33,6 +39,16 @@ namespace OnlineStore.DeviceLibrary
SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove"); SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove");
} }
private void XRay_WarmUp(bool state, string text)
{
LastXRayState =state+ ":" + text;
LogUtil.info(Name + "XRay_WarmUp [" + state + "] [" + text + "]");
if (state)
{
xRayCanStart = true;
}
}
public override bool StartRun() public override bool StartRun()
{ {
if (CanStartRun().Equals(false)) if (CanStartRun().Equals(false))
......
using OnlineStore.Common; using Asa;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -166,8 +167,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -166,8 +167,12 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW); IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
Task.Factory.StartNew(delegate { Task.Factory.StartNew(delegate {
string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount); string msg = "暂不上传";
LogUtil.error(Name + "上传【"+MoveInfo.MoveParam.OutStr()+"】点料结果失败:" + msg); // string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount);
if (!String.IsNullOrEmpty(msg))
{
LogUtil.error(Name + "上传【" + MoveInfo.MoveParam.OutStr() + "】点料结果失败:" + msg);
}
}); });
} }
#endregion #endregion
......
...@@ -27,6 +27,21 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -27,6 +27,21 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("IsDebug")] [ConfigProAttribute("IsDebug")]
public int IsDebug { get; set; } public int IsDebug { get; set; }
/// <summary>
/// PRO,0,XRay端口号,XRay_Port,COM6,,,,,
/// </summary>
[ConfigProAttribute("XRay_Port")]
public string XRay_Port { get; set; }
/// <summary>
/// PRO,0,XRay射线设置电流值,XRay_Electricity,1,,,,,
/// </summary>
[ConfigProAttribute("XRay_Electricity")]
public string XRay_Electricity { get; set; }
/// <summary>
/// PRO,0,XRay射线设置电压值,XRay_Voltage,1,,,,,
/// </summary>
[ConfigProAttribute("XRay_Voltage")]
public string XRay_Voltage { get; set; }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!