Commit e6920f6a 张东亮

更改自动出入库测试功能(以4个料盘进行,上下有料)

1 个父辈 2470f161
......@@ -70,6 +70,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="FormManager.cs" />
<Compile Include="FrmInOutStore.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmInOutStore.Designer.cs">
<DependentUpon>FrmInOutStore.cs</DependentUpon>
</Compile>
<Compile Include="FrmLanguare.cs">
<SubType>Form</SubType>
</Compile>
......@@ -128,6 +134,9 @@
<Compile Include="useControl\AxisMoveControl.Designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="FrmInOutStore.resx">
<DependentUpon>FrmInOutStore.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmLanguare.resx">
<DependentUpon>FrmLanguare.cs</DependentUpon>
</EmbeddedResource>
......
<?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>
<metadata name="mainTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -692,6 +692,20 @@ namespace OnlineStore.ACSingleStore
}
}
/// <summary>
/// 打开自动出入库测试
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnOpenAutoInOut_Click(object sender, EventArgs e)
{
FrmInOutStore frmInOutStore = new FrmInOutStore(store);
if(frmInOutStore.ShowDialog() == DialogResult.Yes)
{
frmInOutStore = null;
}
}
private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e)
{
button1_Click(null, null);
......@@ -1201,6 +1215,7 @@ namespace OnlineStore.ACSingleStore
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
}
}
......@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
public int autoPositionIndex = 0;
public string autoMsg = "";
public int AutoStartIndex = -1;
public bool IsInOutStoreAuto = false; //是否开启自动出入库
#endregion
#region 出入库参数
......@@ -498,7 +499,7 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus = StoreRunStatus.Runing;
//设备连接,入库后,BOX恢复原始状态
storeStatus = StoreStatus.StoreOnline;
InOutEndProcess(StoreMoveType.InStore);
//InOutEndProcess(StoreMoveType.InStore);
}
else
{
......@@ -733,10 +734,18 @@ namespace OnlineStore.DeviceLibrary
}
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_15_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
if(!IsInOutStoreAuto)
{
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
}
else
{
OutStoreLog("出库:SO_14_WaitTake 放置物品,最多等待" + "3秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
StoreMove.OneWaitCanEndStep = true;
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_15_WaitTake)
......@@ -748,7 +757,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + " 【" + posId + "】出库结束[" + FormUtil.GetSpanStr(span) + "]", storeMoveColor);
StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing;
InOutEndProcess(StoreMoveType.OutStore);
//InOutEndProcess(StoreMoveType.OutStore);
}
else
{
......@@ -830,6 +839,7 @@ namespace OnlineStore.DeviceLibrary
waitOutStoreList.Add(code);
}
}
private void InOutEndProcess(StoreMoveType storeMoveType)
{
try
......@@ -844,29 +854,29 @@ namespace OnlineStore.DeviceLibrary
if (storeMoveType.Equals(StoreMoveType.InStore))
{
// autoPositionIndex = newIndex;
string posid = PositionNumList[autoPositionIndex];
string posid = PositionNumList[autoPositionIndex];
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
//else if (CurrInOutCount >= Config.Box_ResetMCount)
//{
// LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
// //ResetMiddleAxis(false);
// autoMsg = "自动出库:" + posid;
// AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
//}
else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutStoreParam("", posid));
}
//判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount)
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false);
autoMsg = "自动出库:" + posid;
AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
}
//else if (CurrInOutCount >= Config.Box_ResetMCount)
//{
// LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
// //ResetMiddleAxis(false);
// autoMsg = "自动出库:" + posid;
// AddWaitOutInfo(new FixtureCodeInfo(0, "", posid));
//}
else
{
LogUtil.info(LOGGER, StoreName + "自动进入下一个出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutStoreParam("", posid));
}
//}
}
else if (storeMoveType.Equals(StoreMoveType.OutStore))
......@@ -886,7 +896,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,自动 出入库结束!");
}
}
if(autoNext)
if (autoNext)
{
autoPositionIndex = newIndex;
string posid = PositionNumList[autoPositionIndex];
......@@ -919,7 +929,6 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, ex.ToString());
}
}
private void InStoreLog(string msg)
{
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!