Commit 0bb9e1fc 顾剑亮
2 个父辈 afe304fc 5bc54092
正在显示 66 个修改的文件 包含 383 行增加170 行删除
<?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
......@@ -7,14 +7,14 @@
<!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="自动点料机" />
<add key="ServerAddr" value="http://10.85.17.233"/>
<add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" />
<add key="ConfigPath_XRay" value="\RobotConfig\Config_XRay.csv" />
<add key="ConfigPath_InputEquip" value="\RobotConfig\Config_InputEquip.csv" />
<add key="ConfigPath_OutputEquip" value="\RobotConfig\Config_OutputEquip.csv" />
<add key="ConfigPath_OutputEquip" value="\RobotConfig\Config_OutputEquip.csv" />
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="Data Matrix ECC 200#QR Code" />
<!--<add key="CodeType" value="Data Matrix ECC 200"/>-->
......@@ -22,7 +22,7 @@
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" />
<add key="Config_Pwd" value="123456" />
<add key="UseAIOBOX" value="1" />
<!--流水线监听端口-->
<add key="TCPServerPort" value="5246" />
......@@ -32,8 +32,8 @@
<add key="DIMS" value="60" />
<add key="DOMS" value="300" />
<add key="LineRunTest" value="1" />
<add key="DefaultPWD" value="123456" />
<add key="DefaultPWD" value="123456" />
<add key="Server_Log_Open" value="0" />
<add key="CodeCount" value="3" />
<add key="NeedScanCode" value="1" />
......@@ -50,7 +50,7 @@
<!--XRay射线最后一次使用时间-->
<add key ="XRay_Data" value =""/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/autoCount.log" />
......@@ -63,7 +63,7 @@
</layout>
</appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID-line.log" />
<file value="logs/TheRFID.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
......@@ -82,6 +82,7 @@
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<logger name="RollingLogFileAppender">
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
......@@ -94,6 +95,7 @@
<level value="Info" />
<appender-ref ref="XRay" />
</logger>
<!--<root>
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
......
......@@ -38,7 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -54,6 +54,9 @@
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
......@@ -230,6 +233,7 @@
<Content Include="AuToRunManager.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="resources\152827.png" />
<Content Include="resources\resources.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
......@@ -84,6 +84,7 @@ namespace OnlineStore.AutoCountClient
txtZP1.Text = equipBean.Config.LabelZ_P1.ToString();
txtZP2.Text = equipBean.Config.LabelZ_P2.ToString();
txtZP3.Text = equipBean.Config.LabelZ_P3.ToString();
txtZP4.Text = equipBean.Config.LabelZ_P4.ToString();
txtRP1.Text = equipBean.Config.LabelR_P1.ToString();
txtRP2.Text = equipBean.Config.LabelR_P2.ToString();
......@@ -571,9 +572,11 @@ namespace OnlineStore.AutoCountClient
int ZP1 = FormUtil.GetIntValue(txtZP1);
int ZP2 = FormUtil.GetIntValue(txtZP2);
int ZP3 = FormUtil.GetIntValue(txtZP3);
int ZP4 = FormUtil.GetIntValue(txtZP4);
equipBean.Config.LabelZ_P1 = ZP1;
equipBean.Config.LabelZ_P2 = ZP2;
equipBean.Config.LabelZ_P3 = ZP3;
equipBean.Config.LabelZ_P4 = ZP4;
int RP1 = FormUtil.GetIntValue(txtRP1);
int RP2 = FormUtil.GetIntValue(txtRP2);
......@@ -765,6 +768,11 @@ namespace OnlineStore.AutoCountClient
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
FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip);
AddForm(" " + robot.outputEquip.Name + " ", frm2);
robot.XrayBean.GetImageEvent += EquipBean_GetImageEvent;
}
private void AddForm(string text, Form form)
{
......@@ -77,6 +77,7 @@ namespace OnlineStore.AutoCountClient
}
private void FrmMain_Load(object sender, EventArgs e)
{
string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("HHmmss") + ".png";
FrmBase.GetVersion(true);
if (!RobotManager.Init())
{
......@@ -94,11 +95,23 @@ namespace OnlineStore.AutoCountClient
LoadListView();
LogUtil.logBox = this.logBox;
LoadOk = true;
// HideForm();
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()
{
......@@ -129,6 +142,7 @@ namespace OnlineStore.AutoCountClient
lvi.SubItems.Add(isDebug ? "✘" : "✔");
lvi.SubItems.Add(equip.alarmType.ToString());
lvi.SubItems.Add(equip.GetRunStr());
lvi.SubItems.Add("");
this.listView1.Items.Add(lvi);
}
......@@ -187,6 +201,7 @@ namespace OnlineStore.AutoCountClient
}
IOManager.instance.CloseAllConnection();
ACServerManager.CloseAllPort();
RobotManager.robot.XrayBean.XRayDispose();
if (Camera._cam != null)
{
Camera._cam.CloseAll();
......@@ -396,6 +411,7 @@ namespace OnlineStore.AutoCountClient
{
return;
}
lblXrayWork.Visible = robot.XrayBean.InXWork;
string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg = robot.WarnMsg;
......
......@@ -29,13 +29,13 @@
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = 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.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.lblMoveInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -65,7 +65,6 @@
this.txtSlaveId = new System.Windows.Forms.TextBox();
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.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout();
......@@ -205,7 +204,6 @@
this.groupBox6.Controls.Add(this.groupBox2);
this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(3, 3);
this.groupBox6.Name = "groupBox6";
......@@ -223,12 +221,22 @@
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.Size = new System.Drawing.Size(276, 149);
this.groupBox2.TabIndex = 282;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "X射线信息";
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
//
this.lblData.AutoSize = true;
......@@ -289,18 +297,6 @@
this.lblMoveInfo.TabIndex = 280;
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
//
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -310,7 +306,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(327, 41);
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.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -686,16 +682,6 @@
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -764,7 +750,6 @@
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInoutInfo;
private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.Button X_OutDoor_Down;
private System.Windows.Forms.Button X_OutDoor_Up;
......
......@@ -46,6 +46,7 @@ namespace OnlineStore.AutoCountClient
IsLoad = true;
}
private void LoadIOList()
{
int roleindex = 0;
......@@ -101,7 +102,7 @@ namespace OnlineStore.AutoCountClient
}
ReadIOList();
ReadBtnDO();
lblData.Text = equipBean.LastXRayState;
lblLastS.Text = equipBean.LastXRayState;
if (equipBean.runStatus > RobotRunStatus.Wait)
{
lblName.BackColor = Color.Green;
......
......@@ -58,6 +58,6 @@ namespace OnlineStore.AutoCountClient.Properties {
set {
resourceCulture = value;
}
}
}
}
}
......@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
......@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
......@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</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="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
......@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" 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="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
......@@ -109,9 +112,13 @@
<value>2.0</value>
</resheader>
<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 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>
<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>
\ No newline at end of file
......@@ -54,3 +54,18 @@ Stop
软件退出时调用Close
20200601
设备启动时提示急停未开:改为未初始化完成
添加点料模块代码。。
贴标时,Z轴需要下降到指定的位置之后才能旋转。
20200602
增加配置
PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
\ No newline at end of file
......@@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
......
......@@ -21,7 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>7.3</LangVersion>
......@@ -37,7 +37,13 @@
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.CarerayImage">
<HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
......@@ -54,6 +60,9 @@
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="CountImage">
<HintPath>..\..\dll\X-Ray\CountImage.dll</HintPath>
</Reference>
<Reference Include="DeviceLib">
<HintPath>..\..\dll\DeviceLib.dll</HintPath>
</Reference>
......@@ -130,6 +139,15 @@
<Content Include="Label\20200520172352.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</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>
<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,右入料线体相机名称,RightCamera,GigE:MV-CE200-10GC (00E02588199),,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
......@@ -21,16 +21,16 @@ PRO,0,提升轴P3速度,BatchAxis_P3Speed,1000,,,,,
PRO,0,提升轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,10446,,,,,
,,,,,,,,,
PRO,0,取料升降轴待机点P1,UpdownAxis_P1,72000,,,,,
PRO,0,取料升降轴取料点P2_左侧,UpdownAxis_P2_L,203000,,,,,
PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,202000,,,,,
PRO,0,取料升降轴取料点P2_左侧,UpdownAxis_P2_L,200000,,,,,
PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,199000,,,,,
PRO,0,取料升降轴XRay入库放料点P3,UpdownAxis_P3,327986,,,,,
PRO,0,取料升降轴工位放料点P4_高,UpdownAxis_P4_H,190969,,,,,
PRO,0,取料升降轴工位放料点P4_低,UpdownAxis_P4_L,515085,,,,,
,,,,,,,,,
PRO,0,取料升降轴P1速度,UpdownAxis_P1Speed,500,,,,,
PRO,0,取料升降轴P2速度,UpdownAxis_P2Speed,500,,,,,
PRO,0,取料升降轴P3速度,UpdownAxis_P3Speed,500,,,,,
PRO,0,取料升降轴P4/P5速度,UpdownAxis_P4Speed,500,,,,,
PRO,0,取料升降轴P1速度,UpdownAxis_P1Speed,1100,,,,,
PRO,0,取料升降轴P2速度,UpdownAxis_P2Speed,1100,,,,,
PRO,0,取料升降轴P3速度,UpdownAxis_P3Speed,1100,,,,,
PRO,0,取料升降轴P4/P5速度,UpdownAxis_P4Speed,1100,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,0,取料旋转轴待机点P1,MiddleAxis_P1,1000,,,,,
......@@ -39,10 +39,10 @@ PRO,0,取料旋转轴取料点P2_右侧 ,MiddleAxis_P2_R,156300,,,,,
PRO,0,取料旋转轴XRay入口放料点P3,MiddleAxis_P3,4224,,,,,
PRO,0,取料旋转轴工位放料点P4,MiddleAxis_P4,397734,,,,,
,,,,,,,,,
PRO,0,取料旋转轴P1速度,MiddleAxis_P1Speed,500,,,,,
PRO,0,取料旋转轴P2速度,MiddleAxis_P2Speed,500,,,,,
PRO,0,取料旋转轴P3速度,MiddleAxis_P3Speed,500,,,,,
PRO,0,取料旋转轴P4速度,MiddleAxis_P4Speed,500,,,,,
PRO,0,取料旋转轴P1速度,MiddleAxis_P1Speed,1300,,,,,
PRO,0,取料旋转轴P2速度,MiddleAxis_P2Speed,1300,,,,,
PRO,0,取料旋转轴P3速度,MiddleAxis_P3Speed,1300,,,,,
PRO,0,取料旋转轴P4速度,MiddleAxis_P4Speed,1300,,,,,
,,,,,,,,,
PRO,0,取料进出轴待机点P1,InoutAxis_P1,0,,,,,
PRO,0,取料进出轴取料点P2_左侧 ,InoutAxis_P2_L,118600,,,,,
......@@ -50,7 +50,7 @@ PRO,0,取料进出轴取料点P2_右侧 ,InoutAxis_P2_R,118000,,,,,
PRO,0,取料进出轴XRay入口放料点P3,InoutAxis_P3,118600,,,,,
PRO,0,取料进出轴工位放料点P4,InoutAxis_P4,116251,,,,,
,,,,,,,,,
PRO,0,取料进出轴P1速度,InoutAxis_P1Speed,500,,,,,
PRO,0,取料进出轴P2速度,InoutAxis_P2Speed,500,,,,,
PRO,0,取料进出轴P3速度,InoutAxis_P3Speed,500,,,,,
PRO,0,取料进出轴P4速度,InoutAxis_P4Speed,500,,,,,
PRO,0,取料进出轴P1速度,InoutAxis_P1Speed,1400,,,,,
PRO,0,取料进出轴P2速度,InoutAxis_P2Speed,1400,,,,,
PRO,0,取料进出轴P3速度,InoutAxis_P3Speed,1400,,,,,
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站号名称,AgvOutName,D2,,,,,
......@@ -12,43 +12,45 @@ PRO,0,出料提升轴缓慢上升目标位置P3,BatchAxisP3,5610528,,,,,
,,,,,,,,,
PRO,0,出料提升轴P1速度,BatchAxis_P1Speed,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,取料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轴-放料点-P3,MoveX_P3,77200,,,,,
PRO,0,取料X轴P1速度,MoveX_P1Speed,500,,,,,
PRO,0,取料X轴P2速度,MoveX_P2Speed,500,,,,,
PRO,0,取料X轴P3速度,MoveX_P3Speed,500,,,,,
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,77300,,,,,
PRO,0,取料X轴P1速度,MoveX_P1Speed,700,,,,,
PRO,0,取料X轴P2速度,MoveX_P2Speed,700,,,,,
PRO,0,取料X轴P3速度,MoveX_P3Speed,700,,,,,
,,,,,,,,,
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轴-放料点-P3集合,MoveZ_P3List,0=108750;8=109700;12=100000;16=99000;24=93000;32=89000;44=74000;56=63500,,,,,
PRO,0,取料Z轴P1速度,MoveZ_P1Speed,1500,,,,,
PRO,0,取料Z轴P2速度,MoveZ_P2Speed,1500,,,,,
PRO,0,取料Z轴P3速度,MoveZ_P3Speed,1500,,,,,
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=100000;8=109700;12=100000;16=99000;24=93000;32=89000;44=74000;56=63500,,,,,
PRO,0,取料Z轴P1速度,MoveZ_P1Speed,4000,,,,,
PRO,0,取料Z轴P2速度,MoveZ_P2Speed,4000,,,,,
PRO,0,取料Z轴P3速度,MoveZ_P3Speed,4000,,,,,
,,,,,,,,,
PRO,0,贴标机构X轴待机点-P1,LabelX_P1,2000,,,,,
PRO,0,贴标机构X轴取标签点P2,LabelX_P2,5751,,,,,
PRO,0,贴标机构X轴贴标点P3,LabelX_P3,533032,,,,,
PRO,0,贴标机构X轴P1速度,LabelX_P1Speed,1500,,,,,
PRO,0,贴标机构X轴P2速度,LabelX_P2Speed,1500,,,,,
PRO,0,贴标机构X轴P3速度,LabelX_P3Speed,1500,,,,,
PRO,0,贴标机构X轴P1速度,LabelX_P1Speed,3500,,,,,
PRO,0,贴标机构X轴P2速度,LabelX_P2Speed,3500,,,,,
PRO,0,贴标机构X轴P3速度,LabelX_P3Speed,3500,,,,,
,,,,,,,,,
PRO,0,贴标机构Y轴待机点-P1,LabelY_P1,2000,,,,,
PRO,0,贴标机构Y轴取标签点P2,LabelY_P2,123731,,,,,
PRO,0,贴标机构Y轴贴标点P3,LabelY_P3,4253,,,,,
PRO,0,贴标机构Y轴P1速度,LabelY_P1Speed,1500,,,,,
PRO,0,贴标机构Y轴P2速度,LabelY_P2Speed,1500,,,,,
PRO,0,贴标机构Y轴P3速度,LabelY_P3Speed,1500,,,,,
PRO,0,贴标机构Y轴P1速度,LabelY_P1Speed,4000,,,,,
PRO,0,贴标机构Y轴P2速度,LabelY_P2Speed,4000,,,,,
PRO,0,贴标机构Y轴P3速度,LabelY_P3Speed,4000,,,,,
,,,,,,,,,
PRO,0,贴标机构Z轴待机点-P1,LabelZ_P1,2000,,,,,
PRO,0,贴标机构Z轴取标签点P2,LabelZ_P2,35935,,,,,
PRO,0,贴标机构Z轴贴标点P3,LabelZ_P3,174174,,,,,
PRO,0,贴标机构Z轴P1速度,LabelZ_P1Speed,1500,,,,,
PRO,0,贴标机构Z轴P2速度,LabelZ_P2Speed,1500,,,,,
PRO,0,贴标机构Z轴P3速度,LabelZ_P3Speed,1500,,,,,
PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
PRO,0,贴标机构Z轴P1速度,LabelZ_P1Speed,4500,,,,,
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轴取标签点P2,LabelR_P2,0,,,,,
......
......@@ -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,,左轨道提升轴_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,,取料移栽机构X轴_SVD06,Move_X_Axis,6,COM4,,100,1500,1500,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,,贴标移栽机构X轴_SVD08,Label_X_Axis,8,COM4,,100,1000,1000,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,,贴标移栽机构Z轴_SVD10,Label_Z_Axis,10,COM4,,100,1000,1000,50,150,500,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,900,900,50,250,1000,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,900,900,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,,出料工位提升轴_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_Electricity,0.87,,,,,
PRO,0,XRay射线设置电压值,XRay_Voltage,567,,,,,
PRO,0,XRay射线设置电流值,XRay_Electricity,0500,,,,,
PRO,0,XRay射线设置电压值,XRay_Voltage,060.0,,,,,
PRO,0,XRay图片窗宽,WindowWidth,30000,,,,,
PRO,0,XRay图片窗位,WindowLevel,15000,,,,,
......@@ -14,7 +14,7 @@ namespace OnlineStore.DeviceLibrary
{
public string Name = "入料";
public AxisBean BatchAxis = null;
public int EquipType = 1;
public int EquipType = 1;//1=左侧,2=右侧
public RobotMoveInfo MoveInfo;
public string WarnMsg = "";
private string CameraName = "";
......
......@@ -442,6 +442,8 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 日志打印
private int WorkLogLevel = 1;
private int SecWorkLogLevel = 1;
protected void WorkLog(string msg)
{
string code = "";
......@@ -452,13 +454,26 @@ namespace OnlineStore.DeviceLibrary
code = "[" + MoveInfo.MoveParam.WareCode + "]";
}
}
LogUtil.info(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg);
if (WorkLogLevel.Equals(1))
{
LogUtil.info(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg);
}
else
{
LogUtil.debug(MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + msg);
}
}
protected void SecWorkLog(string msg)
{
LogUtil.info(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg);
if (SecWorkLogLevel.Equals(1))
{
LogUtil.info(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg);
}
else
{
LogUtil.debug(SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "] " + msg);
}
}
public virtual string GetMoveStr()
......
......@@ -177,13 +177,13 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StepEnum.IW10_SaveSize);
MoveInfo.MoveParam.PlateH = moveBean.LastHeight;
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))
{
WarnMsg =Name+ "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error( WarnMsg, MoveInfo.ErrorLogType);
WarnMsg = Name + "等待" + moveBean.Name + "测高结束超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut);
}
}
......@@ -198,6 +198,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam.TargetPosType = 1;
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())
{
Task task = Task.Factory.StartNew(delegate
......@@ -243,7 +248,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsTimeOut(120))
{
WarnMsg = Name + "等待" + MoveInfo.MoveParam.WareCode + "验证是否测值 超时[" + MoveInfo.TimeOutSeconds + "]秒";
LogUtil.error( WarnMsg,MoveInfo.ErrorLogType);
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut);
}
return;
......
......@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
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);
return false;
......@@ -89,7 +89,8 @@ namespace OnlineStore.DeviceLibrary
WorkLog(" 检测到XRay出口料盘[" + reelInfo.ToStr() + "],准备开始取料");
}
if (MoveInfo.MoveParam.PlateW <= 0 ||
MoveInfo.MoveParam.PlateH <= 0)
MoveInfo.MoveParam.PlateH <= 0 ||
String.IsNullOrEmpty(MoveInfo.MoveParam.WareCode))
{
MoveInfo.MoveParam.IsNgReel = true;
}
......@@ -157,7 +158,7 @@ namespace OnlineStore.DeviceLibrary
}
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);
Alarm(AlarmType.IoSingleTimeOut);
}
......@@ -221,7 +222,7 @@ namespace OnlineStore.DeviceLibrary
}
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);
Alarm(AlarmType.IoSingleTimeOut);
}
......@@ -238,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
}
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);
Alarm(AlarmType.IoSingleTimeOut);
}
......@@ -371,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
//{
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
SecWorkLog("贴标: 重置状态=Unknown,开始打印标签["+NeedPrint+"] ,贴标XYR轴到取标签点P2, 等待1s");
SecWorkLog("贴标: 重置状态=Unknown,开始打印标签[" + NeedPrint + "] ,贴标XYR轴到取标签点P2, 等待1s");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (NeedPrint)
{
......@@ -427,36 +428,27 @@ namespace OnlineStore.DeviceLibrary
SecMoveInfo.OneWaitCanEndStep = true;
}
else if (SecMoveInfo.IsStep(StepEnum.OL08_Nozzle_Work))
{
// SecMoveInfo.NextMoveStep(StepEnum.OL09_WaitGetLabel);
// 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);
{
SecMoveInfo.NextMoveStep(StepEnum.OL09_ZToP1);
SecWorkLog("贴标: Z轴到P1点");
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("贴标: 等待取料机构返回待机点并且空闲");
}
else if (SecMoveInfo.IsStep(StepEnum.OL11_WaitCanLabel))
else if (SecMoveInfo.IsStep(StepEnum.OL10_WaitCanLabel))
{
bool canLabel = MoveInfo.MoveType.Equals(RobotMoveType.None) ||
((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;
((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;
if (canLabel && ShelfMoveInfo.IsStep(StepEnum.OS_25_WaitLabel))
{
SecMoveInfo.NextMoveStep(StepEnum.OL12_XYToP3);
SecMoveInfo.NextMoveStep(StepEnum.OL11_XYToP3);
SecWorkLog("贴标: XY轴移动到P3点");
LabelXAxis.AbsMove(SecMoveInfo, Config.LabelX_P3, Config.LabelX_P3Speed);
......@@ -465,12 +457,18 @@ namespace OnlineStore.DeviceLibrary
}
else if (SecMoveInfo.IsTimeOut(120))
{
WarnMsg = SecMoveInfo.Name + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg,SecMoveInfo.ErrorLogType);
WarnMsg = SecMoveInfo.Name + "[" + SecMoveInfo.MoveStep + "]" + "等待 料盘可贴标(OS_25_WaitLabel) 超时[" + FormUtil.GetSpanStr(SecMoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
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);
SecWorkLog("贴标: R轴到P3点");
......
......@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
}
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);
Alarm(AlarmType.IoSingleTimeOut);
}
......
......@@ -67,6 +67,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(Name + "开始连接IO模块 ");
IOManager.instance.ConnectionIOList(ioList);
Thread.Sleep(3000);
mainTimer.Enabled = true;
canStart = true;
AgvClient.Init();
......
......@@ -8,6 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
......@@ -20,33 +21,84 @@ namespace OnlineStore.DeviceLibrary
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;
public string LastXRayState = "";
public bool InXWork = false;
public X_RAY_Equip(string cid, XRay_Config config)
{
this.DeviceID = config.Id;
this.Config = config;
baseConfig = config;
IsDebug = config.IsDebug.Equals(1);
Name = (" " + "XRay" + " ").ToUpper();
xRay.WarmUp += XRay_WarmUp;
Name = (" " + "XRay" + "_Equip ");
Init();
ledProcessTimer.Elapsed += LedProcess;
IoCheckTimer.Elapsed += IoCheckTimerProcess;
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)
{
LastXRayState =state+ ":" + text;
LastXRayState = state + ":" + text;
LogUtil.info(Name + "XRay_WarmUp [" + state + "] [" + text + "]");
if (state)
{
xRay.SetVC(Config.XRay_Voltage, Config.XRay_Electricity);
LogUtil.info(Name + "收到state= [" + state + "],设置电流 [" + Config.XRay_Electricity + "]电压[" + Config.XRay_Voltage + "]");
xRayCanStart = true;
}
}
}
public override bool StartRun()
......@@ -88,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
isNoAirCheck = false;
isInPro = false;
MoveInfo.NextMoveStep(StepEnum.XR01_CloseXLock);
WorkLog( "XRay复位 :关闭X光");
WorkLog( "XRay复位 :关闭X光互锁信号");
IOMove(IO_Type.X_Lock_On, IO_VALUE.LOW);
}
......@@ -164,16 +216,22 @@ namespace OnlineStore.DeviceLibrary
{
SecMoveInfo.EndMove();
MoveInfo.EndMove();
InXWork = false;
if (xRay.IsRayOpen)
{
xRay.Stop();
}
IOMove(IO_Type.X_Lock_On, 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_InDoor_Up, IO_VALUE.LOW);
IOMove(IO_Type.X_InDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.X_OutDoor_Up, IO_VALUE.LOW);
IOMove(IO_Type.X_OutDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.X_StopCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.X_StopCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.LOW);
//IOMove(IO_Type.X_InDoor_Up, IO_VALUE.LOW);
//IOMove(IO_Type.X_InDoor_Down, IO_VALUE.LOW);
//IOMove(IO_Type.X_OutDoor_Up, IO_VALUE.LOW);
//IOMove(IO_Type.X_OutDoor_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
if (!LockOnCanMove())
{
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
......
......@@ -43,17 +43,17 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
Busy = 4,
}
}
public enum StepEnum
{
/// <summary>
/// 无操作,等待状态
/// </summary>
Wait = 0,
#region 入料模块复位 1000 开始
/// <summary>
/// 入料模块复位: 准备开始复位
......@@ -93,7 +93,7 @@ namespace OnlineStore.DeviceLibrary
IR09_WaitBatchMove,
#endregion
#region 入料模块取料 1100 开始
/// <summary>
/// 入料模块取放料:进出轴回到待机点
......@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
/// 入料模块取放料:根据条码获取目标位置
/// </summary>
IW11_GetTargetPosition,
/// <summary>
/// 放料到XRay:开始放料盘到XRay门口,旋转轴到P3
......@@ -175,17 +175,17 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
IW33_InoutToP4,
/// <summary>
/// 放料:夹料气缸放松
/// </summary>
IW41_Clamping_Relax,
IW41_Clamping_Relax,
/// <summary>
/// 放料完成:进出轴返回P1
/// </summary>
IW42_InoutToP1,
IW42_InoutToP1,
/// <summary>
/// 放料完成:升降轴旋转轴返回P1
/// </summary>
......@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 入料模块复位:
/// </summary>
IBR01_LocationDown= 1501,
IBR01_LocationDown = 1501,
/// <summary>
/// 入料模块复位:若前段末端信号不一致,转动链条3秒
/// </summary>
......@@ -211,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
/// 入料模块复位:批量轴原点返回
/// </summary>
IBR03_BatchHome,
/// <summary>
/// 入料模块复位:等待100后再回待机点
/// </summary>
......@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// XRay复位: 左侧们打开,右侧门打开,挡停不动作
/// </summary>
XR02_DoorOpen ,
XR02_DoorOpen,
/// <summary>
/// XRay复位: 皮带转动3秒
/// </summary>
......@@ -358,13 +358,31 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// XRay点料:开始点料
/// XRay点料:开始点料,等待可以打开X射线
/// </summary>
XW11_StartCount,
/// <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点料:点料结束
/// </summary>
XW12_EndCount,
XW16_EndCount,
......@@ -482,7 +500,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 料串批量轴模块复位 3200开始
/// <summary>
/// 出料模块复位: 阻挡气缸上升
/// </summary>
......@@ -567,7 +585,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 取料: 取料完成,等待料串可放料
/// </summary>
OT11_WaitShelfOk,
OT11_WaitShelfOk,
/// <summary>
/// 取料: 料串可放料,取料X轴移动到P3,提升轴下降指定高度
/// </summary>
......@@ -601,7 +619,7 @@ namespace OnlineStore.DeviceLibrary
/// 取料: NG料,取料气缸放松
/// </summary>
OT23_NG_Clamping_Relax,
/// <summary>
/// 取料: 等待料盘到达NG位
/// </summary>
......@@ -680,15 +698,19 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 贴标: Z轴到P1点
/// </summary>
OL10_ZToP1,
OL09_ZToP1,
/// <summary>
/// 贴标: 等待取料机构返回待机点并且空闲
/// </summary>
OL11_WaitCanLabel,
OL10_WaitCanLabel,
/// <summary>
/// 贴标: XY轴移动到P3点
/// </summary>
OL12_XYToP3,
OL11_XYToP3,
/// <summary>
/// 贴标: Z轴先走到旋转点P4
/// </summary>
OL12_ZToP4,
/// <summary>
/// 贴标: R轴到P3点
......@@ -871,8 +893,8 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
public enum AlarmType
......
......@@ -117,7 +117,7 @@ namespace OnlineStore.LoadCSVLibrary
}
if (DIList.ContainsKey(io.ProName))
{
LogUtil.error("配置DI:[" + io.ToString() + "] ProName重复 ");
LogUtil.debug("配置DI:[" + io.ToString() + "] ProName重复 ");
}
else
{
......@@ -131,7 +131,7 @@ namespace OnlineStore.LoadCSVLibrary
}
if (SubDIList[io.SubType].ContainsKey(io.ProName))
{
LogUtil.error("配置DI:[" + io.ToString() + "] ProName重复 ");
LogUtil.debug("配置DI:[" + io.ToString() + "] ProName重复 ");
}
else
{
......@@ -153,7 +153,7 @@ namespace OnlineStore.LoadCSVLibrary
}
if (DOList.ContainsKey(io.ProName))
{
LogUtil.error("配置DO:[" + io.ToString() + "] ProName重复 ");
LogUtil.debug("配置DO:[" + io.ToString() + "] ProName重复 ");
}
else
{
......@@ -166,7 +166,7 @@ namespace OnlineStore.LoadCSVLibrary
}
if (SubDOList[io.SubType].ContainsKey(io.ProName))
{
LogUtil.error("配置DO:[" + io.ToString() + "] ProName重复 ");
LogUtil.debug("配置DO:[" + io.ToString() + "] ProName重复 ");
}
else
{
......
......@@ -273,6 +273,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("LabelR_P3Speed")]
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)
{
......
......@@ -43,5 +43,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("XRay_Voltage")]
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!