Commit 80e8f55d 张东亮

存储机构-视觉对位流程

1 个父辈 77cba787
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace OnlineStore.Common namespace OnlineStore.Common
{ {
...@@ -20,13 +20,14 @@ namespace OnlineStore.Common ...@@ -20,13 +20,14 @@ namespace OnlineStore.Common
/// <summary> /// <summary>
/// 系统主界面标题 /// 系统主界面标题
/// </summary> /// </summary>
public static string App_Title = "App_Title"; public static string App_Title = "App_Title";
public static string http_server = "http.server"; public static string http_server = "http.server";
public static string Line_CID = "Line_CID"; public static string Line_CID = "Line_CID";
public static string ImagePath = "ImagePath";
public static string ConfigPath_XLRStore = "ConfigPath_XLRStore"; public static string ConfigPath_XLRStore = "ConfigPath_XLRStore";
public static string ConfigPath_Input = "ConfigPath_Input"; public static string ConfigPath_Input = "ConfigPath_Input";
public static string ConfigPath_Box = "ConfigPath_Box"; public static string ConfigPath_Box = "ConfigPath_Box";
...@@ -37,19 +38,19 @@ namespace OnlineStore.Common ...@@ -37,19 +38,19 @@ namespace OnlineStore.Common
/// </summary> /// </summary>
public static string CodeType = "CodeType"; public static string CodeType = "CodeType";
/// <summary> /// <summary>
/// 配置文件路径 Data Matrix ECC 200.dcm /// 配置文件路径 Data Matrix ECC 200.dcm
/// </summary> /// </summary>
public static string CodeParamPath = "CodeParamPath"; public static string CodeParamPath = "CodeParamPath";
public static string Config_Pwd = "Config_Pwd"; public static string Config_Pwd = "Config_Pwd";
///// <summary> ///// <summary>
///// 出库等待料盘拿走的时间,秒 ///// 出库等待料盘拿走的时间,秒
///// </summary> ///// </summary>
//public static string OutStoreWaitSeconds = "OutStoreWaitSeconds"; //public static string OutStoreWaitSeconds = "OutStoreWaitSeconds";
/// <summary> /// <summary>
/// 温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪 /// 温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪
/// </summary> /// </summary>
...@@ -68,13 +69,13 @@ namespace OnlineStore.Common ...@@ -68,13 +69,13 @@ namespace OnlineStore.Common
public static string TCPServerPort = "TCPServerPort"; public static string TCPServerPort = "TCPServerPort";
public static string ACBaudRate = "ACBaudRate"; public static string ACBaudRate = "ACBaudRate";
public static string LineRunTest = "LineRunTest"; public static string LineRunTest = "LineRunTest";
public static string ABBServerPort = "ABBServerPort"; public static string ABBServerPort = "ABBServerPort";
public static string OpenRFIDWrite = "OpenRFIDWrite"; public static string OpenRFIDWrite = "OpenRFIDWrite";
public static string DefaultPWD = "DefaultPWD"; public static string DefaultPWD = "DefaultPWD";
public static string AgvServerIp = "AgvServerIp"; public static string AgvServerIp = "AgvServerIp";
public static string NeedScanCode = "NeedScanCode"; public static string NeedScanCode = "NeedScanCode";
public static string CodeCount = "CodeCount"; public static string CodeCount = "CodeCount";
...@@ -82,15 +83,15 @@ namespace OnlineStore.Common ...@@ -82,15 +83,15 @@ namespace OnlineStore.Common
public static string MaxTrayNum = "MaxTrayNum"; public static string MaxTrayNum = "MaxTrayNum";
public static string UseBuzzer = "UseBuzzer"; public static string UseBuzzer = "UseBuzzer";
public static string RfidServer_Port = "RfidServer_Port"; public static string RfidServer_Port = "RfidServer_Port";
public static string Feed_LastShelfID_ = "Feed_LastShelfID_"; public static string Feed_LastShelfID_ = "Feed_LastShelfID_";
public static string SaveErrorImageToFile = "SaveErrorImageToFile"; public static string SaveErrorImageToFile = "SaveErrorImageToFile";
public static string ConfigPath_TrayList = "ConfigPath_TrayList"; public static string ConfigPath_TrayList = "ConfigPath_TrayList";
...@@ -104,10 +105,10 @@ namespace OnlineStore.Common ...@@ -104,10 +105,10 @@ namespace OnlineStore.Common
public static string AutoInput = "AutoInput"; public static string AutoInput = "AutoInput";
public static string AInStoreInfo= "AInStoreInfo"; public static string AInStoreInfo = "AInStoreInfo";
public static string AOutStoreInfo= "AOutStoreInfo"; public static string AOutStoreInfo = "AOutStoreInfo";
public static string BInStoreInfo= "BInStoreInfo"; public static string BInStoreInfo = "BInStoreInfo";
public static string BOutStoreInfo= "BOutStoreInfo"; public static string BOutStoreInfo = "BOutStoreInfo";
public static string AShelfInfo = "AShelfInfo"; public static string AShelfInfo = "AShelfInfo";
public static string BShelfInfo = "BShelfInfo"; public static string BShelfInfo = "BShelfInfo";
......
...@@ -38,7 +38,6 @@ PRO,0,移栽升降轴_B下暂存区取料高点P10,Updown_P10,100,,,,,,,,,,,, ...@@ -38,7 +38,6 @@ PRO,0,移栽升降轴_B下暂存区取料高点P10,Updown_P10,100,,,,,,,,,,,,
PRO,0,移栽升降轴_B下暂存区取料低点P11,Updown_P11,100,,,,,,,,,,,, PRO,0,移栽升降轴_B下暂存区取料低点P11,Updown_P11,100,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,料斗拉取升降轴_待机点P1,PullAxis_Updown_P1,100,,,,,,,,,,,, PRO,0,料斗拉取升降轴_待机点P1,PullAxis_Updown_P1,100,,,,,,,,,,,,
PRO,0,料斗拉取升降轴_料屉提取水平点P2,PullAxis_Updown_P2,100,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,A面移栽X轴_待机点P1,XAxis_A_P1,100,,,,,,,,,,,, PRO,0,A面移栽X轴_待机点P1,XAxis_A_P1,100,,,,,,,,,,,,
PRO,0,A面移栽X轴_A进出料暂存区取放料点P2,XAxis_A_P2,100,,,,,,,,,,,, PRO,0,A面移栽X轴_A进出料暂存区取放料点P2,XAxis_A_P2,100,,,,,,,,,,,,
...@@ -112,6 +111,9 @@ PRO,0,B面移栽压紧轴_P1速度,ComAxis_B_P1_Speed,108,,,,,,,,,,,, ...@@ -112,6 +111,9 @@ PRO,0,B面移栽压紧轴_P1速度,ComAxis_B_P1_Speed,108,,,,,,,,,,,,
PRO,0,B面移栽压紧轴_P2速度,ComAxis_B_P2_Speed,108,,,,,,,,,,,, PRO,0,B面移栽压紧轴_P2速度,ComAxis_B_P2_Speed,108,,,,,,,,,,,,
PRO,0,B面移栽压紧轴_P3速度,ComAxis_B_P3_Speed,108,,,,,,,,,,,, PRO,0,B面移栽压紧轴_P3速度,ComAxis_B_P3_Speed,108,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,A面料屉拉取进出轴_拍照点,PullAxis_Inout_CamA,108,,,,,,,,,,,,
PRO,0,B面料屉拉取进出轴_拍照点,PullAxis_Inout_CamB,108,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,A面第一列信号屏蔽(0=屏蔽,1=开启),A_Col1_Sig_Shield,0,,,,,,,,,,,, PRO,0,A面第一列信号屏蔽(0=屏蔽,1=开启),A_Col1_Sig_Shield,0,,,,,,,,,,,,
PRO,0,A面第二列信号屏蔽(0=屏蔽,1=开启),A_Col2_Sig_Shield,0,,,,,,,,,,,, PRO,0,A面第二列信号屏蔽(0=屏蔽,1=开启),A_Col2_Sig_Shield,0,,,,,,,,,,,,
PRO,0,A面第三列信号屏蔽(0=屏蔽,1=开启),A_Col3_Sig_Shield,0,,,,,,,,,,,, PRO,0,A面第三列信号屏蔽(0=屏蔽,1=开启),A_Col3_Sig_Shield,0,,,,,,,,,,,,
......
位置,优先级,高度,宽度,料仓ID,料斗进出轴料屉提取点P2P4,料斗进出轴料屉库位点P3P5,料斗升降轴料屉提取高点P3,料斗升降轴料屉提取低点P4,存储库位取放点位P3,移栽升降轴料屉上方过渡点P6P12,移栽升降轴料屉取放点P7P13,AB移栽X轴料屉库位取放料点P3,AB移栽压紧轴压紧前点P2,AB移栽压紧轴压紧点P3 位置,优先级,高度,宽度,料仓ID,料斗进出轴料屉提取点P2P4,料斗进出轴料屉库位点P3P5,料斗升降轴料屉提取高点P3,料斗升降轴料屉提取低点P4,存储库位取放点位P3,移栽升降轴料屉上方过渡点P6P12,移栽升降轴料屉取放点P7P13,AB移栽X轴料屉库位取放料点P3,AB移栽压紧轴压紧前点P2,AB移栽压紧轴压紧点P3,料斗拉取升降轴_料屉提取水平点P2
05AA01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05AA03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933 05BB03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
...@@ -125,9 +125,7 @@ ...@@ -125,9 +125,7 @@
<Content Include="device_config.xml"> <Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="eyemLib.dll"> <Content Include="eyemLib.dll" />
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="halcon.dll"> <Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
......
...@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary
public override int GetHomeSingle(string portName, short slvAddr) public override int GetHomeSingle(string portName, short slvAddr)
{ {
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr); AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM; return axisS.ORG;
} }
public override int GetLimitNegativeSingle(string portName, short slvAddr) public override int GetLimitNegativeSingle(string portName, short slvAddr)
......
此文件类型无法预览
此文件类型无法预览
...@@ -111,9 +111,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -111,9 +111,29 @@ namespace OnlineStore.DeviceLibrary
Wait = 0, Wait = 0,
#region 料仓原点返回和重置步骤 100开始 #region 料仓原点返回和重置步骤 100开始
/// <summary> /// <summary>
/// BOX复位:存储机构复位 /// BOX复位:存储机构复位,检查当前所在层数
/// </summary> /// </summary>
BOX_H01_Wait = 101, BOX_H001_Wait = 101,
/// <summary>
/// BOX复位:抽屉在轴上,提升抽屉
/// </summary>
BOX_H002_PullAxis_UpdownToP3,
/// <summary>
/// BOX复位:抽屉在轴上,推抽屉到提取点P2P4
/// </summary>
BOX_H003_PullAxis_InoutToP2P4,
/// <summary>
/// BOX复位:抽屉降到中点,检查是否到位
/// </summary>
BOX_H004_PullAxis_UpdownToMiddle,
/// <summary>
/// BOX复位:抽屉降到低点
/// </summary>
BOX_H005_PullAxis_UpdownToLow,
/// <summary>
/// BOX复位:检查料屉升降轴位置
/// </summary>
BOX_H01_CheckCurPullDownPos,
/// <summary> /// <summary>
/// BOX复位:料斗拉取升降轴到待机点 /// BOX复位:料斗拉取升降轴到待机点
/// </summary> /// </summary>
...@@ -289,6 +309,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -289,6 +309,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
SI_01_MoveAxis_Ready, SI_01_MoveAxis_Ready,
/// <summary> /// <summary>
///料仓入库:移栽升降轴到上暂存区取料低点P3/P9
/// </summary>
SI_01_Pull_Updown_ToPosition,
/// <summary>
/// 料仓入库:到料盘暂存区 /// 料仓入库:到料盘暂存区
/// 1. 行走机构到P2(进出料机构取放点) /// 1. 行走机构到P2(进出料机构取放点)
/// 2. 移栽升降轴到P3(A上暂存区取料低点) /// 2. 移栽升降轴到P3(A上暂存区取料低点)
......
...@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout_P2_P4 = position.PullAxis_Inout_P2_P4; PullAxis_Inout_P2_P4 = position.PullAxis_Inout_P2_P4;
PullAxis_Inout_P3_P5 = position.PullAxis_Inout_P3_P5; PullAxis_Inout_P3_P5 = position.PullAxis_Inout_P3_P5;
PullAxis_Updown_P2 = position.PullAxis_Updown_P2;
PullAxis_Updown_P3 = position.PullAxis_Updown_P3; PullAxis_Updown_P3 = position.PullAxis_Updown_P3;
PullAxis_Updown_P4 = position.PullAxis_Updown_P4; PullAxis_Updown_P4 = position.PullAxis_Updown_P4;
Updown_P6_P12 = position.Updown_P6_P12; Updown_P6_P12 = position.Updown_P6_P12;
...@@ -269,6 +270,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -269,6 +270,7 @@ namespace OnlineStore.DeviceLibrary
ComAxis_AB_P2 = position.ComAxis_AB_P2; ComAxis_AB_P2 = position.ComAxis_AB_P2;
ComAxis_AB_P3 = position.ComAxis_AB_P3; ComAxis_AB_P3 = position.ComAxis_AB_P3;
MoveAxis_P3 = position.MoveAxis_P3; MoveAxis_P3 = position.MoveAxis_P3;
} }
/// <summary> /// <summary>
/// 加载固定点位位置 /// 加载固定点位位置
...@@ -288,7 +290,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -288,7 +290,6 @@ namespace OnlineStore.DeviceLibrary
Updown_P10 = equip_Config.Updown_P10; Updown_P10 = equip_Config.Updown_P10;
Updown_P11 = equip_Config.Updown_P11; Updown_P11 = equip_Config.Updown_P11;
PullAxis_Updown_P1 = equip_Config.PullAxis_Updown_P1; PullAxis_Updown_P1 = equip_Config.PullAxis_Updown_P1;
PullAxis_Updown_P2 = equip_Config.PullAxis_Updown_P2;
XAxis_A_P1 = equip_Config.XAxis_A_P1; XAxis_A_P1 = equip_Config.XAxis_A_P1;
XAxis_A_P2 = equip_Config.XAxis_A_P2; XAxis_A_P2 = equip_Config.XAxis_A_P2;
MiddleAxis_A_P1 = equip_Config.MiddleAxis_A_P1; MiddleAxis_A_P1 = equip_Config.MiddleAxis_A_P1;
......
...@@ -332,6 +332,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -332,6 +332,7 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W006_AxisOrg)) else if (wait.WaitType.Equals(WaitEnum.W006_AxisOrg))
{ {
wait.IsEnd = AxisManager.instance.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(1); wait.IsEnd = AxisManager.instance.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(1);
//LogInfo($"{wait.AxisInfo.DeviceName}-{wait.AxisInfo.GetAxisValue()}-{AxisManager.instance.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(1)}");
} }
else else
{ {
......
...@@ -83,6 +83,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,6 +83,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public string[] trayBColumns; public string[] trayBColumns;
/// <summary> /// <summary>
/// A面列信号屏蔽
/// </summary>
public string[] sheidAColmns;
/// <summary>
/// B面列信号屏蔽
/// </summary>
public string[] sheidBColmns;
/// <summary>
/// A面等待出库的队列 /// A面等待出库的队列
/// </summary> /// </summary>
public ConcurrentQueue<InOutParam> waitAOutStoreList = new ConcurrentQueue<InOutParam>(); public ConcurrentQueue<InOutParam> waitAOutStoreList = new ConcurrentQueue<InOutParam>();
...@@ -150,6 +158,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -150,6 +158,26 @@ namespace OnlineStore.DeviceLibrary
IO_Type.Column_Check_B5, IO_Type.Column_Check_B5,
IO_Type.Column_Check_B6 IO_Type.Column_Check_B6
}; };
sheidAColmns = new string[]
{
"Col_Sig_Shield",
"A_Col1_Sig_Shield",
"A_Col2_Sig_Shield",
"A_Col3_Sig_Shield",
"A_Col4_Sig_Shield",
"A_Col5_Sig_Shield",
"A_Col6_Sig_Shield"
};
sheidBColmns = new string[]
{
"Col_Sig_Shield",
"B_Col1_Sig_Shield",
"B_Col2_Sig_Shield",
"B_Col3_Sig_Shield",
"B_Col4_Sig_Shield",
"B_Col5_Sig_Shield",
"B_Col6_Sig_Shield"
};
} }
internal void InitAllAxis() internal void InitAllAxis()
{ {
...@@ -187,12 +215,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -187,12 +215,14 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (!OpenAllAxis()) bool rtn = false;
Task task = Task.Factory.StartNew(new Action(() => { rtn = OpenAllAxis(); }));
task.Wait();
if (!rtn)
{ {
CloseAllAxis(); CloseAllAxis();
return false; return false;
} }
StartCamera();
SetAllTimer(false); SetAllTimer(false);
SetConnectServerTimer(false); SetConnectServerTimer(false);
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -209,7 +239,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -209,7 +239,10 @@ namespace OnlineStore.DeviceLibrary
public override bool Reset() public override bool Reset()
{ {
StopMove(); StopMove();
if (!OpenAllAxis()) bool rtn = false;
Task task = Task.Factory.StartNew(new Action(() => { rtn = OpenAllAxis(); }));
task.Wait();
if (!rtn)
{ {
CloseAllAxis(); CloseAllAxis();
return false; return false;
...@@ -233,7 +266,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -233,7 +266,7 @@ namespace OnlineStore.DeviceLibrary
alarmType = AlarmType.None; alarmType = AlarmType.None;
isInSuddenDown = false; isInSuddenDown = false;
isNoAirpressure_Check = false; isNoAirpressure_Check = false;
MoveInfo.NextMoveStep(StepEnum.BOX_H01_Wait); MoveInfo.NextMoveStep(StepEnum.BOX_H001_Wait);
AutoInout.StopAuto(); AutoInout.StopAuto();
LogInfo($"复位 {MoveInfo.SLog} :存储机构轴开始复位"); LogInfo($"复位 {MoveInfo.SLog} :存储机构轴开始复位");
...@@ -265,8 +298,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -265,8 +298,55 @@ namespace OnlineStore.DeviceLibrary
switch (MoveInfo.MoveStep) switch (MoveInfo.MoveStep)
{ {
//回零 //回零
case StepEnum.BOX_H01_Wait: case StepEnum.BOX_H001_Wait:
if (!PullAxis_Updown.IsInPosition(Config.PullAxis_Updown_P1) && !PullAxis_Updown.IsInPosition(Config.PullAxis_Updown_P2)) if(GetCurLocation(out string posid))
{
MoveInfo.NextMoveStep(StepEnum.BOX_H002_PullAxis_UpdownToP3);
MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("Reset", posid));
MoveInfo.MoveParam.MoveP = new LineMoveP(Config, MoveInfo.MoveParam.PosInfo.PosId);
UpdownAxisTo_P6_P12();
PullAxis_UpdownToHighP3();
LogInfo($"复位 {MoveInfo.SLog}:抽屉在料屉轴上,移栽升降轴到料屉上方过度点,料屉升降轴到高点P3");
}
else
{
MoveInfo.NextMoveStep(StepEnum.BOX_H01_CheckCurPullDownPos);
MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("Reset", posid));
MoveInfo.MoveParam.MoveP = new LineMoveP(Config, MoveInfo.MoveParam.PosInfo.PosId);
LogInfo($"复位 {MoveInfo.SLog}:抽屉未在料屉轴上");
}
break;
case StepEnum.BOX_H002_PullAxis_UpdownToP3:
MoveInfo.NextMoveStep(StepEnum.BOX_H003_PullAxis_InoutToP2P4);
LogInfo($"复位 {MoveInfo.SLog}:推到抽屉提取点,料斗拉取进出轴到料屉提取点P2");
PullAxis_Inout_To_P2_P4();
break;
case StepEnum.BOX_H003_PullAxis_InoutToP2P4:
MoveInfo.NextMoveStep(StepEnum.BOX_H004_PullAxis_UpdownToMiddle);
PullAxis_UpdownToMiddleP2();
if (CheckASide())
{
LogInfo($"复位 {MoveInfo.SLog}:料斗拉取升降轴到料屉水平点P2,同时检测{trayAColumns[GetPosColumn()]}=1");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayAColumns[GetPosColumn()], IO_VALUE.HIGH));
}
else
{
LogInfo($"复位 {MoveInfo.SLog}:料斗拉取升降轴到料屉水平点P2,同时检测{trayBColumns[GetPosColumn()]} = 1");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
}
break;
case StepEnum.BOX_H004_PullAxis_UpdownToMiddle:
MoveInfo.NextMoveStep(StepEnum.BOX_H005_PullAxis_UpdownToLow);
LogInfo($"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4");
PullAxis_UpdownToLowP4();
break;
case StepEnum.BOX_H005_PullAxis_UpdownToLow:
MoveInfo.NextMoveStep(StepEnum.BOX_H01_CheckCurPullDownPos);
PullAxis_Inout_To_P1();
LogInfo($"复位 {MoveInfo.SLog}:料斗拉取拉取轴到待机点P1");
break;
case StepEnum.BOX_H01_CheckCurPullDownPos:
if (!PullAxis_Updown.IsInPosition(Config.PullAxis_Updown_P1) && !PullAxis_Updown.IsInPosition(MoveInfo.MoveParam.MoveP.PullAxis_Updown_P2))
{ {
MoveInfo.NextMoveStep(StepEnum.BOX_H02_PullAxis_UpDownToP1); MoveInfo.NextMoveStep(StepEnum.BOX_H02_PullAxis_UpDownToP1);
LogInfo($"复位 {MoveInfo.SLog}:当前料屉拉取升降轴不在在料屉待机点/提取低点,先到低点,移栽升降轴到料屉上方过渡点"); LogInfo($"复位 {MoveInfo.SLog}:当前料屉拉取升降轴不在在料屉待机点/提取低点,先到低点,移栽升降轴到料屉上方过渡点");
......
...@@ -7,6 +7,7 @@ using System.Linq; ...@@ -7,6 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
...@@ -14,6 +15,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,6 +15,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Thread[] camerathread; Thread[] camerathread;
bool IsOpen = false; bool IsOpen = false;
bool AutoSaveImage = true;
Asa.Camera.VisionLib camera; Asa.Camera.VisionLib camera;
bool loadCameraState = false; bool loadCameraState = false;
public delegate void CameraAcqEventHandler(CameraArgs cameraArgs); public delegate void CameraAcqEventHandler(CameraArgs cameraArgs);
...@@ -29,6 +31,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,6 +31,7 @@ namespace OnlineStore.DeviceLibrary
camera = new Asa.Camera.VisionLib(path); camera = new Asa.Camera.VisionLib(path);
camerathread = new Thread[2]; camerathread = new Thread[2];
//pictureBox1.Image = bmp; //pictureBox1.Image = bmp;
StartCamera();
loadCameraState = true; loadCameraState = true;
} }
void StartCamera() void StartCamera()
...@@ -55,7 +58,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
while (IsOpen) while (IsOpen)
{ {
Bitmap bmp = AcqImage(name); Bitmap bmp = AcqImage(name);
LogUtil.info($"{name} 取图"); // LogUtil.info($"{name} 取图");
if (bmp != null) if (bmp != null)
{ {
camera_event?.Invoke(new CameraArgs(name, bmp)); camera_event?.Invoke(new CameraArgs(name, bmp));
...@@ -73,6 +76,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -73,6 +76,19 @@ namespace OnlineStore.DeviceLibrary
{ {
return camera.GetImage(camName); return camera.GetImage(camName);
} }
public void SaveImage(string camName, string subpath, string filename,Bitmap bitmap=null)
{
string path = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ImagePath) + subpath;
if (AutoSaveImage)
{
if (!System.IO.Directory.Exists(path))
Directory.CreateDirectory(path);
//if (bitmap != null)
// bitmap.Save(path + "\\" + filename + ".bmp");
camera.SaveImage(camName, path, filename, System.Drawing.Imaging.ImageFormat.Bmp);
}
//camera.SaveImage(camName, path, filename, System.Drawing.Imaging.ImageFormat.Bmp);
}
} }
public class CameraArgs : EventArgs public class CameraArgs : EventArgs
{ {
......
...@@ -133,19 +133,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,19 +133,25 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StepEnum.SI_01_PullAxis_Ready: case StepEnum.SI_01_PullAxis_Ready:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy); SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy);
MoveInfo.NextMoveStep(StepEnum.SI_01_MoveAxis_Ready); MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition);
if (!IsMoveAxisInSafePos()) if (!IsMoveAxisInSafePos())
{ {
MoveAxisToP1(); MoveAxisToP1();
LogInfo($"入库 行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}"); LogInfo($"入库 行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}");
} }
break; break;
case StepEnum.SI_01_Pull_Updown_ToPosition:
MoveInfo.NextMoveStep(StepEnum.SI_01_MoveAxis_Ready);
LogInfo($"入库 {MoveInfo.SLog}:到暂存区入料口," +
$"料屉升降轴到P1点,移栽升降轴到上暂存区取料低点P3/P9[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_UpdownToP1();
UpdownAxisTo_P3_P9();
break;
case StepEnum.SI_01_MoveAxis_Ready: case StepEnum.SI_01_MoveAxis_Ready:
MoveInfo.NextMoveStep(StepEnum.SI_02_ToBufferArea); MoveInfo.NextMoveStep(StepEnum.SI_02_ToBufferArea);
LogInfo($"入库 {MoveInfo.SLog}:到暂存区入料口," + LogInfo($"入库 {MoveInfo.SLog}:到暂存区入料口," +
$"行走机构到取放点P2,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); $"行走机构到取放点P2,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxisToP2(); MoveAxisToP2();
UpdownAxisTo_P3_P9();
ComAxis_To_P2(); ComAxis_To_P2();
MiddleAxis_To_P2(); MiddleAxis_To_P2();
XAxis_To_P1(); XAxis_To_P1();
...@@ -204,8 +210,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,8 +210,7 @@ namespace OnlineStore.DeviceLibrary
//if(CheckOtherSideIsThereReel(out InOutPosInfo inOutPosInfo)) //if(CheckOtherSideIsThereReel(out InOutPosInfo inOutPosInfo))
//{ //{
// MoveInfo.NextMoveStep(StepEnum.SI_01_PullAxis_Ready); // MoveInfo.NextMoveStep(StepEnum.SI_01_PullAxis_Ready);
// LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3,取另一面暂存区的料[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); // LogInfo($"入库 {MoveInfo.SLog}:取另一面暂存区的料[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// MiddleAxis_To_P3();
// MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy(); // MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.PosInfo = inOutPosInfo; // MoveInfo.MoveParam.PosInfo = inOutPosInfo;
// MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutPosInfo.PosId); // MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutPosInfo.PosId);
...@@ -214,15 +219,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,15 +219,15 @@ namespace OnlineStore.DeviceLibrary
//else //else
{ {
MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3); MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3);
LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MiddleAxis_To_P3(); MiddleAxis_To_P3();
LogInfo($"入库 {MoveInfo.SLog}:另一面无料,移栽旋转轴到料屉库位垂直取放料点P3,直接入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
} }
} }
else //另一个料叉已有料,进行入库 else //另一个料叉已有料,进行入库
{ {
MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3); MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3);
LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MiddleAxis_To_P3(); MiddleAxis_To_P3();
LogInfo($"入库 {MoveInfo.SLog}:另一个料叉已有料,移栽旋转轴到料屉库位垂直取放料点P3,进行入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
} }
break; break;
...@@ -318,6 +323,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -318,6 +323,7 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing); SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
MoveInfo.EndMove(); MoveInfo.EndMove();
AutoInout.InOutEndProcess(this, MoveType.InStore); AutoInout.InOutEndProcess(this, MoveType.InStore);
LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
} }
else else
{ {
......
...@@ -174,18 +174,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -174,18 +174,19 @@ namespace OnlineStore.DeviceLibrary
} }
//直接出库,执行该步骤的情况:1.另一个料叉有料;2.另一面有出库任务但出料口有料;3.另一面没有出库任务; //直接出库,执行该步骤的情况:1.另一个料叉有料;2.另一面有出库任务但出料口有料;3.另一面没有出库任务;
MoveInfo.NextMoveStep(StepEnum.SO_14_GetReels_Ready); MoveInfo.NextMoveStep(StepEnum.SO_14_GetReels_Ready);
PullAxis_UpdownToP1();
UpdownAxisTo_P4_P10();
if (MoveInfo.MoveParam.PosInfoBack == null) if (MoveInfo.MoveParam.PosInfoBack == null)
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.barcode}]取料完成,准备送往出料口"); LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.barcode}]取料完成,准备送往出料口。料屉升降轴到P1点,移栽升降轴到下暂存区放料高点P4/P10");
else else
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfoBack.ToStr()}]取料完成,准备送往出料口"); LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfoBack.ToStr()}]取料完成,准备送往出料口。料屉升降轴到P1点,移栽升降轴到下暂存区放料高点P4/P10");
break; break;
case StepEnum.SO_14_GetReels_Ready: case StepEnum.SO_14_GetReels_Ready:
//已出一边的料,切换到另一边 //已出一边的料,切换到另一边
MoveInfo.NextMoveStep(StepEnum.SO_15_ToBufferArea); MoveInfo.NextMoveStep(StepEnum.SO_15_ToBufferArea);
LogInfo($"出库 {MoveInfo.SLog}:到暂存区出料口," + LogInfo($"出库 {MoveInfo.SLog}:到暂存区出料口," +
$"行走机构到进出料机构取放点P2,移栽升降轴到下暂存区放料高点P4/P10[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); $"行走机构到进出料机构取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxisToP2(); MoveAxisToP2();
UpdownAxisTo_P4_P10();
break; break;
case StepEnum.SO_15_ToBufferArea: case StepEnum.SO_15_ToBufferArea:
//if (!OutDoorCheck(MoveInfo.MoveParam)) //if (!OutDoorCheck(MoveInfo.MoveParam))
......
...@@ -56,7 +56,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -56,7 +56,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
private void MoveAxisToP1() private void MoveAxisToP1()
{ {
MoveAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.MoveP.MoveAxis_P1, Config.MoveAxis_P1_Speed); if (!MoveAxis.IsInPosition(MoveInfo.MoveParam.MoveP.MoveAxis_P1))
MoveAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.MoveP.MoveAxis_P1, Config.MoveAxis_P1_Speed);
} }
/// <summary> /// <summary>
/// 行走机构到进出料机构取放点P2 /// 行走机构到进出料机构取放点P2
...@@ -311,7 +312,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,7 +312,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide()) if (CheckASide())
{ {
MiddleAxis_A.AbsMove(MoveInfo, Config.MiddleAxis_A_P3, Config.MiddleAxis_A_P3_Speed); MiddleAxis_A.AbsMove(MoveInfo, Config.MiddleAxis_A_P3, Config.MiddleAxis_A_P3_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxisOrg(MiddleAxis_A.Config,IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAxisOrg(MiddleAxis_A.Config, IO_VALUE.HIGH));
} }
else else
{ {
...@@ -365,6 +366,117 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,6 +366,117 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout.AbsMove(MoveInfo, MoveInfo.MoveParam.MoveP.PullAxis_Inout_P2_P4, Config.PullAxis_Inout_P4_Speed); PullAxis_Inout.AbsMove(MoveInfo, MoveInfo.MoveParam.MoveP.PullAxis_Inout_P2_P4, Config.PullAxis_Inout_P4_Speed);
} }
} }
/// <summary>
/// 获取当前位置
/// </summary>
/// <param name="PosId"></param>
/// <returns>true表示抽屉挂在轴上</returns>
private bool GetCurLocation(out string PosId)
{
int row = 1;
int col = 1;
string side = "BB";
PosId = "05BB01010101";
for (int i = 1; i <= trayRows.Length; i++)
{
if (i == trayRows.Length)
break;
if (IOValue(trayRows[i]).Equals(IO_VALUE.HIGH))
{
LogUtil.info($"复位 检测到料屉在第{i}层");
row = i;
break;
}
}
bool atBside = false;
for (int i = 1; i <= trayBColumns.Length; i++)
{
if (i == trayBColumns.Length)
break;
if (GetShieldState(sheidBColmns[i]))
continue;
if (IOValue(trayBColumns[i]).Equals(IO_VALUE.LOW))//&& PullAxis_Inout.GetAclPosition()<=Config.PullAxis_Inout_P1
{
LogUtil.info($"复位 检测到料屉在B面");
side = "BB";
atBside = true;
col = i;
PosId = $"05{side}{row.ToString().PadLeft(2,'0')}{col.ToString().PadLeft(2,'0')}0101";
return true;
}
}
if (!atBside)
{
for (int i = 1; i <= trayAColumns.Length; i++)
{
if (i == trayBColumns.Length)
break;
if (GetShieldState(sheidAColmns[i]))
continue;
if (IOValue(trayAColumns[i]).Equals(IO_VALUE.LOW))//&& PullAxis_Inout.GetAclPosition() >= Config.PullAxis_Inout_P1
{
LogUtil.info($"复位 检测到料屉在A面");
side = "AA";
col = i;
PosId = $"05{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101";
return true;
}
}
}
PosId = $"05{side}{row.ToString().PadLeft(2, '0')}{col.ToString().PadLeft(2, '0')}0101";
return false;
}
/// <summary>
/// 获取列屏蔽状态
/// </summary>
/// <param name="name"></param>
/// <returns>true表示屏蔽</returns>
private bool GetShieldState(string name)
{
int res = 0;
switch (name)
{
case "A_Col1_Sig_Shield":
res = Config.A_Col1_Sig_Shield;
break;
case "A_Col2_Sig_Shield":
res = Config.A_Col2_Sig_Shield;
break;
case "A_Col3_Sig_Shield":
res = Config.A_Col3_Sig_Shield;
break;
case "A_Col4_Sig_Shield":
res = Config.A_Col4_Sig_Shield;
break;
case "A_Col5_Sig_Shield":
res = Config.A_Col5_Sig_Shield;
break;
case "A_Col6_Sig_Shield":
res = Config.A_Col6_Sig_Shield;
break;
case "B_Col1_Sig_Shield":
res = Config.B_Col1_Sig_Shield;
break;
case "B_Col2_Sig_Shield":
res = Config.B_Col2_Sig_Shield;
break;
case "B_Col3_Sig_Shield":
res = Config.B_Col3_Sig_Shield;
break;
case "B_Col4_Sig_Shield":
res = Config.B_Col4_Sig_Shield;
break;
case "B_Col5_Sig_Shield":
res = Config.B_Col5_Sig_Shield;
break;
case "B_Col6_Sig_Shield":
res = Config.B_Col6_Sig_Shield;
break;
}
LogInfo(string.Format("列信号屏蔽状态:{0}={1}", name, res == 0 ? "屏蔽" : "开启"));
return res == 0 ? true : false;
}
#endregion #endregion
/// <summary> /// <summary>
/// 设置料仓状态 /// 设置料仓状态
...@@ -419,42 +531,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -419,42 +531,42 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
private bool CamCheckReelPosition() private bool CamCheckReelPosition()
{ {
//if (IgnoreCamDect) if (IgnoreCamDect)
//{ {
// CamDetectError = false; CamDetectError = false;
// return true; return true;
//} }
//AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId), out Bitmap bitmap); Bitmap bitmap = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
//int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR); int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR);
//if (res == 0) if (res == 0)
//{ {
// LogInfo($"存储机构-相机检查库位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosId}]"); LogInfo($"存储机构-相机检查库位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosId}]");
//} }
//else if (res == -4) else if (res == -4)
//{ {
// SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}"); SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
// CamDetectError = true; CamDetectError = true;
// return false; return false;
//} }
//else else
//{ {
// SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}"); SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
// CamDetectError = true; CamDetectError = true;
// return false; return false;
//} }
//if (Math.Abs(Config.Drawer_X - ocsFXYR.fX) < Config.Drawer_X_Error && Math.Abs(Config.Drawer_Y - ocsFXYR.fY) < Config.Drawer_Y_Error) if (Math.Abs(Config.Drawer_X - ocsFXYR.fX) < Config.Drawer_X_Error && Math.Abs(Config.Drawer_Y - ocsFXYR.fY) < Config.Drawer_Y_Error)
//{ {
// CamDetectError = false; CamDetectError = false;
// return true; return true;
//} }
//else else
//{ {
// SetWarnMsg($"存储机构-相机检查库位异常 {MoveInfo.SLog}:Mark点Y轴坐标{ocsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - ocsFXYR.fY)};" + SetWarnMsg($"存储机构-相机检查库位异常 {MoveInfo.SLog}:Mark点Y轴坐标{ocsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - ocsFXYR.fY)};" +
// $"Mark点X轴坐标{ ocsFXYR.fX},模板Mark点X轴坐标{ Config.Drawer_X},X轴偏差{ (Config.Drawer_X - ocsFXYR.fX)},"); $"Mark点X轴坐标{ ocsFXYR.fX},模板Mark点X轴坐标{ Config.Drawer_X},X轴偏差{ (Config.Drawer_X - ocsFXYR.fX)},");
//} }
//CamDetectError = true; CamDetectError = true;
//return false; return false;
return true; //return true;
} }
#endregion #endregion
#region 入库 #region 入库
......
...@@ -76,7 +76,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -76,7 +76,11 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[CSVAttribute("AB移栽压紧轴压紧点P3")] [CSVAttribute("AB移栽压紧轴压紧点P3")]
public int ComAxis_AB_P3 { get; set; } public int ComAxis_AB_P3 { get; set; }
/// <summary>
/// PRO,0,料斗拉取升降轴_料屉提取水平点P2,PullAxis_Updown_P2,100,,,,,,,,,,,,
/// </summary>
[CSVAttribute("料斗拉取升降轴_料屉提取水平点P2")]
public int PullAxis_Updown_P2 { get; set; }
public static bool CheckPosition(BoxPosition position, BoxEquip_Config Config) public static bool CheckPosition(BoxPosition position, BoxEquip_Config Config)
{ {
try try
......
...@@ -141,7 +141,18 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -141,7 +141,18 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("PullAxis_Inout_P1")] [ConfigProAttribute("PullAxis_Inout_P1")]
public int PullAxis_Inout_P1 { get; set; } public int PullAxis_Inout_P1 { get; set; }
/// <summary>
/// PRO,0,A面料屉拉取进出轴_拍照点,PullAxis_Inout_CamA,108,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("PullAxis_Inout_CamA")]
public int PullAxis_Inout_CamA { get; set; }
/// <summary>
/// PRO,0,B面料屉拉取进出轴_拍照点,PullAxis_Inout_CamB,108,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("PullAxis_Inout_CamB")]
public int PullAxis_Inout_CamB { get; set; }
/// <summary> /// <summary>
/// PRO,0,移栽升降轴_待机点P1,Updown_P1,100,,,,,,,,,,,, /// PRO,0,移栽升降轴_待机点P1,Updown_P1,100,,,,,,,,,,,,
/// </summary> /// </summary>
...@@ -203,12 +214,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -203,12 +214,6 @@ namespace OnlineStore.LoadCSVLibrary
public int PullAxis_Updown_P1 { get; set; } public int PullAxis_Updown_P1 { get; set; }
/// <summary> /// <summary>
/// PRO,0,料斗拉取升降轴_料屉提取水平点P2,PullAxis_Updown_P2,100,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("PullAxis_Updown_P2")]
public int PullAxis_Updown_P2 { get; set; }
/// <summary>
/// PRO,0,A面移栽X轴_待机点P1,XAxis_A_P1,100,,,,,,,,,,,, /// PRO,0,A面移栽X轴_待机点P1,XAxis_A_P1,100,,,,,,,,,,,,
/// </summary> /// </summary>
[ConfigProAttribute("XAxis_A_P1")] [ConfigProAttribute("XAxis_A_P1")]
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<add key="ConfigPath_BoxPosition" value="\Config\linePositions.csv" /> <add key="ConfigPath_BoxPosition" value="\Config\linePositions.csv" />
<add key="ConfigPath_DrawerPosition" value="\Config\DrawerPosition.csv" /> <add key="ConfigPath_DrawerPosition" value="\Config\DrawerPosition.csv" />
<add key="ConfigPath_TrayList" value="\LineConfig\TrayList.data" /> <add key="ConfigPath_TrayList" value="\LineConfig\TrayList.data" />
<add key="ImagePath" value="\Images\" />
<add key="Line_CID" value="05" /> <add key="Line_CID" value="05" />
<!--end one store config--> <!--end one store config-->
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code--> <!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
this.tabPage2.Controls.Add(this.panel1); this.tabPage2.Controls.Add(this.panel1);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(192, 67); this.tabPage2.Size = new System.Drawing.Size(988, 605);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 设备状态 "; this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(192, 67); this.panel1.Size = new System.Drawing.Size(988, 605);
this.panel1.TabIndex = 1; this.panel1.TabIndex = 1;
// //
// tableLayoutPanel1 // tableLayoutPanel1
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(192, 67); this.tableLayoutPanel1.Size = new System.Drawing.Size(988, 605);
this.tableLayoutPanel1.TabIndex = 0; this.tableLayoutPanel1.TabIndex = 0;
// //
// InputControl // InputControl
...@@ -184,10 +184,10 @@ ...@@ -184,10 +184,10 @@
this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2); this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2);
this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill; this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.InputControl.EquipText = "上料机构"; this.InputControl.EquipText = "上料机构";
this.InputControl.Location = new System.Drawing.Point(3, 43); this.InputControl.Location = new System.Drawing.Point(3, 376);
this.InputControl.MoveInfo = "暂无出入库"; this.InputControl.MoveInfo = "暂无出入库";
this.InputControl.Name = "InputControl"; this.InputControl.Name = "InputControl";
this.InputControl.Size = new System.Drawing.Size(186, 6); this.InputControl.Size = new System.Drawing.Size(982, 109);
this.InputControl.TabIndex = 5; this.InputControl.TabIndex = 5;
this.InputControl.WorkStatus = "暂未启动"; this.InputControl.WorkStatus = "暂未启动";
// //
...@@ -197,10 +197,10 @@ ...@@ -197,10 +197,10 @@
this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA1.ColorStatus = System.Drawing.Color.White; this.ReelControlA1.ColorStatus = System.Drawing.Color.White;
this.ReelControlA1.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlA1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA1.Location = new System.Drawing.Point(3, 25); this.ReelControlA1.Location = new System.Drawing.Point(3, 204);
this.ReelControlA1.Name = "ReelControlA1"; this.ReelControlA1.Name = "ReelControlA1";
this.ReelControlA1.ReelText = "暂存区物料"; this.ReelControlA1.ReelText = "暂存区物料";
this.ReelControlA1.Size = new System.Drawing.Size(90, 3); this.ReelControlA1.Size = new System.Drawing.Size(488, 80);
this.ReelControlA1.TabIndex = 0; this.ReelControlA1.TabIndex = 0;
// //
// ReelControlA2 // ReelControlA2
...@@ -209,10 +209,10 @@ ...@@ -209,10 +209,10 @@
this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA2.ColorStatus = System.Drawing.Color.White; this.ReelControlA2.ColorStatus = System.Drawing.Color.White;
this.ReelControlA2.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlA2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA2.Location = new System.Drawing.Point(3, 34); this.ReelControlA2.Location = new System.Drawing.Point(3, 290);
this.ReelControlA2.Name = "ReelControlA2"; this.ReelControlA2.Name = "ReelControlA2";
this.ReelControlA2.ReelText = "暂存区物料"; this.ReelControlA2.ReelText = "暂存区物料";
this.ReelControlA2.Size = new System.Drawing.Size(90, 3); this.ReelControlA2.Size = new System.Drawing.Size(488, 80);
this.ReelControlA2.TabIndex = 1; this.ReelControlA2.TabIndex = 1;
// //
// ReelControlB1 // ReelControlB1
...@@ -221,10 +221,10 @@ ...@@ -221,10 +221,10 @@
this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB1.ColorStatus = System.Drawing.Color.White; this.ReelControlB1.ColorStatus = System.Drawing.Color.White;
this.ReelControlB1.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlB1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB1.Location = new System.Drawing.Point(99, 25); this.ReelControlB1.Location = new System.Drawing.Point(497, 204);
this.ReelControlB1.Name = "ReelControlB1"; this.ReelControlB1.Name = "ReelControlB1";
this.ReelControlB1.ReelText = "暂存区物料"; this.ReelControlB1.ReelText = "暂存区物料";
this.ReelControlB1.Size = new System.Drawing.Size(90, 3); this.ReelControlB1.Size = new System.Drawing.Size(488, 80);
this.ReelControlB1.TabIndex = 2; this.ReelControlB1.TabIndex = 2;
// //
// ReelControlB2 // ReelControlB2
...@@ -233,10 +233,10 @@ ...@@ -233,10 +233,10 @@
this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB2.ColorStatus = System.Drawing.Color.White; this.ReelControlB2.ColorStatus = System.Drawing.Color.White;
this.ReelControlB2.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlB2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB2.Location = new System.Drawing.Point(99, 34); this.ReelControlB2.Location = new System.Drawing.Point(497, 290);
this.ReelControlB2.Name = "ReelControlB2"; this.ReelControlB2.Name = "ReelControlB2";
this.ReelControlB2.ReelText = "暂存区物料"; this.ReelControlB2.ReelText = "暂存区物料";
this.ReelControlB2.Size = new System.Drawing.Size(90, 3); this.ReelControlB2.Size = new System.Drawing.Size(488, 80);
this.ReelControlB2.TabIndex = 3; this.ReelControlB2.TabIndex = 3;
// //
// BoxControl // BoxControl
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
this.BoxControl.Location = new System.Drawing.Point(3, 3); this.BoxControl.Location = new System.Drawing.Point(3, 3);
this.BoxControl.MoveInfo = "暂无出入库"; this.BoxControl.MoveInfo = "暂无出入库";
this.BoxControl.Name = "BoxControl"; this.BoxControl.Name = "BoxControl";
this.BoxControl.Size = new System.Drawing.Size(186, 16); this.BoxControl.Size = new System.Drawing.Size(982, 195);
this.BoxControl.TabIndex = 4; this.BoxControl.TabIndex = 4;
this.BoxControl.WorkStatus = "暂未启动"; this.BoxControl.WorkStatus = "暂未启动";
// //
...@@ -261,10 +261,10 @@ ...@@ -261,10 +261,10 @@
this.ShelfAControl.ColorStatus = System.Drawing.Color.White; this.ShelfAControl.ColorStatus = System.Drawing.Color.White;
this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfAControl.EquipText = "A料口"; this.ShelfAControl.EquipText = "A料口";
this.ShelfAControl.Location = new System.Drawing.Point(3, 55); this.ShelfAControl.Location = new System.Drawing.Point(3, 491);
this.ShelfAControl.MoveInfo = "暂无出入库"; this.ShelfAControl.MoveInfo = "暂无出入库";
this.ShelfAControl.Name = "ShelfAControl"; this.ShelfAControl.Name = "ShelfAControl";
this.ShelfAControl.Size = new System.Drawing.Size(90, 9); this.ShelfAControl.Size = new System.Drawing.Size(488, 111);
this.ShelfAControl.TabIndex = 6; this.ShelfAControl.TabIndex = 6;
this.ShelfAControl.WorkStatus = "暂未启动"; this.ShelfAControl.WorkStatus = "暂未启动";
// //
...@@ -275,10 +275,10 @@ ...@@ -275,10 +275,10 @@
this.ShelfBControl.ColorStatus = System.Drawing.Color.White; this.ShelfBControl.ColorStatus = System.Drawing.Color.White;
this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfBControl.EquipText = "B料口"; this.ShelfBControl.EquipText = "B料口";
this.ShelfBControl.Location = new System.Drawing.Point(99, 55); this.ShelfBControl.Location = new System.Drawing.Point(497, 491);
this.ShelfBControl.MoveInfo = "暂无出入库"; this.ShelfBControl.MoveInfo = "暂无出入库";
this.ShelfBControl.Name = "ShelfBControl"; this.ShelfBControl.Name = "ShelfBControl";
this.ShelfBControl.Size = new System.Drawing.Size(90, 9); this.ShelfBControl.Size = new System.Drawing.Size(488, 111);
this.ShelfBControl.TabIndex = 7; this.ShelfBControl.TabIndex = 7;
this.ShelfBControl.WorkStatus = "暂未启动"; this.ShelfBControl.WorkStatus = "暂未启动";
// //
......
...@@ -20,9 +20,18 @@ namespace OnlineStore.XLRStore ...@@ -20,9 +20,18 @@ namespace OnlineStore.XLRStore
{ {
CheckForIllegalCrossThreadCalls = false; CheckForIllegalCrossThreadCalls = false;
InitializeComponent(); InitializeComponent();
SetState(false);
} }
BoxEquip boxEquip; BoxEquip boxEquip;
string posSide = "AA"; string posSide = "AA";
private void SetState(bool state)
{
button1.Enabled = state;
button2.Enabled = state;
button3.Enabled = state;
button4.Enabled = state;
tabControl1.Enabled = state;
}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
tabControl1.SelectedIndex = 0; tabControl1.SelectedIndex = 0;
...@@ -124,6 +133,7 @@ namespace OnlineStore.XLRStore ...@@ -124,6 +133,7 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param> /// <param name="e"></param>
private void button7_Click_1(object sender, EventArgs e) private void button7_Click_1(object sender, EventArgs e)
{ {
label5.Text = string.Format("更新其他抽屉使用的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
int.TryParse(textBox4.Text, out rows_in_drawer); int.TryParse(textBox4.Text, out rows_in_drawer);
int.TryParse(textBox3.Text, out colmns_in_drawer); int.TryParse(textBox3.Text, out colmns_in_drawer);
...@@ -172,10 +182,10 @@ namespace OnlineStore.XLRStore ...@@ -172,10 +182,10 @@ namespace OnlineStore.XLRStore
ktkPosition.MoveAxis_P3 = srcPosition.MoveAxis_P3; ktkPosition.MoveAxis_P3 = srcPosition.MoveAxis_P3;
ktkPosition.PullAxis_Inout_P2_P4 = srcPosition.PullAxis_Inout_P2_P4; ktkPosition.PullAxis_Inout_P2_P4 = srcPosition.PullAxis_Inout_P2_P4;
ktkPosition.PullAxis_Inout_P3_P5 = srcPosition.PullAxis_Inout_P3_P5; ktkPosition.PullAxis_Inout_P3_P5 = srcPosition.PullAxis_Inout_P3_P5;
ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3; //ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3;
ktkPosition.PullAxis_Updown_P4 = srcPosition.PullAxis_Updown_P4; //ktkPosition.PullAxis_Updown_P4 = srcPosition.PullAxis_Updown_P4;
ktkPosition.Updown_P6_P12 = srcPosition.Updown_P6_P12; //ktkPosition.Updown_P6_P12 = srcPosition.Updown_P6_P12;
ktkPosition.Updown_P7_P13 = srcPosition.Updown_P7_P13; //ktkPosition.Updown_P7_P13 = srcPosition.Updown_P7_P13;
ktkPosition.XAxis_AB_P3 = srcPosition.XAxis_AB_P3; ktkPosition.XAxis_AB_P3 = srcPosition.XAxis_AB_P3;
bool result = CSVPositionReader<BoxPosition>.SavePostion(positionConfigFile, ktkPosition); bool result = CSVPositionReader<BoxPosition>.SavePostion(positionConfigFile, ktkPosition);
if (result) if (result)
...@@ -208,6 +218,7 @@ namespace OnlineStore.XLRStore ...@@ -208,6 +218,7 @@ namespace OnlineStore.XLRStore
} }
} }
info = $"更新完成!";
})); }));
} }
...@@ -223,15 +234,29 @@ namespace OnlineStore.XLRStore ...@@ -223,15 +234,29 @@ namespace OnlineStore.XLRStore
button11.Enabled = true; button11.Enabled = true;
timer1.Enabled = true; timer1.Enabled = true;
timer1.Start(); timer1.Start();
StringBuilder head2 = new StringBuilder(boxEquip.CID + posSide + textBox1.Text.PadLeft(2, '0') + textBox2.Text.PadLeft(2, '0')); StringBuilder head2 = new StringBuilder(boxEquip.CID + posSide + textBox6.Text.PadLeft(2, '0') + textBox5.Text.PadLeft(2, '0')+"0101");
boxEquip.autoFindPosMode = true; boxEquip.autoFindPosMode = true;
boxEquip.StartFindPos(new InOutParam(new InOutPosInfo("AA", head2.ToString()))); boxEquip.StartFindPos(new InOutParam(new InOutPosInfo("AutoFindPos", head2.ToString())));
} }
private void button10_Click(object sender, EventArgs e) private void button10_Click(object sender, EventArgs e)
{ {
boxEquip.autoFindPos.SetParam(int.Parse(textBox6.Text), int.Parse(textBox5.Text),float.Parse(textBox8.Text),float.Parse(textBox7.Text)); boxEquip.autoFindPos.SetParam(int.Parse(textBox6.Text), int.Parse(textBox5.Text),float.Parse(textBox8.Text),float.Parse(textBox7.Text));
StringBuilder head2 = new StringBuilder(boxEquip.CID + posSide + textBox6.Text.PadLeft(2, '0') + textBox5.Text.PadLeft(2, '0'));
head2.Append("0101");
LineMoveP lineMoveP = new LineMoveP();
lineMoveP.UpdatePosById(head2.ToString());
boxEquip.autoFindPos.PullUpdown_Diff_mid = lineMoveP.PullAxis_Updown_P2 - lineMoveP.PullAxis_Updown_P4;
boxEquip.autoFindPos.PullUpdown_Diff_high = lineMoveP.PullAxis_Updown_P3 - lineMoveP.PullAxis_Updown_P4;
boxEquip.autoFindPos.UpdownAxis_Diff_Upper_Low = lineMoveP.Updown_P7_P13 - lineMoveP.Updown_P6_P12;
boxEquip.autoFindPos.Startposition_MoveAxis = lineMoveP.MoveAxis_P3;
boxEquip.autoFindPos.Startposition_PullUpdpwnAxis = lineMoveP.PullAxis_Updown_P4;
boxEquip.autoFindPos.Startposition_UpDownAxis = lineMoveP.Updown_P6_P12;
int.TryParse(textBox4.Text, out rows_in_drawer);
int.TryParse(textBox3.Text, out colmns_in_drawer);
boxEquip.autoFindPos.RowsInDraw = rows_in_drawer;
boxEquip.autoFindPos.ColumnsInDraw = colmns_in_drawer;
button9.Enabled = true; button9.Enabled = true;
boxEquip.autoFindPosMode = false; boxEquip.autoFindPosMode = false;
} }
...@@ -281,9 +306,19 @@ namespace OnlineStore.XLRStore ...@@ -281,9 +306,19 @@ namespace OnlineStore.XLRStore
{ {
bitmap = boxEquip.AcqImage("box_B"); bitmap = boxEquip.AcqImage("box_B");
} }
if(bitmap!=null) pictureBox1.Image = null;
if (bitmap!=null)
{ {
pictureBox1.Image = bitmap;
int res = AutoFindPos.GetMarkInfo(bitmap, out eyemLib_Sharp.EyemLibDemo.EyemOcsFXYR eyemOcsFXYR); int res = AutoFindPos.GetMarkInfo(bitmap, out eyemLib_Sharp.EyemLibDemo.EyemOcsFXYR eyemOcsFXYR);
if (posSide.Equals("AA"))
{
boxEquip.SaveImage("box_A", boxEquip.CID + posSide + "_Manual", string.Format("{0}_{1}_{2}", DateTime.Now.ToString("yyyyMMddhhmmss"), eyemOcsFXYR.fX.ToString("f2"), eyemOcsFXYR.fY.ToString("f2")));
}
else
{
boxEquip.SaveImage("box_B", boxEquip.CID + posSide + "_Manual", string.Format("{0}_{1}_{2}", DateTime.Now.ToString("yyyyMMddhhmmss"), eyemOcsFXYR.fX.ToString("f2"), eyemOcsFXYR.fY.ToString("f2")));
}
if (res == 0) if (res == 0)
{ {
txtMark_X.Text = eyemOcsFXYR.fX.ToString("f2"); txtMark_X.Text = eyemOcsFXYR.fX.ToString("f2");
...@@ -312,5 +347,10 @@ namespace OnlineStore.XLRStore ...@@ -312,5 +347,10 @@ namespace OnlineStore.XLRStore
boxEquip.Config.Drawer_Y_Error=float.Parse(txtMark_Y_err.Text); boxEquip.Config.Drawer_Y_Error=float.Parse(txtMark_Y_err.Text);
StoreManager.SaveBoxConfig(boxEquip.Config); StoreManager.SaveBoxConfig(boxEquip.Config);
} }
private void checkBoxOpenAuto_CheckedChanged(object sender, EventArgs e)
{
SetState(checkBoxOpenAuto.Checked);
}
} }
} }
...@@ -40,20 +40,8 @@ namespace OnlineStore.XLRStore ...@@ -40,20 +40,8 @@ namespace OnlineStore.XLRStore
string posId = ""; string posId = "";
private void InitShieldColData() private void InitShieldColData()
{ {
comboBoxShieldSig.Items.AddRange(new string[] { comboBoxShieldSig.Items.AddRange((from m in boxEquip.sheidAColmns where !m.Equals("Col_Sig_Shield") select m).ToArray());
"A_Col1_Sig_Shield", comboBoxShieldSig.Items.AddRange((from m in boxEquip.sheidBColmns where !m.Equals("Col_Sig_Shield") select m).ToArray());
"A_Col2_Sig_Shield",
"A_Col3_Sig_Shield",
"A_Col4_Sig_Shield",
"A_Col5_Sig_Shield",
"A_Col6_Sig_Shield",
"B_Col1_Sig_Shield",
"B_Col2_Sig_Shield",
"B_Col3_Sig_Shield",
"B_Col4_Sig_Shield",
"B_Col5_Sig_Shield",
"B_Col6_Sig_Shield"
});
comboBoxShieldSig.SelectedIndexChanged += ComboBoxShieldSig_SelectedIndexChanged; comboBoxShieldSig.SelectedIndexChanged += ComboBoxShieldSig_SelectedIndexChanged;
comboBoxShieldSig.SelectedIndex = 0; comboBoxShieldSig.SelectedIndex = 0;
} }
...@@ -110,7 +98,6 @@ namespace OnlineStore.XLRStore ...@@ -110,7 +98,6 @@ namespace OnlineStore.XLRStore
txtMoveAxis_P1.Text = boxEquip.Config.MoveAxis_P1.ToString(); txtMoveAxis_P1.Text = boxEquip.Config.MoveAxis_P1.ToString();
txtPullAxis_Inout_P1.Text = boxEquip.Config.PullAxis_Inout_P1.ToString(); txtPullAxis_Inout_P1.Text = boxEquip.Config.PullAxis_Inout_P1.ToString();
txtPullAxis_Updown_P1.Text = boxEquip.Config.PullAxis_Updown_P1.ToString(); txtPullAxis_Updown_P1.Text = boxEquip.Config.PullAxis_Updown_P1.ToString();
txtPullAxis_Updown_P2.Text = boxEquip.Config.PullAxis_Updown_P2.ToString();
txtUpdown_P1.Text = boxEquip.Config.Updown_P1.ToString(); txtUpdown_P1.Text = boxEquip.Config.Updown_P1.ToString();
txtUpdown_P10.Text = boxEquip.Config.Updown_P10.ToString(); txtUpdown_P10.Text = boxEquip.Config.Updown_P10.ToString();
txtUpdown_P11.Text = boxEquip.Config.Updown_P11.ToString(); txtUpdown_P11.Text = boxEquip.Config.Updown_P11.ToString();
...@@ -132,6 +119,7 @@ namespace OnlineStore.XLRStore ...@@ -132,6 +119,7 @@ namespace OnlineStore.XLRStore
txtMoveAxis_P3.Text = boxPosition.MoveAxis_P3.ToString(); txtMoveAxis_P3.Text = boxPosition.MoveAxis_P3.ToString();
txtPullAxis_Inout_P2_P4.Text = boxPosition.PullAxis_Inout_P2_P4.ToString(); txtPullAxis_Inout_P2_P4.Text = boxPosition.PullAxis_Inout_P2_P4.ToString();
txtPullAxis_Inout_P3_P5.Text = boxPosition.PullAxis_Inout_P3_P5.ToString(); txtPullAxis_Inout_P3_P5.Text = boxPosition.PullAxis_Inout_P3_P5.ToString();
txtPullAxis_Updown_P2.Text = boxPosition.PullAxis_Updown_P2.ToString();
txtPullAxis_Updown_P3.Text = boxPosition.PullAxis_Updown_P3.ToString(); txtPullAxis_Updown_P3.Text = boxPosition.PullAxis_Updown_P3.ToString();
txtPullAxis_Updown_P4.Text = boxPosition.PullAxis_Updown_P4.ToString(); txtPullAxis_Updown_P4.Text = boxPosition.PullAxis_Updown_P4.ToString();
txtUpdown_P6_P12.Text = boxPosition.Updown_P6_P12.ToString(); txtUpdown_P6_P12.Text = boxPosition.Updown_P6_P12.ToString();
...@@ -258,11 +246,6 @@ namespace OnlineStore.XLRStore ...@@ -258,11 +246,6 @@ namespace OnlineStore.XLRStore
} }
} }
private void btnPullAxis_Updown_P2_Click(object sender, EventArgs e)
{
AxisABSMove(boxEquip.PullAxis_Updown, txtPullAxis_Updown_P2, boxEquip.Config.PullAxis_Updown_P2_Speed);
}
private void btnMoveAxis_P1_Click(object sender, EventArgs e) private void btnMoveAxis_P1_Click(object sender, EventArgs e)
{ {
if (PullAxisInOutIsInP1()) if (PullAxisInOutIsInP1())
...@@ -437,6 +420,10 @@ namespace OnlineStore.XLRStore ...@@ -437,6 +420,10 @@ namespace OnlineStore.XLRStore
{ {
AxisABSMove(boxEquip.MoveAxis, txtMoveAxis_P3, boxEquip.Config.MoveAxis_P3_Speed); AxisABSMove(boxEquip.MoveAxis, txtMoveAxis_P3, boxEquip.Config.MoveAxis_P3_Speed);
} }
private void btnPullAxis_Updown_P2_Click(object sender, EventArgs e)
{
AxisABSMove(boxEquip.PullAxis_Updown, txtPullAxis_Updown_P2, boxEquip.Config.PullAxis_Updown_P2_Speed);
}
private void btnPullAxis_Updown_P3_Click(object sender, EventArgs e) private void btnPullAxis_Updown_P3_Click(object sender, EventArgs e)
{ {
...@@ -512,11 +499,6 @@ namespace OnlineStore.XLRStore ...@@ -512,11 +499,6 @@ namespace OnlineStore.XLRStore
boxEquip.Config.PullAxis_Updown_P1 = FormUtil.GetIntValue(txtPullAxis_Updown_P1); boxEquip.Config.PullAxis_Updown_P1 = FormUtil.GetIntValue(txtPullAxis_Updown_P1);
needUpdate = true; needUpdate = true;
} }
if (boxEquip.Config.PullAxis_Updown_P2 != FormUtil.GetIntValue(txtPullAxis_Updown_P2))
{
boxEquip.Config.PullAxis_Updown_P2 = FormUtil.GetIntValue(txtPullAxis_Updown_P2);
needUpdate = true;
}
if (boxEquip.Config.Updown_P1 != FormUtil.GetIntValue(txtUpdown_P1)) if (boxEquip.Config.Updown_P1 != FormUtil.GetIntValue(txtUpdown_P1))
{ {
boxEquip.Config.Updown_P1 = FormUtil.GetIntValue(txtUpdown_P1); boxEquip.Config.Updown_P1 = FormUtil.GetIntValue(txtUpdown_P1);
...@@ -612,6 +594,7 @@ namespace OnlineStore.XLRStore ...@@ -612,6 +594,7 @@ namespace OnlineStore.XLRStore
ktkPosition.MoveAxis_P3 = FormUtil.GetIntValue(txtMoveAxis_P3); ktkPosition.MoveAxis_P3 = FormUtil.GetIntValue(txtMoveAxis_P3);
ktkPosition.PullAxis_Inout_P2_P4 = FormUtil.GetIntValue(txtPullAxis_Inout_P2_P4); ktkPosition.PullAxis_Inout_P2_P4 = FormUtil.GetIntValue(txtPullAxis_Inout_P2_P4);
ktkPosition.PullAxis_Inout_P3_P5 = FormUtil.GetIntValue(txtPullAxis_Inout_P3_P5); ktkPosition.PullAxis_Inout_P3_P5 = FormUtil.GetIntValue(txtPullAxis_Inout_P3_P5);
ktkPosition.PullAxis_Updown_P2 = FormUtil.GetIntValue(txtPullAxis_Updown_P2); ;
ktkPosition.PullAxis_Updown_P3 = FormUtil.GetIntValue(txtPullAxis_Updown_P3); ktkPosition.PullAxis_Updown_P3 = FormUtil.GetIntValue(txtPullAxis_Updown_P3);
ktkPosition.PullAxis_Updown_P4 = FormUtil.GetIntValue(txtPullAxis_Updown_P4); ktkPosition.PullAxis_Updown_P4 = FormUtil.GetIntValue(txtPullAxis_Updown_P4);
ktkPosition.Updown_P6_P12 = FormUtil.GetIntValue(txtUpdown_P6_P12); ktkPosition.Updown_P6_P12 = FormUtil.GetIntValue(txtUpdown_P6_P12);
...@@ -846,6 +829,7 @@ namespace OnlineStore.XLRStore ...@@ -846,6 +829,7 @@ namespace OnlineStore.XLRStore
boxEquip.Config.B_Col6_Sig_Shield = res; boxEquip.Config.B_Col6_Sig_Shield = res;
break; break;
} }
StoreManager.SaveBoxConfig(boxEquip.Config);
this.Invoke(new Action(() => this.Invoke(new Action(() =>
{ {
lblcolSigState.BackColor = res == 0 ? Color.Red : Color.Green; lblcolSigState.BackColor = res == 0 ? Color.Red : Color.Green;
...@@ -876,7 +860,7 @@ namespace OnlineStore.XLRStore ...@@ -876,7 +860,7 @@ namespace OnlineStore.XLRStore
boxEquip.Config.B_Col5_Sig_Shield = res; boxEquip.Config.B_Col5_Sig_Shield = res;
boxEquip.Config.B_Col6_Sig_Shield = res; boxEquip.Config.B_Col6_Sig_Shield = res;
StoreManager.SaveBoxConfig(boxEquip.Config);
} }
private void btnShieldSig_Click(object sender, EventArgs e) private void btnShieldSig_Click(object sender, EventArgs e)
......
...@@ -336,10 +336,12 @@ ...@@ -336,10 +336,12 @@
// //
// pictureBox2 // pictureBox2
// //
this.pictureBox2.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox2.Location = new System.Drawing.Point(3, 19); this.pictureBox2.Location = new System.Drawing.Point(3, 19);
this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(401, 323); this.pictureBox2.Size = new System.Drawing.Size(401, 323);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 1; this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false; this.pictureBox2.TabStop = false;
// //
...@@ -356,10 +358,12 @@ ...@@ -356,10 +358,12 @@
// //
// pictureBox1 // pictureBox1
// //
this.pictureBox1.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 19); this.pictureBox1.Location = new System.Drawing.Point(3, 19);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(401, 323); this.pictureBox1.Size = new System.Drawing.Size(401, 323);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
// //
......
...@@ -52,7 +52,7 @@ namespace OnlineStore.XLRStore ...@@ -52,7 +52,7 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param> /// <param name="cameraArgs"></param>
private void BoxBean_camera_event(CameraArgs cameraArgs) private void BoxBean_camera_event(CameraArgs cameraArgs)
{ {
LogUtil.info($"事件触发{cameraArgs.CamName} 取图"); // LogUtil.info($"事件触发{cameraArgs.CamName} 取图");
if(cameraArgs.CamName.Equals("box_A")) if(cameraArgs.CamName.Equals("box_A"))
{ {
pictureBox1.Image = cameraArgs.Image; pictureBox1.Image = cameraArgs.Image;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!