Commit 90ae9aa6 张东亮

存储机构-视觉对位

1 个父辈 3f996b55
......@@ -372,35 +372,43 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 存储机构自动对位:开始对位
/// </summary>
SA_Drawer_Start_Find_Pos = 401,
SA_01_Pos_Start_Find_Pos = 401,
/// <summary>
/// 存储机构自动对位:去抽屉起始点
/// </summary>
SA_01_To_Drawer_StartPoint,
SA_02_Pos_To_Drawer_StartPoint,
/// <summary>
/// 存储机构自动对位:取图(正向)
/// </summary>
SA_02_Pos_AcqImg,
SA_03_Pos_AcqImg,
/// <summary>
/// 存储机构自动对位:对位(正向)
/// </summary>
SA_03_Pos_AdjPos,
SA_04_Pos_AdjPos,
/// <summary>
/// 存储机构自动对位:到下一个抽屉(正向)
/// </summary>
SA_04_Pos_NextDrawer,
SA_05_Pos_NextDrawer,
/// <summary>
/// 存储机构自动对位:开始对位
/// </summary>
SA_06_Neg_Start_Find_Pos,
/// <summary>
/// 存储机构自动对位:去抽屉起始点
/// </summary>
SA_07_Neg_To_Drawer_StartPoint,
/// <summary>
/// 存储机构自动对位:取图(反向)
/// </summary>
SA_05_Neg_AcqImg,
SA_08_Neg_AcqImg,
/// <summary>
/// 存储机构自动对位:对位(反向)
/// </summary>
SA_06_Neg_AdjPos,
SA_09_Neg_AdjPos,
/// <summary>
/// 存储机构自动对位:到下一个抽屉(反向)
/// </summary>
SA_07_Neg_NextDrawer,
SA_10_Neg_NextDrawer,
#endregion
#region 入料模块复位 1000 开始
......
......@@ -6,11 +6,13 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using static eyemLib_Sharp.EyemLibDemo;
......@@ -19,8 +21,8 @@ namespace OnlineStore.DeviceLibrary
public partial class BoxEquip
{
//public Dictionary<string, List<DrawerInfo>> DrawerNums = new Dictionary<string, List<DrawerInfo>>();
AutoFindPos autoFindPos;
private bool autoFindPosMode = false;
public AutoFindPos autoFindPos;
public bool autoFindPosMode = false;
private void InitDrawInfos()
{
autoFindPos = new AutoFindPos(Config);
......@@ -70,6 +72,95 @@ namespace OnlineStore.DeviceLibrary
AxisSts sts = HCBoardManager.GetAxisSts(axisNo);
return sts.PEL == 1;
}
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);
}
private bool CheckMarkXPoint(EyemOcsFXYR eyemOcsFXYR)
{
if (Math.Abs(Config.Drawer_X - eyemOcsFXYR.fX) < Config.Drawer_X_Error)
return true;
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.PosSide}面]");
MoveAxis.AbsMove(MoveInfo, Convert.ToInt32(MoveAxis.GetAclPosition() + (Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse), Config.MoveAxis_P1_Speed / 2);
return false;
}
private bool CheckMarkYPoint(EyemOcsFXYR eyemOcsFXYR)
{
if (Math.Abs(Config.Drawer_Y - eyemOcsFXYR.fY) < Config.Drawer_Y_Error)
return true;
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.PosSide}面]");
return false;
}
public void StartFindPos(InOutParam param)
{
if (isInSuddenDown || isNoAirpressure_Check ||
(!runStatus.Equals(RunStatus.Runing))
|| (!MoveInfo.MoveType.Equals(MoveType.None)))
{
LogUtil.error(Name + " 启动视觉对位出错,忙碌或报警中 ,storeStatus=" + runStatus + ",MoveType=" + MoveInfo.MoveType + ",isInSuddenDown=" + isInSuddenDown + ",isNoAirpressure_Check=" + isNoAirpressure_Check);
return;
}
LogInfo(" 启动视觉对位【" + param.PosInfo.ToStr() + "】 ");
MoveInfo.NewMove(MoveType.Working, param);
SetBoxStatus(DeviceStatus.Debugging, RunStatus.Busy);
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
}
private bool SaveDrawerPosition()
{
StringBuilder stringBuilder = new StringBuilder(MoveInfo.MoveParam.PosInfo.PosId);
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()));
if (curDrawer != null && curDrawer.Count > 0)
{
foreach (string item in curDrawer)
{
BoxPosition ktkPosition = CSVPositionReader<BoxPosition>.GetPositon(item);
if (ktkPosition != null)
{
ktkPosition.MoveAxis_P3 = MoveAxis.GetAclPosition();
ktkPosition.Updown_P7_P13 = UpdownAxis.GetAclPosition();
}
//位置配置
string appPath = Application.StartupPath;
//如果总配置文件存在,保存到总的配置文件
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition);
if (!File.Exists(positionConfigFile))
{
string nameStr = DeviceID.ToString();
positionConfigFile = positionConfigFile.Replace(".csv", "_" + nameStr + ".csv");
}
bool result = CSVPositionReader<BoxPosition>.SavePostion(positionConfigFile, ktkPosition);
if (!result)
{
SetWarnMsg("库位【" + item + "】保存失败!");
}
else
{
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:库位[{item}]保存成功[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
}
return result;
}
}
return false;
}
public void FindPosEnd()
{
MoveInfo.EndMove();
if (MoveInfo.MoveParam != null)
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:对位结束[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
}
EyemOcsFXYR ocsFXYR;
public void AutoFindPosProcess()
{
if (MoveInfo.IsInWait)
......@@ -80,54 +171,149 @@ namespace OnlineStore.DeviceLibrary
{
return;
}
switch(MoveInfo.MoveStep)
if (!autoFindPosMode)
return;
switch (MoveInfo.MoveStep)
{
case StepEnum.SA_Drawer_Start_Find_Pos:
MoveInfo.NextMoveStep(StepEnum.SA_01_To_Drawer_StartPoint);
case StepEnum.SA_01_Pos_Start_Find_Pos:
MoveInfo.NextMoveStep(StepEnum.SA_02_Pos_To_Drawer_StartPoint);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
$"行走机构到进出料机构取放点P2,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到进出料暂存区取放料水平点P2[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
MoveAxis.AbsMove(MoveInfo, Config.MoveAxis_P2, Config.MoveAxis_P2_Speed);
$"行走机构到抽屉起始点,移栽升降轴到抽屉起始点[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
ToDrawer_StartPoint();
break;
case StepEnum.SA_01_To_Drawer_StartPoint:
case StepEnum.SA_02_Pos_To_Drawer_StartPoint:
//取图
Bitmap bitmap = null;
int res = AutoFindPos.GetMarkInfo(bitmap, out ocsFXYR);
if (res == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_03_Pos_AcqImg);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
}
else if (res == -4)
{
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()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_05_Pos_NextDrawer);
}
break;
case StepEnum.SA_02_Pos_AcqImg:
case StepEnum.SA_03_Pos_AcqImg:
if (CheckMarkXPoint(ocsFXYR) && CheckMarkYPoint(ocsFXYR))
{
//存储抽屉位置信息
if (SaveDrawerPosition())
{
}
else
{
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
}
MoveInfo.NextMoveStep(StepEnum.SA_05_Pos_NextDrawer);
}
else
{
MoveInfo.NextMoveStep(StepEnum.SA_04_Pos_AdjPos);
}
break;
case StepEnum.SA_03_Pos_AdjPos:
case StepEnum.SA_04_Pos_AdjPos:
MoveInfo.NextMoveStep(StepEnum.SA_02_Pos_To_Drawer_StartPoint);
break;
case StepEnum.SA_04_Pos_NextDrawer:
case StepEnum.SA_05_Pos_NextDrawer:
if (autoFindPos.CurColumn < autoFindPos.Columns)
{
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
autoFindPos.CurColumn++;
}
else
{
if (autoFindPos.CurRow < autoFindPos.Rows)
{
MoveInfo.NextMoveStep(StepEnum.SA_06_Neg_Start_Find_Pos);
autoFindPos.CurRow++;
}
else//结束
{
FindPosEnd();
}
}
break;
case StepEnum.SA_05_Neg_AcqImg:
case StepEnum.SA_06_Neg_Start_Find_Pos:
MoveInfo.NextMoveStep(StepEnum.SA_07_Neg_To_Drawer_StartPoint);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:到抽屉起始点," +
$"行走机构到抽屉起始点,移栽升降轴到抽屉起始点[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
ToDrawer_StartPoint();
break;
case StepEnum.SA_06_Neg_AdjPos:
case StepEnum.SA_07_Neg_To_Drawer_StartPoint:
//取图
Bitmap bitmap1 = null;
int res1 = AutoFindPos.GetMarkInfo(bitmap1, out ocsFXYR);
if (res1 == 0)
{
MoveInfo.NextMoveStep(StepEnum.SA_08_Neg_AcqImg);
LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.PosSide}面]");
}
else if (res1 == -4)
{
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()}]");
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
MoveInfo.NextMoveStep(StepEnum.SA_10_Neg_NextDrawer);
}
break;
case StepEnum.SA_07_Neg_NextDrawer:
case StepEnum.SA_08_Neg_AcqImg:
if (CheckMarkXPoint(ocsFXYR) && CheckMarkYPoint(ocsFXYR))
{
//存储抽屉位置信息
if (SaveDrawerPosition())
{
}
else
{
autoFindPos.FailedDrawers.Add($"{autoFindPos.CurRow},{autoFindPos.CurColumn}");
}
MoveInfo.NextMoveStep(StepEnum.SA_10_Neg_NextDrawer);
}
else
{
MoveInfo.NextMoveStep(StepEnum.SA_09_Neg_AdjPos);
}
break;
case StepEnum.SA_09_Neg_AdjPos:
MoveInfo.NextMoveStep(StepEnum.SA_07_Neg_To_Drawer_StartPoint);
break;
case StepEnum.SA_10_Neg_NextDrawer:
if (autoFindPos.CurColumn > 1)
{
MoveInfo.NextMoveStep(StepEnum.SA_06_Neg_Start_Find_Pos);
autoFindPos.CurColumn--;
}
else
{
if (autoFindPos.CurRow < autoFindPos.Rows)
{
MoveInfo.NextMoveStep(StepEnum.SA_01_Pos_Start_Find_Pos);
autoFindPos.CurRow++;
}
else//结束
{
FindPosEnd();
}
}
break;
//case StepEnum.:
// //如果行>抽屉行数,直接退出。否则获取图片、得到mark的坐标,并与模板坐标比较。根据误差范围外对行走机构和移栽升降轴移动
// //在误差范围内,保存该位置脉冲同时生成库位位置信息。列加1进行第二步
// break;
//case StepEnum.:
// //如果列>抽屉列数,判断行是否大于抽屉的行数?大于则结束;否则行加1,移栽升降轴运动,到第三步
// //否则行走机构移动一个行间距的距离,到第一步
// break;
//case StepEnum.:
// //如果行>抽屉行数,直接退出。否则获取图片、得到mark的坐标,并与模板坐标比较。根据误差范围外对行走机构和移栽升降轴移动
// //在误差范围内,保存该位置脉冲同时生成库位位置信息。列减1进行第四步
// break;
//case StepEnum.:
// //如果列《1,判断行是否大于抽屉的行数?大于则结束;否则行加1,移栽升降轴运动,到第一步
// //否则行走机构移动一个行间距的距离,到第三步
// break;
//case StepEnum.:
// break;
}
}
}
......@@ -139,17 +325,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public int CurRow { get; set; } = 1;
/// <summary>
/// 当前行脉冲
/// </summary>
public int CurRowPulse { get; set; } = 0;
/// <summary>
/// 当前列脉冲
/// x坐标到脉冲的转换系数
/// </summary>
public int CurColumnPulse { get; set; } = 0;
public float XCoeffOfCoorToPulse { get; set; } = 1;
/// <summary>
/// 坐标到脉冲的转换系数
/// </summary>
public float CoeffOfCoorToPulse { get; set; } = 1;
public float YCoeffOfCoorToPulse { get; set; } = 1;
/// <summary>
/// 当前列
/// </summary>
......@@ -164,7 +346,6 @@ namespace OnlineStore.DeviceLibrary
public int Columns { get; private set; }
/// <summary>
/// 抽屉间行间距
/// </summary>
......@@ -173,12 +354,28 @@ namespace OnlineStore.DeviceLibrary
/// 抽屉间列间距
/// </summary>
public int Column_Spacing { get; private set; }
public List<string> FailedDrawers { get; set; }
BoxEquip_Config boxEquip_Config;
public AutoFindPos(BoxEquip_Config boxEquip_Config)
{
this.boxEquip_Config = boxEquip_Config;
Row_Spacing = boxEquip_Config.Row_Spacing;
Column_Spacing = boxEquip_Config.Column_Spacing;
Rows = boxEquip_Config.Drawer_Rows;
Columns = boxEquip_Config.Drawer_Columns;
FailedDrawers = new List<string>();
}
public void SetParam(int curRow, int curColumn, float xCooef, float yCooef)
{
CurRow = curRow;
CurColumn = curColumn;
Row_Spacing = boxEquip_Config.Row_Spacing;
Column_Spacing = boxEquip_Config.Column_Spacing;
Rows = boxEquip_Config.Drawer_Rows;
Columns = boxEquip_Config.Drawer_Columns;
XCoeffOfCoorToPulse = xCooef;
YCoeffOfCoorToPulse = yCooef;
}
/// <summary>
/// Mark点坐标信息
......@@ -186,7 +383,7 @@ namespace OnlineStore.DeviceLibrary
/// <param name="bitmap">输入图片</param>
/// <param name="markCoor">mark点坐标信息</param>
/// <returns>0 正常 -4未定位到 </returns>
public static int GetMarkInfo(Bitmap bitmap,out EyemOcsFXYR markCoor)
public static int GetMarkInfo(Bitmap bitmap, out EyemOcsFXYR markCoor)
{
int flag;
markCoor = new EyemOcsFXYR();
......@@ -196,26 +393,4 @@ namespace OnlineStore.DeviceLibrary
return flag;
}
}
public class DrawerInfo
{
/// <summary>
/// 抽屉信息
/// </summary>
/// <param name="pos">抽屉位置</param>
/// <param name="posNums">仓位列表</param>
public DrawerInfo(string pos, List<string> posNums)
{
PositionNum = pos;
Positions = posNums.FindAll(s => s.StartsWith(pos));
}
/// <summary>
/// 抽屉位置
/// </summary>
public string PositionNum { get; private set; }
/// <summary>
/// 抽屉内的仓位位置
/// </summary>
public List<string> Positions { get; private set; }
}
}
......@@ -432,9 +432,9 @@ namespace eyemLib_Sharp
[StructLayout(LayoutKind.Sequential)]
public struct EyemOcsFXYR // 用于表示圆
{
float fX; // X坐标
float fY; // Y坐标
float fR; // 半径
public float fX; // X坐标
public float fY; // Y坐标
public float fR; // 半径
}
[StructLayout(LayoutKind.Sequential)]
......
......@@ -75,22 +75,22 @@ namespace OnlineStore.LoadCSVLibrary
/// 抽屉Mark_X坐标
/// </summary>
[ConfigProAttribute("Drawer_X")]
public double Drawer_X { get; set; }
public float Drawer_X { get; set; }
/// <summary>
/// 抽屉Mark_Y坐标
/// </summary>
[ConfigProAttribute("Drawer_Y")]
public double Drawer_Y { get; set; }
public float Drawer_Y { get; set; }
/// <summary>
/// 抽屉Mark_X方向误差范围
/// </summary>
[ConfigProAttribute("Drawer_X_Error")]
public string Drawer_X_Error { get; set; }
public float Drawer_X_Error { get; set; }
/// <summary>
/// 抽屉Mark_Y方向误差范围
/// </summary>
[ConfigProAttribute("Drawer_Y_Error")]
public string Drawer_Y_Error { get; set; }
public float Drawer_Y_Error { get; set; }
/// <summary>
/// 抽屉行间距
/// </summary>
......@@ -111,7 +111,6 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("Drawer_Columns")]
public int Drawer_Columns { get; set; }
/// <summary>
/// PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
/// </summary>
......
......@@ -22,7 +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="Line_CID" value="so827" />
<add key="Line_CID" value="05" />
<!--end one store config-->
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="Data Matrix ECC 200#QR Code" />
......
......@@ -28,19 +28,699 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label11 = new System.Windows.Forms.Label();
this.txtColumnSpacing = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtRowSpacing = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtDrawerColumns = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtDrawerRows = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
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();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
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();
this.button8 = new System.Windows.Forms.Button();
this.listBox1 = new System.Windows.Forms.ListBox();
this.label8 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.button7 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.button12 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.label18 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.textBox7 = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.textBox8 = new System.Windows.Forms.TextBox();
this.button10 = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.textBox6 = new System.Windows.Forms.TextBox();
this.button9 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
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.timer1 = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.tabControl1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
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.Size = new System.Drawing.Size(800, 450);
this.tableLayoutPanel1.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
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.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(794, 346);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label11);
this.tabPage1.Controls.Add(this.txtColumnSpacing);
this.tabPage1.Controls.Add(this.label12);
this.tabPage1.Controls.Add(this.txtRowSpacing);
this.tabPage1.Controls.Add(this.label9);
this.tabPage1.Controls.Add(this.txtDrawerColumns);
this.tabPage1.Controls.Add(this.label10);
this.tabPage1.Controls.Add(this.txtDrawerRows);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.textBox3);
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);
this.tabPage1.Controls.Add(this.textBox1);
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.TabIndex = 0;
this.tabPage1.Text = "设置模板抽屉信息";
this.tabPage1.UseVisualStyleBackColor = true;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(227, 169);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(140, 17);
this.label11.TabIndex = 19;
this.label11.Text = "抽屉列间距(脉冲值):";
//
// txtColumnSpacing
//
this.txtColumnSpacing.Location = new System.Drawing.Point(373, 166);
this.txtColumnSpacing.Name = "txtColumnSpacing";
this.txtColumnSpacing.Size = new System.Drawing.Size(100, 23);
this.txtColumnSpacing.TabIndex = 18;
this.txtColumnSpacing.Text = "1";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(227, 125);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(140, 17);
this.label12.TabIndex = 17;
this.label12.Text = "抽屉行间距(脉冲值):";
//
// txtRowSpacing
//
this.txtRowSpacing.Location = new System.Drawing.Point(373, 122);
this.txtRowSpacing.Name = "txtRowSpacing";
this.txtRowSpacing.Size = new System.Drawing.Size(100, 23);
this.txtRowSpacing.TabIndex = 16;
this.txtRowSpacing.Text = "1";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(18, 166);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(68, 17);
this.label9.TabIndex = 15;
this.label9.Text = "抽屉列数:";
//
// txtDrawerColumns
//
this.txtDrawerColumns.Location = new System.Drawing.Point(104, 163);
this.txtDrawerColumns.Name = "txtDrawerColumns";
this.txtDrawerColumns.Size = new System.Drawing.Size(100, 23);
this.txtDrawerColumns.TabIndex = 14;
this.txtDrawerColumns.Text = "1";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(18, 122);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(68, 17);
this.label10.TabIndex = 13;
this.label10.Text = "抽屉行数:";
//
// txtDrawerRows
//
this.txtDrawerRows.Location = new System.Drawing.Point(104, 119);
this.txtDrawerRows.Name = "txtDrawerRows";
this.txtDrawerRows.Size = new System.Drawing.Size(100, 23);
this.txtDrawerRows.TabIndex = 12;
this.txtDrawerRows.Text = "1";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(227, 68);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(104, 17);
this.label6.TabIndex = 11;
this.label6.Text = "抽屉内库位列数:";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(337, 65);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(100, 23);
this.textBox3.TabIndex = 10;
this.textBox3.Text = "10";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(227, 24);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(104, 17);
this.label7.TabIndex = 9;
this.label7.Text = "抽屉内库位行数:";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(337, 21);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(100, 23);
this.textBox4.TabIndex = 8;
this.textBox4.Text = "2";
//
// button5
//
this.button5.Location = new System.Drawing.Point(215, 234);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(146, 41);
this.button5.TabIndex = 7;
this.button5.Text = "确认";
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;
this.label2.Location = new System.Drawing.Point(18, 71);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 17);
this.label2.TabIndex = 3;
this.label2.Text = "抽屉所在列:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(104, 68);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 23);
this.textBox2.TabIndex = 2;
this.textBox2.Text = "1";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 17);
this.label1.TabIndex = 1;
this.label1.Text = "抽屉所在行:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(104, 24);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 23);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "1";
//
// tabPage2
//
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.TabIndex = 1;
this.tabPage2.Text = "配置模板抽屉位置";
this.tabPage2.UseVisualStyleBackColor = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(177, 231);
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(318, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(43, 17);
this.label3.TabIndex = 1;
this.label3.Text = "label3";
//
// button6
//
this.button6.Location = new System.Drawing.Point(273, 103);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(169, 61);
this.button6.TabIndex = 0;
this.button6.Text = "打开伺服调试界面";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// tabPage3
//
this.tabPage3.Controls.Add(this.button8);
this.tabPage3.Controls.Add(this.listBox1);
this.tabPage3.Controls.Add(this.label8);
this.tabPage3.Controls.Add(this.progressBar1);
this.tabPage3.Controls.Add(this.button7);
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.TabIndex = 2;
this.tabPage3.Text = "更新库位位置信息";
this.tabPage3.UseVisualStyleBackColor = true;
//
// button8
//
this.button8.Location = new System.Drawing.Point(408, 46);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(163, 46);
this.button8.TabIndex = 7;
this.button8.Text = "中断";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 17;
this.listBox1.Location = new System.Drawing.Point(19, 132);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(679, 157);
this.listBox1.TabIndex = 6;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(390, 14);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(43, 17);
this.label8.TabIndex = 5;
this.label8.Text = "label8";
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(19, 98);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(679, 28);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar1.TabIndex = 4;
//
// button7
//
this.button7.Location = new System.Drawing.Point(198, 46);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(163, 46);
this.button7.TabIndex = 3;
this.button7.Text = "更新";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click_1);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 14);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(43, 17);
this.label5.TabIndex = 2;
this.label5.Text = "label5";
//
// tabPage4
//
this.tabPage4.Controls.Add(this.button12);
this.tabPage4.Controls.Add(this.button11);
this.tabPage4.Controls.Add(this.label18);
this.tabPage4.Controls.Add(this.label15);
this.tabPage4.Controls.Add(this.textBox7);
this.tabPage4.Controls.Add(this.label16);
this.tabPage4.Controls.Add(this.textBox8);
this.tabPage4.Controls.Add(this.button10);
this.tabPage4.Controls.Add(this.label13);
this.tabPage4.Controls.Add(this.textBox5);
this.tabPage4.Controls.Add(this.label14);
this.tabPage4.Controls.Add(this.textBox6);
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.TabIndex = 3;
this.tabPage4.Text = "视觉对位";
this.tabPage4.UseVisualStyleBackColor = true;
//
// button12
//
this.button12.Location = new System.Drawing.Point(496, 122);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(163, 46);
this.button12.TabIndex = 22;
this.button12.Text = "结束";
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// button11
//
this.button11.Location = new System.Drawing.Point(496, 70);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(163, 46);
this.button11.TabIndex = 21;
this.button11.Text = "暂停";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(493, 191);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(80, 17);
this.label18.TabIndex = 20;
this.label18.Text = "抽屉当前行列";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(26, 188);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(223, 17);
this.label15.TabIndex = 18;
this.label15.Text = "Y方向系数(Mark点Y轴->行走机构):";
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(283, 185);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(100, 23);
this.textBox7.TabIndex = 17;
this.textBox7.Text = "1";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(26, 152);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(225, 17);
this.label16.TabIndex = 16;
this.label16.Text = "X方向系数(Mark点X轴->行走机构):";
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(283, 146);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(100, 23);
this.textBox8.TabIndex = 15;
this.textBox8.Text = "1";
//
// button10
//
this.button10.Location = new System.Drawing.Point(245, 59);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(163, 46);
this.button10.TabIndex = 14;
this.button10.Text = "设置";
this.button10.UseVisualStyleBackColor = true;
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(26, 91);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(80, 17);
this.label13.TabIndex = 13;
this.label13.Text = "抽屉开始列:";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(112, 88);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 23);
this.textBox5.TabIndex = 12;
this.textBox5.Text = "1";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(26, 47);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(80, 17);
this.label14.TabIndex = 11;
this.label14.Text = "抽屉开始行:";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(112, 44);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(100, 23);
this.textBox6.TabIndex = 10;
this.textBox6.Text = "1";
//
// button9
//
this.button9.Location = new System.Drawing.Point(496, 18);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(163, 46);
this.button9.TabIndex = 7;
this.button9.Text = "开始";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// groupBox1
//
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.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.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "流程";
//
// button4
//
this.button4.Location = new System.Drawing.Point(639, 32);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(146, 41);
this.button4.TabIndex = 3;
this.button4.Text = "④视觉对位";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(429, 32);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(146, 41);
this.button3.TabIndex = 2;
this.button3.Text = "③更新库位位置信息";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(219, 32);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(146, 41);
this.button2.TabIndex = 1;
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.Name = "button1";
this.button1.Size = new System.Drawing.Size(146, 41);
this.button1.TabIndex = 0;
this.button1.Text = "①设置模板抽屉信息";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmAutoFindPos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmAutoFindPos";
this.Text = "自动对位";
this.Load += new System.EventHandler(this.FrmAutoFindPos_Load);
this.tableLayoutPanel1.ResumeLayout(false);
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();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
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;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtColumnSpacing;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtRowSpacing;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtDrawerColumns;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtDrawerRows;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button11;
}
}
\ No newline at end of file
using System;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -14,7 +18,247 @@ namespace OnlineStore.XLRStore
{
internal FrmAutoFindPos()
{
CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
}
BoxEquip boxEquip;
string posSide = "AA";
private void button1_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 0;
}
private void button2_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 1;
label3.Text = string.Format("需要配置的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
label5.Text = string.Format("更新其他抽屉使用的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
}
private void button3_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 2;
label3.Text = string.Format("需要配置的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
label5.Text = string.Format("更新其他抽屉使用的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
}
private void button4_Click(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 3;
}
private void button5_Click(object sender, EventArgs e)
{
label3.Text = string.Format("需要配置的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
label5.Text = string.Format("更新其他抽屉使用的模板抽屉为:{0}面,{1}行,{2}列", posSide, textBox1.Text, textBox2.Text);
boxEquip.Config.Column_Spacing = int.Parse(txtColumnSpacing.Text);
boxEquip.Config.Row_Spacing = int.Parse(txtRowSpacing.Text);
boxEquip.Config.Drawer_Rows = int.Parse(txtDrawerRows.Text);
boxEquip.Config.Drawer_Columns = int.Parse(txtDrawerColumns.Text);
txtColumnSpacing.Text = boxEquip.Config.Column_Spacing.ToString();
txtRowSpacing.Text = boxEquip.Config.Row_Spacing.ToString();
txtDrawerRows.Text = boxEquip.Config.Drawer_Rows.ToString();
txtDrawerColumns.Text = boxEquip.Config.Drawer_Columns.ToString();
StoreManager.SaveBoxConfig(boxEquip.Config);
button2.Enabled = true;
}
private void FrmAutoFindPos_Load(object sender, EventArgs e)
{
boxEquip = StoreManager.XLRStore.boxEquip;
txtColumnSpacing.Text = boxEquip.Config.Column_Spacing.ToString();
txtRowSpacing.Text = boxEquip.Config.Row_Spacing.ToString();
txtDrawerRows.Text = boxEquip.Config.Drawer_Rows.ToString();
txtDrawerColumns.Text = boxEquip.Config.Drawer_Columns.ToString();
button9.Enabled = false;
button11.Enabled = false;
button12.Enabled = false;
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
posSide = "AA";
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
posSide = "BB";
}
FrmAxisMove frmAxisMove = null;
private void button6_Click(object sender, EventArgs e)
{
if (frmAxisMove == null)
{
frmAxisMove = new FrmAxisMove(true);
frmAxisMove.Show();
}
else
{
if (frmAxisMove.IsDisposed)
{
frmAxisMove = new FrmAxisMove(true);
frmAxisMove.Show();
}
else
{
frmAxisMove.Activate();
}
}
}
private void button7_Click(object sender, EventArgs e)
{
button3.Enabled = true;
}
int rows_in_drawer = 0;
int colmns_in_drawer = 0;
/// <summary>
/// 更新
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button7_Click_1(object sender, EventArgs e)
{
int.TryParse(textBox4.Text, out rows_in_drawer);
int.TryParse(textBox3.Text, out colmns_in_drawer);
progressBar1.Maximum = boxEquip.Config.Drawer_Rows * boxEquip.Config.Drawer_Columns * rows_in_drawer * colmns_in_drawer;
progressBar1.Minimum = 0;
int count = 0;
//位置配置
string appPath = Application.StartupPath;
//如果总配置文件存在,保存到总的配置文件
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition);
if (!File.Exists(positionConfigFile))
{
string nameStr = boxEquip.DeviceID.ToString();
positionConfigFile = positionConfigFile.Replace(".csv", "_" + nameStr + ".csv");
}
string info = "";
bool ok = false;
isBreak = false;
if (listBox1.Items.Count > 0)
listBox1.Items.Clear();
Task.Factory.StartNew(new Action(() =>
{
for (int i = 1; i <= boxEquip.Config.Drawer_Rows; i++)
{
for (int j = 1; j <= boxEquip.Config.Drawer_Columns; j++)
{
for (int d = 1; d <= rows_in_drawer; d++)
{
for (int k = 1; k <= colmns_in_drawer; k++)
{
StringBuilder head1 = new StringBuilder(boxEquip.CID + posSide);
head1.Append(i.ToString().PadLeft(2, '0'));
head1.Append(j.ToString().PadLeft(2, '0'));
head1.Append(d.ToString().PadLeft(2, '0'));
head1.Append(k.ToString().PadLeft(2, '0'));
BoxPosition ktkPosition = CSVPositionReader<BoxPosition>.GetPositon(head1.ToString());
StringBuilder head2 = new StringBuilder(boxEquip.CID + posSide + textBox1.Text.PadLeft(2, '0') + textBox2.Text.PadLeft(2, '0'));
head2.Append(d.ToString().PadLeft(2, '0'));
head2.Append(k.ToString().PadLeft(2, '0'));
BoxPosition srcPosition = CSVPositionReader<BoxPosition>.GetPositon(head2.ToString());
if (ktkPosition != null && srcPosition != null)
{
ktkPosition.ComAxis_AB_P2 = srcPosition.ComAxis_AB_P2;
ktkPosition.ComAxis_AB_P3 = srcPosition.ComAxis_AB_P3;
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.XAxis_AB_P3 = srcPosition.XAxis_AB_P3;
bool result = CSVPositionReader<BoxPosition>.SavePostion(positionConfigFile, ktkPosition);
if (result)
info = $"{head2.ToString()}->{head1.ToString()} 成功...{(count * 100 / progressBar1.Maximum).ToString("d")}%";
else
info = $"{head2.ToString()}->{head1.ToString()} 保存失败...{(count * 100 / progressBar1.Maximum).ToString("d")}%";
ok = result;
}
else if (ktkPosition == null)
{
info = $"{head2.ToString()}->{head1.ToString()} 失败,目标仓位不存在...{(count * 100 / progressBar1.Maximum).ToString("d")}%";
ok = false;
}
else if (srcPosition == null)
{
info = $"{head2.ToString()}->{head1.ToString()} 失败,源仓位不存在...{(count * 100 / progressBar1.Maximum).ToString("d")}%";
ok = false;
}
label8.Text = info;
label8.BackColor = ok ? Color.Green : Color.Red;
if (!ok)
listBox1.Items.Add(info);
count++;
progressBar1.Value = count; ;
System.Threading.Thread.Sleep(50);
if (isBreak)
return;
}
}
}
}
}));
}
bool isBreak = false;
private void button8_Click(object sender, EventArgs e)
{
isBreak = true;
}
private void button9_Click(object sender, EventArgs e)
{
button9.Enabled = false;
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'));
boxEquip.autoFindPosMode = true;
boxEquip.StartFindPos(new InOutParam(new InOutPosInfo("AA", 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));
button9.Enabled = true;
boxEquip.autoFindPosMode = false;
}
private void timer1_Tick(object sender, EventArgs e)
{
label18.Text = $"当前抽屉的行:{boxEquip.autoFindPos.CurRow},列:{boxEquip.autoFindPos.CurColumn}";
}
private void button11_Click(object sender, EventArgs e)
{
if(button11.Text.Equals("暂停"))
{
boxEquip.autoFindPosMode = false;
button11.Text = "继续";
button12.Enabled = true;
}
else
{
boxEquip.autoFindPosMode = true;
button11.Text = "暂停";
button12.Enabled = false;
}
}
private void button12_Click(object sender, EventArgs e)
{
boxEquip.FindPosEnd();
button11.Enabled = false;
button12.Enabled = false;
}
}
}
......@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -1613,7 +1613,7 @@
this.groupBox23.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox23.Location = new System.Drawing.Point(0, 191);
this.groupBox23.Name = "groupBox23";
this.groupBox23.Size = new System.Drawing.Size(492, 248);
this.groupBox23.Size = new System.Drawing.Size(492, 209);
this.groupBox23.TabIndex = 12;
this.groupBox23.TabStop = false;
this.groupBox23.Text = "页面切换操作";
......
......@@ -22,8 +22,8 @@ namespace OnlineStore.XLRStore
{
internal partial class FrmBoxEquip : FrmBase
{
FrmAxisMove frmAxisMove = null;
private bool IsLoad = false;
FrmAxisMove frmAxisMove =null;
private BoxEquip boxBean;
internal FrmBoxEquip(BoxEquip moveEquip)
{
......@@ -41,6 +41,8 @@ namespace OnlineStore.XLRStore
lblName.Text = boxBean.Name;
this.Text = boxBean.Name;
chbDebug.Checked = boxBean.IsDebug;
FrmAutoFindPos frmAutoFindPos = new FrmAutoFindPos();
AddForm(tabControl1, " 视觉对位 ", frmAutoFindPos);
IsLoad = true;
}
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!