Commit 2a72a60e LN

批量轴增加扫码点功能

1 个父辈 3fa3cb66
...@@ -18,13 +18,16 @@ PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,, ...@@ -18,13 +18,16 @@ PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,, PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,, PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,, PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,, PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,9999,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,, PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,,
PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,, PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,, PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,, PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,, PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,,
......
...@@ -1095,37 +1095,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -1095,37 +1095,47 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
IB07_AxisUpMove, IB07_AxisUpMove,
/// <summary> /// <summary>
/// 料串入料:扫码点可用,批量轴上升到扫码点
/// </summary>
IB08_BatchAxisToP4,
/// <summary>
/// 料串入料:等待是否可以开始扫码 /// 料串入料:等待是否可以开始扫码
/// </summary> /// </summary>
IB08_WaitCanScan, IB09_WaitCanScan,
/// <summary> /// <summary>
/// 料串入料:扫码 /// 料串入料:扫码
/// </summary> /// </summary>
IB09_ScanCode, IB11_ScanCode,
/// <summary>
/// 料串入库:扫码前走到了P4点,需要返回料盘位置
/// </summary>
IB12_BatchAxisToReelPosition,
/// <summary> /// <summary>
/// 料串入料:扫码结束,等待取料机构拿料 /// 料串入料:扫码结束,等待取料机构拿料
/// </summary> /// </summary>
IB10_ScanOK, IB13_ScanOK,
/// <summary> /// <summary>
/// 料串入料:当前托盘已离开 /// 料串入料:当前托盘已离开
/// </summary> /// </summary>
IB11_WaitReelLeave, IB14_ReelLeave,
/// <summary> /// <summary>
/// 料串入料:料盘已拿走,批量轴到P2,侧高度 /// 料串入料:料盘已拿走,批量轴到P2,侧高度
/// </summary> /// </summary>
IB12_BatchAxisToP2, IB15_BatchAxisToP2,
/// <summary> /// <summary>
/// 料串入料:记录高度,判断是否还有料盘 /// 料串入料:记录高度,判断是否还有料盘
/// </summary> /// </summary>
IB13_SaveHight, IB16_SaveHight,
/// <summary> /// <summary>
/// 料串入料:等待夹爪离开 /// 料串入料:等待夹爪离开
/// </summary> /// </summary>
IB14_WaitReelLeave, IB17_WaitReelLeave,
/// <summary> /// <summary>
......
...@@ -38,6 +38,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,6 +38,8 @@ namespace OnlineStore.DeviceLibrary
Name = "A料口 "; Name = "A料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_A; Config.BatchAxisP1 = config.BatchAxisP1_A;
Config.BatchAxisP2 = config.BatchAxisP2_A; Config.BatchAxisP2 = config.BatchAxisP2_A;
Config.BatchAxisP4 = config.BatchAxisP4_A;
Config.AgvName = config.AgvName_A; Config.AgvName = config.AgvName_A;
Config.CameraName = config.CameraNameList_A; Config.CameraName = config.CameraNameList_A;
Config.RfidIP = config.PRO_RFIP_A; Config.RfidIP = config.PRO_RFIP_A;
...@@ -48,6 +50,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
Name = "B料口 "; Name = "B料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_B; Config.BatchAxisP1 = config.BatchAxisP1_B;
Config.BatchAxisP2 = config.BatchAxisP2_B; Config.BatchAxisP2 = config.BatchAxisP2_B;
Config.BatchAxisP4 = config.BatchAxisP4_B;
Config.AgvName = config.AgvName_B; Config.AgvName = config.AgvName_B;
Config.CameraName = config.CameraNameList_B; Config.CameraName = config.CameraNameList_B;
Config.RfidIP = config.PRO_RFIP_B; Config.RfidIP = config.PRO_RFIP_B;
...@@ -626,6 +630,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -626,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
public string AgvName = ""; public string AgvName = "";
public int BatchAxisP1 = 0; public int BatchAxisP1 = 0;
public int BatchAxisP2 = 0; public int BatchAxisP2 = 0;
public int BatchAxisP4 = 0;
internal string RfidIP = ""; internal string RfidIP = "";
#region 左右入料口共有IO #region 左右入料口共有IO
//伺服料盘检测 //伺服料盘检测
......
...@@ -15,7 +15,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,7 +15,14 @@ namespace OnlineStore.DeviceLibrary
public bool MoveStop = false; public bool MoveStop = false;
public ShelfInfo CurrShelf = new ShelfInfo(); public ShelfInfo CurrShelf = new ShelfInfo();
#region 入库 #region 入库
/// <summary>
/// 扫码前是否到了P4点
/// </summary>
private bool toBatchP4 = false;
/// <summary>
/// 扫门前料盘位置
/// </summary>
private int batchAxisReelPosition = 0;
private List<string> preCodeList = new List<string>(); private List<string> preCodeList = new List<string>();
private List<string> LastCodeList = new List<string>(); private List<string> LastCodeList = new List<string>();
//private List<string> NextCodeList = new List<string>(); //private List<string> NextCodeList = new List<string>();
...@@ -33,7 +40,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -33,7 +40,7 @@ namespace OnlineStore.DeviceLibrary
if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave) if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave)
{ {
//WorkLog("料串入料 :等待AGV来取空料串1"); //WorkLog("料串入料 :等待AGV来取空料串1");
return false; ; return false;
} }
UpdateShelf(1); UpdateShelf(1);
if (CurrShelf.ShelfState.Equals(3)) if (CurrShelf.ShelfState.Equals(3))
...@@ -204,19 +211,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,19 +211,31 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove)) else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove))
{ {
CheckHasTray(); CheckHasTray();
}else if (MoveInfo.IsStep(StepEnum.IB08_BatchAxisToP4))
{
if (Robot.AxisIsInShelfUp(ShelfType))
{
MoveInfo.NextMoveStep(StepEnum.IB09_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开");
}
else
{
IB11_ScanCode();
}
} }
else if (MoveInfo.IsStep(StepEnum.IB08_WaitCanScan)) else if (MoveInfo.IsStep(StepEnum.IB09_WaitCanScan))
{ {
if (!Robot.AxisIsInShelfUp(ShelfType)) if (!Robot.AxisIsInShelfUp(ShelfType))
{ {
IB09_ScanCode(); IB11_ScanCode();
} }
else if (MoveInfo.IsTimeOut(10)) else if (MoveInfo.IsTimeOut(10))
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "] " + "等待旋转轴离开料串超时" + "[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "] " + "等待旋转轴离开料串超时" + "[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
} }
} }
else if (MoveInfo.IsStep(StepEnum.IB09_ScanCode)) else if (MoveInfo.IsStep(StepEnum.IB11_ScanCode))
{ {
//WorkLog("IB09_ScanCode"); //WorkLog("IB09_ScanCode");
MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("", "")); MoveInfo.MoveParam = new InOutParam(new InOutPosInfo("", ""));
...@@ -230,24 +249,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,24 +249,43 @@ namespace OnlineStore.DeviceLibrary
WorkLog(" 无有效条码NG,需要放入NG箱:" + MoveInfo.MoveParam.PosInfo.ToStr()); WorkLog(" 无有效条码NG,需要放入NG箱:" + MoveInfo.MoveParam.PosInfo.ToStr());
} }
MoveInfo.NextMoveStep(StepEnum.IB10_ScanOK);
//如果之前走到了扫码点,需要下降
if (toBatchP4)
{
MoveInfo.NextMoveStep(StepEnum.IB12_BatchAxisToReelPosition);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
BatchAxis.AbsMove(MoveInfo, batchAxisReelPosition, Robot.Config.BatchAxis_P4Speed);
WorkLog("扫码结束,扫码前走到了扫码点【" + Config.BatchAxisP4 + "】,批量轴需要返回之前位置【" + batchAxisReelPosition + "】");
}
else
{
MoveInfo.NextMoveStep(StepEnum.IB13_ScanOK);
var span = DateTime.Now - MoveInfo.LastSetpTime;
WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr());
}
}else if (MoveInfo.IsStep(StepEnum.IB12_BatchAxisToReelPosition))
{
string code = CodeManager.ProcessCode(LastCodeList);
MoveInfo.NextMoveStep(StepEnum.IB13_ScanOK);
var span = DateTime.Now - MoveInfo.LastSetpTime; var span = DateTime.Now - MoveInfo.LastSetpTime;
WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr()); WorkLog("料串入料 :扫码结束【" + code + "】,等待取料机构来取料," + MoveInfo.MoveParam.PosInfo.ToStr());
} }
else if (MoveInfo.IsStep(StepEnum.IB11_WaitReelLeave)) else if (MoveInfo.IsStep(StepEnum.IB14_ReelLeave))
{ {
MoveInfo.NextMoveStep(StepEnum.IB12_BatchAxisToP2); MoveInfo.NextMoveStep(StepEnum.IB15_BatchAxisToP2);
WorkLog("料串入料 :料盘已拿走,批量轴到P2,测盘高 "); WorkLog("料串入料 :料盘已拿走,批量轴到P2,测盘高 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
BatchAxisToP2(); BatchAxisToP2();
} }
else if (MoveInfo.IsStep(StepEnum.IB12_BatchAxisToP2)) else if (MoveInfo.IsStep(StepEnum.IB15_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(StepEnum.IB13_SaveHight); MoveInfo.NextMoveStep(StepEnum.IB16_SaveHight);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LastHeight = GetHeight(); LastHeight = GetHeight();
} }
else if (MoveInfo.IsStep(StepEnum.IB14_WaitReelLeave)) else if (MoveInfo.IsStep(StepEnum.IB17_WaitReelLeave))
{ {
CheckHasTray(); CheckHasTray();
} }
...@@ -288,16 +326,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -288,16 +326,16 @@ namespace OnlineStore.DeviceLibrary
public bool IsInScanCode() public bool IsInScanCode()
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore) && MoveInfo.IsStep(StepEnum.IB09_ScanCode)) if (MoveInfo.MoveType.Equals(MoveType.InStore) && MoveInfo.IsStep(StepEnum.IB11_ScanCode))
{ {
return true; return true;
} }
return false; return false;
} }
private void IB09_ScanCode() private void IB11_ScanCode()
{ {
ClearWarnMsg("等待旋转轴离开料串超时"); ClearWarnMsg("等待旋转轴离开料串超时");
MoveInfo.NextMoveStep(StepEnum.IB09_ScanCode); MoveInfo.NextMoveStep(StepEnum.IB11_ScanCode);
bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1); bool isScan = ConfigAppSettings.GetIntValue(Setting_Init.NeedScanCode).Equals(1);
LastCodeList = new List<string>(); LastCodeList = new List<string>();
...@@ -372,16 +410,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,16 +410,35 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = ""; WarnMsg = "";
if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false)) if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false))
{ {
if (Robot.AxisIsInShelfUp(ShelfType))
{ toBatchP4 = false;
MoveInfo.NextMoveStep(StepEnum.IB08_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); //判断扫码点是否可用,可用,运动到扫码点
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开"); int currP = BatchAxis.GetAclPosition();
int targetPosition = currP + Config.BatchAxisP4;
if (Config.BatchAxisP4 > 0 &&(targetPosition<Config.BatchAxisP2 ))
{
batchAxisReelPosition = currP;
toBatchP4 = true;
MoveInfo.NextMoveStep(StepEnum.IB08_BatchAxisToP4);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
BatchAxis.AbsMove(MoveInfo, targetPosition, Robot.Config.BatchAxis_P4Speed);
WorkLog("料盘已到位,批量轴当前位置【"+currP+ "】,扫码上升高度P4【" + Config.BatchAxisP4+"】可用,批量轴走到扫码点【"+ targetPosition + "】");
} }
else else
{ {
IB09_ScanCode(); LogUtil.info(Name + "料盘已到位,批量轴当前位置【" + currP + "】扫码上升高度P4【" + Config.BatchAxisP4 + "】扫码点【" + targetPosition + "】P2【"+ Config.BatchAxisP2 + "】,可直接扫码");
} if (Robot.AxisIsInShelfUp(ShelfType))
{
MoveInfo.NextMoveStep(StepEnum.IB09_WaitCanScan);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
WorkLog("旋转轴在料串上方,暂不能扫码,等待旋转轴离开");
}
else
{
IB11_ScanCode();
}
}
} }
else else
{ {
...@@ -863,7 +920,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -863,7 +920,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore)) if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
MoveInfo.NextMoveStep(StepEnum.IB11_WaitReelLeave); MoveInfo.NextMoveStep(StepEnum.IB14_ReelLeave);
WorkLog("当前料盘已离开,清理高度,准备开始测高"); WorkLog("当前料盘已离开,清理高度,准备开始测高");
LastHeight = 0; LastHeight = 0;
} }
...@@ -877,9 +934,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -877,9 +934,9 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveType.Equals(MoveType.InStore)) if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
if (MoveInfo.IsStep(StepEnum.IB13_SaveHight)) if (MoveInfo.IsStep(StepEnum.IB16_SaveHight))
{ {
MoveInfo.NextMoveStep(StepEnum.IB14_WaitReelLeave); MoveInfo.NextMoveStep(StepEnum.IB17_WaitReelLeave);
WorkLog("当前料盘已离开,开始判断是否有下一盘,开始扫码"); WorkLog("当前料盘已离开,开始判断是否有下一盘,开始扫码");
LastHeight = 0; LastHeight = 0;
} }
......
...@@ -416,7 +416,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -416,7 +416,7 @@ namespace OnlineStore.DeviceLibrary
//若左侧或右侧在等待扫码结束的状态,需要开始去取料 //若左侧或右侧在等待扫码结束的状态,需要开始去取料
foreach (BatchMoveBean moveBean in BatchMoveList) foreach (BatchMoveBean moveBean in BatchMoveList)
{ {
if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB10_ScanOK)) if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB13_ScanOK))
{ {
LogInfo(moveBean.Name + "开始取料:" + moveBean.GetInstoreParam().PosInfo.ToStr()); LogInfo(moveBean.Name + "开始取料:" + moveBean.GetInstoreParam().PosInfo.ToStr());
StartInstore(moveBean.GetInstoreParam()); StartInstore(moveBean.GetInstoreParam());
......
...@@ -346,6 +346,22 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -346,6 +346,22 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("MiddleAxis_Reverse_Offset")] [ConfigProAttribute("MiddleAxis_Reverse_Offset")]
public int MiddleAxis_Reverse_Offset { get; set; } public int MiddleAxis_Reverse_Offset { get; set; }
/// <summary>
/// PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxisP4_A")]
public int BatchAxisP4_A { get; set; }
/// <summary>
/// PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxisP4_B")]
public int BatchAxisP4_B { get; set; }
/// <summary>
/// PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P4Speed")]
public int BatchAxis_P4Speed { get; set; }
private List<string> CameraList = null; private List<string> CameraList = null;
......
...@@ -31,21 +31,22 @@ ...@@ -31,21 +31,22 @@
this.lblTestMsg = new System.Windows.Forms.Label(); this.lblTestMsg = new System.Windows.Forms.Label();
this.btnTestStop = new System.Windows.Forms.Button(); this.btnTestStop = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.batchAxisP4 = new OnlineStore.XLRStore.useControl.AxisPointControl();
this.batchAxisP2 = new OnlineStore.XLRStore.useControl.AxisPointControl(); this.batchAxisP2 = new OnlineStore.XLRStore.useControl.AxisPointControl();
this.batchAxisP1 = new OnlineStore.XLRStore.useControl.AxisPointControl(); this.batchAxisP1 = new OnlineStore.XLRStore.useControl.AxisPointControl();
this.btnSave = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button();
this.panBase = new System.Windows.Forms.Panel(); this.panBase = new System.Windows.Forms.Panel();
this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
this.btnResetShelf = new System.Windows.Forms.Button(); this.btnResetShelf = new System.Windows.Forms.Button();
this.chbDebug = new System.Windows.Forms.CheckBox(); this.chbDebug = new System.Windows.Forms.CheckBox();
this.btnScanTest = new System.Windows.Forms.Button(); this.btnScanTest = new System.Windows.Forms.Button();
this.lblAgvInfo = new System.Windows.Forms.Label(); this.lblAgvInfo = new System.Windows.Forms.Label();
this.btnShelfOut = new System.Windows.Forms.Button(); this.btnShelfOut = new System.Windows.Forms.Button();
this.chbAutoOut = new System.Windows.Forms.CheckBox();
this.lblCurrInfo = new System.Windows.Forms.Label(); this.lblCurrInfo = new System.Windows.Forms.Label();
this.btnReset = new System.Windows.Forms.Button(); this.btnReset = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.XLRStore.AxisMoveControl(); this.axisMoveControl1 = new OnlineStore.XLRStore.AxisMoveControl();
this.chbMoveStop = new System.Windows.Forms.CheckBox(); this.chbAutoOut = new System.Windows.Forms.CheckBox();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -91,9 +92,9 @@ ...@@ -91,9 +92,9 @@
this.groupBox3.Controls.Add(this.Shelf_StopDown_A); this.groupBox3.Controls.Add(this.Shelf_StopDown_A);
this.groupBox3.Controls.Add(this.Shelf_StopUp_A); this.groupBox3.Controls.Add(this.Shelf_StopUp_A);
this.groupBox3.Controls.Add(this.LineStart_A); this.groupBox3.Controls.Add(this.LineStart_A);
this.groupBox3.Location = new System.Drawing.Point(499, 380); this.groupBox3.Location = new System.Drawing.Point(492, 380);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(444, 120); this.groupBox3.Size = new System.Drawing.Size(450, 120);
this.groupBox3.TabIndex = 281; this.groupBox3.TabIndex = 281;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "IO操作"; this.groupBox3.Text = "IO操作";
...@@ -168,9 +169,9 @@ ...@@ -168,9 +169,9 @@
this.groupBox2.Controls.Add(this.btnStartTest); this.groupBox2.Controls.Add(this.btnStartTest);
this.groupBox2.Controls.Add(this.lblTestMsg); this.groupBox2.Controls.Add(this.lblTestMsg);
this.groupBox2.Controls.Add(this.btnTestStop); this.groupBox2.Controls.Add(this.btnTestStop);
this.groupBox2.Location = new System.Drawing.Point(499, 256); this.groupBox2.Location = new System.Drawing.Point(492, 256);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(444, 123); this.groupBox2.Size = new System.Drawing.Size(450, 123);
this.groupBox2.TabIndex = 280; this.groupBox2.TabIndex = 280;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "上料轴运动测试"; this.groupBox2.Text = "上料轴运动测试";
...@@ -222,38 +223,51 @@ ...@@ -222,38 +223,51 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.batchAxisP4);
this.groupBox1.Controls.Add(this.batchAxisP2); this.groupBox1.Controls.Add(this.batchAxisP2);
this.groupBox1.Controls.Add(this.batchAxisP1); this.groupBox1.Controls.Add(this.batchAxisP1);
this.groupBox1.Controls.Add(this.btnSave); this.groupBox1.Controls.Add(this.btnSave);
this.groupBox1.Location = new System.Drawing.Point(499, 133); this.groupBox1.Location = new System.Drawing.Point(492, 133);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(444, 121); this.groupBox1.Size = new System.Drawing.Size(450, 121);
this.groupBox1.TabIndex = 280; this.groupBox1.TabIndex = 280;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "上料轴点位信息"; this.groupBox1.Text = "上料轴点位信息";
// //
// batchAxisP4
//
this.batchAxisP4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.batchAxisP4.Location = new System.Drawing.Point(223, 23);
this.batchAxisP4.Name = "batchAxisP4";
this.batchAxisP4.PointBackColor = System.Drawing.Color.Transparent;
this.batchAxisP4.PointForeColor = System.Drawing.Color.Blue;
this.batchAxisP4.PointText = "扫码时上升高度P4:";
this.batchAxisP4.PointValue = 0;
this.batchAxisP4.Size = new System.Drawing.Size(215, 41);
this.batchAxisP4.TabIndex = 326;
//
// batchAxisP2 // batchAxisP2
// //
this.batchAxisP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.batchAxisP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.batchAxisP2.Location = new System.Drawing.Point(21, 70); this.batchAxisP2.Location = new System.Drawing.Point(5, 70);
this.batchAxisP2.Name = "batchAxisP2"; this.batchAxisP2.Name = "batchAxisP2";
this.batchAxisP2.PointBackColor = System.Drawing.Color.Transparent; this.batchAxisP2.PointBackColor = System.Drawing.Color.Transparent;
this.batchAxisP2.PointForeColor = System.Drawing.Color.Blue; this.batchAxisP2.PointForeColor = System.Drawing.Color.Blue;
this.batchAxisP2.PointText = "上料目标位置P2:"; this.batchAxisP2.PointText = "上料目标位置P2:";
this.batchAxisP2.PointValue = 0; this.batchAxisP2.PointValue = 0;
this.batchAxisP2.Size = new System.Drawing.Size(233, 41); this.batchAxisP2.Size = new System.Drawing.Size(215, 41);
this.batchAxisP2.TabIndex = 325; this.batchAxisP2.TabIndex = 325;
// //
// batchAxisP1 // batchAxisP1
// //
this.batchAxisP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.batchAxisP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.batchAxisP1.Location = new System.Drawing.Point(21, 23); this.batchAxisP1.Location = new System.Drawing.Point(5, 23);
this.batchAxisP1.Name = "batchAxisP1"; this.batchAxisP1.Name = "batchAxisP1";
this.batchAxisP1.PointBackColor = System.Drawing.Color.Transparent; this.batchAxisP1.PointBackColor = System.Drawing.Color.Transparent;
this.batchAxisP1.PointForeColor = System.Drawing.Color.Blue; this.batchAxisP1.PointForeColor = System.Drawing.Color.Blue;
this.batchAxisP1.PointText = "待机点P1:"; this.batchAxisP1.PointText = "待机点P1:";
this.batchAxisP1.PointValue = 0; this.batchAxisP1.PointValue = 0;
this.batchAxisP1.Size = new System.Drawing.Size(233, 41); this.batchAxisP1.Size = new System.Drawing.Size(215, 41);
this.batchAxisP1.TabIndex = 324; this.batchAxisP1.TabIndex = 324;
// //
// btnSave // btnSave
...@@ -263,7 +277,7 @@ ...@@ -263,7 +277,7 @@
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.ForeColor = System.Drawing.Color.Blue; this.btnSave.ForeColor = System.Drawing.Color.Blue;
this.btnSave.Location = new System.Drawing.Point(274, 70); this.btnSave.Location = new System.Drawing.Point(262, 70);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnSave.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnSave.Size = new System.Drawing.Size(118, 34); this.btnSave.Size = new System.Drawing.Size(118, 34);
...@@ -289,6 +303,19 @@ ...@@ -289,6 +303,19 @@
this.panBase.Size = new System.Drawing.Size(940, 122); this.panBase.Size = new System.Drawing.Size(940, 122);
this.panBase.TabIndex = 260; this.panBase.TabIndex = 260;
// //
// chbMoveStop
//
this.chbMoveStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbMoveStop.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Location = new System.Drawing.Point(322, 86);
this.chbMoveStop.Name = "chbMoveStop";
this.chbMoveStop.Size = new System.Drawing.Size(84, 24);
this.chbMoveStop.TabIndex = 327;
this.chbMoveStop.Text = "暂停运动";
this.chbMoveStop.UseVisualStyleBackColor = true;
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged);
//
// lblWarnMsg // lblWarnMsg
// //
this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -368,21 +395,6 @@ ...@@ -368,21 +395,6 @@
this.btnShelfOut.UseVisualStyleBackColor = false; this.btnShelfOut.UseVisualStyleBackColor = false;
this.btnShelfOut.Click += new System.EventHandler(this.btnShelfOut_Click); this.btnShelfOut.Click += new System.EventHandler(this.btnShelfOut_Click);
// //
// chbAutoOut
//
this.chbAutoOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbAutoOut.AutoSize = true;
this.chbAutoOut.Checked = true;
this.chbAutoOut.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoOut.Location = new System.Drawing.Point(502, 510);
this.chbAutoOut.Name = "chbAutoOut";
this.chbAutoOut.Size = new System.Drawing.Size(168, 24);
this.chbAutoOut.TabIndex = 280;
this.chbAutoOut.Text = "入料完成自动开始出库";
this.chbAutoOut.UseVisualStyleBackColor = true;
this.chbAutoOut.CheckedChanged += new System.EventHandler(this.chbAutoOut_CheckedChanged);
//
// lblCurrInfo // lblCurrInfo
// //
this.lblCurrInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblCurrInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -413,21 +425,23 @@ ...@@ -413,21 +425,23 @@
// //
this.axisMoveControl1.Location = new System.Drawing.Point(6, 128); this.axisMoveControl1.Location = new System.Drawing.Point(6, 128);
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(490, 398); this.axisMoveControl1.Size = new System.Drawing.Size(486, 398);
this.axisMoveControl1.TabIndex = 219; this.axisMoveControl1.TabIndex = 219;
// //
// chbMoveStop // chbAutoOut
// //
this.chbMoveStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbAutoOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbMoveStop.AutoSize = true; this.chbAutoOut.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAutoOut.Checked = true;
this.chbMoveStop.Location = new System.Drawing.Point(322, 86); this.chbAutoOut.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbMoveStop.Name = "chbMoveStop"; this.chbAutoOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Size = new System.Drawing.Size(84, 24); this.chbAutoOut.Location = new System.Drawing.Point(502, 510);
this.chbMoveStop.TabIndex = 327; this.chbAutoOut.Name = "chbAutoOut";
this.chbMoveStop.Text = "暂停运动"; this.chbAutoOut.Size = new System.Drawing.Size(168, 24);
this.chbMoveStop.UseVisualStyleBackColor = true; this.chbAutoOut.TabIndex = 280;
this.chbMoveStop.CheckedChanged += new System.EventHandler(this.chbMoveStop_CheckedChanged); this.chbAutoOut.Text = "入料完成自动开始出库";
this.chbAutoOut.UseVisualStyleBackColor = true;
this.chbAutoOut.CheckedChanged += new System.EventHandler(this.chbAutoOut_CheckedChanged);
// //
// FrmBatchMove // FrmBatchMove
// //
...@@ -485,6 +499,7 @@ ...@@ -485,6 +499,7 @@
protected System.Windows.Forms.CheckBox chbDebug; protected System.Windows.Forms.CheckBox chbDebug;
protected System.Windows.Forms.Button btnResetShelf; protected System.Windows.Forms.Button btnResetShelf;
protected System.Windows.Forms.CheckBox chbMoveStop; protected System.Windows.Forms.CheckBox chbMoveStop;
private useControl.AxisPointControl batchAxisP4;
} }
} }
...@@ -86,6 +86,8 @@ namespace OnlineStore.XLRStore ...@@ -86,6 +86,8 @@ namespace OnlineStore.XLRStore
batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.Config.BatchAxisP1); batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.Config.BatchAxisP1);
batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.Config.BatchAxisP2 ); batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.Config.BatchAxisP2 );
batchAxisP4.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P4Speed, moveBean.Config.BatchAxisP4, true);
lblWarnMsg.Text = moveBean.WarnMsg; lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr(); lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName); lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName);
...@@ -110,18 +112,30 @@ namespace OnlineStore.XLRStore ...@@ -110,18 +112,30 @@ namespace OnlineStore.XLRStore
{ {
int p1 = batchAxisP1.PointValue; int p1 = batchAxisP1.PointValue;
int p2 = batchAxisP2.PointValue; int p2 = batchAxisP2.PointValue;
int p4 = batchAxisP4.PointValue;
if (p4<0)
{
MessageBox.Show( "扫码时上升高度P4不能小于0 ,请重新设置P4点位置", "保存失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
moveBean.Config.BatchAxisP1 = p1; moveBean.Config.BatchAxisP1 = p1;
moveBean.Config.BatchAxisP2 = p2; moveBean.Config.BatchAxisP2 = p2;
moveBean.Config.BatchAxisP4 = p4;
if (moveBean.ShelfType.Equals(1)) if (moveBean.ShelfType.Equals(1))
{ {
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_A = p1; StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_A = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_A = p2; StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_A = p2;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP4_A = p4;
} }
else else
{ {
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_B = p1; StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_B = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_B = p2; StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_B = p2;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP4_B = p4;
} }
StoreManager.SaveInputEquipConfig(StoreManager.XLRStore.inputEquip.Config); StoreManager.SaveInputEquipConfig(StoreManager.XLRStore.inputEquip.Config);
MessageBox.Show("保存成功"); MessageBox.Show("保存成功");
......
...@@ -13,7 +13,7 @@ using System.Windows.Forms; ...@@ -13,7 +13,7 @@ using System.Windows.Forms;
namespace OnlineStore.XLRStore.useControl namespace OnlineStore.XLRStore.useControl
{ {
public partial class AxisPointControl : UserControl public partial class AxisPointControl : UserControl
{ {
public AxisPointControl() public AxisPointControl()
{ {
InitializeComponent(); InitializeComponent();
...@@ -26,7 +26,7 @@ namespace OnlineStore.XLRStore.useControl ...@@ -26,7 +26,7 @@ namespace OnlineStore.XLRStore.useControl
public int PointValue public int PointValue
{ {
get { return FormUtil.GetIntValue( txtPoint.Text); } get { return FormUtil.GetIntValue(txtPoint.Text); }
set { txtPoint.Text = value.ToString(); } set { txtPoint.Text = value.ToString(); }
} }
public Color PointBackColor public Color PointBackColor
...@@ -41,17 +41,34 @@ namespace OnlineStore.XLRStore.useControl ...@@ -41,17 +41,34 @@ namespace OnlineStore.XLRStore.useControl
} }
private int MoveSpeed; private int MoveSpeed;
private AxisBean MoveAxis = null; private AxisBean MoveAxis = null;
public void SetMoveData(AxisBean axisBean,int speed,int pointV) private bool isRelMovePoint=false;
public void SetMoveData(AxisBean axisBean, int speed, int pointV, bool isRelMovePoint=false)
{ {
this.MoveAxis = axisBean; this.MoveAxis = axisBean;
this.MoveSpeed = speed; this.MoveSpeed = speed;
this.PointValue = pointV; this.PointValue = pointV;
this.isRelMovePoint = isRelMovePoint;
} }
private void btnMove_Click(object sender, EventArgs e) private void btnMove_Click(object sender, EventArgs e)
{ {
int v = FormUtil.GetIntValue(txtPoint); int v = FormUtil.GetIntValue(txtPoint);
LogUtil.info(this.Name+" "+ MoveAxis.AxisName + " 点击:" + btnMove.Text); if (isRelMovePoint)
MoveAxis.AbsMove(null, v, MoveSpeed); {
if (v<=0)
{
MessageBox.Show(PointText + "为相对运动,请正确设置点位", "操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int currPosition = MoveAxis.GetAclPosition();
int targetPosition = currPosition + v;
LogUtil.info(this.Name + " " + MoveAxis.AxisName + " 点击:" + btnMove.Text + ",增量运动【" + v + "】,目标位置【"+ targetPosition + "】");
MoveAxis.AbsMove(null, targetPosition, MoveSpeed);
}
else
{
LogUtil.info(this.Name + " " + MoveAxis.AxisName + " 点击:" + btnMove.Text + ",绝对运动【" + v + "】");
MoveAxis.AbsMove(null, v, MoveSpeed);
}
} }
} }
} }
...@@ -24,3 +24,13 @@ AA:第3和第4位存储机构A面或B面,AA或者BB ...@@ -24,3 +24,13 @@ AA:第3和第4位存储机构A面或B面,AA或者BB
Config_InputEquip.csv 配置文件需要增加一行配置: Config_InputEquip.csv 配置文件需要增加一行配置:
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,, PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
20220325
批量轴增加扫码点P4功能。扫码点P4配置时必须大于上料目标点P2。使用时必须高于当前料盘位置才会生效。
Config_InputEquip.csv 文件需要增加三行配置:
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!