Commit 0bb9e1fc 顾剑亮
2 个父辈 afe304fc 5bc54092
正在显示 66 个修改的文件 包含 445 行增加152 行删除
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="CarerayImage" type="log4net.Appender.RollingFileAppender">
<file value="logs/CarerayImage.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>
<root>
<level value="Debug"/>
<appender-ref ref="CarerayImage"/>
</root>
</log4net>
</configuration>
\ No newline at end of file \ No newline at end of file
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</layout> </layout>
</appender> </appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender"> <appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID-line.log" /> <file value="logs/TheRFID.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
<level value="Info" /> <level value="Info" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
<level value="Info" /> <level value="Info" />
<appender-ref ref="XRay" /> <appender-ref ref="XRay" />
</logger> </logger>
<!--<root> <!--<root>
<level value="Info" /> <level value="Info" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
<ApplicationIcon>icon.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.PrintLabel"> <Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath> <HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
...@@ -230,6 +233,7 @@ ...@@ -230,6 +233,7 @@
<Content Include="AuToRunManager.exe"> <Content Include="AuToRunManager.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="resources\152827.png" />
<Content Include="resources\resources.txt"> <Content Include="resources\resources.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
......
...@@ -84,6 +84,7 @@ namespace OnlineStore.AutoCountClient ...@@ -84,6 +84,7 @@ namespace OnlineStore.AutoCountClient
txtZP1.Text = equipBean.Config.LabelZ_P1.ToString(); txtZP1.Text = equipBean.Config.LabelZ_P1.ToString();
txtZP2.Text = equipBean.Config.LabelZ_P2.ToString(); txtZP2.Text = equipBean.Config.LabelZ_P2.ToString();
txtZP3.Text = equipBean.Config.LabelZ_P3.ToString(); txtZP3.Text = equipBean.Config.LabelZ_P3.ToString();
txtZP4.Text = equipBean.Config.LabelZ_P4.ToString();
txtRP1.Text = equipBean.Config.LabelR_P1.ToString(); txtRP1.Text = equipBean.Config.LabelR_P1.ToString();
txtRP2.Text = equipBean.Config.LabelR_P2.ToString(); txtRP2.Text = equipBean.Config.LabelR_P2.ToString();
...@@ -571,9 +572,11 @@ namespace OnlineStore.AutoCountClient ...@@ -571,9 +572,11 @@ namespace OnlineStore.AutoCountClient
int ZP1 = FormUtil.GetIntValue(txtZP1); int ZP1 = FormUtil.GetIntValue(txtZP1);
int ZP2 = FormUtil.GetIntValue(txtZP2); int ZP2 = FormUtil.GetIntValue(txtZP2);
int ZP3 = FormUtil.GetIntValue(txtZP3); int ZP3 = FormUtil.GetIntValue(txtZP3);
int ZP4 = FormUtil.GetIntValue(txtZP4);
equipBean.Config.LabelZ_P1 = ZP1; equipBean.Config.LabelZ_P1 = ZP1;
equipBean.Config.LabelZ_P2 = ZP2; equipBean.Config.LabelZ_P2 = ZP2;
equipBean.Config.LabelZ_P3 = ZP3; equipBean.Config.LabelZ_P3 = ZP3;
equipBean.Config.LabelZ_P4 = ZP4;
int RP1 = FormUtil.GetIntValue(txtRP1); int RP1 = FormUtil.GetIntValue(txtRP1);
int RP2 = FormUtil.GetIntValue(txtRP2); int RP2 = FormUtil.GetIntValue(txtRP2);
...@@ -765,6 +768,11 @@ namespace OnlineStore.AutoCountClient ...@@ -765,6 +768,11 @@ namespace OnlineStore.AutoCountClient
LogUtil.info(equipBean.Name + "用户切换 启用标签打印 =" + isCheck); LogUtil.info(equipBean.Name + "用户切换 启用标签打印 =" + isCheck);
} }
} }
private void btnZP4_Click(object sender, EventArgs e)
{
AxisMove(equipBean.LabelZAxis, txtZP4, equipBean.Config.LabelZ_P4Speed);
}
} }
} }
......
...@@ -53,7 +53,7 @@ namespace OnlineStore.AutoCountClient ...@@ -53,7 +53,7 @@ namespace OnlineStore.AutoCountClient
FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip); FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip);
AddForm(" " + robot.outputEquip.Name + " ", frm2); AddForm(" " + robot.outputEquip.Name + " ", frm2);
robot.XrayBean.GetImageEvent += EquipBean_GetImageEvent;
} }
private void AddForm(string text, Form form) private void AddForm(string text, Form form)
{ {
...@@ -77,6 +77,7 @@ namespace OnlineStore.AutoCountClient ...@@ -77,6 +77,7 @@ namespace OnlineStore.AutoCountClient
} }
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("HHmmss") + ".png";
FrmBase.GetVersion(true); FrmBase.GetVersion(true);
if (!RobotManager.Init()) if (!RobotManager.Init())
{ {
...@@ -94,11 +95,23 @@ namespace OnlineStore.AutoCountClient ...@@ -94,11 +95,23 @@ namespace OnlineStore.AutoCountClient
LoadListView(); LoadListView();
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
LoadOk = true; LoadOk = true;
// HideForm(); // HideForm();
timer1.Start(); timer1.Start();
} }
private void EquipBean_GetImageEvent(Bitmap bitmap)
{
try
{
this.pictureBox1.Image = bitmap;
}
catch (Exception ex)
{
LogUtil.error(" EquipBean_GetImageEvent 出错:" + ex.ToString());
}
}
private void LoadListView() private void LoadListView()
{ {
...@@ -129,6 +142,7 @@ namespace OnlineStore.AutoCountClient ...@@ -129,6 +142,7 @@ namespace OnlineStore.AutoCountClient
lvi.SubItems.Add(isDebug ? "✘" : "✔"); lvi.SubItems.Add(isDebug ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString()); lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(equip.GetRunStr()); lvi.SubItems.Add(equip.GetRunStr());
lvi.SubItems.Add("");
this.listView1.Items.Add(lvi); this.listView1.Items.Add(lvi);
} }
...@@ -187,6 +201,7 @@ namespace OnlineStore.AutoCountClient ...@@ -187,6 +201,7 @@ namespace OnlineStore.AutoCountClient
} }
IOManager.instance.CloseAllConnection(); IOManager.instance.CloseAllConnection();
ACServerManager.CloseAllPort(); ACServerManager.CloseAllPort();
RobotManager.robot.XrayBean.XRayDispose();
if (Camera._cam != null) if (Camera._cam != null)
{ {
Camera._cam.CloseAll(); Camera._cam.CloseAll();
...@@ -396,6 +411,7 @@ namespace OnlineStore.AutoCountClient ...@@ -396,6 +411,7 @@ namespace OnlineStore.AutoCountClient
{ {
return; return;
} }
lblXrayWork.Visible = robot.XrayBean.InXWork;
string canScanCode = ""; string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode; lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg = robot.WarnMsg; string warnMsg = robot.WarnMsg;
......
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
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.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblLastS = new System.Windows.Forms.Label();
this.lblData = new System.Windows.Forms.Label(); this.lblData = new System.Windows.Forms.Label();
this.lblCom = new System.Windows.Forms.Label(); this.lblCom = new System.Windows.Forms.Label();
this.lblDiany = new System.Windows.Forms.Label(); this.lblDiany = new System.Windows.Forms.Label();
this.lblDianl = 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.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
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.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();
...@@ -205,7 +204,6 @@ ...@@ -205,7 +204,6 @@
this.groupBox6.Controls.Add(this.groupBox2); 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.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";
...@@ -223,12 +221,22 @@ ...@@ -223,12 +221,22 @@
this.groupBox2.Controls.Add(this.lblDianl); this.groupBox2.Controls.Add(this.lblDianl);
this.groupBox2.Location = new System.Drawing.Point(12, 41); this.groupBox2.Location = new System.Drawing.Point(12, 41);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(309, 149); this.groupBox2.Size = new System.Drawing.Size(276, 149);
this.groupBox2.TabIndex = 282; this.groupBox2.TabIndex = 282;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "X射线信息"; this.groupBox2.Text = "X射线信息";
this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter); this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
// //
// 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 = "点料机状态";
//
// lblData // lblData
// //
this.lblData.AutoSize = true; this.lblData.AutoSize = true;
...@@ -289,18 +297,6 @@ ...@@ -289,18 +297,6 @@
this.lblMoveInfo.TabIndex = 280; this.lblMoveInfo.TabIndex = 280;
this.lblMoveInfo.Text = "运动信息:"; this.lblMoveInfo.Text = "运动信息:";
// //
// 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("微软雅黑", 9F, 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(331, 185);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(971, 115);
this.lblInstoreList.TabIndex = 277;
//
// lblThisSta // lblThisSta
// //
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -310,7 +306,7 @@ ...@@ -310,7 +306,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(327, 41); this.lblThisSta.Location = new System.Drawing.Point(327, 41);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(975, 149); this.lblThisSta.Size = new System.Drawing.Size(975, 66);
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;
...@@ -686,16 +682,6 @@ ...@@ -686,16 +682,6 @@
this.tabPage2.Text = " X光射线 "; this.tabPage2.Text = " X光射线 ";
this.tabPage2.UseVisualStyleBackColor = true; 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);
...@@ -764,7 +750,6 @@ ...@@ -764,7 +750,6 @@
private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInoutInfo; private System.Windows.Forms.Label lblInoutInfo;
private System.Windows.Forms.Label lblMoveInfo; private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.Label lblThisSta; private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.Button X_OutDoor_Down; private System.Windows.Forms.Button X_OutDoor_Down;
private System.Windows.Forms.Button X_OutDoor_Up; private System.Windows.Forms.Button X_OutDoor_Up;
......
...@@ -46,6 +46,7 @@ namespace OnlineStore.AutoCountClient ...@@ -46,6 +46,7 @@ namespace OnlineStore.AutoCountClient
IsLoad = true; IsLoad = true;
} }
private void LoadIOList() private void LoadIOList()
{ {
int roleindex = 0; int roleindex = 0;
...@@ -101,7 +102,7 @@ namespace OnlineStore.AutoCountClient ...@@ -101,7 +102,7 @@ namespace OnlineStore.AutoCountClient
} }
ReadIOList(); ReadIOList();
ReadBtnDO(); ReadBtnDO();
lblData.Text = equipBean.LastXRayState; lblLastS.Text = equipBean.LastXRayState;
if (equipBean.runStatus > RobotRunStatus.Wait) if (equipBean.runStatus > RobotRunStatus.Wait)
{ {
lblName.BackColor = Color.Green; lblName.BackColor = Color.Green;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
: and then encoded with base64 encoding. : 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: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:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
...@@ -68,9 +69,10 @@ ...@@ -68,9 +69,10 @@
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
...@@ -85,9 +87,10 @@ ...@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <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:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> <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="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
...@@ -109,9 +112,13 @@ ...@@ -109,9 +112,13 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="152827" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\152827.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -54,3 +54,18 @@ Stop ...@@ -54,3 +54,18 @@ Stop
软件退出时调用Close 软件退出时调用Close
20200601
设备启动时提示急停未开:改为未初始化完成
添加点料模块代码。。
贴标时,Z轴需要下降到指定的位置之后才能旋转。
20200602
增加配置
PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace> <RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName> <AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
...@@ -37,7 +37,13 @@ ...@@ -37,7 +37,13 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.CarerayImage">
<HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX"> <Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
...@@ -54,6 +60,9 @@ ...@@ -54,6 +60,9 @@
<Reference Include="CodeLibrary"> <Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath> <HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="CountImage">
<HintPath>..\..\dll\X-Ray\CountImage.dll</HintPath>
</Reference>
<Reference Include="DeviceLib"> <Reference Include="DeviceLib">
<HintPath>..\..\dll\DeviceLib.dll</HintPath> <HintPath>..\..\dll\DeviceLib.dll</HintPath>
</Reference> </Reference>
...@@ -130,6 +139,15 @@ ...@@ -130,6 +139,15 @@
<Content Include="Label\20200520172352.xml"> <Content Include="Label\20200520172352.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="XRAY\out\out.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\png\png.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="XRAY\tif\tif.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
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,,,,,
...@@ -21,16 +21,16 @@ PRO,0,提升轴P3速度,BatchAxis_P3Speed,1000,,,,, ...@@ -21,16 +21,16 @@ PRO,0,提升轴P3速度,BatchAxis_P3Speed,1000,,,,,
PRO,0,提升轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,10446,,,,, PRO,0,提升轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,10446,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料升降轴待机点P1,UpdownAxis_P1,72000,,,,, PRO,0,取料升降轴待机点P1,UpdownAxis_P1,72000,,,,,
PRO,0,取料升降轴取料点P2_左侧,UpdownAxis_P2_L,203000,,,,, PRO,0,取料升降轴取料点P2_左侧,UpdownAxis_P2_L,200000,,,,,
PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,202000,,,,, PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,199000,,,,,
PRO,0,取料升降轴XRay入库放料点P3,UpdownAxis_P3,327986,,,,, PRO,0,取料升降轴XRay入库放料点P3,UpdownAxis_P3,327986,,,,,
PRO,0,取料升降轴工位放料点P4_高,UpdownAxis_P4_H,190969,,,,, PRO,0,取料升降轴工位放料点P4_高,UpdownAxis_P4_H,190969,,,,,
PRO,0,取料升降轴工位放料点P4_低,UpdownAxis_P4_L,515085,,,,, PRO,0,取料升降轴工位放料点P4_低,UpdownAxis_P4_L,515085,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料升降轴P1速度,UpdownAxis_P1Speed,500,,,,, PRO,0,取料升降轴P1速度,UpdownAxis_P1Speed,1100,,,,,
PRO,0,取料升降轴P2速度,UpdownAxis_P2Speed,500,,,,, PRO,0,取料升降轴P2速度,UpdownAxis_P2Speed,1100,,,,,
PRO,0,取料升降轴P3速度,UpdownAxis_P3Speed,500,,,,, PRO,0,取料升降轴P3速度,UpdownAxis_P3Speed,1100,,,,,
PRO,0,取料升降轴P4/P5速度,UpdownAxis_P4Speed,500,,,,, PRO,0,取料升降轴P4/P5速度,UpdownAxis_P4Speed,1100,,,,,
,,,,,,,,, ,,,,,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料旋转轴待机点P1,MiddleAxis_P1,1000,,,,, PRO,0,取料旋转轴待机点P1,MiddleAxis_P1,1000,,,,,
...@@ -39,10 +39,10 @@ PRO,0,取料旋转轴取料点P2_右侧 ,MiddleAxis_P2_R,156300,,,,, ...@@ -39,10 +39,10 @@ PRO,0,取料旋转轴取料点P2_右侧 ,MiddleAxis_P2_R,156300,,,,,
PRO,0,取料旋转轴XRay入口放料点P3,MiddleAxis_P3,4224,,,,, PRO,0,取料旋转轴XRay入口放料点P3,MiddleAxis_P3,4224,,,,,
PRO,0,取料旋转轴工位放料点P4,MiddleAxis_P4,397734,,,,, PRO,0,取料旋转轴工位放料点P4,MiddleAxis_P4,397734,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料旋转轴P1速度,MiddleAxis_P1Speed,500,,,,, PRO,0,取料旋转轴P1速度,MiddleAxis_P1Speed,1300,,,,,
PRO,0,取料旋转轴P2速度,MiddleAxis_P2Speed,500,,,,, PRO,0,取料旋转轴P2速度,MiddleAxis_P2Speed,1300,,,,,
PRO,0,取料旋转轴P3速度,MiddleAxis_P3Speed,500,,,,, PRO,0,取料旋转轴P3速度,MiddleAxis_P3Speed,1300,,,,,
PRO,0,取料旋转轴P4速度,MiddleAxis_P4Speed,500,,,,, PRO,0,取料旋转轴P4速度,MiddleAxis_P4Speed,1300,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料进出轴待机点P1,InoutAxis_P1,0,,,,, PRO,0,取料进出轴待机点P1,InoutAxis_P1,0,,,,,
PRO,0,取料进出轴取料点P2_左侧 ,InoutAxis_P2_L,118600,,,,, PRO,0,取料进出轴取料点P2_左侧 ,InoutAxis_P2_L,118600,,,,,
...@@ -50,7 +50,7 @@ PRO,0,取料进出轴取料点P2_右侧 ,InoutAxis_P2_R,118000,,,,, ...@@ -50,7 +50,7 @@ PRO,0,取料进出轴取料点P2_右侧 ,InoutAxis_P2_R,118000,,,,,
PRO,0,取料进出轴XRay入口放料点P3,InoutAxis_P3,118600,,,,, PRO,0,取料进出轴XRay入口放料点P3,InoutAxis_P3,118600,,,,,
PRO,0,取料进出轴工位放料点P4,InoutAxis_P4,116251,,,,, PRO,0,取料进出轴工位放料点P4,InoutAxis_P4,116251,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料进出轴P1速度,InoutAxis_P1Speed,500,,,,, PRO,0,取料进出轴P1速度,InoutAxis_P1Speed,1400,,,,,
PRO,0,取料进出轴P2速度,InoutAxis_P2Speed,500,,,,, PRO,0,取料进出轴P2速度,InoutAxis_P2Speed,1400,,,,,
PRO,0,取料进出轴P3速度,InoutAxis_P3Speed,500,,,,, PRO,0,取料进出轴P3速度,InoutAxis_P3Speed,1400,,,,,
PRO,0,取料进出轴P4速度,InoutAxis_P4Speed,500,,,,, PRO,0,取料进出轴P4速度,InoutAxis_P4Speed,1400,,,,,
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,空料串入口AGV站号名称,AgvInName,D1,,,,, PRO,0,空料串入口AGV站号名称,AgvInName,D1,,,,,
PRO,0,料串出口AGV站号名称,AgvOutName,D2,,,,, PRO,0,料串出口AGV站号名称,AgvOutName,D2,,,,,
...@@ -12,43 +12,45 @@ PRO,0,出料提升轴缓慢上升目标位置P3,BatchAxisP3,5610528,,,,, ...@@ -12,43 +12,45 @@ PRO,0,出料提升轴缓慢上升目标位置P3,BatchAxisP3,5610528,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,出料提升轴P1速度,BatchAxis_P1Speed,3000,,,,, PRO,0,出料提升轴P1速度,BatchAxis_P1Speed,3000,,,,,
PRO,0,出料提升轴P2速度,BatchAxis_P2Speed,3000,,,,, PRO,0,出料提升轴P2速度,BatchAxis_P2Speed,3000,,,,,
PRO,0,出料提升轴P3速度,BatchAxis_P3Speed,1500,,,,, PRO,0,出料提升轴P3速度,BatchAxis_P3Speed,1700,,,,,
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=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轴-取料点-P2集合,MoveX_P2List,0=16000;8=150000;12=150000;16=150000;24=150000;32=140000;44=120000;56=100000;13=5150;15=1750;11=10520;7=16250,,,,,
PRO,0,取料X轴-放料点-P3,MoveX_P3,77200,,,,, PRO,0,取料X轴-放料点-P3,MoveX_P3,77300,,,,,
PRO,0,取料X轴P1速度,MoveX_P1Speed,500,,,,, PRO,0,取料X轴P1速度,MoveX_P1Speed,700,,,,,
PRO,0,取料X轴P2速度,MoveX_P2Speed,500,,,,, PRO,0,取料X轴P2速度,MoveX_P2Speed,700,,,,,
PRO,0,取料X轴P3速度,MoveX_P3Speed,500,,,,, PRO,0,取料X轴P3速度,MoveX_P3Speed,700,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,取料Z轴待机点-P1,MoveZ_P1,2000,,,,, PRO,0,取料Z轴待机点-P1,MoveZ_P1,2000,,,,,
PRO,0,取料Z轴-取料点-P2集合,MoveZ_P2List,0=448700;8=448700;12=443900;16=440000;24=429900;32=420100;44=409000;56=398620,,,,, PRO,0,取料Z轴-取料点-P2集合,MoveZ_P2List,0=443700;8=443700;12=441900;16=438000;24=427900;32=418100;44=407000;56=397620,,,,,
PRO,0,取料Z轴-放料点-P3集合,MoveZ_P3List,0=108750;8=109700;12=100000;16=99000;24=93000;32=89000;44=74000;56=63500,,,,, PRO,0,取料Z轴-放料点-P3集合,MoveZ_P3List,0=100000;8=109700;12=100000;16=99000;24=93000;32=89000;44=74000;56=63500,,,,,
PRO,0,取料Z轴P1速度,MoveZ_P1Speed,1500,,,,, PRO,0,取料Z轴P1速度,MoveZ_P1Speed,4000,,,,,
PRO,0,取料Z轴P2速度,MoveZ_P2Speed,1500,,,,, PRO,0,取料Z轴P2速度,MoveZ_P2Speed,4000,,,,,
PRO,0,取料Z轴P3速度,MoveZ_P3Speed,1500,,,,, PRO,0,取料Z轴P3速度,MoveZ_P3Speed,4000,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,贴标机构X轴待机点-P1,LabelX_P1,2000,,,,, PRO,0,贴标机构X轴待机点-P1,LabelX_P1,2000,,,,,
PRO,0,贴标机构X轴取标签点P2,LabelX_P2,5751,,,,, PRO,0,贴标机构X轴取标签点P2,LabelX_P2,5751,,,,,
PRO,0,贴标机构X轴贴标点P3,LabelX_P3,533032,,,,, PRO,0,贴标机构X轴贴标点P3,LabelX_P3,533032,,,,,
PRO,0,贴标机构X轴P1速度,LabelX_P1Speed,1500,,,,, PRO,0,贴标机构X轴P1速度,LabelX_P1Speed,3500,,,,,
PRO,0,贴标机构X轴P2速度,LabelX_P2Speed,1500,,,,, PRO,0,贴标机构X轴P2速度,LabelX_P2Speed,3500,,,,,
PRO,0,贴标机构X轴P3速度,LabelX_P3Speed,1500,,,,, PRO,0,贴标机构X轴P3速度,LabelX_P3Speed,3500,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,贴标机构Y轴待机点-P1,LabelY_P1,2000,,,,, PRO,0,贴标机构Y轴待机点-P1,LabelY_P1,2000,,,,,
PRO,0,贴标机构Y轴取标签点P2,LabelY_P2,123731,,,,, PRO,0,贴标机构Y轴取标签点P2,LabelY_P2,123731,,,,,
PRO,0,贴标机构Y轴贴标点P3,LabelY_P3,4253,,,,, PRO,0,贴标机构Y轴贴标点P3,LabelY_P3,4253,,,,,
PRO,0,贴标机构Y轴P1速度,LabelY_P1Speed,1500,,,,, PRO,0,贴标机构Y轴P1速度,LabelY_P1Speed,4000,,,,,
PRO,0,贴标机构Y轴P2速度,LabelY_P2Speed,1500,,,,, PRO,0,贴标机构Y轴P2速度,LabelY_P2Speed,4000,,,,,
PRO,0,贴标机构Y轴P3速度,LabelY_P3Speed,1500,,,,, PRO,0,贴标机构Y轴P3速度,LabelY_P3Speed,4000,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,贴标机构Z轴待机点-P1,LabelZ_P1,2000,,,,, PRO,0,贴标机构Z轴待机点-P1,LabelZ_P1,2000,,,,,
PRO,0,贴标机构Z轴取标签点P2,LabelZ_P2,35935,,,,, PRO,0,贴标机构Z轴取标签点P2,LabelZ_P2,35935,,,,,
PRO,0,贴标机构Z轴贴标点P3,LabelZ_P3,174174,,,,, PRO,0,贴标机构Z轴贴标点P3,LabelZ_P3,174174,,,,,
PRO,0,贴标机构Z轴P1速度,LabelZ_P1Speed,1500,,,,, PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
PRO,0,贴标机构Z轴P2速度,LabelZ_P2Speed,1500,,,,, PRO,0,贴标机构Z轴P1速度,LabelZ_P1Speed,4500,,,,,
PRO,0,贴标机构Z轴P3速度,LabelZ_P3Speed,1500,,,,, PRO,0,贴标机构Z轴P2速度,LabelZ_P2Speed,4500,,,,,
PRO,0,贴标机构Z轴P3速度,LabelZ_P3Speed,4500,,,,,
PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,贴标机构R轴待机点-P1,LabelR_P1,0,,,,, PRO,0,贴标机构R轴待机点-P1,LabelR_P1,0,,,,,
PRO,0,贴标机构R轴取标签点P2,LabelR_P2,0,,,,, PRO,0,贴标机构R轴取标签点P2,LabelR_P2,0,,,,,
......
...@@ -6,11 +6,11 @@ AXIS,,取料机构上下轴_SVD02,Take_UpDown_Axis,2,COM2,,1000,1000,1000,200,500,500,1 ...@@ -6,11 +6,11 @@ AXIS,,取料机构上下轴_SVD02,Take_UpDown_Axis,2,COM2,,1000,1000,1000,200,500,500,1
AXIS,,取料机构进出轴_SVD03,Take_InOut_Axis,3,COM2,,800,1000,1000,200,500,500,10,1000,0,0 AXIS,,取料机构进出轴_SVD03,Take_InOut_Axis,3,COM2,,800,1000,1000,200,500,500,10,1000,0,0
AXIS,,左轨道提升轴_SVD04,Left_Batch_Axis,4,COM2,,3000,1000,1000,200,1000,200,10,1000,0,0 AXIS,,左轨道提升轴_SVD04,Left_Batch_Axis,4,COM2,,3000,1000,1000,200,1000,200,10,1000,0,0
AXIS,,右轨道提升轴_SVD05,Right_Batch_Axis,5,COM2,,3000,1000,1000,200,1000,200,10,1000,0,0 AXIS,,右轨道提升轴_SVD05,Right_Batch_Axis,5,COM2,,3000,1000,1000,200,1000,200,10,1000,0,0
AXIS,,取料移栽机构X轴_SVD06,Move_X_Axis,6,COM4,,100,1500,1500,30,100,1000,10,1000,0,0 AXIS,,取料移栽机构X轴_SVD06,Move_X_Axis,6,COM4,,100,1400,1400,30,100,1000,10,1000,0,0
AXIS,,取料移栽机构Z轴_SVD07,Move_Z_Axis,7,COM4,,100,1000,1000,50,250,1000,10,1000,0,0 AXIS,,取料移栽机构Z轴_SVD07,Move_Z_Axis,7,COM4,,100,900,900,50,250,1000,10,1000,0,0
AXIS,,贴标移栽机构X轴_SVD08,Label_X_Axis,8,COM4,,100,1000,1000,50,250,500,10,1000,0,0 AXIS,,贴标移栽机构X轴_SVD08,Label_X_Axis,8,COM4,,100,900,900,50,250,500,10,1000,0,0
AXIS,,贴标移栽机构Y轴_SVD09,Label_Y_Axis,9,COM4,,100,1000,1000,50,150,500,10,1000,0,0 AXIS,,贴标移栽机构Y轴_SVD09,Label_Y_Axis,9,COM4,,100,900,900,50,150,500,10,1000,0,0
AXIS,,贴标移栽机构Z轴_SVD10,Label_Z_Axis,10,COM4,,100,1000,1000,50,150,500,10,1000,0,0 AXIS,,贴标移栽机构Z轴_SVD10,Label_Z_Axis,10,COM4,,100,900,900,50,150,500,10,1000,0,0
AXIS,,贴标移栽机构R轴_SVD11,Label_R_Axis,11,COM4,,10,2000,2000,1,5,200,500,1000,0,0 AXIS,,贴标移栽机构R轴_SVD11,Label_R_Axis,11,COM4,,10,2000,2000,1,5,200,500,1000,0,0
AXIS,,出料工位提升轴_SVD12,Out_Batch_Axis,12,COM4,,2000,1000,1000,200,1000,500,10,1000,0,0 AXIS,,出料工位提升轴_SVD12,Out_Batch_Axis,12,COM4,,2000,1000,1000,200,1000,500,10,1000,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,XRay端口号,XRay_Port,COM6,,,,, PRO,0,XRay端口号,XRay_Port,COM6,,,,,
PRO,0,XRay射线设置电流值,XRay_Electricity,0.87,,,,, PRO,0,XRay射线设置电流值,XRay_Electricity,0500,,,,,
PRO,0,XRay射线设置电压值,XRay_Voltage,567,,,,, PRO,0,XRay射线设置电压值,XRay_Voltage,060.0,,,,,
PRO,0,XRay图片窗宽,WindowWidth,30000,,,,,
PRO,0,XRay图片窗位,WindowLevel,15000,,,,,

\ No newline at end of file \ No newline at end of file

\ No newline at end of file \ No newline at end of file

\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,7 +14,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public string Name = "入料"; public string Name = "入料";
public AxisBean BatchAxis = null; public AxisBean BatchAxis = null;
public int EquipType = 1; public int EquipType = 1;//1=左侧,2=右侧
public RobotMoveInfo MoveInfo; public RobotMoveInfo MoveInfo;
public string WarnMsg = ""; public string WarnMsg = "";
private string CameraName = ""; private string CameraName = "";
......
...@@ -442,6 +442,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -442,6 +442,8 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 日志打印 #region 日志打印
private int WorkLogLevel = 1;
private int SecWorkLogLevel = 1;
protected void WorkLog(string msg) protected void WorkLog(string msg)
{ {
string code = ""; string code = "";
...@@ -452,14 +454,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -452,14 +454,27 @@ namespace OnlineStore.DeviceLibrary
code = "[" + MoveInfo.MoveParam.WareCode + "]"; code = "[" + MoveInfo.MoveParam.WareCode + "]";
} }
} }
if (WorkLogLevel.Equals(1))
{
LogUtil.info(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg); LogUtil.info(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg);
}
else
{
LogUtil.debug(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg);
}
} }
protected void SecWorkLog(string msg) protected void SecWorkLog(string msg)
{ {
if (SecWorkLogLevel.Equals(1))
{
LogUtil.info(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg); LogUtil.info(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg);
} }
else
{
LogUtil.debug(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg);
}
}
public virtual string GetMoveStr() public virtual string GetMoveStr()
{ {
......
...@@ -177,13 +177,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -177,13 +177,13 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StepEnum.IW10_SaveSize); MoveInfo.NextMoveStep(StepEnum.IW10_SaveSize);
MoveInfo.MoveParam.PlateH = moveBean.LastHeight; MoveInfo.MoveParam.PlateH = moveBean.LastHeight;
MoveInfo.MoveParam.PlateW = GetWidth(); MoveInfo.MoveParam.PlateW = GetWidth();
WorkLog("测高结束, 记录尺寸【"+ MoveInfo.MoveParam.PlateW + "X"+ MoveInfo.MoveParam.PlateH + "】,开始下一盘预扫码"); WorkLog("测高结束, 记录尺寸【" + MoveInfo.MoveParam.PlateW + "X" + MoveInfo.MoveParam.PlateH + "】,开始下一盘预扫码");
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg =Name+ "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒"; WarnMsg = Name + "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error( WarnMsg, MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
...@@ -198,6 +198,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -198,6 +198,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam.TargetPosType = 1; MoveInfo.MoveParam.TargetPosType = 1;
WorkLog(" 无有效条码,从XRay放到NG箱:" + MoveInfo.MoveParam.ToStr()); WorkLog(" 无有效条码,从XRay放到NG箱:" + MoveInfo.MoveParam.ToStr());
} }
else if (MoveInfo.MoveParam.InPosType.Equals(2))
{
MoveInfo.MoveParam.TargetPosType = 1;
WorkLog(" 右侧入口入料,直接放到XRay:" + MoveInfo.MoveParam.ToStr());
}
else if (SServerManager.CanConnect()) else if (SServerManager.CanConnect())
{ {
Task task = Task.Factory.StartNew(delegate Task task = Task.Factory.StartNew(delegate
...@@ -243,7 +248,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,7 +248,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsTimeOut(120)) if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒"; WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error( WarnMsg,MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
return; return;
......
...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
if(SecMoveInfo.MoveType.Equals(RobotMoveType.Labelling)&&SecMoveInfo.MoveStep<= StepEnum.OL12_XYToP3) if(SecMoveInfo.MoveType.Equals(RobotMoveType.Labelling)&&SecMoveInfo.MoveStep<= StepEnum.OL11_XYToP3)
{ {
LogUtil.error(MoveInfo.Name + "StartWorking 失败 , SecMoveInfo 上个贴标还在等待中 " + SecMoveInfo.MoveType + "_" + SecMoveInfo.MoveStep); LogUtil.error(MoveInfo.Name + "StartWorking 失败 , SecMoveInfo 上个贴标还在等待中 " + SecMoveInfo.MoveType + "_" + SecMoveInfo.MoveStep);
return false; return false;
...@@ -89,7 +89,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,7 +89,8 @@ namespace OnlineStore.DeviceLibrary
WorkLog(" 检测到XRay出口料盘[" + reelInfo.ToStr() + "],准备开始取料"); WorkLog(" 检测到XRay出口料盘[" + reelInfo.ToStr() + "],准备开始取料");
} }
if (MoveInfo.MoveParam.PlateW <= 0 || if (MoveInfo.MoveParam.PlateW <= 0 ||
MoveInfo.MoveParam.PlateH <= 0) MoveInfo.MoveParam.PlateH <= 0 ||
String.IsNullOrEmpty(MoveInfo.MoveParam.WareCode))
{ {
MoveInfo.MoveParam.IsNgReel = true; MoveInfo.MoveParam.IsNgReel = true;
} }
...@@ -157,7 +158,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,7 +158,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name + "等待贴标模块空闲 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待贴标模块空闲 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -221,7 +222,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -221,7 +222,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name + "等待出料料串准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待出料料串准备完成(OS_18_ShelfReady)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -238,7 +239,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = MoveInfo.Name + "等待出料料串可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待出料料串可放料(OS_22_WaitTray)超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -371,7 +372,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -371,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
//{ //{
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel); SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown; RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
SecWorkLog("贴标: 重置状态=Unknown,开始打印标签["+NeedPrint+"] ,贴标XYR轴到取标签点P2, 等待1s"); SecWorkLog("贴标: 重置状态=Unknown,开始打印标签[" + NeedPrint + "] ,贴标XYR轴到取标签点P2, 等待1s");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (NeedPrint) if (NeedPrint)
{ {
...@@ -428,27 +429,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -428,27 +429,18 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsStep(StepEnum.OL08_Nozzle_Work)) else if (SecMoveInfo.IsStep(StepEnum.OL08_Nozzle_Work))
{ {
// SecMoveInfo.NextMoveStep(StepEnum.OL09_WaitGetLabel); SecMoveInfo.NextMoveStep(StepEnum.OL09_ZToP1);
// SecWorkLog("贴标: 等待吸盘信号到位");
// SecMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Nozzle_Work, IO_VALUE.HIGH));
// SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
// SecMoveInfo.OneWaitCanEndStep = true;
//}
//else if (SecMoveInfo.IsStep(StepEnum.OL09_WaitGetLabel))
//{
SecMoveInfo.NextMoveStep(StepEnum.OL10_ZToP1);
SecWorkLog("贴标: Z轴到P1点"); SecWorkLog("贴标: Z轴到P1点");
LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P1, Config.LabelZ_P1Speed); LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P1, Config.LabelZ_P1Speed);
} }
else if (SecMoveInfo.IsStep(StepEnum.OL10_ZToP1)) else if (SecMoveInfo.IsStep(StepEnum.OL09_ZToP1))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL11_WaitCanLabel); SecMoveInfo.NextMoveStep(StepEnum.OL10_WaitCanLabel);
SecWorkLog("贴标: 等待取料机构返回待机点并且空闲"); SecWorkLog("贴标: 等待取料机构返回待机点并且空闲");
} }
else if (SecMoveInfo.IsStep(StepEnum.OL11_WaitCanLabel)) else if (SecMoveInfo.IsStep(StepEnum.OL10_WaitCanLabel))
{ {
bool canLabel = MoveInfo.MoveType.Equals(RobotMoveType.None) || bool canLabel = MoveInfo.MoveType.Equals(RobotMoveType.None) ||
((MoveInfo.MoveType.Equals(RobotMoveType.Working) && MoveInfo.MoveStep <= StepEnum.OT05_GetImage)); ((MoveInfo.MoveType.Equals(RobotMoveType.Working) && MoveInfo.MoveStep <= StepEnum.OT05_GetImage));
...@@ -456,7 +448,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -456,7 +448,7 @@ namespace OnlineStore.DeviceLibrary
if (canLabel && ShelfMoveInfo.IsStep(StepEnum.OS_25_WaitLabel)) if (canLabel && ShelfMoveInfo.IsStep(StepEnum.OS_25_WaitLabel))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL12_XYToP3); SecMoveInfo.NextMoveStep(StepEnum.OL11_XYToP3);
SecWorkLog("贴标: XY轴移动到P3点"); SecWorkLog("贴标: XY轴移动到P3点");
LabelXAxis.AbsMove(SecMoveInfo, Config.LabelX_P3, Config.LabelX_P3Speed); LabelXAxis.AbsMove(SecMoveInfo, Config.LabelX_P3, Config.LabelX_P3Speed);
...@@ -465,12 +457,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -465,12 +457,18 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsTimeOut(120)) else if (SecMoveInfo.IsTimeOut(120))
{ {
WarnMsg = SecMoveInfo.Name + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "]" + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(SecMoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg,SecMoveInfo.ErrorLogType); LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
} }
else if (SecMoveInfo.IsStep(StepEnum.OL12_XYToP3)) else if (SecMoveInfo.IsStep(StepEnum.OL11_XYToP3))
{
SecMoveInfo.NextMoveStep(StepEnum.OL12_ZToP4);
SecWorkLog("贴标: Z轴先走到旋转点P4");
LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P4, Config.LabelZ_P4Speed);
}
else if (SecMoveInfo.IsStep(StepEnum.OL12_ZToP4))
{ {
SecMoveInfo.NextMoveStep(StepEnum.OL13_RToP3); SecMoveInfo.NextMoveStep(StepEnum.OL13_RToP3);
SecWorkLog("贴标: R轴到P3点"); SecWorkLog("贴标: R轴到P3点");
......
...@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsTimeOut(120)) else if (SecMoveInfo.IsTimeOut(120))
{ {
WarnMsg = SecMoveInfo.Name + "等待 贴标结束 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "]" + "等待 贴标结束 超时[" + FormUtil.GetSpanStr(SecMoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType); LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
......
...@@ -67,6 +67,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -67,6 +67,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.info(Name + "开始连接IO模块 "); LogUtil.info(Name + "开始连接IO模块 ");
IOManager.instance.ConnectionIOList(ioList); IOManager.instance.ConnectionIOList(ioList);
Thread.Sleep(3000);
mainTimer.Enabled = true; mainTimer.Enabled = true;
canStart = true; canStart = true;
AgvClient.Init(); AgvClient.Init();
......
...@@ -8,6 +8,7 @@ using System.Linq; ...@@ -8,6 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
...@@ -20,31 +21,82 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,31 +21,82 @@ namespace OnlineStore.DeviceLibrary
public XRay_Config Config; public XRay_Config Config;
private XRay xRay = new XRay("XRay"); private XRay xRay = null;
private CountImage countImage = null;
private CarerayImage carerayImage = null;
private bool xRayCanStart = false; private bool xRayCanStart = false;
public string LastXRayState = ""; public string LastXRayState = "";
public bool InXWork = false;
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;
this.Config = config; this.Config = config;
baseConfig = config; baseConfig = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = (" " + "XRay" + " ").ToUpper(); Name = (" " + "XRay" + "_Equip ");
xRay.WarmUp += XRay_WarmUp;
Init(); Init();
ledProcessTimer.Elapsed += LedProcess; ledProcessTimer.Elapsed += LedProcess;
IoCheckTimer.Elapsed += IoCheckTimerProcess; IoCheckTimer.Elapsed += IoCheckTimerProcess;
MoveInfo = new RobotMoveInfo(Name); MoveInfo = new RobotMoveInfo(Name);
SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove"); SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove");
XRayLoad();
}
private void XRayLoad()
{
try
{
xRay = new XRay("XRay");
string lastData = ConfigAppSettings.GetValue(Setting_Init.XRay_Data);
bool xresult = xRay.Open(Config.XRay_Port, lastData);
if (!xresult)
{
LogUtil.info(Name + "第一次 xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult+", 再打开一次 ");
xresult = xRay.Open(Config.XRay_Port, lastData);
}
LogUtil.info(Name + "xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult);
xRay.WarmUp += XRay_WarmUp;
carerayImage = new CarerayImage("XRay");
bool cResult = carerayImage.Open();
LogUtil.info(Name + "carerayImage.Open()=" + cResult);
countImage = new CountImage("XRay");
string path1 = Application.StartupPath + @"\XRAY\tif";
string path2 = Application.StartupPath + @"\XRAY\png";
string path3 = Application.StartupPath + @"\XRAY\out";
countImage.SetDirectory(path1, path2, path3);
LogUtil.info(Name + "SetDirectory: path1【" + path1 + "】path2【" + path2 + "】path3【" + path3 + "】" + cResult);
}
catch (Exception ex)
{
LogUtil.error("XRayLoad 出错:" + ex.ToString());
}
}
public void XRayDispose()
{
try
{
xRay.Close();
carerayImage.Close();
}
catch (Exception ex)
{
LogUtil.error("XRayDispose 出错:" + ex.ToString());
}
} }
private void XRay_WarmUp(bool state, string text) private void XRay_WarmUp(bool state, string text)
{ {
LastXRayState =state+ ":" + text; LastXRayState = state + ":" + text;
LogUtil.info(Name + "XRay_WarmUp [" + state + "] [" + text + "]"); LogUtil.info(Name + "XRay_WarmUp [" + state + "] [" + text + "]");
if (state) if (state)
{ {
xRay.SetVC(Config.XRay_Voltage, Config.XRay_Electricity);
LogUtil.info(Name + "收到state= [" + state + "],设置电流 [" + Config.XRay_Electricity + "]电压[" + Config.XRay_Voltage + "]");
xRayCanStart = true; xRayCanStart = true;
} }
} }
...@@ -88,7 +140,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
isNoAirCheck = false; isNoAirCheck = false;
isInPro = false; isInPro = false;
MoveInfo.NextMoveStep(StepEnum.XR01_CloseXLock); MoveInfo.NextMoveStep(StepEnum.XR01_CloseXLock);
WorkLog( "XRay复位 :关闭X光"); WorkLog( "XRay复位 :关闭X光互锁信号");
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW); IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
} }
...@@ -164,16 +216,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -164,16 +216,22 @@ namespace OnlineStore.DeviceLibrary
{ {
SecMoveInfo.EndMove(); SecMoveInfo.EndMove();
MoveInfo.EndMove(); MoveInfo.EndMove();
InXWork = false;
if (xRay.IsRayOpen)
{
xRay.Stop();
}
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW); IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
IOMove(IO_Type.X_InLine_Run, IO_VALUE.LOW); IOMove(IO_Type.X_InLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_MLine_Run, IO_VALUE.LOW); IOMove(IO_Type.X_MLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_InDoor_Up, IO_VALUE.LOW); IOMove(IO_Type.X_OLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_InDoor_Down, IO_VALUE.LOW); //IOMove(IO_Type.X_InDoor_Up, IO_VALUE.LOW);
IOMove(IO_Type.X_OutDoor_Up, IO_VALUE.LOW); //IOMove(IO_Type.X_InDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.X_OutDoor_Down, IO_VALUE.LOW); //IOMove(IO_Type.X_OutDoor_Up, IO_VALUE.LOW);
IOMove(IO_Type.X_StopCylinder_Up, IO_VALUE.LOW); //IOMove(IO_Type.X_OutDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.X_StopCylinder_Down, IO_VALUE.LOW); //IOMove(IO_Type.X_StopCylinder_Up, IO_VALUE.LOW);
//IOMove(IO_Type.X_StopCylinder_Down, IO_VALUE.LOW);
} }
...@@ -214,6 +272,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,6 +272,11 @@ namespace OnlineStore.DeviceLibrary
if (!LockOnCanMove()) if (!LockOnCanMove())
{ {
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW); IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
if (xRay.IsRayOpen)
{
LogUtil.error("LockOnProcess 需要关闭 X_Lock_On,发现 xRay.IsRayOpen,调用 xRay.Close");
xRay.Close();
}
} }
} }
else else
......
...@@ -4,17 +4,22 @@ using OnlineStore.LoadCSVLibrary; ...@@ -4,17 +4,22 @@ using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Timers; using System.Timers;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
partial class X_RAY_Equip partial class X_RAY_Equip
{ {
public delegate void GetImage(Bitmap bitmap);
public event GetImage GetImageEvent;
#region Label #region Label
public override bool StartLabelling(WorkParam param) public override bool StartLabelling(WorkParam param)
{ {
...@@ -41,13 +46,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -41,13 +46,12 @@ namespace OnlineStore.DeviceLibrary
//出口有料 //出口有料
if (IOValue(IO_Type.X_ReelCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.X_ReelCheck).Equals(IO_VALUE.HIGH))
{ {
runStatus = RobotRunStatus.Busy;
MoveInfo.NewMove(RobotMoveType.Working); MoveInfo.NewMove(RobotMoveType.Working);
MoveInfo.MoveParam.SetReelInfo(Work_ReelInfo); MoveInfo.MoveParam.SetReelInfo(Work_ReelInfo);
if (Work_ReelInfo.WareCount <= 0) if (Work_ReelInfo.WareCount <= 0)
{ {
runStatus = RobotRunStatus.Busy;
MoveInfo.NewMove(RobotMoveType.Working);
MoveInfo.MoveParam.SetReelInfo(Work_ReelInfo);
MoveInfo.NextMoveStep(StepEnum.XW06_WaitTime); MoveInfo.NextMoveStep(StepEnum.XW06_WaitTime);
WorkLog("扫描区有料["+Work_ReelInfo.ToStr()+"],还未进行点料,开始处理"); WorkLog("扫描区有料["+Work_ReelInfo.ToStr()+"],还未进行点料,开始处理");
//IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH); //IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
...@@ -57,9 +61,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -57,9 +61,6 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
runStatus = RobotRunStatus.Busy;
MoveInfo.NewMove(RobotMoveType.Working);
MoveInfo.MoveParam.SetReelInfo(Work_ReelInfo);
MoveInfo.NextMoveStep(StepEnum.XW21_WaitOutNoReel); MoveInfo.NextMoveStep(StepEnum.XW21_WaitOutNoReel);
WorkLog("扫描区有料[" + Work_ReelInfo.ToStr() + "],点料已完成,准备放出料盘"); WorkLog("扫描区有料[" + Work_ReelInfo.ToStr() + "],点料已完成,准备放出料盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Out_TrayCheck, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Out_TrayCheck, IO_VALUE.LOW));
...@@ -137,11 +138,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,11 +138,25 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.XW07_InLineStop)) else if (MoveInfo.IsStep(StepEnum.XW07_InLineStop))
{ {
if(Work_ReelInfo.PlateH<=0||String.IsNullOrEmpty(Work_ReelInfo.WareCode))
{
Work_ReelInfo.IsNgReel = true;
MoveInfo.MoveParam.SetReelInfo(In_ReelInfo);
}
//判断是否需要点料
if (Work_ReelInfo.IsNgReel)
{
MoveInfo.NextMoveStep(StepEnum.XW21_WaitOutNoReel);
WorkLog("扫描区NG料 [" + Work_ReelInfo.ToStr() + "],直接放行料盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Out_TrayCheck, IO_VALUE.LOW));
}
else
{
MoveInfo.NextMoveStep(StepEnum.XW08_DoorClose); MoveInfo.NextMoveStep(StepEnum.XW08_DoorClose);
WorkLog("料盘处理:左侧门关闭,右侧门关闭,准备开始点料"); WorkLog("料盘处理:左侧门关闭,右侧门关闭,准备开始点料");
CylinderMove(MoveInfo, IO_Type.X_InDoor_Down, IO_Type.X_InDoor_Up); CylinderMove(MoveInfo, IO_Type.X_InDoor_Down, IO_Type.X_InDoor_Up);
CylinderMove(MoveInfo, IO_Type.X_OutDoor_Down, IO_Type.X_OutDoor_Up); CylinderMove(MoveInfo, IO_Type.X_OutDoor_Down, IO_Type.X_OutDoor_Up);
}
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Down, IO_VALUE.HIGH)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Down, IO_VALUE.HIGH));
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Up, IO_VALUE.HIGH)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Up, IO_VALUE.HIGH));
} }
...@@ -151,22 +166,81 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,22 +166,81 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.XW08_DoorClose)) else if (MoveInfo.IsStep(StepEnum.XW08_DoorClose))
{ {
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(StepEnum.XW11_StartCount); MoveInfo.NextMoveStep(StepEnum.XW11_StartCount);
WorkLog("料盘处理:开始点料"); WorkLog("料盘处理:开始点料,等待X射线可以启动");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InXWork = true;
}
else if (MoveInfo.IsTimeOut(120))
{
WarnMsg = MoveInfo.Name +"["+MoveInfo.MoveStep+"]"+ "等待 X互锁信号打开 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut);
}
} }
else if (MoveInfo.IsStep(StepEnum.XW11_StartCount)) else if (MoveInfo.IsStep(StepEnum.XW11_StartCount))
{ {
MoveInfo.NextMoveStep(StepEnum.XW12_EndCount); if (xRayCanStart)
{
MoveInfo.NextMoveStep(StepEnum.XW12_XRayStart);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
bool result = xRay.Start();
WorkLog("料盘处理:启动X射线["+result+"],等待1秒");
}
else if (MoveInfo.IsTimeOut(120))
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待 可以打开X射线 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut);
}
}
else if (MoveInfo.IsStep(StepEnum.XW12_XRayStart))
{
MoveInfo.NextMoveStep(StepEnum.XW13_GetXRayImage);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(8000));
WorkLog("点料:开始获取X射线图形 ");
string lastData = DateTime.Now.ToString("yyyy-MM-dd");
ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
carerayImage.GetImage();
carerayImage.WindowWidth = Config.WindowWidth;
carerayImage.WindowLevel = Config.WindowLevel;
Bitmap bmp = carerayImage.Get48bImage();
string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("HHmmss") + ".png";
bmp.Save(fileP, System.Drawing.Imaging.ImageFormat.Png);
WorkLog("点料:获取X射线图形,并保存到: " + fileP + ",记录时间"+ lastData + ",停止X射线");
GetImageEvent?.Invoke(bmp);
bool result = xRay.Stop();
if (!result)
{
LogUtil.error(" xRay.Stop()失败:" + result);
}
MoveInfo.EndStepWait();
}
else if (MoveInfo.IsStep(StepEnum.XW13_GetXRayImage))
{
MoveInfo.NextMoveStep(StepEnum.XW15_GetResult);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (xRay.IsRayOpen)
{
xRay.Stop();
}
int count = 99999;
countImage.GetCount(out count);
InXWork = false;
WorkLog("点料:获取点料结果,【" + count + "】,保存并上传结果");
if (Work_ReelInfo.WareCount <= 0) if (Work_ReelInfo.WareCount <= 0)
{ {
MoveInfo.MoveParam.WareCount = 99999; MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = 99999; Work_ReelInfo.WareCount = count;
} }
WorkLog("料盘处理:点料结束,关闭X关机互锁信号,上传点料结果");
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 = "暂不上传"; string msg = "暂不上传";
// string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount); // string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount);
if (!String.IsNullOrEmpty(msg)) if (!String.IsNullOrEmpty(msg))
...@@ -175,8 +249,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -175,8 +249,14 @@ namespace OnlineStore.DeviceLibrary
} }
}); });
} }
else if (MoveInfo.IsStep(StepEnum.XW15_GetResult))
{
MoveInfo.NextMoveStep(StepEnum.XW16_EndCount);
WorkLog("料盘处理:点料结束,关闭X关机互锁信号");
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
}
#endregion #endregion
else if (MoveInfo.IsStep(StepEnum.XW12_EndCount)) else if (MoveInfo.IsStep(StepEnum.XW16_EndCount))
{ {
MoveInfo.NextMoveStep(StepEnum.XW21_WaitOutNoReel); MoveInfo.NextMoveStep(StepEnum.XW21_WaitOutNoReel);
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
...@@ -210,7 +290,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -210,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StepEnum.XW25_WaitTime); MoveInfo.NextMoveStep(StepEnum.XW25_WaitTime);
Out_ReelInfo = Work_ReelInfo.GetReelInfo(); Out_ReelInfo = Work_ReelInfo.GetReelInfo();
Work_ReelInfo = new ReelInfo(); Work_ReelInfo = new ReelInfo();
WorkLog("料盘处理:清空 Work_ReelInfo,更新Out_ReelInfo【"+ Out_ReelInfo .ToStr()+ "】 再转动3秒"); WorkLog("料盘处理:清空 Work_ReelInfo,更新Out_ReelInfo【" + Out_ReelInfo.ToStr() + "】 再转动3秒");
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);
......
...@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 入料模块复位: /// 入料模块复位:
/// </summary> /// </summary>
IBR01_LocationDown= 1501, IBR01_LocationDown = 1501,
/// <summary> /// <summary>
/// 入料模块复位:若前段末端信号不一致,转动链条3秒 /// 入料模块复位:若前段末端信号不一致,转动链条3秒
/// </summary> /// </summary>
...@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// XRay复位: 左侧们打开,右侧门打开,挡停不动作 /// XRay复位: 左侧们打开,右侧门打开,挡停不动作
/// </summary> /// </summary>
XR02_DoorOpen , XR02_DoorOpen,
/// <summary> /// <summary>
/// XRay复位: 皮带转动3秒 /// XRay复位: 皮带转动3秒
/// </summary> /// </summary>
...@@ -358,13 +358,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -358,13 +358,31 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// XRay点料:开始点料 /// XRay点料:开始点料,等待可以打开X射线
/// </summary> /// </summary>
XW11_StartCount, XW11_StartCount,
/// <summary> /// <summary>
/// XRay点料:StartX射线
/// </summary>
XW12_XRayStart,
/// <summary>
/// XRay点料:获取X射线 图片
/// </summary>
XW13_GetXRayImage,
/// <summary>
/// XRay点料:StopX射线
/// </summary>
XW14_XRayStop,
/// <summary>
/// XRay点料:获取点料结果
/// </summary>
XW15_GetResult,
/// <summary>
/// XRay点料:点料结束 /// XRay点料:点料结束
/// </summary> /// </summary>
XW12_EndCount, XW16_EndCount,
...@@ -680,15 +698,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -680,15 +698,19 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 贴标: Z轴到P1点 /// 贴标: Z轴到P1点
/// </summary> /// </summary>
OL10_ZToP1, OL09_ZToP1,
/// <summary> /// <summary>
/// 贴标: 等待取料机构返回待机点并且空闲 /// 贴标: 等待取料机构返回待机点并且空闲
/// </summary> /// </summary>
OL11_WaitCanLabel, OL10_WaitCanLabel,
/// <summary> /// <summary>
/// 贴标: XY轴移动到P3点 /// 贴标: XY轴移动到P3点
/// </summary> /// </summary>
OL12_XYToP3, OL11_XYToP3,
/// <summary>
/// 贴标: Z轴先走到旋转点P4
/// </summary>
OL12_ZToP4,
/// <summary> /// <summary>
/// 贴标: R轴到P3点 /// 贴标: R轴到P3点
......
...@@ -117,7 +117,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -117,7 +117,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
if (DIList.ContainsKey(io.ProName)) if (DIList.ContainsKey(io.ProName))
{ {
LogUtil.error("配置DI:[" + io.ToString() + "] ProName重复 "); LogUtil.debug("配置DI:[" + io.ToString() + "] ProName重复 ");
} }
else else
{ {
...@@ -131,7 +131,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -131,7 +131,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
if (SubDIList[io.SubType].ContainsKey(io.ProName)) if (SubDIList[io.SubType].ContainsKey(io.ProName))
{ {
LogUtil.error("配置DI:[" + io.ToString() + "] ProName重复 "); LogUtil.debug("配置DI:[" + io.ToString() + "] ProName重复 ");
} }
else else
{ {
...@@ -153,7 +153,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -153,7 +153,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
if (DOList.ContainsKey(io.ProName)) if (DOList.ContainsKey(io.ProName))
{ {
LogUtil.error("配置DO:[" + io.ToString() + "] ProName重复 "); LogUtil.debug("配置DO:[" + io.ToString() + "] ProName重复 ");
} }
else else
{ {
...@@ -166,7 +166,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -166,7 +166,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
if (SubDOList[io.SubType].ContainsKey(io.ProName)) if (SubDOList[io.SubType].ContainsKey(io.ProName))
{ {
LogUtil.error("配置DO:[" + io.ToString() + "] ProName重复 "); LogUtil.debug("配置DO:[" + io.ToString() + "] ProName重复 ");
} }
else else
{ {
......
...@@ -273,6 +273,16 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -273,6 +273,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("LabelR_P3Speed")] [ConfigProAttribute("LabelR_P3Speed")]
public int LabelR_P3Speed { get; set; } public int LabelR_P3Speed { get; set; }
/// <summary>
/// PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
/// </summary>
[ConfigProAttribute("LabelZ_P4")]
public int LabelZ_P4 { get; set; }
/// <summary>
/// PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
/// </summary>
[ConfigProAttribute("LabelZ_P4Speed")]
public int LabelZ_P4Speed { get; set; }
private static string UpdateP(Dictionary<int, int> pMap, int key, int value) private static string UpdateP(Dictionary<int, int> pMap, int key, int value)
{ {
......
...@@ -43,5 +43,16 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -43,5 +43,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("XRay_Voltage")] [ConfigProAttribute("XRay_Voltage")]
public string XRay_Voltage { get; set; } public string XRay_Voltage { get; set; }
/// <summary>
/// PRO,0,XRay图片窗宽,WindowWidth,567,,,,,
/// </summary>
[ConfigProAttribute("WindowWidth")]
public int WindowWidth { get; set; }
/// <summary>
/// PRO,0,XRay图片窗位,WindowLevel,567,,,,,
/// </summary>
[ConfigProAttribute("WindowLevel")]
public int WindowLevel { get; set; }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!