Commit 80e8f55d 张东亮

存储机构-视觉对位流程

1 个父辈 77cba787
......@@ -27,6 +27,7 @@ namespace OnlineStore.Common
public static string Line_CID = "Line_CID";
public static string ImagePath = "ImagePath";
public static string ConfigPath_XLRStore = "ConfigPath_XLRStore";
public static string ConfigPath_Input = "ConfigPath_Input";
public static string ConfigPath_Box = "ConfigPath_Box";
......@@ -104,10 +105,10 @@ namespace OnlineStore.Common
public static string AutoInput = "AutoInput";
public static string AInStoreInfo= "AInStoreInfo";
public static string AOutStoreInfo= "AOutStoreInfo";
public static string BInStoreInfo= "BInStoreInfo";
public static string BOutStoreInfo= "BOutStoreInfo";
public static string AInStoreInfo = "AInStoreInfo";
public static string AOutStoreInfo = "AOutStoreInfo";
public static string BInStoreInfo = "BInStoreInfo";
public static string BOutStoreInfo = "BOutStoreInfo";
public static string AShelfInfo = "AShelfInfo";
public static string BShelfInfo = "BShelfInfo";
......
......@@ -38,7 +38,6 @@ PRO,0,移栽升降轴_B下暂存区取料高点P10,Updown_P10,100,,,,,,,,,,,,
PRO,0,移栽升降轴_B下暂存区取料低点P11,Updown_P11,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轴_A进出料暂存区取放料点P2,XAxis_A_P2,100,,,,,,,,,,,,
......@@ -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面移栽压紧轴_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_Col2_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
05AA01010101,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
05AA01030101,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
05AA01050101,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
05AA02010101,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
05AA02030101,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
05AA02050101,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
05AA03010101,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
05AA03030101,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
05AA03050101,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
05BB01010101,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
05BB01030101,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
05BB01050101,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
05BB02010101,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
05BB02030101,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
05BB02050101,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
05BB03010101,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
05BB03030101,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
05BB03050101,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
位置,优先级,高度,宽度,料仓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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,1779933
05BB03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933,1779933
......@@ -125,9 +125,7 @@
<Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="eyemLib.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="eyemLib.dll" />
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
......@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary
public override int GetHomeSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM;
return axisS.ORG;
}
public override int GetLimitNegativeSingle(string portName, short slvAddr)
......
此文件类型无法预览
此文件类型无法预览
......@@ -111,9 +111,29 @@ namespace OnlineStore.DeviceLibrary
Wait = 0,
#region 料仓原点返回和重置步骤 100开始
/// <summary>
/// BOX复位:存储机构复位
/// BOX复位:存储机构复位,检查当前所在层数
/// </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>
/// BOX复位:料斗拉取升降轴到待机点
/// </summary>
......@@ -289,6 +309,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_01_MoveAxis_Ready,
/// <summary>
///料仓入库:移栽升降轴到上暂存区取料低点P3/P9
/// </summary>
SI_01_Pull_Updown_ToPosition,
/// <summary>
/// 料仓入库:到料盘暂存区
/// 1. 行走机构到P2(进出料机构取放点)
/// 2. 移栽升降轴到P3(A上暂存区取料低点)
......
......@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout_P2_P4 = position.PullAxis_Inout_P2_P4;
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_P4 = position.PullAxis_Updown_P4;
Updown_P6_P12 = position.Updown_P6_P12;
......@@ -269,6 +270,7 @@ namespace OnlineStore.DeviceLibrary
ComAxis_AB_P2 = position.ComAxis_AB_P2;
ComAxis_AB_P3 = position.ComAxis_AB_P3;
MoveAxis_P3 = position.MoveAxis_P3;
}
/// <summary>
/// 加载固定点位位置
......@@ -288,7 +290,6 @@ namespace OnlineStore.DeviceLibrary
Updown_P10 = equip_Config.Updown_P10;
Updown_P11 = equip_Config.Updown_P11;
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_P2 = equip_Config.XAxis_A_P2;
MiddleAxis_A_P1 = equip_Config.MiddleAxis_A_P1;
......
......@@ -332,6 +332,7 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W006_AxisOrg))
{
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
{
......
......@@ -83,6 +83,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public string[] trayBColumns;
/// <summary>
/// A面列信号屏蔽
/// </summary>
public string[] sheidAColmns;
/// <summary>
/// B面列信号屏蔽
/// </summary>
public string[] sheidBColmns;
/// <summary>
/// A面等待出库的队列
/// </summary>
public ConcurrentQueue<InOutParam> waitAOutStoreList = new ConcurrentQueue<InOutParam>();
......@@ -150,6 +158,26 @@ namespace OnlineStore.DeviceLibrary
IO_Type.Column_Check_B5,
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()
{
......@@ -187,12 +215,14 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if (!OpenAllAxis())
bool rtn = false;
Task task = Task.Factory.StartNew(new Action(() => { rtn = OpenAllAxis(); }));
task.Wait();
if (!rtn)
{
CloseAllAxis();
return false;
}
StartCamera();
SetAllTimer(false);
SetConnectServerTimer(false);
MoveInfo.EndMove();
......@@ -209,7 +239,10 @@ namespace OnlineStore.DeviceLibrary
public override bool Reset()
{
StopMove();
if (!OpenAllAxis())
bool rtn = false;
Task task = Task.Factory.StartNew(new Action(() => { rtn = OpenAllAxis(); }));
task.Wait();
if (!rtn)
{
CloseAllAxis();
return false;
......@@ -233,7 +266,7 @@ namespace OnlineStore.DeviceLibrary
alarmType = AlarmType.None;
isInSuddenDown = false;
isNoAirpressure_Check = false;
MoveInfo.NextMoveStep(StepEnum.BOX_H01_Wait);
MoveInfo.NextMoveStep(StepEnum.BOX_H001_Wait);
AutoInout.StopAuto();
LogInfo($"复位 {MoveInfo.SLog} :存储机构轴开始复位");
......@@ -265,8 +298,55 @@ namespace OnlineStore.DeviceLibrary
switch (MoveInfo.MoveStep)
{
//回零
case StepEnum.BOX_H01_Wait:
if (!PullAxis_Updown.IsInPosition(Config.PullAxis_Updown_P1) && !PullAxis_Updown.IsInPosition(Config.PullAxis_Updown_P2))
case StepEnum.BOX_H001_Wait:
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);
LogInfo($"复位 {MoveInfo.SLog}:当前料屉拉取升降轴不在在料屉待机点/提取低点,先到低点,移栽升降轴到料屉上方过渡点");
......
......@@ -85,16 +85,42 @@ namespace OnlineStore.DeviceLibrary
}
private void ToDrawer_StartPoint()
{
MoveAxis.AbsMove(MoveInfo, autoFindPos.CurRow * autoFindPos.Row_Spacing, Config.MoveAxis_P1_Speed);
UpdownAxis.AbsMove(MoveInfo, autoFindPos.CurColumn * autoFindPos.Column_Spacing, Config.Updown_P1_Speed);
StringBuilder stringBuilder = new StringBuilder(MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4));
stringBuilder.Append(autoFindPos.CurRow.ToString().PadLeft(2, '0'));
stringBuilder.Append(autoFindPos.CurColumn.ToString().PadLeft(2, '0'));
stringBuilder.Append("0101");
if (MoveInfo.MoveParam.PosInfo.PosId.Equals(stringBuilder.ToString()))
{
MoveAxisToP3();
UpdownAxisTo_P6_P12();
PullAxis_UpdownToLowP4();
}
else
{
autoFindPos.Startposition_MoveAxis = MoveAxis.GetAclPosition();
autoFindPos.Startposition_PullUpdpwnAxis = PullAxis_Updown.GetAclPosition();
autoFindPos.Startposition_UpDownAxis = UpdownAxis.GetAclPosition();
LogUtil.info($"视觉对位 运行到抽屉 行={autoFindPos.CurRow},列={autoFindPos.CurColumn}");
MoveAxis.AbsMove(MoveInfo, autoFindPos.Startposition_MoveAxis + (autoFindPos.CurColumn - autoFindPos.PreColumn) * autoFindPos.Row_Spacing, Config.MoveAxis_P1_Speed);
UpdownAxis.AbsMove(MoveInfo, autoFindPos.Startposition_UpDownAxis + (autoFindPos.CurRow - autoFindPos.PreRow) * autoFindPos.Column_Spacing, Config.Updown_P1_Speed);
PullAxis_Updown.AbsMove(MoveInfo, autoFindPos.Startposition_PullUpdpwnAxis + (autoFindPos.CurRow - autoFindPos.PreRow) * autoFindPos.Column_Spacing, Config.PullAxis_Updown_P1_Speed);
}
}
private bool CheckMarkXPoint(EyemOcsFXYR eyemOcsFXYR)
{
if (Math.Abs(Config.Drawer_X - eyemOcsFXYR.fX) < Config.Drawer_X_Error)
{
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)},在误差范围内" +
$"[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
AutoFindPosSaveImage($"OK_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}");
return true;
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}," +
}
AutoFindPosSaveImage($"NG_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}");
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}," +
$"行走机构相对移动{(Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxis.AbsMove(MoveInfo, Convert.ToInt32(MoveAxis.GetAclPosition() + (Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse), Config.MoveAxis_P1_Speed / 2);
return false;
......@@ -102,13 +128,23 @@ namespace OnlineStore.DeviceLibrary
private bool CheckMarkYPoint(EyemOcsFXYR eyemOcsFXYR)
{
if (Math.Abs(Config.Drawer_Y - eyemOcsFXYR.fY) < Config.Drawer_Y_Error)
{
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)},在误差范围内" +
$"[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
AutoFindPosSaveImage($"OK_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}");
return true;
}
AutoFindPosSaveImage($"NG_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}");
UpdownAxis.AbsMove(MoveInfo, Convert.ToInt32(UpdownAxis.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 2);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}," +
$"移栽升降轴相对移动{(Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_Updown.AbsMove(MoveInfo, Convert.ToInt32(PullAxis_Updown.GetAclPosition() + (Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse), Config.Updown_P1_Speed / 2);
LogInfo($"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}," +
$"移栽升降轴、料屉升降轴相对移动{(Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
return false;
}
private void AutoFindPosSaveImage(string imgInfo)
{
SaveImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId),$"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0,4)}",$"{DateTime.Now.ToString("yyyyMMddhhmmss")}_{autoFindPos.CurRow}_{autoFindPos.CurColumn}_{imgInfo}");
}
public void StartFindPos(InOutParam param)
{
if (isInSuddenDown || isNoAirpressure_Check ||
......@@ -119,13 +155,15 @@ namespace OnlineStore.DeviceLibrary
return;
}
LogInfo(" 启动视觉对位【" + param.PosInfo.ToStr() + "】 ");
param.MoveP = new LineMoveP(Config, param.PosInfo.PosId);
MoveInfo.NewMove(MoveType.Working, param);
SetBoxStatus(DeviceStatus.Debugging, RunStatus.Busy);
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
PullAxis_Inout_To_P1();
}
private bool SaveDrawerPosition()
{
StringBuilder stringBuilder = new StringBuilder(MoveInfo.MoveParam.PosInfo.PosId);
StringBuilder stringBuilder = new StringBuilder(MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4));
stringBuilder.Append(autoFindPos.CurRow.ToString().PadLeft(2, '0'));
stringBuilder.Append(autoFindPos.CurColumn.ToString().PadLeft(2, '0'));
List<string> curDrawer = PositionNumList.FindAll(s => s.StartsWith(stringBuilder.ToString()));
......@@ -137,8 +175,11 @@ namespace OnlineStore.DeviceLibrary
if (ktkPosition != null)
{
ktkPosition.MoveAxis_P3 = MoveAxis.GetAclPosition();
ktkPosition.Updown_P7_P13 = UpdownAxis.GetAclPosition();
ktkPosition.Updown_P6_P12 = UpdownAxis.GetAclPosition();
ktkPosition.Updown_P7_P13 = UpdownAxis.GetAclPosition() + autoFindPos.UpdownAxis_Diff_Upper_Low;
ktkPosition.PullAxis_Updown_P4 = PullAxis_Updown.GetAclPosition();
ktkPosition.PullAxis_Updown_P2 = PullAxis_Updown.GetAclPosition() + autoFindPos.PullUpdown_Diff_mid;
ktkPosition.PullAxis_Updown_P3 = PullAxis_Updown.GetAclPosition() + autoFindPos.PullUpdown_Diff_high;
}
//位置配置
string appPath = Application.StartupPath;
......@@ -157,10 +198,11 @@ namespace OnlineStore.DeviceLibrary
else
{
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:库位[{item}]保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:库位[{item}]保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
return result;
}
LogInfo($"视觉对位 {MoveInfo.SLog}:抽屉[{autoFindPos.CurRow},{autoFindPos.CurColumn}]位置信息保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
return true;
}
return false;
}
......@@ -168,8 +210,13 @@ namespace OnlineStore.DeviceLibrary
public void FindPosEnd()
{
MoveInfo.EndMove();
SetBoxStatus(DeviceStatus.Debugging, RunStatus.Runing);
if (MoveInfo.MoveParam != null)
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:对位结束[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
LogInfo($"视觉对位 {MoveInfo.SLog}:对位结束[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
foreach (string item in autoFindPos.FailedDrawers)
{
LogUtil.info("视觉对位失败抽屉:" + item);
}
}
EyemOcsFXYR ocsFXYR;
public void AutoFindPosProcess()
......@@ -188,29 +235,29 @@ namespace OnlineStore.DeviceLibrary
{
case StepEnum.SA_01_Pos_Start_Find_Pos:
MoveInfo.NextMoveStep(StepEnum.SA_02_Pos_To_Drawer_StartPoint);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
LogInfo($"视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
$"行走机构到抽屉起始点,移栽升降轴到抽屉起始点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
ToDrawer_StartPoint();
break;
case StepEnum.SA_02_Pos_To_Drawer_StartPoint:
//取图
//Bitmap bitmap = null;
Bitmap bitmap=AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
Bitmap bitmap = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR);
if (res == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_03_Pos_AcqImg);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
else if (res == -4)
{
SetWarnMsg($"存储机构-视觉对位异常[code={res}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
SetWarnMsg($"视觉对位异常[code={res}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_05_Pos_NextDrawer);
}
else
{
SetWarnMsg($"存储机构-视觉对位异常[code={res}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
SetWarnMsg($"视觉对位异常[code={res}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_05_Pos_NextDrawer);
}
......@@ -241,6 +288,8 @@ namespace OnlineStore.DeviceLibrary
if (autoFindPos.CurColumn < autoFindPos.Columns)
{
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
autoFindPos.PreColumn = autoFindPos.CurColumn;
autoFindPos.PreRow = autoFindPos.CurRow;
autoFindPos.CurColumn++;
}
else
......@@ -248,7 +297,9 @@ namespace OnlineStore.DeviceLibrary
if (autoFindPos.CurRow < autoFindPos.Rows)
{
MoveInfo.NextMoveStep(StepEnum.SA_06_Neg_Start_Find_Pos);
autoFindPos.PreRow = autoFindPos.CurRow;
autoFindPos.CurRow++;
autoFindPos.PreColumn = autoFindPos.CurColumn;
}
else//结束
{
......@@ -258,7 +309,7 @@ namespace OnlineStore.DeviceLibrary
break;
case StepEnum.SA_06_Neg_Start_Find_Pos:
MoveInfo.NextMoveStep(StepEnum.SA_07_Neg_To_Drawer_StartPoint);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
LogInfo($"视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
$"行走机构到抽屉起始点,移栽升降轴到抽屉起始点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
ToDrawer_StartPoint();
break;
......@@ -266,22 +317,22 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SA_07_Neg_To_Drawer_StartPoint:
//取图
//Bitmap bitmap1 = null;
Bitmap bitmap1=AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
Bitmap bitmap1 = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
int res1 = AutoFindPos.GetMarkInfo(bitmap1, out ocsFXYR);
if (res1 == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_08_Neg_AcqImg);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
LogInfo($"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
else if (res1 == -4)
{
SetWarnMsg($"存储机构-视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
SetWarnMsg($"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_10_Neg_NextDrawer);
}
else
{
SetWarnMsg($"存储机构-视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
SetWarnMsg($"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_10_Neg_NextDrawer);
}
......@@ -312,6 +363,8 @@ namespace OnlineStore.DeviceLibrary
if (autoFindPos.CurColumn > 1)
{
MoveInfo.NextMoveStep(StepEnum.SA_06_Neg_Start_Find_Pos);
autoFindPos.PreRow = autoFindPos.CurRow;
autoFindPos.PreColumn = autoFindPos.CurColumn;
autoFindPos.CurColumn--;
}
else
......@@ -319,7 +372,9 @@ namespace OnlineStore.DeviceLibrary
if (autoFindPos.CurRow < autoFindPos.Rows)
{
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
autoFindPos.PreRow = autoFindPos.CurRow;
autoFindPos.CurRow++;
autoFindPos.PreColumn = autoFindPos.CurColumn;
}
else//结束
{
......@@ -333,10 +388,14 @@ namespace OnlineStore.DeviceLibrary
public class AutoFindPos
{
public int Startposition_MoveAxis { get; set; }
public int Startposition_UpDownAxis { get; set; }
public int Startposition_PullUpdpwnAxis { get; set; }
/// <summary>
/// 当前行
/// </summary>
public int CurRow { get; set; } = 1;
public int PreRow { get; set; } = 1;
/// <summary>
/// x坐标到脉冲的转换系数
/// </summary>
......@@ -349,6 +408,7 @@ namespace OnlineStore.DeviceLibrary
/// 当前列
/// </summary>
public int CurColumn { get; set; } = 1;
public int PreColumn { get; set; } = 1;
/// <summary>
/// 抽屉行数
/// </summary>
......@@ -367,7 +427,20 @@ namespace OnlineStore.DeviceLibrary
/// 抽屉间列间距
/// </summary>
public int Column_Spacing { get; private set; }
/// <summary>
/// 料屉中点与低点的差
/// </summary>
public int PullUpdown_Diff_mid { get; set; }
/// <summary>
/// 料屉高点与低点的差
/// </summary>
public int PullUpdown_Diff_high { get; set; }
/// <summary>
/// 移栽升降P13-P12的差
/// </summary>
public int UpdownAxis_Diff_Upper_Low { get; set; }
public int RowsInDraw { get; set; }
public int ColumnsInDraw { get; set; }
public List<string> FailedDrawers { get; set; }
BoxEquip_Config boxEquip_Config;
public AutoFindPos(BoxEquip_Config boxEquip_Config)
......@@ -383,6 +456,8 @@ namespace OnlineStore.DeviceLibrary
{
CurRow = curRow;
CurColumn = curColumn;
PreColumn = curColumn;
PreRow = curRow;
Row_Spacing = boxEquip_Config.Row_Spacing;
Column_Spacing = boxEquip_Config.Column_Spacing;
Rows = boxEquip_Config.Drawer_Rows;
......@@ -401,7 +476,7 @@ namespace OnlineStore.DeviceLibrary
int flag;
markCoor = new EyemOcsFXYR();
EyemImage image = eyemCvtToEyemImage(bitmap);
flag = eyemMarkerTracing(image, 130, ref markCoor);
flag = eyemMarkerTracing(image, 120, ref markCoor);
Marshal.FreeHGlobal(image.vpImage);
return flag;
}
......
......@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
......@@ -14,6 +15,7 @@ namespace OnlineStore.DeviceLibrary
{
Thread[] camerathread;
bool IsOpen = false;
bool AutoSaveImage = true;
Asa.Camera.VisionLib camera;
bool loadCameraState = false;
public delegate void CameraAcqEventHandler(CameraArgs cameraArgs);
......@@ -29,6 +31,7 @@ namespace OnlineStore.DeviceLibrary
camera = new Asa.Camera.VisionLib(path);
camerathread = new Thread[2];
//pictureBox1.Image = bmp;
StartCamera();
loadCameraState = true;
}
void StartCamera()
......@@ -55,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
while (IsOpen)
{
Bitmap bmp = AcqImage(name);
LogUtil.info($"{name} 取图");
// LogUtil.info($"{name} 取图");
if (bmp != null)
{
camera_event?.Invoke(new CameraArgs(name, bmp));
......@@ -73,6 +76,19 @@ namespace OnlineStore.DeviceLibrary
{
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
{
......
......@@ -133,19 +133,25 @@ namespace OnlineStore.DeviceLibrary
break;
case StepEnum.SI_01_PullAxis_Ready:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy);
MoveInfo.NextMoveStep(StepEnum.SI_01_MoveAxis_Ready);
MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition);
if (!IsMoveAxisInSafePos())
{
MoveAxisToP1();
LogInfo($"入库 行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}");
}
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:
MoveInfo.NextMoveStep(StepEnum.SI_02_ToBufferArea);
LogInfo($"入库 {MoveInfo.SLog}:到暂存区入料口," +
$"行走机构到取放点P2,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
$"行走机构到取放点P2,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxisToP2();
UpdownAxisTo_P3_P9();
ComAxis_To_P2();
MiddleAxis_To_P2();
XAxis_To_P1();
......@@ -204,8 +210,7 @@ namespace OnlineStore.DeviceLibrary
//if(CheckOtherSideIsThereReel(out InOutPosInfo inOutPosInfo))
//{
// MoveInfo.NextMoveStep(StepEnum.SI_01_PullAxis_Ready);
// LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3,取另一面暂存区的料[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// MiddleAxis_To_P3();
// LogInfo($"入库 {MoveInfo.SLog}:取另一面暂存区的料[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// MoveInfo.MoveParam.PosInfoBack = MoveInfo.MoveParam.PosInfo.ToCopy();
// MoveInfo.MoveParam.PosInfo = inOutPosInfo;
// MoveInfo.MoveParam.MoveP = new LineMoveP(Config, inOutPosInfo.PosId);
......@@ -214,15 +219,15 @@ namespace OnlineStore.DeviceLibrary
//else
{
MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3);
LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MiddleAxis_To_P3();
LogInfo($"入库 {MoveInfo.SLog}:另一面无料,移栽旋转轴到料屉库位垂直取放料点P3,直接入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
}
else //另一个料叉已有料,进行入库
{
MoveInfo.NextMoveStep(StepEnum.SI_07_MiddleToP3);
LogInfo($"入库 {MoveInfo.SLog}:移栽旋转轴到料屉库位垂直取放料点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MiddleAxis_To_P3();
LogInfo($"入库 {MoveInfo.SLog}:另一个料叉已有料,移栽旋转轴到料屉库位垂直取放料点P3,进行入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
break;
......@@ -318,6 +323,7 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
MoveInfo.EndMove();
AutoInout.InOutEndProcess(this, MoveType.InStore);
LogInfo($"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
else
{
......
......@@ -174,18 +174,19 @@ namespace OnlineStore.DeviceLibrary
}
//直接出库,执行该步骤的情况:1.另一个料叉有料;2.另一面有出库任务但出料口有料;3.另一面没有出库任务;
MoveInfo.NextMoveStep(StepEnum.SO_14_GetReels_Ready);
PullAxis_UpdownToP1();
UpdownAxisTo_P4_P10();
if (MoveInfo.MoveParam.PosInfoBack == null)
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.barcode}]取料完成,准备送往出料口");
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.barcode}]取料完成,准备送往出料口。料屉升降轴到P1点,移栽升降轴到下暂存区放料高点P4/P10");
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;
case StepEnum.SO_14_GetReels_Ready:
//已出一边的料,切换到另一边
MoveInfo.NextMoveStep(StepEnum.SO_15_ToBufferArea);
LogInfo($"出库 {MoveInfo.SLog}:到暂存区出料口," +
$"行走机构到进出料机构取放点P2,移栽升降轴到下暂存区放料高点P4/P10[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
$"行走机构到进出料机构取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
MoveAxisToP2();
UpdownAxisTo_P4_P10();
break;
case StepEnum.SO_15_ToBufferArea:
//if (!OutDoorCheck(MoveInfo.MoveParam))
......
......@@ -56,6 +56,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
private void MoveAxisToP1()
{
if (!MoveAxis.IsInPosition(MoveInfo.MoveParam.MoveP.MoveAxis_P1))
MoveAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.MoveP.MoveAxis_P1, Config.MoveAxis_P1_Speed);
}
/// <summary>
......@@ -311,7 +312,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide())
{
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
{
......@@ -365,6 +366,117 @@ namespace OnlineStore.DeviceLibrary
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
/// <summary>
/// 设置料仓状态
......@@ -419,43 +531,43 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns>
private bool CamCheckReelPosition()
{
//if (IgnoreCamDect)
//{
// CamDetectError = false;
// return true;
//}
//AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId), out Bitmap bitmap);
//int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR);
//if (res == 0)
//{
// LogInfo($"存储机构-相机检查库位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosId}]");
//}
//else if (res == -4)
//{
// SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
// CamDetectError = true;
// return false;
//}
//else
//{
// SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
// CamDetectError = true;
// 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)
//{
// CamDetectError = false;
// return true;
//}
//else
//{
// 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)},");
//}
//CamDetectError = true;
//return false;
if (IgnoreCamDect)
{
CamDetectError = false;
return true;
}
Bitmap bitmap = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR);
if (res == 0)
{
LogInfo($"存储机构-相机检查库位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosId}]");
}
else if (res == -4)
{
SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
CamDetectError = true;
return false;
}
else
{
SetWarnMsg($"存储机构-相机检查库位异常[code={res}],未找到Mark点。库位号:{MoveInfo.MoveParam.PosInfo.PosId}");
CamDetectError = true;
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)
{
CamDetectError = false;
return true;
}
else
{
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)},");
}
CamDetectError = true;
return false;
//return true;
}
#endregion
#region 入库
private DateTime startInStoreTime = DateTime.Now;
......
......@@ -76,7 +76,11 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[CSVAttribute("AB移栽压紧轴压紧点P3")]
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)
{
try
......
......@@ -142,6 +142,17 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("PullAxis_Inout_P1")]
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>
/// PRO,0,移栽升降轴_待机点P1,Updown_P1,100,,,,,,,,,,,,
/// </summary>
......@@ -203,12 +214,6 @@ namespace OnlineStore.LoadCSVLibrary
public int PullAxis_Updown_P1 { get; set; }
/// <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,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("XAxis_A_P1")]
......
......@@ -22,6 +22,7 @@
<add key="ConfigPath_BoxPosition" value="\Config\linePositions.csv" />
<add key="ConfigPath_DrawerPosition" value="\Config\DrawerPosition.csv" />
<add key="ConfigPath_TrayList" value="\LineConfig\TrayList.data" />
<add key="ImagePath" value="\Images\" />
<add key="Line_CID" value="05" />
<!--end one store config-->
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
......
......@@ -137,7 +137,7 @@
this.tabPage2.Controls.Add(this.panel1);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
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.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -148,7 +148,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
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;
//
// tableLayoutPanel1
......@@ -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, 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;
//
// InputControl
......@@ -184,10 +184,10 @@
this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2);
this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill;
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.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.WorkStatus = "暂未启动";
//
......@@ -197,10 +197,10 @@
this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA1.ColorStatus = System.Drawing.Color.White;
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.ReelText = "暂存区物料";
this.ReelControlA1.Size = new System.Drawing.Size(90, 3);
this.ReelControlA1.Size = new System.Drawing.Size(488, 80);
this.ReelControlA1.TabIndex = 0;
//
// ReelControlA2
......@@ -209,10 +209,10 @@
this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA2.ColorStatus = System.Drawing.Color.White;
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.ReelText = "暂存区物料";
this.ReelControlA2.Size = new System.Drawing.Size(90, 3);
this.ReelControlA2.Size = new System.Drawing.Size(488, 80);
this.ReelControlA2.TabIndex = 1;
//
// ReelControlB1
......@@ -221,10 +221,10 @@
this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB1.ColorStatus = System.Drawing.Color.White;
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.ReelText = "暂存区物料";
this.ReelControlB1.Size = new System.Drawing.Size(90, 3);
this.ReelControlB1.Size = new System.Drawing.Size(488, 80);
this.ReelControlB1.TabIndex = 2;
//
// ReelControlB2
......@@ -233,10 +233,10 @@
this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB2.ColorStatus = System.Drawing.Color.White;
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.ReelText = "暂存区物料";
this.ReelControlB2.Size = new System.Drawing.Size(90, 3);
this.ReelControlB2.Size = new System.Drawing.Size(488, 80);
this.ReelControlB2.TabIndex = 3;
//
// BoxControl
......@@ -250,7 +250,7 @@
this.BoxControl.Location = new System.Drawing.Point(3, 3);
this.BoxControl.MoveInfo = "暂无出入库";
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.WorkStatus = "暂未启动";
//
......@@ -261,10 +261,10 @@
this.ShelfAControl.ColorStatus = System.Drawing.Color.White;
this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill;
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.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.WorkStatus = "暂未启动";
//
......@@ -275,10 +275,10 @@
this.ShelfBControl.ColorStatus = System.Drawing.Color.White;
this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill;
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.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.WorkStatus = "暂未启动";
//
......
......@@ -45,9 +45,6 @@
this.label7 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.button5 = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
......@@ -65,7 +62,6 @@
this.label17 = new System.Windows.Forms.Label();
this.txtMark_X = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.button6 = new System.Windows.Forms.Button();
this.tabPage3 = new System.Windows.Forms.TabPage();
......@@ -90,20 +86,24 @@
this.textBox6 = new System.Windows.Forms.TextBox();
this.button9 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBoxOpenAuto = new System.Windows.Forms.CheckBox();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
......@@ -116,8 +116,8 @@
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 21.77778F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.22222F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 66.66666F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
this.tableLayoutPanel1.TabIndex = 0;
//
......@@ -128,10 +128,10 @@
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage4);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(3, 101);
this.tabControl1.Location = new System.Drawing.Point(3, 153);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(794, 346);
this.tabControl1.Size = new System.Drawing.Size(794, 294);
this.tabControl1.TabIndex = 0;
//
// tabPage1
......@@ -149,7 +149,6 @@
this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.textBox4);
this.tabPage1.Controls.Add(this.button5);
this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.textBox2);
this.tabPage1.Controls.Add(this.label1);
......@@ -157,7 +156,7 @@
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(786, 316);
this.tabPage1.Size = new System.Drawing.Size(786, 264);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "设置模板抽屉信息";
this.tabPage1.UseVisualStyleBackColor = true;
......@@ -169,7 +168,7 @@
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(140, 17);
this.label11.TabIndex = 19;
this.label11.Text = "抽屉间距(脉冲值):";
this.label11.Text = "抽屉间距(脉冲值):";
//
// txtColumnSpacing
//
......@@ -186,7 +185,7 @@
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(140, 17);
this.label12.TabIndex = 17;
this.label12.Text = "抽屉间距(脉冲值):";
this.label12.Text = "抽屉间距(脉冲值):";
//
// txtRowSpacing
//
......@@ -220,7 +219,7 @@
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(68, 17);
this.label10.TabIndex = 13;
this.label10.Text = "抽屉数:";
this.label10.Text = "抽屉数:";
//
// txtDrawerRows
//
......@@ -245,7 +244,7 @@
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(100, 23);
this.textBox3.TabIndex = 10;
this.textBox3.Text = "10";
this.textBox3.Text = "20";
//
// label7
//
......@@ -262,11 +261,11 @@
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(100, 23);
this.textBox4.TabIndex = 8;
this.textBox4.Text = "2";
this.textBox4.Text = "4";
//
// button5
//
this.button5.Location = new System.Drawing.Point(215, 234);
this.button5.Location = new System.Drawing.Point(514, 59);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(146, 41);
this.button5.TabIndex = 7;
......@@ -274,42 +273,6 @@
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.radioButton2);
this.groupBox2.Controls.Add(this.radioButton1);
this.groupBox2.Location = new System.Drawing.Point(490, 21);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(200, 70);
this.groupBox2.TabIndex = 6;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "抽屉所在面";
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(121, 34);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(46, 21);
this.radioButton2.TabIndex = 5;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "B面";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(6, 34);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(46, 21);
this.radioButton1.TabIndex = 4;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "A面";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// label2
//
this.label2.AutoSize = true;
......@@ -334,7 +297,7 @@
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 17);
this.label1.TabIndex = 1;
this.label1.Text = "抽屉所在:";
this.label1.Text = "抽屉所在:";
//
// textBox1
//
......@@ -358,15 +321,14 @@
this.tabPage2.Controls.Add(this.label17);
this.tabPage2.Controls.Add(this.txtMark_X);
this.tabPage2.Controls.Add(this.pictureBox1);
this.tabPage2.Controls.Add(this.label4);
this.tabPage2.Controls.Add(this.label3);
this.tabPage2.Controls.Add(this.button6);
this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(786, 316);
this.tabPage2.Size = new System.Drawing.Size(786, 264);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "配置抽屉位置";
this.tabPage2.Text = "配置模板抽屉";
this.tabPage2.UseVisualStyleBackColor = true;
//
// label22
......@@ -380,9 +342,9 @@
//
// button14
//
this.button14.Location = new System.Drawing.Point(570, 140);
this.button14.Location = new System.Drawing.Point(570, 114);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(147, 45);
this.button14.Size = new System.Drawing.Size(210, 45);
this.button14.TabIndex = 13;
this.button14.Text = "保存Mark点参数";
this.button14.UseVisualStyleBackColor = true;
......@@ -390,9 +352,9 @@
//
// button13
//
this.button13.Location = new System.Drawing.Point(570, 71);
this.button13.Location = new System.Drawing.Point(570, 60);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(147, 45);
this.button13.Size = new System.Drawing.Size(210, 45);
this.button13.TabIndex = 12;
this.button13.Text = "取像并获取Mark点坐标";
this.button13.UseVisualStyleBackColor = true;
......@@ -401,7 +363,7 @@
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(262, 202);
this.label21.Location = new System.Drawing.Point(291, 148);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(159, 17);
this.label21.TabIndex = 11;
......@@ -409,7 +371,7 @@
//
// txtMark_Y_err
//
this.txtMark_Y_err.Location = new System.Drawing.Point(425, 196);
this.txtMark_Y_err.Location = new System.Drawing.Point(454, 142);
this.txtMark_Y_err.Name = "txtMark_Y_err";
this.txtMark_Y_err.Size = new System.Drawing.Size(100, 23);
this.txtMark_Y_err.TabIndex = 10;
......@@ -418,7 +380,7 @@
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(261, 154);
this.label20.Location = new System.Drawing.Point(290, 100);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(160, 17);
this.label20.TabIndex = 9;
......@@ -426,7 +388,7 @@
//
// txtMark_X_err
//
this.txtMark_X_err.Location = new System.Drawing.Point(425, 151);
this.txtMark_X_err.Location = new System.Drawing.Point(454, 97);
this.txtMark_X_err.Name = "txtMark_X_err";
this.txtMark_X_err.Size = new System.Drawing.Size(100, 23);
this.txtMark_X_err.TabIndex = 8;
......@@ -435,7 +397,7 @@
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(297, 114);
this.label19.Location = new System.Drawing.Point(326, 60);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(111, 17);
this.label19.TabIndex = 7;
......@@ -443,7 +405,7 @@
//
// txtMark_Y
//
this.txtMark_Y.Location = new System.Drawing.Point(425, 114);
this.txtMark_Y.Location = new System.Drawing.Point(454, 60);
this.txtMark_Y.Name = "txtMark_Y";
this.txtMark_Y.Size = new System.Drawing.Size(100, 23);
this.txtMark_Y.TabIndex = 6;
......@@ -452,7 +414,7 @@
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(286, 71);
this.label17.Location = new System.Drawing.Point(315, 17);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(112, 17);
this.label17.TabIndex = 5;
......@@ -460,7 +422,7 @@
//
// txtMark_X
//
this.txtMark_X.Location = new System.Drawing.Point(425, 71);
this.txtMark_X.Location = new System.Drawing.Point(454, 17);
this.txtMark_X.Name = "txtMark_X";
this.txtMark_X.Size = new System.Drawing.Size(100, 23);
this.txtMark_X.TabIndex = 4;
......@@ -468,25 +430,17 @@
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(6, 71);
this.pictureBox1.Location = new System.Drawing.Point(5, 6);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(249, 223);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 3;
this.pictureBox1.TabStop = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(404, 28);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(368, 17);
this.label4.TabIndex = 2;
this.label4.Text = "配置模板抽屉位置,即配置该抽屉的位置参数,包括其内的库位位置";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(15, 14);
this.label3.Location = new System.Drawing.Point(451, 184);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(43, 17);
this.label3.TabIndex = 1;
......@@ -494,11 +448,11 @@
//
// button6
//
this.button6.Location = new System.Drawing.Point(251, 14);
this.button6.Location = new System.Drawing.Point(570, 6);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(147, 45);
this.button6.Size = new System.Drawing.Size(210, 45);
this.button6.TabIndex = 0;
this.button6.Text = "打开伺服调试界面";
this.button6.Text = "打开伺服调试界面配置抽屉的位置以及其内的库位位置";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
......@@ -512,7 +466,7 @@
this.tabPage3.Controls.Add(this.label5);
this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(786, 316);
this.tabPage3.Size = new System.Drawing.Size(786, 264);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "更新库位位置信息";
this.tabPage3.UseVisualStyleBackColor = true;
......@@ -559,7 +513,7 @@
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(163, 46);
this.button7.TabIndex = 3;
this.button7.Text = "更新";
this.button7.Text = "更新所有抽屉内的库位位置";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click_1);
//
......@@ -589,14 +543,14 @@
this.tabPage4.Controls.Add(this.button9);
this.tabPage4.Location = new System.Drawing.Point(4, 26);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(786, 316);
this.tabPage4.Size = new System.Drawing.Size(786, 264);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "视觉对位";
this.tabPage4.UseVisualStyleBackColor = true;
//
// button12
//
this.button12.Location = new System.Drawing.Point(496, 122);
this.button12.Location = new System.Drawing.Point(526, 70);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(163, 46);
this.button12.TabIndex = 22;
......@@ -606,7 +560,7 @@
//
// button11
//
this.button11.Location = new System.Drawing.Point(496, 70);
this.button11.Location = new System.Drawing.Point(620, 15);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(163, 46);
this.button11.TabIndex = 21;
......@@ -617,7 +571,7 @@
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(493, 191);
this.label18.Location = new System.Drawing.Point(385, 132);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(80, 17);
this.label18.TabIndex = 20;
......@@ -626,24 +580,24 @@
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(26, 188);
this.label15.Location = new System.Drawing.Point(9, 135);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(223, 17);
this.label15.Size = new System.Drawing.Size(235, 17);
this.label15.TabIndex = 18;
this.label15.Text = "Y方向系数(Mark点Y轴->行走机构):";
this.label15.Text = "Y方向系数(Mark点Y轴->料屉升降轴):";
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(283, 185);
this.textBox7.Location = new System.Drawing.Point(266, 132);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(100, 23);
this.textBox7.TabIndex = 17;
this.textBox7.Text = "1";
this.textBox7.Text = "489";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(26, 152);
this.label16.Location = new System.Drawing.Point(9, 99);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(225, 17);
this.label16.TabIndex = 16;
......@@ -651,15 +605,15 @@
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(283, 146);
this.textBox8.Location = new System.Drawing.Point(266, 93);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(100, 23);
this.textBox8.TabIndex = 15;
this.textBox8.Text = "1";
this.textBox8.Text = "489";
//
// button10
//
this.button10.Location = new System.Drawing.Point(245, 59);
this.button10.Location = new System.Drawing.Point(228, 30);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(163, 46);
this.button10.TabIndex = 14;
......@@ -670,7 +624,7 @@
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(26, 91);
this.label13.Location = new System.Drawing.Point(9, 62);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(80, 17);
this.label13.TabIndex = 13;
......@@ -678,7 +632,7 @@
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(112, 88);
this.textBox5.Location = new System.Drawing.Point(95, 59);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 23);
this.textBox5.TabIndex = 12;
......@@ -687,15 +641,15 @@
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(26, 47);
this.label14.Location = new System.Drawing.Point(9, 18);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(80, 17);
this.label14.TabIndex = 11;
this.label14.Text = "抽屉开始:";
this.label14.Text = "抽屉开始:";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(112, 44);
this.textBox6.Location = new System.Drawing.Point(95, 15);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(100, 23);
this.textBox6.TabIndex = 10;
......@@ -703,7 +657,7 @@
//
// button9
//
this.button9.Location = new System.Drawing.Point(496, 18);
this.button9.Location = new System.Drawing.Point(451, 15);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(163, 46);
this.button9.TabIndex = 7;
......@@ -713,21 +667,34 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBoxOpenAuto);
this.groupBox1.Controls.Add(this.button4);
this.groupBox1.Controls.Add(this.button3);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(794, 92);
this.groupBox1.Size = new System.Drawing.Size(794, 144);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "流程";
//
// checkBoxOpenAuto
//
this.checkBoxOpenAuto.AutoSize = true;
this.checkBoxOpenAuto.Location = new System.Drawing.Point(31, 22);
this.checkBoxOpenAuto.Name = "checkBoxOpenAuto";
this.checkBoxOpenAuto.Size = new System.Drawing.Size(99, 21);
this.checkBoxOpenAuto.TabIndex = 4;
this.checkBoxOpenAuto.Text = "开启视觉对位";
this.checkBoxOpenAuto.UseVisualStyleBackColor = true;
this.checkBoxOpenAuto.CheckedChanged += new System.EventHandler(this.checkBoxOpenAuto_CheckedChanged);
//
// button4
//
this.button4.Location = new System.Drawing.Point(639, 32);
this.button4.Location = new System.Drawing.Point(504, 91);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(146, 41);
this.button4.TabIndex = 3;
......@@ -737,7 +704,7 @@
//
// button3
//
this.button3.Location = new System.Drawing.Point(429, 32);
this.button3.Location = new System.Drawing.Point(342, 91);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(146, 41);
this.button3.TabIndex = 2;
......@@ -747,17 +714,17 @@
//
// button2
//
this.button2.Location = new System.Drawing.Point(219, 32);
this.button2.Location = new System.Drawing.Point(504, 32);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(146, 41);
this.button2.TabIndex = 1;
this.button2.Text = "②配置抽屉位置";
this.button2.Text = "②配置模板抽屉";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(9, 32);
this.button1.Location = new System.Drawing.Point(342, 32);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(146, 41);
this.button1.TabIndex = 0;
......@@ -765,6 +732,43 @@
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox2
//
this.groupBox2.BackColor = System.Drawing.Color.YellowGreen;
this.groupBox2.Controls.Add(this.radioButton2);
this.groupBox2.Controls.Add(this.radioButton1);
this.groupBox2.Location = new System.Drawing.Point(31, 62);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(200, 70);
this.groupBox2.TabIndex = 6;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "抽屉所在面";
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(121, 34);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(46, 21);
this.radioButton2.TabIndex = 5;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "B面";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(6, 34);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(46, 21);
this.radioButton1.TabIndex = 4;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "A面";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// timer1
//
this.timer1.Interval = 1000;
......@@ -783,8 +787,6 @@
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
......@@ -793,6 +795,9 @@
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
......@@ -820,7 +825,6 @@
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button button7;
......@@ -865,5 +869,6 @@
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.CheckBox checkBoxOpenAuto;
}
}
\ No newline at end of file
......@@ -20,9 +20,18 @@ namespace OnlineStore.XLRStore
{
CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
SetState(false);
}
BoxEquip boxEquip;
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)
{
tabControl1.SelectedIndex = 0;
......@@ -124,6 +133,7 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param>
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(textBox3.Text, out colmns_in_drawer);
......@@ -172,10 +182,10 @@ namespace OnlineStore.XLRStore
ktkPosition.MoveAxis_P3 = srcPosition.MoveAxis_P3;
ktkPosition.PullAxis_Inout_P2_P4 = srcPosition.PullAxis_Inout_P2_P4;
ktkPosition.PullAxis_Inout_P3_P5 = srcPosition.PullAxis_Inout_P3_P5;
ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3;
ktkPosition.PullAxis_Updown_P4 = srcPosition.PullAxis_Updown_P4;
ktkPosition.Updown_P6_P12 = srcPosition.Updown_P6_P12;
ktkPosition.Updown_P7_P13 = srcPosition.Updown_P7_P13;
//ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3;
//ktkPosition.PullAxis_Updown_P4 = srcPosition.PullAxis_Updown_P4;
//ktkPosition.Updown_P6_P12 = srcPosition.Updown_P6_P12;
//ktkPosition.Updown_P7_P13 = srcPosition.Updown_P7_P13;
ktkPosition.XAxis_AB_P3 = srcPosition.XAxis_AB_P3;
bool result = CSVPositionReader<BoxPosition>.SavePostion(positionConfigFile, ktkPosition);
if (result)
......@@ -208,6 +218,7 @@ namespace OnlineStore.XLRStore
}
}
info = $"更新完成!";
}));
}
......@@ -223,15 +234,29 @@ namespace OnlineStore.XLRStore
button11.Enabled = true;
timer1.Enabled = true;
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.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)
{
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;
boxEquip.autoFindPosMode = false;
}
......@@ -281,9 +306,19 @@ namespace OnlineStore.XLRStore
{
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);
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)
{
txtMark_X.Text = eyemOcsFXYR.fX.ToString("f2");
......@@ -312,5 +347,10 @@ namespace OnlineStore.XLRStore
boxEquip.Config.Drawer_Y_Error=float.Parse(txtMark_Y_err.Text);
StoreManager.SaveBoxConfig(boxEquip.Config);
}
private void checkBoxOpenAuto_CheckedChanged(object sender, EventArgs e)
{
SetState(checkBoxOpenAuto.Checked);
}
}
}
......@@ -38,9 +38,7 @@
this.btnMoveAxis_P2 = new System.Windows.Forms.Button();
this.btnMoveAxis_P1 = new System.Windows.Forms.Button();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnPullAxis_Updown_P2 = new System.Windows.Forms.Button();
this.btnPullAxis_Updown_P1 = new System.Windows.Forms.Button();
this.txtPullAxis_Updown_P2 = new System.Windows.Forms.TextBox();
this.txtPullAxis_Updown_P1 = new System.Windows.Forms.TextBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -188,10 +186,11 @@
this.btnOutstoreTest = new System.Windows.Forms.Button();
this.btnInstoreTest = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.btnSavePosIds = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.combBoxPosIds = new System.Windows.Forms.ComboBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnPullAxis_Updown_P2 = new System.Windows.Forms.Button();
this.txtPullAxis_Updown_P2 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage4.SuspendLayout();
......@@ -318,27 +317,15 @@
// groupBox5
//
this.groupBox5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.groupBox5.Controls.Add(this.btnPullAxis_Updown_P2);
this.groupBox5.Controls.Add(this.btnPullAxis_Updown_P1);
this.groupBox5.Controls.Add(this.txtPullAxis_Updown_P2);
this.groupBox5.Controls.Add(this.txtPullAxis_Updown_P1);
this.groupBox5.Location = new System.Drawing.Point(623, 112);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(294, 100);
this.groupBox5.Size = new System.Drawing.Size(294, 87);
this.groupBox5.TabIndex = 3;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "料斗拉取升降轴";
//
// btnPullAxis_Updown_P2
//
this.btnPullAxis_Updown_P2.Location = new System.Drawing.Point(6, 55);
this.btnPullAxis_Updown_P2.Name = "btnPullAxis_Updown_P2";
this.btnPullAxis_Updown_P2.Size = new System.Drawing.Size(132, 32);
this.btnPullAxis_Updown_P2.TabIndex = 3;
this.btnPullAxis_Updown_P2.Text = "料屉提取水平点P2";
this.btnPullAxis_Updown_P2.UseVisualStyleBackColor = true;
this.btnPullAxis_Updown_P2.Click += new System.EventHandler(this.btnPullAxis_Updown_P2_Click);
//
// btnPullAxis_Updown_P1
//
this.btnPullAxis_Updown_P1.Location = new System.Drawing.Point(6, 17);
......@@ -349,13 +336,6 @@
this.btnPullAxis_Updown_P1.UseVisualStyleBackColor = true;
this.btnPullAxis_Updown_P1.Click += new System.EventHandler(this.btnPullAxis_Updown_P1_Click);
//
// txtPullAxis_Updown_P2
//
this.txtPullAxis_Updown_P2.Location = new System.Drawing.Point(144, 60);
this.txtPullAxis_Updown_P2.Name = "txtPullAxis_Updown_P2";
this.txtPullAxis_Updown_P2.Size = new System.Drawing.Size(134, 23);
this.txtPullAxis_Updown_P2.TabIndex = 8;
//
// txtPullAxis_Updown_P1
//
this.txtPullAxis_Updown_P1.Location = new System.Drawing.Point(144, 22);
......@@ -903,7 +883,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(171, 39);
this.label3.Location = new System.Drawing.Point(182, 32);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(0, 17);
this.label3.TabIndex = 13;
......@@ -911,13 +891,13 @@
// btnSavePoints
//
this.btnSavePoints.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.btnSavePoints.Location = new System.Drawing.Point(7, 31);
this.btnSavePoints.Location = new System.Drawing.Point(9, 24);
this.btnSavePoints.Name = "btnSavePoints";
this.btnSavePoints.Size = new System.Drawing.Size(136, 32);
this.btnSavePoints.Size = new System.Drawing.Size(162, 32);
this.btnSavePoints.TabIndex = 12;
this.btnSavePoints.Text = "保存位置";
this.btnSavePoints.UseVisualStyleBackColor = false;
this.btnSavePoints.Click += new System.EventHandler(this.btnSavePoints_Click);
this.btnSavePoints.Click += new System.EventHandler(this.btnSavePosIds_Click);
//
// groupBox13
//
......@@ -986,20 +966,22 @@
// groupBox17
//
this.groupBox17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.groupBox17.Controls.Add(this.btnPullAxis_Updown_P2);
this.groupBox17.Controls.Add(this.txtPullAxis_Updown_P2);
this.groupBox17.Controls.Add(this.btnPullAxis_Updown_P4);
this.groupBox17.Controls.Add(this.btnPullAxis_Updown_P3);
this.groupBox17.Controls.Add(this.txtPullAxis_Updown_P4);
this.groupBox17.Controls.Add(this.txtPullAxis_Updown_P3);
this.groupBox17.Location = new System.Drawing.Point(350, 135);
this.groupBox17.Name = "groupBox17";
this.groupBox17.Size = new System.Drawing.Size(293, 99);
this.groupBox17.Size = new System.Drawing.Size(520, 123);
this.groupBox17.TabIndex = 3;
this.groupBox17.TabStop = false;
this.groupBox17.Text = "料斗拉取升降轴";
//
// btnPullAxis_Updown_P4
//
this.btnPullAxis_Updown_P4.Location = new System.Drawing.Point(6, 55);
this.btnPullAxis_Updown_P4.Location = new System.Drawing.Point(241, 65);
this.btnPullAxis_Updown_P4.Name = "btnPullAxis_Updown_P4";
this.btnPullAxis_Updown_P4.Size = new System.Drawing.Size(132, 32);
this.btnPullAxis_Updown_P4.TabIndex = 3;
......@@ -1009,7 +991,7 @@
//
// btnPullAxis_Updown_P3
//
this.btnPullAxis_Updown_P3.Location = new System.Drawing.Point(6, 17);
this.btnPullAxis_Updown_P3.Location = new System.Drawing.Point(241, 27);
this.btnPullAxis_Updown_P3.Name = "btnPullAxis_Updown_P3";
this.btnPullAxis_Updown_P3.Size = new System.Drawing.Size(132, 32);
this.btnPullAxis_Updown_P3.TabIndex = 2;
......@@ -1019,14 +1001,14 @@
//
// txtPullAxis_Updown_P4
//
this.txtPullAxis_Updown_P4.Location = new System.Drawing.Point(144, 60);
this.txtPullAxis_Updown_P4.Location = new System.Drawing.Point(379, 70);
this.txtPullAxis_Updown_P4.Name = "txtPullAxis_Updown_P4";
this.txtPullAxis_Updown_P4.Size = new System.Drawing.Size(134, 23);
this.txtPullAxis_Updown_P4.TabIndex = 8;
//
// txtPullAxis_Updown_P3
//
this.txtPullAxis_Updown_P3.Location = new System.Drawing.Point(144, 22);
this.txtPullAxis_Updown_P3.Location = new System.Drawing.Point(379, 32);
this.txtPullAxis_Updown_P3.Name = "txtPullAxis_Updown_P3";
this.txtPullAxis_Updown_P3.Size = new System.Drawing.Size(134, 23);
this.txtPullAxis_Updown_P3.TabIndex = 9;
......@@ -1084,7 +1066,7 @@
this.groupBox19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.groupBox19.Controls.Add(this.txtXAxis_AB_P3);
this.groupBox19.Controls.Add(this.btnXAxis_AB_P3);
this.groupBox19.Location = new System.Drawing.Point(653, 135);
this.groupBox19.Location = new System.Drawing.Point(12, 204);
this.groupBox19.Name = "groupBox19";
this.groupBox19.Size = new System.Drawing.Size(327, 67);
this.groupBox19.TabIndex = 4;
......@@ -1797,7 +1779,6 @@
this.groupBox18.Controls.Add(this.btnOutstoreTest);
this.groupBox18.Controls.Add(this.btnInstoreTest);
this.groupBox18.Controls.Add(this.label2);
this.groupBox18.Controls.Add(this.btnSavePosIds);
this.groupBox18.Controls.Add(this.label1);
this.groupBox18.Controls.Add(this.combBoxPosIds);
this.groupBox18.Dock = System.Windows.Forms.DockStyle.Top;
......@@ -1831,22 +1812,11 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(63, 60);
this.label2.Location = new System.Drawing.Point(226, 28);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 17);
this.label2.TabIndex = 12;
//
// btnSavePosIds
//
this.btnSavePosIds.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.btnSavePosIds.Location = new System.Drawing.Point(279, 20);
this.btnSavePosIds.Name = "btnSavePosIds";
this.btnSavePosIds.Size = new System.Drawing.Size(136, 32);
this.btnSavePosIds.TabIndex = 11;
this.btnSavePosIds.Text = "保存库位位置";
this.btnSavePosIds.UseVisualStyleBackColor = false;
this.btnSavePosIds.Click += new System.EventHandler(this.btnSavePosIds_Click);
//
// label1
//
this.label1.AutoSize = true;
......@@ -1869,6 +1839,23 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btnPullAxis_Updown_P2
//
this.btnPullAxis_Updown_P2.Location = new System.Drawing.Point(26, 61);
this.btnPullAxis_Updown_P2.Name = "btnPullAxis_Updown_P2";
this.btnPullAxis_Updown_P2.Size = new System.Drawing.Size(132, 32);
this.btnPullAxis_Updown_P2.TabIndex = 10;
this.btnPullAxis_Updown_P2.Text = "料屉提取水平点P2";
this.btnPullAxis_Updown_P2.UseVisualStyleBackColor = true;
this.btnPullAxis_Updown_P2.Click += new System.EventHandler(this.btnPullAxis_Updown_P2_Click);
//
// txtPullAxis_Updown_P2
//
this.txtPullAxis_Updown_P2.Location = new System.Drawing.Point(24, 27);
this.txtPullAxis_Updown_P2.Name = "txtPullAxis_Updown_P2";
this.txtPullAxis_Updown_P2.Size = new System.Drawing.Size(134, 23);
this.txtPullAxis_Updown_P2.TabIndex = 11;
//
// FrmAxisMove
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -1967,9 +1954,7 @@
private System.Windows.Forms.Button btnUpdown_P5;
private System.Windows.Forms.Button btnUpdown_P2;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Button btnPullAxis_Updown_P2;
private System.Windows.Forms.Button btnPullAxis_Updown_P1;
private System.Windows.Forms.TextBox txtPullAxis_Updown_P2;
private System.Windows.Forms.TextBox txtPullAxis_Updown_P1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtMoveAxis_P2;
......@@ -2083,7 +2068,6 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox18;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnSavePosIds;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox combBoxPosIds;
private System.Windows.Forms.GroupBox groupBox23;
......@@ -2109,5 +2093,7 @@
private System.Windows.Forms.Button btnCloseShieldSig;
private System.Windows.Forms.Button btnShieldSig;
private System.Windows.Forms.Button btnCloseShieldAll;
private System.Windows.Forms.Button btnPullAxis_Updown_P2;
private System.Windows.Forms.TextBox txtPullAxis_Updown_P2;
}
}
\ No newline at end of file
......@@ -40,20 +40,8 @@ namespace OnlineStore.XLRStore
string posId = "";
private void InitShieldColData()
{
comboBoxShieldSig.Items.AddRange(new string[] {
"A_Col1_Sig_Shield",
"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.Items.AddRange((from m in boxEquip.sheidAColmns where !m.Equals("Col_Sig_Shield") select m).ToArray());
comboBoxShieldSig.Items.AddRange((from m in boxEquip.sheidBColmns where !m.Equals("Col_Sig_Shield") select m).ToArray());
comboBoxShieldSig.SelectedIndexChanged += ComboBoxShieldSig_SelectedIndexChanged;
comboBoxShieldSig.SelectedIndex = 0;
}
......@@ -110,7 +98,6 @@ namespace OnlineStore.XLRStore
txtMoveAxis_P1.Text = boxEquip.Config.MoveAxis_P1.ToString();
txtPullAxis_Inout_P1.Text = boxEquip.Config.PullAxis_Inout_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_P10.Text = boxEquip.Config.Updown_P10.ToString();
txtUpdown_P11.Text = boxEquip.Config.Updown_P11.ToString();
......@@ -132,6 +119,7 @@ namespace OnlineStore.XLRStore
txtMoveAxis_P3.Text = boxPosition.MoveAxis_P3.ToString();
txtPullAxis_Inout_P2_P4.Text = boxPosition.PullAxis_Inout_P2_P4.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_P4.Text = boxPosition.PullAxis_Updown_P4.ToString();
txtUpdown_P6_P12.Text = boxPosition.Updown_P6_P12.ToString();
......@@ -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)
{
if (PullAxisInOutIsInP1())
......@@ -437,6 +420,10 @@ namespace OnlineStore.XLRStore
{
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)
{
......@@ -512,11 +499,6 @@ namespace OnlineStore.XLRStore
boxEquip.Config.PullAxis_Updown_P1 = FormUtil.GetIntValue(txtPullAxis_Updown_P1);
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))
{
boxEquip.Config.Updown_P1 = FormUtil.GetIntValue(txtUpdown_P1);
......@@ -612,6 +594,7 @@ namespace OnlineStore.XLRStore
ktkPosition.MoveAxis_P3 = FormUtil.GetIntValue(txtMoveAxis_P3);
ktkPosition.PullAxis_Inout_P2_P4 = FormUtil.GetIntValue(txtPullAxis_Inout_P2_P4);
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_P4 = FormUtil.GetIntValue(txtPullAxis_Updown_P4);
ktkPosition.Updown_P6_P12 = FormUtil.GetIntValue(txtUpdown_P6_P12);
......@@ -846,6 +829,7 @@ namespace OnlineStore.XLRStore
boxEquip.Config.B_Col6_Sig_Shield = res;
break;
}
StoreManager.SaveBoxConfig(boxEquip.Config);
this.Invoke(new Action(() =>
{
lblcolSigState.BackColor = res == 0 ? Color.Red : Color.Green;
......@@ -876,7 +860,7 @@ namespace OnlineStore.XLRStore
boxEquip.Config.B_Col5_Sig_Shield = res;
boxEquip.Config.B_Col6_Sig_Shield = res;
StoreManager.SaveBoxConfig(boxEquip.Config);
}
private void btnShieldSig_Click(object sender, EventArgs e)
......
......@@ -336,10 +336,12 @@
//
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox2.Location = new System.Drawing.Point(3, 19);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(401, 323);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
//
......@@ -356,10 +358,12 @@
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(401, 323);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
......
......@@ -52,7 +52,7 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param>
private void BoxBean_camera_event(CameraArgs cameraArgs)
{
LogUtil.info($"事件触发{cameraArgs.CamName} 取图");
// LogUtil.info($"事件触发{cameraArgs.CamName} 取图");
if(cameraArgs.CamName.Equals("box_A"))
{
pictureBox1.Image = cameraArgs.Image;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!