Commit d13b6b32 刘韬

1

1 个父辈 b444f6fa
...@@ -60,9 +60,10 @@ ...@@ -60,9 +60,10 @@
<add key="Tool_P6_Offset" value="6000" /> <add key="Tool_P6_Offset" value="6000" />
<add key="Tool_TargetSpeed" value="20" /> <add key="Tool_TargetSpeed" value="20" />
<add key="Tool_TargetPosition" value="6000" /> <add key="Tool_TargetPosition" value="6000" />
<add key ="CodeCount" value ="1"/> <add key="CodeCount" value="1" />
<add key="CodeRun" value="1" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/AutoStore1.log" /> <file value="logs/AutoStore1.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
...@@ -95,10 +96,10 @@ ...@@ -95,10 +96,10 @@
<level value="Info" /> <level value="Info" />
<appender-ref ref="AIOBOX" /> <appender-ref ref="AIOBOX" />
</logger> </logger>
<logger name="HIK.IPCamera" additivity="false"> <logger name="HIK.IPCamera" additivity="false">
<level value="All" /> <level value="All" />
<appender-ref ref="Camera" /> <appender-ref ref="Camera" />
</logger> </logger>
<root> <root>
<level value="INFO" /> <level value="INFO" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
...@@ -109,42 +110,13 @@ ...@@ -109,42 +110,13 @@
</startup> </startup>
<!-- 部署服务库项目时,必须将配置文件的内容添加到 <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。 --> 主机的 app.config 文件中。System.Configuration 不支持库的配置文件。 -->
<system.serviceModel> <runtime>
<services> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<service name="AcStoreWCF.CWSMDBox"> <dependentAssembly>
<endpoint address="" binding="basicHttpBinding" contract="AcStoreWCF.ICWSMDBox"> <assemblyIdentity name="log4net" culture="neutral" publicKeyToken="669e0ddf0bb1aa2a" Retargetable="Yes" />
<identity> <bindingRedirect oldVersion="0.0.0.0-9.9.9.0" newVersion="2.0.12.0" />
<dns value="localhost" /> </dependentAssembly>
</identity> </assemblyBinding>
</endpoint> </runtime>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/AcStoreWCF/CWSMDBox/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,
请在部署前将以下值设置为 false -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<!-- 要接收故障异常详细信息以进行调试,
请将以下值设置为 true。在部署前设置为 false
以避免泄漏异常信息 -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name= "log4net" culture= "neutral" publicKeyToken= "669e0ddf0bb1aa2a" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "0.0.0.0-9.9.9.0" newVersion= "2.0.12.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,21 @@ ...@@ -12,6 +12,21 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -37,6 +52,7 @@ ...@@ -37,6 +52,7 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>box.ico</ApplicationIcon> <ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="CodeLibrary, Version=1.0.7844.17688, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="CodeLibrary, Version=1.0.7844.17688, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
...@@ -50,8 +66,10 @@ ...@@ -50,8 +66,10 @@
<HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -131,7 +149,6 @@ ...@@ -131,7 +149,6 @@
<EmbeddedResource Include="Properties\Resource.en-US.resx"> <EmbeddedResource Include="Properties\Resource.en-US.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Properties\Resource.ge-DE.resx" />
<EmbeddedResource Include="Properties\Resource.ja-JP.resx"> <EmbeddedResource Include="Properties\Resource.ja-JP.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
...@@ -163,15 +180,6 @@ ...@@ -163,15 +180,6 @@
<EmbeddedResource Include="userControl\uc_boxdebug.resx"> <EmbeddedResource Include="userControl\uc_boxdebug.resx">
<DependentUpon>uc_boxdebug.cs</DependentUpon> <DependentUpon>uc_boxdebug.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config"> <None Include="App.config">
...@@ -246,6 +254,18 @@ ...@@ -246,6 +254,18 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -1224,4 +1224,7 @@ ...@@ -1224,4 +1224,7 @@
<data name="BatchFull" xml:space="preserve"> <data name="BatchFull" xml:space="preserve">
<value>The material tray is full, please take out the material</value> <value>The material tray is full, please take out the material</value>
</data> </data>
<data name="InStoreFailed_takereel" xml:space="preserve">
<value>Warehousing failed, please remove the tray</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1224,4 +1224,7 @@ ...@@ -1224,4 +1224,7 @@
<data name="BatchFull" xml:space="preserve"> <data name="BatchFull" xml:space="preserve">
<value>トレイがいっぱいになっていますので、材料を取り出してください</value> <value>トレイがいっぱいになっていますので、材料を取り出してください</value>
</data> </data>
<data name="InStoreFailed_takereel" xml:space="preserve">
<value>倉庫保管に失敗しました。トレイを取り外してください</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1223,4 +1223,7 @@ ...@@ -1223,4 +1223,7 @@
<data name="BatchOutFail_DoorNotLock" xml:space="preserve"> <data name="BatchOutFail_DoorNotLock" xml:space="preserve">
<value>批量出库失败,门锁未关闭</value> <value>批量出库失败,门锁未关闭</value>
</data> </data>
<data name="InStoreFailed_takereel" xml:space="preserve">
<value>入库失败,请取走料盘</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace OnlineStore.AutoInOutStore.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
...@@ -11,6 +11,7 @@ using System.Windows.Forms; ...@@ -11,6 +11,7 @@ using System.Windows.Forms;
using CodeLibrary; using CodeLibrary;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
...@@ -155,12 +156,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -155,12 +156,28 @@ namespace OnlineStore.DeviceLibrary
continue; continue;
} }
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
int retryTimes = 0;
retry:
LogUtil.info( " 【" + cameraName + "】开始取图片"); LogUtil.info( " 【" + cameraName + "】开始取图片");
HalconDotNet.HObject ho_Image = null; HalconDotNet.HObject ho_Image = null;
Bitmap bit=null; Bitmap bit=null;
try try
{ {
ho_Image = Camera._cam.CaptureOnImage(cameraName,out bit,true); ho_Image = Camera._cam.CaptureOnImage(cameraName,out bit,true);
if (bit == null)
{
retryTimes++;
LogUtil.error(" 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
CloseCamera(cameraName);
Thread.Sleep(100);
if (retryTimes > 2)
{
return new List<string>();
}
LogUtil.info(" 【" + cameraName + "】取图片失败,重试:" + retryTimes);
goto retry;
}
//if (ho_Image == null) //if (ho_Image == null)
//{ //{
// LogUtil.error( " 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机"); // LogUtil.error( " 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
......
...@@ -363,5 +363,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -363,5 +363,9 @@ namespace OnlineStore.DeviceLibrary
/// 批量轴已放满 /// 批量轴已放满
/// </summary> /// </summary>
public static string BatchFull= "BatchFull"; public static string BatchFull= "BatchFull";
/// <summary>
/// 入库失败,请取走料盘
/// </summary>
public static string InStoreFailed_takereel = "InStoreFailed_takereel";
} }
} }
...@@ -550,13 +550,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -550,13 +550,7 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep == StoreMoveStep.SI_11_DeviceToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_11_DeviceToBag)
{ {
InStoreLog("入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) "); InStoreLog("入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) ");
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = posId;
lastPosIdStatus = StoreStatus.InStoreEnd;
storeStatus = StoreStatus.InStoreEnd;
//手动发给服务器状态,防止没有手动
Task.Run(delegate { SendLineStatus(); });
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag); StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
...@@ -567,28 +561,97 @@ namespace OnlineStore.DeviceLibrary ...@@ -567,28 +561,97 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
{ {
InStoreLog("入库:SI_13 叉子从库位返回,进出轴至P1(待机点) "); InStoreLog("入库:SI_13 叉子从库位返回,进出轴至P1(待机点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack); StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
if (Config.IsUse_Tray_Check.Equals(1))
{
InStoreLog("入库:SI_13 进出轴到P1后,判断是否放下物料 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
}
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_13_InoutBack)
{ {
InStoreLog("入库:SI_14 返回待机点,轴2/轴1到P1,轴4到P3"); InStoreLog("入库:SI_14 返回待机点,轴2/轴1到P1,轴4到P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SI_14_CheckTray);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_14_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_14_CheckTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SI_16_sendstate);
if (Config.IsUse_Tray_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
if (false && AutomaticBaiting.StoreMove.MoveStep >= StoreMoveStep.AUTO_I09_WaitTrayLeave || AutomaticBaiting.StoreMove.MoveStep == StoreMoveStep.Wait)
{
InStoreLog("入库:SI_15 进出轴到P1后,发现仍有物料 打开NG门");
StoreMove.NextMoveStep(StoreMoveStep.SI_21_DeviceToDoor);
ACAxisMove(Config.Middle_Axis, Config.UpDownAxis_Door_P7, Config.MiddleAxis_P1_Speed);
SetWarnMsg(ResourceControl.InStoreFailed_takereel);
}
//StoreMove.NextMoveStep(StoreMoveStep.SI_15_CheckTray);
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
//IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SI_16_sendstate);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_CheckTray)
{
if (IOManager.IOValue(IO_Type.BatchDoor_Close).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.BatchDoor_Close2).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SI_17_GoBack);
InStoreLog("入库:SI_15 门已关, 取消入库:" + StoreMove.MoveParam.PositionNum);
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
StoreManager.cancelPutInTask(posId);
SetWarnMsg("");
}
else if (IOManager.IOValue(IO_Type.BatchDoor_Close).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.BatchDoor_Close2).Equals(IO_VALUE.HIGH))
{
InStoreLog("入库:SI_15 关门后,发现仍有物料,再次打开NG门");
StoreMove.NextMoveStep(StoreMoveStep.SI_15_CheckTray);
BatchDoorOpen(true);
}
else
{
SetWarnMsg(ResourceControl.InStoreFailed_takereel);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_16_sendstate)
{
StoreMove.NextMoveStep(StoreMoveStep.SI_17_GoBack);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = posId;
lastPosIdStatus = StoreStatus.InStoreEnd;
storeStatus = StoreStatus.InStoreEnd;
//手动发给服务器状态,防止没有手动
Task.Run(delegate { SendLineStatus(); });
InStoreLog("入库:SI_16 发送入库完成信息给服务器");
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_17_GoBack)
{ {
preProTime = DateTime.Now.AddSeconds(-5); preProTime = DateTime.Now.AddSeconds(-5);
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
LogUtil.info(LOGGER, " 【" + posId + "】 入库结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】!"); LogUtil.info(LOGGER, " 【" + posId + "】 入库结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】!");
StoreMove.EndMove(); StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
//设备连接,入库后,BOX恢复原始状态 //设备连接,入库后,BOX恢复原始状态
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
InOutEndProcess(posId,StoreMoveType.InStore); InOutEndProcess(posId, StoreMoveType.InStore);
} }
#region 送出料盘处理 #region 送出料盘处理
else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor) else if (StoreMove.MoveStep == StoreMoveStep.SI_21_DeviceToDoor)
...@@ -635,16 +698,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -635,16 +698,20 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{ {
InStoreLog("入库:取消入库:" + StoreMove.MoveParam.PositionNum);
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
StoreManager.cancelPutInTask(posId);
InStoreLog("送出料盘:SI_13 叉子从库位返回,进出轴到P1(待机点) "); InStoreLog("送出料盘:SI_13 叉子从库位返回,进出轴到P1(待机点) ");
CodeOrInoutMsg = ""; CodeOrInoutMsg = "";
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; //string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = ""; lastPosId = "";
lastPosIdStatus = StoreStatus.InStoreEnd; lastPosIdStatus = StoreStatus.InStoreEnd;
storeStatus = StoreStatus.InStoreEnd; storeStatus = StoreStatus.InStoreEnd;
StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack); StoreMove.NextMoveStep(StoreMoveStep.SI_13_InoutBack);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
CloseDoorAndWait(); CloseDoorAndWait();
SetWarnMsg("");
} }
} }
...@@ -654,7 +721,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -654,7 +721,42 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + " 入库,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!"); LogUtil.info(LOGGER, StoreName + " 入库,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!");
} }
} }
public void BatchDoorOpen(bool isWait)
{
//ClearInStoreInfo();
//ClearOutStoreInfo();
//DoorStatus = 1;
IOManager.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.HIGH);
if (isWait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Close, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Open, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Close2, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Open2, IO_VALUE.HIGH));
}
}
public bool BatchDoorClose(bool isWait)
{
if (!IOManager.IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH))
{
return false;
}
//ClearInStoreInfo();
//ClearOutStoreInfo();
//DoorStatus = 2;
if (isWait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Open, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Close, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Open2, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchDoor_Close2, IO_VALUE.HIGH));
}
IOManager.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.HIGH);
return true;
}
protected void SingleInStoreProcess() protected void SingleInStoreProcess()
{ {
LineMoveP moveP = StoreMove.MoveParam.MoveP; LineMoveP moveP = StoreMove.MoveParam.MoveP;
......
...@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary
if (valueList.Contains(item)) if (valueList.Contains(item))
{ {
LogUtil.error(LOGGER, type.Name + "枚举值:" + item + "重复存在,请检查代码!"); LogUtil.error(LOGGER, type.Name + "枚举值:" + item + "重复存在,请检查代码!");
Application.Exit(); throw new Exception(type.Name + "枚举值:" + item + "重复存在,请检查代码!");
break; break;
} }
valueList.Add(item); valueList.Add(item);
......
...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 压紧轴压紧后,升降轴稍微下降之后叉子再后退 /// 压紧轴压紧后,升降轴稍微下降之后叉子再后退
/// </summary> /// </summary>
SI_061_UpdownAxisDown = 215, SI_061_UpdownAxisDown = 218,
/// <summary> /// <summary>
/// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点) /// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
...@@ -365,7 +365,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,7 +365,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 拿到料盘后判断叉子料盘检测信号 /// 拿到料盘后判断叉子料盘检测信号
/// </summary> /// </summary>
SI_071_CheckFixture = 216, SI_071_CheckFixture = 219,
/// <summary> /// <summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤) /// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// </summary> /// </summary>
...@@ -390,10 +390,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -390,10 +390,13 @@ namespace OnlineStore.DeviceLibrary
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点) /// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary> /// </summary>
SI_13_InoutBack = 213, SI_13_InoutBack = 213,
SI_14_CheckTray = 214,
SI_15_CheckTray = 215,
SI_16_sendstate = 216,
/// <summary> /// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始 /// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary> /// </summary>
SI_14_GoBack = 214, SI_17_GoBack = 217,
...@@ -597,6 +600,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -597,6 +600,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
AUTO_O07_WaitDown = 1307, AUTO_O07_WaitDown = 1307,
#endregion #endregion
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!