Commit 19f200a8 刘韬

1

1 个父辈 a41ebcbe
......@@ -57,6 +57,8 @@ namespace OnlineStore.Common
public static MyConfig<bool> Device_Disable_INOUT_FixtureCheck = false;
[MyConfigComment("出库时料串检测料盘高度")]
public static MyConfig<bool> Device_OutStoreStringReelCheck = false;
[MyConfigComment("屏蔽取料后自动提升")]
public static MyConfig<bool> Device_Disable_AutoLifTingAfterTakeReel = true;
......
......@@ -288,6 +288,7 @@ namespace OnlineStore.Common
public static string doit = "doit";
public static string enable = "enable";
public static string hide = "hide";
public static string disable = "disable";
public static string queueTaskCount="queueTaskCount";
......
......@@ -13,6 +13,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
public class HIKCamera
{
......
......@@ -288,13 +288,19 @@ namespace DeviceLibrary
}
}));
Task.Delay(ii * 700).Wait();
Task.Delay(500).Wait();
}
while (!cameraTask[0].IsCompleted || !cameraTask[1].IsCompleted)
bool isfinish = false;
while (!isfinish)
{
Application.DoEvents();
Thread.Sleep(100);
isfinish = true;
for (int i = 0; i < cameraTask.Count(); i++) {
if (!cameraTask[i].IsCompleted) {
isfinish = false;
Application.DoEvents();
Thread.Sleep(100);
}
}
}
}
catch (AccessViolationException e)
......
......@@ -416,10 +416,14 @@ namespace DeviceLibrary
//map.Add(ParamDefine.doorStatus, "料串门关闭");
map[ParamDefine.openLock] = ParamDefine.enable;
}
if (!Setting_Init.Device_Allow_SingleIn)
map[ParamDefine.singleReelIn] = ParamDefine.hide;
else
if (Setting_Init.Device_Allow_SingleIn && IOManager.IOValue(IO_Type.NGDoor_Close).Equals(IO_VALUE.HIGH))
{
map[ParamDefine.singleReelIn] = ParamDefine.enable;
}
if (IOManager.IOValue(IO_Type.BatchDoor_Close).Equals(IO_VALUE.LOW)
&& IOManager.IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH))
{
......
......@@ -203,7 +203,8 @@ namespace DeviceLibrary
if (!ignoreFixtureCheck && !IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
Msg.add(crc.GetString(L.out_store_not_detect_material, "出库时料叉X23没有检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查");
MoveInfo.log($"出库时料叉X23没有检测到有物料无法继续,请检查.");
//RobotManage.UserPause("出库时料叉X23没有检测到有物料无法继续,请检查");
}
else
{
......
......@@ -17,6 +17,7 @@ namespace DeviceLibrary
{
public static bool IsNeedIgnoreFixtureCheck(string code)
{
return Setting_Init.Device_Disable_INOUT_FixtureCheck;
if (Setting_Init.Device_Disable_INOUT_FixtureCheck) {
return true;
}
......
......@@ -14,16 +14,36 @@ namespace DeviceLibrary
{
partial class MainMachine
{
bool MaterialDoorOpen = false;
void ioMonitor()
{
if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW)) {
Msg.add(crc.GetString(L.not_detect_airpressure, "未检测到气压信号."), MsgLevel.warning);
}
if ((StringState >= StringStateE.OutStore) && IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.LOW)) {
if ((StringState >= StringStateE.OutStore) && IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.LOW))
{
MaterialDoorOpen = true;
StringState = StringStateE.None;
}
else if (IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH) && StringMoveInfo.MoveStep == MoveStep.Wait)
{
if (!Setting_Init.Device_Disable_AutoLifTingAfterTakeReel)
StringMoveInfo.NextMoveStep(MoveStep.StringDown);
MaterialDoorOpen = false;
}
if (!Setting_Init.Device_Disable_AutoLifTingAfterTakeReel)
{
if (MaterialDoorOpen && StringMoveInfo.MoveStep == MoveStep.Wait && IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.LOW))
{
if (IOValue(IO_Type.OutCheck).Equals(IO_VALUE.LOW) && !Batch_Axis.IsBusy && !Batch_Axis.IsInPosition(Config.Batch_P2))
{
Batch_Axis.AbsMove(null, Config.Batch_P2, Config.Batch_P1_speed);
//开始检测信号
Batch_Axis.BatchAxisStartCheck(IO_Type.OutCheck, IO_VALUE.HIGH);
}
}
}
airprocess();
}
public double Current_Humidity = 0;
......
......@@ -600,8 +600,8 @@ namespace DeviceLibrary
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ButtenEvent?.Invoke(null, ErrInfo.SuddenStop);
}
LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
ok = false;
}
}
......
......@@ -69,9 +69,11 @@ namespace DeviceLibrary
}
if (StringMoveInfo.MoveStep == MoveStep.Wait)
{
StringMoveInfo.log($"升起待机料串");
StringMoveInfo.log($"升起待机料串1");
StringState = StringStateE.OutStore;
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_03);
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04);
BatchAxisToP2(StringMoveInfo,true);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("料串正在上升", MsgLevel.warning));
newreel = true;
return true;
}
......@@ -133,6 +135,11 @@ namespace DeviceLibrary
StringMoveInfo.log($"有料盘在出库, 强制转为出库料串");
}
break;
case MoveStep.StringDown:
StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"批量轴到待机点");
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
break;
case MoveStep.StringLoad_01:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_01a);
StringMoveInfo.log($"批量轴到待机点");
......@@ -160,7 +167,7 @@ namespace DeviceLibrary
if (tpos1 < 0)
tpos1 = 0;
Batch_Axis.AbsMove(StringMoveInfo, tpos1, Config.Batch_P1_speed);
StringMoveInfo.log($"批量轴下降1cm");
StringMoveInfo.log($"批量轴下降1cm: {Batch_Axis.GetAclPosition()}-{Config.Batch_PoToMM}*10="+ tpos1);
break;
case MoveStep.StringLoad_03:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04);
......@@ -332,7 +339,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
downCheck2 = true;
}
else if (tpos > Config.Batch_P1)
else if (tpos > Config.Batch_P1 + Config.Batch_PoToMM * 12)
{
StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut);
StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}cm");
......@@ -358,7 +365,7 @@ namespace DeviceLibrary
case MoveStep.StringReelPut_02:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_05);
StringMoveInfo.log($"批量轴到顶部检测点");
BatchAxisToP2(StringMoveInfo);
BatchAxisToP2(StringMoveInfo,true);
break;
case MoveStep.StringReelPut_03:
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_04);
......@@ -458,7 +465,7 @@ namespace DeviceLibrary
{
targetSpeed = Config.Batch_P1_speed;
}
moveInfo.log("BatchAxisToP2 目标P2: " + targetP2);
moveInfo.log("BatchAxisToP2 目标P2: " + targetP2+",speed:"+targetSpeed);
moveInfo.TimeOutSeconds = 200;
moveInfo.CanWhileCount = 0;
// 需要增加定时器,获取验证信号并停止伺服
......
......@@ -31,7 +31,8 @@ namespace DeviceLibrary
H16_HomeReset,
HEND_HomeReset,
StringDown,
StringLoad_01,
StringLoad_01a,
StringLoad_02,
......@@ -150,6 +151,7 @@ namespace DeviceLibrary
StoreFIX03,
StoreFIX04,
StoreFIX05,
StoreFIX06,
StoreTS10,
StoreTS11,
StoreTS12,
......
......@@ -953,6 +953,7 @@
this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(699, 402);
this.Load += new System.EventHandler(this.AxisMoveControl_Load);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox2.ResumeLayout(false);
......
......@@ -28,7 +28,8 @@ namespace DeviceLibrary
InitializeComponent();
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = Setting_Init.Device_Default_Language;
if (!string.IsNullOrEmpty(Setting_Init.Device_Default_Language))
crc.CurrLanguage = Setting_Init.Device_Default_Language;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......@@ -444,5 +445,9 @@ namespace DeviceLibrary
lbl.BackColor = this.BackColor;
}
}
private void AxisMoveControl_Load(object sender, EventArgs e)
{
}
}
}
......@@ -56,7 +56,6 @@ namespace TheMachine
//
// configControl1
//
this.configControl1.Config = null;
this.configControl1.Location = new System.Drawing.Point(568, 3);
this.configControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.configControl1.Name = "configControl1";
......

namespace TheMachine
{
partial class UserControl1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file

namespace TheMachine
{
partial class UserControl2
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// UserControl2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "UserControl2";
this.Size = new System.Drawing.Size(699, 398);
this.ResumeLayout(false);
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class UserControl2 : UserControl
{
public UserControl2()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!