Commit 3c1ea47d LN

入料机构出入库代码

1 个父辈 148e3fdb
此文件类型无法预览
此文件类型无法预览
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -436,7 +437,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -436,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
public static GetPosResult GetPosId(string deviceName, List<string> codeList, int height, int width, string rfid, int feedEquipId) public static GetPosResult GetPosId(string deviceName, List<string> codeList, int height, int width, string rfid, int feedEquipId)
{ {
GetPosResult result = new GetPosResult(); GetPosResult result = new GetPosResult();
try try
{ {
string codeStr = ""; string codeStr = "";
...@@ -456,9 +457,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -456,9 +457,9 @@ namespace OnlineStore.DeviceLibrary
//判断是否不连接服务器 //判断是否不连接服务器
if (string.IsNullOrEmpty(serverAddr)) if (string.IsNullOrEmpty(serverAddr))
{ {
LogUtil.error (deviceName + "GetPosId[" + codeStr + "][" + height + "][" + width + "]:未找到服务器地址 "); LogUtil.error(deviceName + "GetPosId[" + codeStr + "][" + height + "][" + width + "]:未找到服务器地址 ");
result.Msg = "未找到服务器地址"; result.Msg = "未找到服务器地址";
result.Param =InOutPosInfo.NewNgPos( codeStr, "", height, width,"" ); result.Param = InOutPosInfo.NewNgPos(codeStr, "", height, width, "");
return result; return result;
} }
...@@ -488,9 +489,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -488,9 +489,9 @@ namespace OnlineStore.DeviceLibrary
{ {
result.Msg = deviceName + " 【" + codeStr + "】结果:没有收到服务器反馈,调用 cancelPutInTask "; result.Msg = deviceName + " 【" + codeStr + "】结果:没有收到服务器反馈,调用 cancelPutInTask ";
cancelPutInTask(deviceName, codeStr); cancelPutInTask(deviceName, codeStr);
result.Param = InOutPosInfo.NewNgPos( codeStr, "", height, width, "没有收到服务器反馈"); result.Param = InOutPosInfo.NewNgPos(codeStr, "", height, width, "没有收到服务器反馈");
result.Param.rfid = rfid; result.Param.rfid = rfid;
result.Param.IsNG = true; result.Param.IsNG = true;
return result; return result;
} }
else if ((!string.IsNullOrEmpty(serverResult.msg)) && serverResult.result.Equals(98)) else if ((!string.IsNullOrEmpty(serverResult.msg)) && serverResult.result.Equals(98))
...@@ -503,7 +504,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -503,7 +504,7 @@ namespace OnlineStore.DeviceLibrary
int rfidloc = FormUtil.GetIntValue(serverResult.rfidLoc); int rfidloc = FormUtil.GetIntValue(serverResult.rfidLoc);
int pH = FormUtil.GetIntValue(serverResult.plateH); int pH = FormUtil.GetIntValue(serverResult.plateH);
int pW = FormUtil.GetIntValue(serverResult.plateW); int pW = FormUtil.GetIntValue(serverResult.plateW);
result.Param = new InOutPosInfo( serverResult.barcode, serverResult.posId, pW,pH, urgentReel, cutReel, smallReel, serverResult.rfid, rfidloc); result.Param = new InOutPosInfo(serverResult.barcode, serverResult.posId, pW, pH, urgentReel, cutReel, smallReel, serverResult.rfid, rfidloc);
LogUtil.info(deviceName + "收到出库命令: " + result.Param.ToStr() + " "); LogUtil.info(deviceName + "收到出库命令: " + result.Param.ToStr() + " ");
return result; return result;
...@@ -512,9 +513,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -512,9 +513,9 @@ namespace OnlineStore.DeviceLibrary
{ {
result.Result = serverResult.result; result.Result = serverResult.result;
//result.Msg = deviceName + " 【" + codeStr + "】结果:" + serverResult.msg; //result.Msg = deviceName + " 【" + codeStr + "】结果:" + serverResult.msg;
result.Msg = serverResult.msg; result.Msg = serverResult.msg;
result.Param = InOutPosInfo.NewNgPos( codeStr, "", height, width, serverResult.msg); result.Param = InOutPosInfo.NewNgPos(codeStr, "", height, width, serverResult.msg);
result.Param.rfid = rfid; result.Param.rfid = rfid;
return result; return result;
} }
result.Result = serverResult.result; result.Result = serverResult.result;
...@@ -532,28 +533,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -532,28 +533,21 @@ namespace OnlineStore.DeviceLibrary
//根据库位号查找移栽 //根据库位号查找移栽
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败 // 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
result.Param = new InOutPosInfo( serverResult.barcode, posId,width, height); result.Param = new InOutPosInfo(serverResult.barcode, posId, width, height);
result.Param.rfid = rfid; result.Param.rfid = rfid;
//int storeId = result.Param.GetStoreId(); BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(posId);
//if (StoreManager.XLRStore.MoveEquipMap.ContainsKey(storeId)) if (position == null)
//{ {
// MoveEquip moveEquip = StoreManager.XLRStore.MoveEquipMap[storeId]; result.Param.IsNG = true;
// if (StoreManager.XLRStore.IsReviceInPosId(moveEquip, posId)) result.Param.NgMsg = "未找到库位[" + position + "]";
// { result.Msg = deviceName + ("收到服务器入库命令 " + ",未找到库位: " + result.Param.ToStr() + " ,入库失败!");
// result.Param.IsNG = true; return result;
// result.Param.NgMsg = "入库库位重复"; }
// result.Msg = deviceName + ("收到服务器入库命令 " + "入库库位重复: " + result.Param.ToStr() + " ,入库失败!"); else
// return result; {
// } LogUtil.info(deviceName + "收到入库命令: " + result.Param.ToStr() + " ");
// LogUtil.info(deviceName + "收到入库命令: " + result.Param.ToStr() + " "); return result;
//} }
//else
//{
// result.Param.IsNG = true;
// result.Param.NgMsg = "未找到料仓[" + storeId + "]";
// result.Msg = deviceName + ("收到服务器入库命令 " + "未找到料仓[" + storeId + "]: " + result.Param.ToStr() + " ,入库失败!");
// return result;
//}
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -412,6 +412,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -412,6 +412,10 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 入料机构入料 1100 开始 #region 入料机构入料 1100 开始
/// <summary>
/// 入料料串取料:判断旋转轴是否在P1,不在的话直接到P1
/// </summary>
II00_MiddleToP1=1100,
/// <summary> /// <summary>
/// 入库料串取料:升降轴到达P1 /// 入库料串取料:升降轴到达P1
......
...@@ -17,68 +17,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,68 +17,45 @@ namespace OnlineStore.DeviceLibrary
public bool ShelfNeedLeave = false; public bool ShelfNeedLeave = false;
public string Name = "料口"; public string Name = "料口";
public AxisBean BatchAxis = null; public AxisBean BatchAxis = null;
public int EquipType = 1;//1=左侧A,2=右侧B public int ShelfType = 1;//1=左侧A,2=右侧B
public DeviceMoveInfo MoveInfo; public DeviceMoveInfo MoveInfo;
public string WarnMsg = ""; public string WarnMsg = "";
public string CameraName = ""; public BatchMoveConfig Config = null;
public string AgvName = "";
private string RfidIP = "";
public int BatchAxisP1 = 0;
public int BatchAxisP2 = 0;
public List<string> DIList = new List<string>();
public List<string> DOList = new List<string>();
private InputEquip Robot private InputEquip Robot
{ {
get { return StoreManager.XLRStore.inputEquip; } get { return StoreManager.XLRStore.inputEquip; }
} }
public BatchMoveBean(InputEquip_Config config, AxisBean axis, int inType = 1) public BatchMoveBean(InputEquip_Config config, AxisBean axis, int inType = 1)
{ {
Config = new BatchMoveConfig();
this.EquipType = inType; this.ShelfType = inType;
this.BatchAxis = axis; this.BatchAxis = axis;
string ioAdd = "_A"; string ioAdd = "_A";
if (EquipType.Equals(1)) if (ShelfType.Equals(1))
{ {
Name = "A料口 " ;
this.BatchAxisP1 = config.BatchAxisP1_A;
this.BatchAxisP2 = config.BatchAxisP2_A;
ioAdd = "_A"; ioAdd = "_A";
AgvName = config.AgvName_A; Name = "A料口 ";
this.CameraName = config.CameraNameList_A; Config.BatchAxisP1 = config.BatchAxisP1_A;
this.RfidIP = config.PRO_RFIP_A; Config.BatchAxisP2 = config.BatchAxisP2_A;
Config. AgvName = config.AgvName_A;
Config.CameraName = config.CameraNameList_A;
Config.RfidIP = config.PRO_RFIP_A;
} }
else else
{ {
Name = "B料口 " ;
this.BatchAxisP1 = config.BatchAxisP1_B;
this.BatchAxisP2 = config.BatchAxisP2_B;
ioAdd = "_B"; ioAdd = "_B";
AgvName = config.AgvName_B; Name = "B料口 ";
this.CameraName = config.CameraNameList_B; Config.BatchAxisP1 = config.BatchAxisP1_B;
this.RfidIP = config.PRO_RFIP_B; Config.BatchAxisP2 = config.BatchAxisP2_B;
Config. AgvName = config.AgvName_B;
Config.CameraName = config.CameraNameList_B;
Config.RfidIP = config.PRO_RFIP_B;
} }
Config.LoadIO(ioAdd);
MoveInfo = new DeviceMoveInfo(Name); MoveInfo = new DeviceMoveInfo(Name);
IO_ReelCheck = IO_ReelCheck + ioAdd;
IO_LineIn_Check = IO_LineIn_Check + ioAdd;
IO_LineEnd_Check = IO_LineEnd_Check + ioAdd;
IO_Shelf_StopUp = IO_Shelf_StopUp + ioAdd;
IO_Shelf_StopDown = IO_Shelf_StopDown + ioAdd;
IO_LineStart = IO_LineStart + ioAdd;
IO_LineBack = IO_LineBack + ioAdd;
DIList.Add(IO_ReelCheck);
DIList.Add(IO_LineIn_Check);
DIList.Add(IO_LineEnd_Check);
DIList.Add(IO_Shelf_StopUp);
DIList.Add(IO_Shelf_StopDown);
DOList.Add(IO_Shelf_StopUp);
DOList.Add(IO_Shelf_StopDown);
DOList.Add(IO_LineStart);
DOList.Add(IO_LineBack);
} }
internal void TimerProcess() internal void TimerProcess()
{ {
...@@ -89,7 +66,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (Robot.AutoInput && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) if (Robot.AutoInput && Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
StartInstore(new InOutParam()); StartInstore(new InOutParam());
} }
...@@ -110,21 +87,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -110,21 +87,21 @@ namespace OnlineStore.DeviceLibrary
//判断是否无料串 //判断是否无料串
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.LOW)
&& Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.LOW)
&& Robot.CylinderIsOk(IO_Shelf_StopUp, IO_Shelf_StopDown)) && Robot.CylinderIsOk(Config.IO_Shelf_StopUp, Config.IO_Shelf_StopDown))
{ {
if (StoreManager.checkWatch(shelfWatch, 10000, true)) if (StoreManager.checkWatch(shelfWatch, 10000, true))
{ {
var agvcallresult = AgvClient.NeedEnter(AgvName, "", Asa.ClientLevel.High); var agvcallresult = AgvClient.NeedEnter(Config.AgvName, "", Asa.ClientLevel.High);
WorkLog("无料串,:通知agv来送料串AgvName:" + AgvName + ",agvcallresult:" + agvcallresult.ToString()); WorkLog("无料串,:通知agv来送料串AgvName:" + Config.AgvName + ",agvcallresult:" + agvcallresult.ToString());
} }
} }
else if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH) else if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH)
&& AgvClient.GetAction(AgvName) != Asa.ClientAction.NeedLeave && AgvClient.GetAction(AgvName) != Asa.ClientAction.MayLeave && AgvClient.GetAction(AgvName) != Asa.ClientAction.FinishLeave) && AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.NeedLeave && AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.MayLeave && AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.FinishLeave)
{ {
shelfWatch.Stop(); shelfWatch.Stop();
AgvClient.SetToNone(AgvName); AgvClient.SetToNone(Config.AgvName);
} }
} }
private Stopwatch shelfWatch = new Stopwatch(); private Stopwatch shelfWatch = new Stopwatch();
...@@ -132,17 +109,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,17 +109,24 @@ namespace OnlineStore.DeviceLibrary
{ {
if (Robot.CanStartRun()) if (Robot.CanStartRun())
{ {
if (needStop) if (Robot.runStatus >= RunStatus.HomeMoving)
{
if (needStop)
{
StopMove();
}
WarnMsg = "";
alarmType = AlarmType.None;
MoveInfo.NewMove(MoveType.Reset);
MoveInfo.NextMoveStep(StepEnum.IBR01_StopDown);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
WorkLog("开始复位,定位气缸下降");
StopDown(MoveInfo);
}
else
{ {
StopMove(); WarnMsg = Name + "复位失败:入料机构未启动";
} }
WarnMsg = "";
alarmType = AlarmType.None;
MoveInfo.NewMove(MoveType.Reset);
MoveInfo.NextMoveStep(StepEnum.IBR01_StopDown);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
WorkLog("开始复位,定位气缸下降");
StopDown(MoveInfo);
} }
else else
{ {
...@@ -165,7 +149,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsStep(StepEnum.IBR01_StopDown)) if (MoveInfo.IsStep(StepEnum.IBR01_StopDown))
{ {
if (Robot.IOValue(IO_LineIn_Check).Equals(Robot.IOValue(IO_LineEnd_Check))) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(Robot.IOValue(Config.IO_LineEnd_Check)))
{ {
LineStop(); LineStop();
MoveInfo.NextMoveStep(StepEnum.IBR04_BatchHome); MoveInfo.NextMoveStep(StepEnum.IBR04_BatchHome);
...@@ -196,7 +180,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -196,7 +180,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StepEnum.IBR06_BatchToP1); MoveInfo.NextMoveStep(StepEnum.IBR06_BatchToP1);
WorkLog("复位:批量轴走到待机点"); WorkLog("复位:批量轴走到待机点");
BatchAxis.AbsMove(MoveInfo, BatchAxisP1, Robot.Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Robot.Config.BatchAxis_P1Speed);
} }
else if (MoveInfo.IsStep(StepEnum.IBR06_BatchToP1)) else if (MoveInfo.IsStep(StepEnum.IBR06_BatchToP1))
{ {
...@@ -232,76 +216,97 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,76 +216,97 @@ namespace OnlineStore.DeviceLibrary
} }
#region 左右入料口共有IO
//伺服料盘检测
private string IO_ReelCheck = "ReelCheck";
//料串前端检测
private string IO_LineIn_Check = "LineIn_Check";
//料串到位检测
private string IO_LineEnd_Check = "LineEnd_Check";
//料串阻挡上升
private string IO_Shelf_StopUp = "Shelf_StopUp";
//料串阻挡下降
private string IO_Shelf_StopDown = "Shelf_StopDown";
//线体正转
private string IO_LineStart = "LineStart";
//线体反转
private string IO_LineBack = "LineBack";
#endregion
#region 气缸操作 #region 气缸操作
public void LineRun(DeviceMoveInfo moveInfo = null) public void LineRun(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_LineBack, IO_VALUE.LOW); Robot.IOMove(Config.IO_LineBack, IO_VALUE.LOW);
Robot.IOMove(IO_LineStart, IO_VALUE.HIGH); Robot.IOMove(Config.IO_LineStart, IO_VALUE.HIGH);
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineBack, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineBack, IO_VALUE.LOW));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineStart, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineStart, IO_VALUE.HIGH));
} }
} }
public void LineBack(DeviceMoveInfo moveInfo = null) public void LineBack(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_LineBack, IO_VALUE.HIGH); Robot.IOMove(Config.IO_LineBack, IO_VALUE.HIGH);
Robot.IOMove(IO_LineStart, IO_VALUE.HIGH); Robot.IOMove(Config.IO_LineStart, IO_VALUE.HIGH);
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineBack, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineBack, IO_VALUE.HIGH));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineStart, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineStart, IO_VALUE.HIGH));
} }
} }
public void LineStop(DeviceMoveInfo moveInfo = null) public void LineStop(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_LineBack, IO_VALUE.LOW); Robot.IOMove(Config.IO_LineBack, IO_VALUE.LOW);
Robot.IOMove(IO_LineStart, IO_VALUE.LOW); Robot.IOMove(Config.IO_LineStart, IO_VALUE.LOW);
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineBack, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineBack, IO_VALUE.LOW));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineStart, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineStart, IO_VALUE.LOW));
} }
} }
public void StopDown(DeviceMoveInfo moveInfo = null) public void StopDown(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_Shelf_StopUp, IO_VALUE.LOW); Robot.IOMove(Config.IO_Shelf_StopUp, IO_VALUE.LOW);
Robot.IOMove(IO_Shelf_StopDown, IO_VALUE.HIGH); Robot.IOMove(Config.IO_Shelf_StopDown, IO_VALUE.HIGH);
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Shelf_StopUp, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_Shelf_StopUp, IO_VALUE.LOW));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Shelf_StopDown, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_Shelf_StopDown, IO_VALUE.HIGH));
} }
} }
public void StopUp(DeviceMoveInfo moveInfo = null) public void StopUp(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_Shelf_StopDown, IO_VALUE.HIGH); Robot.IOMove(Config.IO_Shelf_StopDown, IO_VALUE.HIGH);
Robot.IOMove(IO_Shelf_StopUp, IO_VALUE.HIGH); Robot.IOMove(Config.IO_Shelf_StopUp, IO_VALUE.HIGH);
if (moveInfo != null) if (moveInfo != null)
{ {
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Shelf_StopDown, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_Shelf_StopDown, IO_VALUE.HIGH));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Shelf_StopUp, IO_VALUE.HIGH)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_Shelf_StopUp, IO_VALUE.HIGH));
}
}
#endregion
#region 提升轴匀速上升处理
public bool LastMoveIsTest = true;
public void BatchAxisToP2(bool isFirstMove = true, bool isWait = true, bool IsTest = false)
{
int targetP2 = Config.BatchAxisP2;
int targetSpeed = Robot.Config.BatchAxis_P2Speed;
if (!isFirstMove)
{
int currPosition = BatchAxis.GetAclPosition();
if (currPosition != -1)
{
targetP2 = currPosition + Robot.Config.Height_ChangeValue * 80;
if (targetP2 > Config.BatchAxisP2)
{
targetP2 = Config.BatchAxisP2;
}
LogUtil.info(Name + " BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")");
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
}
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (isWait)
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(BatchAxis.Config, targetP2, targetSpeed));
} }
BatchAxis.Config.TargetPosition = targetP2;
BatchAxis.AbsMove(null, targetP2, targetSpeed);
//开始检测信号
BatchAxis.BatchAxisStartCheck(Config.IO_ReelCheck, IO_VALUE.HIGH);
LastMoveIsTest = IsTest;
} }
#endregion #endregion
...@@ -309,7 +314,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -309,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
protected DateTime preRWTime = DateTime.Now; protected DateTime preRWTime = DateTime.Now;
internal void CheckWait(DeviceMoveInfo moveInfo) internal void CheckWait(DeviceMoveInfo moveInfo)
{ {
int DeviceID = 10 + EquipType; int DeviceID = 10 + ShelfType;
try try
{ {
List<WaitResultInfo> list = moveInfo.WaitList; List<WaitResultInfo> list = moveInfo.WaitList;
...@@ -481,15 +486,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -481,15 +486,14 @@ namespace OnlineStore.DeviceLibrary
} }
} }
internal bool ShelfReadyOut(InOutPosInfo posInfo = null, bool SendShelfOut = false)
/// <summary>
/// 料串准备好出库
/// </summary>
/// <returns></returns>
internal bool ShelfReadyOut(InOutPosInfo posInfo, bool SendShelfOut)
{ {
if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.IsStep(StepEnum.IS11_ShelfReady)) if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
{ {
if (posInfo == null)
{
return true;
}
//TODO 验证料串是否同一个,不是同一个直接送出料串 //TODO 验证料串是否同一个,不是同一个直接送出料串
if (String.IsNullOrEmpty(CurrShelf.XuniRfid)) if (String.IsNullOrEmpty(CurrShelf.XuniRfid))
{ {
...@@ -501,48 +505,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -501,48 +505,14 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SendShelfOut) else if (SendShelfOut)
{ {
SendOutShelfLeave(""); LogUtil.error($"当前料串【{CurrShelf.ToStr()}】出库料盘【{posInfo.ToStr()}】料串不一致,送出当前料串");
SendOutShelfLeave($"料串{CurrShelf.XuniRfid}与{posInfo.rfid}不一致");
} }
} }
return false; return false;
} }
#region 提升轴匀速上升处理
public bool LastMoveIsTest = true;
public void BatchAxisToP2(bool isFirstMove = true, bool isWait = true, bool IsTest = false)
{
int targetP2 = BatchAxisP2;
int targetSpeed = Robot.Config.BatchAxis_P2Speed;
if (!isFirstMove)
{
int currPosition = BatchAxis.GetAclPosition();
if (currPosition != -1)
{
targetP2 = currPosition + Robot.Config.Height_ChangeValue * 80;
if (targetP2 > BatchAxisP2)
{
targetP2 = BatchAxisP2;
}
LogUtil.info(Name + " BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")");
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
}
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (isWait)
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(BatchAxis.Config, targetP2, targetSpeed));
}
BatchAxis.Config.TargetPosition = targetP2;
BatchAxis.AbsMove(null, targetP2, targetSpeed);
//开始检测信号
BatchAxis.BatchAxisStartCheck(IO_ReelCheck, IO_VALUE.HIGH);
LastMoveIsTest = IsTest;
}
#endregion
public string GetMoveStr() public string GetMoveStr()
{ {
...@@ -597,4 +567,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -597,4 +567,55 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " [" + MoveInfo.MoveStep + "]" + msg); LogUtil.info(Name + " [" + MoveInfo.MoveStep + "]" + msg);
} }
} }
public class BatchMoveConfig
{
internal List<string> DIList = new List<string>();
internal List<string> DOList = new List<string>();
public string CameraName = "";
public string AgvName = "";
public int BatchAxisP1 = 0;
public int BatchAxisP2 = 0;
internal string RfidIP = "";
#region 左右入料口共有IO
//伺服料盘检测
internal string IO_ReelCheck = "ReelCheck";
//料串前端检测
internal string IO_LineIn_Check = "LineIn_Check";
//料串到位检测
internal string IO_LineEnd_Check = "LineEnd_Check";
//料串阻挡上升
internal string IO_Shelf_StopUp = "Shelf_StopUp";
//料串阻挡下降
internal string IO_Shelf_StopDown = "Shelf_StopDown";
//线体正转
internal string IO_LineStart = "LineStart";
//线体反转
internal string IO_LineBack = "LineBack";
internal void LoadIO(string ioAdd)
{
IO_ReelCheck = IO_ReelCheck + ioAdd;
IO_LineIn_Check = IO_LineIn_Check + ioAdd;
IO_LineEnd_Check = IO_LineEnd_Check + ioAdd;
IO_Shelf_StopUp = IO_Shelf_StopUp + ioAdd;
IO_Shelf_StopDown = IO_Shelf_StopDown + ioAdd;
IO_LineStart = IO_LineStart + ioAdd;
IO_LineBack = IO_LineBack + ioAdd;
DIList.Add(IO_ReelCheck);
DIList.Add(IO_LineIn_Check);
DIList.Add(IO_LineEnd_Check);
DIList.Add(IO_Shelf_StopUp);
DIList.Add(IO_Shelf_StopDown);
DOList.Add(IO_Shelf_StopUp);
DOList.Add(IO_Shelf_StopDown);
DOList.Add(IO_LineStart);
DOList.Add(IO_LineBack);
}
#endregion
}
} }
...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (AgvClient.GetAction(AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(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; ;
...@@ -36,11 +36,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,11 +36,11 @@ namespace OnlineStore.DeviceLibrary
UpdateShelf(1); UpdateShelf(1);
if (CurrShelf.ShelfState.Equals(3)) if (CurrShelf.ShelfState.Equals(3))
{ {
bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High); bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString()); LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + Config.AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
return false; return false;
} }
if (Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NewMove(MoveType.InStore); MoveInfo.NewMove(MoveType.InStore);
MoveInfo.MoveParam = new InOutParam(); MoveInfo.MoveParam = new InOutParam();
...@@ -48,7 +48,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,7 +48,7 @@ namespace OnlineStore.DeviceLibrary
IB05_StopUp(); IB05_StopUp();
} }
else if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) else if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NewMove(MoveType.InStore); MoveInfo.NewMove(MoveType.InStore);
MoveInfo.NextMoveStep(StepEnum.IB04_LineStart); MoveInfo.NextMoveStep(StepEnum.IB04_LineStart);
...@@ -70,7 +70,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -70,7 +70,7 @@ namespace OnlineStore.DeviceLibrary
posInfo.IsNG = MoveInfo.MoveParam.PosInfo.IsNG; posInfo.IsNG = MoveInfo.MoveParam.PosInfo.IsNG;
posInfo.rfid = MoveInfo.MoveParam.PosInfo.rfid; posInfo.rfid = MoveInfo.MoveParam.PosInfo.rfid;
InOutParam param = new InOutParam(posInfo); InOutParam param = new InOutParam(posInfo);
param.ShelfType = 1; param.ShelfType = ShelfType;
return param; return param;
} }
...@@ -87,13 +87,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -87,13 +87,13 @@ namespace OnlineStore.DeviceLibrary
{ {
WorkLog("料串入料 :提升伺服移动到P1,阻挡气缸下降"); WorkLog("料串入料 :提升伺服移动到P1,阻挡气缸下降");
MoveInfo.NextMoveStep(StepEnum.IB02_BatchAxisToP1); MoveInfo.NextMoveStep(StepEnum.IB02_BatchAxisToP1);
BatchAxis.AbsMove(MoveInfo, BatchAxisP1, Robot.Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Robot.Config.BatchAxis_P1Speed);
StopDown(); StopDown();
} }
private void IB07_AxisUpMove() private void IB07_AxisUpMove()
{ {
MoveInfo.ShelfNoTray = false; MoveInfo.ShelfNoTray = false;
AgvClient.SetToNone(AgvName); AgvClient.SetToNone(Config.AgvName);
MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove); MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
WorkLog("料串入料 :上料轴开始慢速上升到P2点,等待检测到料盘"); WorkLog("料串入料 :上料轴开始慢速上升到P2点,等待检测到料盘");
...@@ -127,11 +127,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -127,11 +127,11 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.IB04_LineStart)) else if (MoveInfo.IsStep(StepEnum.IB04_LineStart))
{ {
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH))
{ {
IB05_StopUp(); IB05_StopUp();
} }
else if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) else if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(StepEnum.IB04_LineStart); MoveInfo.NextMoveStep(StepEnum.IB04_LineStart);
WorkLog(" 入口检测到料串,流水线转动 6000,等待料串完全进入轨道"); WorkLog(" 入口检测到料串,流水线转动 6000,等待料串完全进入轨道");
...@@ -148,7 +148,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -148,7 +148,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB06_WaitTime)) else if (MoveInfo.IsStep(StepEnum.IB06_WaitTime))
{ {
LineStop(); LineStop();
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH))
{ {
if (CurrShelf.ShelfState.Equals(2)) if (CurrShelf.ShelfState.Equals(2))
{ {
...@@ -236,10 +236,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -236,10 +236,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.TimeOutSeconds = 40; MoveInfo.TimeOutSeconds = 40;
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High); bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
WorkLog("上料完成 :通知agv来取料串,等待料串离开AgvName:" + AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString()); WorkLog("上料完成 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineIn_Check, IO_VALUE.LOW));
} }
else if (MoveInfo.IsStep(StepEnum.IB23_ShelfOut)) else if (MoveInfo.IsStep(StepEnum.IB23_ShelfOut))
{ {
...@@ -281,10 +281,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,10 +281,10 @@ namespace OnlineStore.DeviceLibrary
{ {
Robot.IOMove(IO_Type.CameraLed, IO_VALUE.HIGH); Robot.IOMove(IO_Type.CameraLed, IO_VALUE.HIGH);
LastCodeList = CodeManager.CameraScan(CameraName, Name); LastCodeList = CodeManager.CameraScan(Config.CameraName, Name);
if (LastCodeList.Count <= 0) if (LastCodeList.Count <= 0)
{ {
LastCodeList = CodeManager.CameraScan(CameraName, Name); LastCodeList = CodeManager.CameraScan(Config.CameraName, Name);
} }
Robot.IOMove(IO_Type.CameraLed, IO_VALUE.LOW); Robot.IOMove(IO_Type.CameraLed, IO_VALUE.LOW);
return LastCodeList; return LastCodeList;
...@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary
private void CheckHasTray() private void CheckHasTray()
{ {
WarnMsg = ""; WarnMsg = "";
if (Robot.IOValue(IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false)) if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH) && MoveInfo.ShelfNoTray.Equals(false))
{ {
IB09_ScanCode(); IB09_ScanCode();
} }
...@@ -315,7 +315,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -315,7 +315,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//判断当前位置是否在指定的位置 //判断当前位置是否在指定的位置
int currP = BatchAxis.GetAclPosition(); int currP = BatchAxis.GetAclPosition();
int chaz = Math.Abs(currP - BatchAxisP2); int chaz = Math.Abs(currP - Config.BatchAxisP2);
if (chaz > BatchAxis.Config.CanErrorCountMax) if (chaz > BatchAxis.Config.CanErrorCountMax)
{ {
MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove); MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
...@@ -331,22 +331,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -331,22 +331,40 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void SendInShelfLeave(string msg = "") private void SendInShelfLeave(string msg = "")
{ {
bool needLeave = true;
//入料完成直接开始出库 //入料完成直接开始出库
if (ShelfAutoOut || CurrShelf.ShelfState.Equals(2)) if (ShelfAutoOut || CurrShelf.ShelfState.Equals(2))
{ {
MoveInfo.NextMoveStep(StepEnum.IB20_InStoreEnd); needLeave = false;
StartOutstore(); }
else if (ShelfType.Equals(1) && Robot.BatchMove_B.ShelfReadyOut())
{
needLeave = true;
}
//如果已经有一个出库料串,这个直接离开
else if (ShelfType.Equals(2) && Robot.BatchMove_A.ShelfReadyOut())
{
needLeave = true;
} }
else else
{ {
needLeave = false;
}
if (needLeave)
{
UpdateShelf(3); UpdateShelf(3);
MoveInfo.NextMoveStep(StepEnum.IB21_BatchToP1); MoveInfo.NextMoveStep(StepEnum.IB21_BatchToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
WorkLog("送出料串 :" + msg + ",提升伺服到P1点"); WorkLog("送出料串 :" + msg + ",提升伺服到P1点");
BatchAxis.SuddenStop(); BatchAxis.SuddenStop();
BatchAxis.AbsMove(MoveInfo, BatchAxisP1, Robot.Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Robot.Config.BatchAxis_P1Speed);
}
else
{
MoveInfo.NextMoveStep(StepEnum.IB20_InStoreEnd);
StartOutstore();
} }
} }
#endregion #endregion
...@@ -363,7 +381,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -363,7 +381,7 @@ namespace OnlineStore.DeviceLibrary
//计算高度 //计算高度
EndMovePosition = BatchAxis.GetAclPosition(); EndMovePosition = BatchAxis.GetAclPosition();
bool isLast = false; bool isLast = false;
int chaz = Math.Abs(EndMovePosition - BatchAxisP2); int chaz = Math.Abs(EndMovePosition - Config.BatchAxisP2);
if (chaz < BatchAxis.Config.CanErrorCountMax) if (chaz < BatchAxis.Config.CanErrorCountMax)
{ {
isLast = true; isLast = true;
...@@ -417,7 +435,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,7 +435,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NewMove(MoveType.OutStore); MoveInfo.NewMove(MoveType.OutStore);
//如果已经在P2位置 或者伺服检测信号亮,直接开始 //如果已经在P2位置 或者伺服检测信号亮,直接开始
if (BatchAxis.IsInPosition(BatchAxisP2) || Robot.IOValue(IO_ReelCheck).Equals(IO_VALUE.LOW)) if (BatchAxis.IsInPosition(Config.BatchAxisP2) || Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.LOW))
{ {
ShelfToReady(); ShelfToReady();
} }
...@@ -485,10 +503,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -485,10 +503,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.TimeOutSeconds = 40; MoveInfo.TimeOutSeconds = 40;
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High); bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
WorkLog("送出出库料串 :通知agv来取料串,等待料串离开AgvName:" + AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString()); WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_LineIn_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineIn_Check, IO_VALUE.LOW));
} }
else if (MoveInfo.IsStep(StepEnum.IS23_ShelfOut)) else if (MoveInfo.IsStep(StepEnum.IS23_ShelfOut))
{ {
...@@ -503,34 +521,49 @@ namespace OnlineStore.DeviceLibrary ...@@ -503,34 +521,49 @@ namespace OnlineStore.DeviceLibrary
internal void NewReelOut(InOutPosInfo posInfo, string xnRfid = "") internal void NewReelOut(InOutPosInfo posInfo, string xnRfid = "")
{ {
UpdateShelf(2, xnRfid); if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
MoveInfo.NextMoveStep(StepEnum.IS12_AxisDown); {
MoveInfo.MoveParam.PosInfo = posInfo; UpdateShelf(2, xnRfid);
int currPositon = BatchAxis.GetAclPosition(); MoveInfo.NextMoveStep(StepEnum.IS12_AxisDown);
int downValue = Robot.Config.Height_ChangeValue * (posInfo.PlateH + 2); MoveInfo.MoveParam.PosInfo = posInfo;
int batchTP = currPositon - downValue; int currPositon = BatchAxis.GetAclPosition();
if (batchTP <= BatchAxisP1) int downValue = Robot.Config.Height_ChangeValue * (posInfo.PlateH + 2);
int batchTP = currPositon - downValue;
if (batchTP <= Config.BatchAxisP1)
{
batchTP = Config.BatchAxisP1;
}
WorkLog($"出库{MoveInfo.SLog}新料盘:{posInfo.ToStr()},提升轴下降{posInfo.PlateH + 2}mm,目标位置{batchTP}");
BatchAxis.AbsMove(MoveInfo, batchTP, Robot.Config.BatchAxis_P1Speed);
}
else
{ {
batchTP = BatchAxisP1;
LogUtil.error(Name + "NewReelOut ,料串不在 IS11_ShelfReady 中,跳过暂不处理");
} }
WorkLog($"出库{MoveInfo.SLog}新料盘:{posInfo.ToStr()},提升轴下降{posInfo.PlateH + 2}mm,目标位置{batchTP}");
BatchAxis.AbsMove(MoveInfo, batchTP, Robot.Config.BatchAxis_P1Speed);
} }
internal void ReelPutOk() internal void ReelPutOk()
{ {
MoveInfo.NextMoveStep(StepEnum.IS14_ReelOK); if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.IsStep(StepEnum.IS13_WaitReel))
WorkLog($"出库{MoveInfo.SLog} 放料完成"); {
CheckShelfIsFull(); MoveInfo.NextMoveStep(StepEnum.IS14_ReelOK);
WorkLog($"出库{MoveInfo.SLog} 放料完成");
CheckShelfIsFull();
}
else
{
LogUtil.error(Name + "ReelPutOk ,料串不在等待放料 IS13_WaitReel 中,跳过暂不处理");
}
} }
private void CheckShelfIsFull() private void CheckShelfIsFull()
{ {
int currPositon = BatchAxis.GetAclPosition(); int currPositon = BatchAxis.GetAclPosition();
int nextP = currPositon - Robot.Config.Height_ChangeValue * (8 + 2); int nextP = currPositon - Robot.Config.Height_ChangeValue * (8 + 2);
if (nextP <= BatchAxisP1) if (nextP <= Config.BatchAxisP1)
{ {
if (Robot.IOValue(IO_ReelCheck).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(Config.IO_ReelCheck).Equals(IO_VALUE.HIGH))
{ {
SendOutShelfLeave("料串出满需离开"); SendOutShelfLeave("料串出满需离开");
} }
...@@ -558,7 +591,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -558,7 +591,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog($"送出料串{MoveInfo.SLog} :" + log + ",提升伺服到P1点"); WorkLog($"送出料串{MoveInfo.SLog} :" + log + ",提升伺服到P1点");
UpdateShelf(3); UpdateShelf(3);
BatchAxis.SuddenStop(); BatchAxis.SuddenStop();
BatchAxis.AbsMove(MoveInfo, BatchAxisP1, Robot.Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Robot.Config.BatchAxis_P1Speed);
} }
private void ShelfToReady() private void ShelfToReady()
{ {
...@@ -590,35 +623,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -590,35 +623,35 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
UpdateShelf(); UpdateShelf();
string logName = Name + "料串 " + rfid + " [AGV->" + AgvName + "] "; string logName = Name + "料串 " + rfid + " [AGV->" + Config.AgvName + "] ";
try try
{ {
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW)) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.LOW))
{ {
LogUtil.info(logName + " 开始转动线体"); LogUtil.info(logName + " 开始转动线体");
ProcessShelfEnter = true; ProcessShelfEnter = true;
LineRun(); LineRun();
//等待进料检测信号 //等待进料检测信号
bool result = Robot.WaitIo(IO_LineIn_Check, IO_VALUE.HIGH, 60000); bool result = Robot.WaitIo(Config.IO_LineIn_Check, IO_VALUE.HIGH, 60000);
if (!result) if (!result)
{ {
LogUtil.error(logName + $" 等待{ IO_LineIn_Check}=High 超时, 等待 {IO_LineEnd_Check } 信号"); LogUtil.error(logName + $" 等待{ Config.IO_LineIn_Check}=High 超时, 等待 {Config.IO_LineEnd_Check } 信号");
} }
else else
{ {
LogUtil.info(logName + $"已收到 {IO_LineIn_Check}=High , 等待 { IO_LineEnd_Check} 信号"); LogUtil.info(logName + $"已收到 {Config.IO_LineIn_Check}=High , 等待 { Config.IO_LineEnd_Check} 信号");
} }
result = Robot.WaitIo(IO_LineEnd_Check, IO_VALUE.HIGH, 60000); result = Robot.WaitIo(Config.IO_LineEnd_Check, IO_VALUE.HIGH, 60000);
if (!result) if (!result)
{ {
LogUtil.error(logName + $" 等待 {IO_LineEnd_Check} =High 超时,等待3000后停止转动,发送 FinishEnter"); LogUtil.error(logName + $" 等待 {Config.IO_LineEnd_Check} =High 超时,等待3000后停止转动,发送 FinishEnter");
} }
else else
{ {
LogUtil.info(logName + $"已收到 {IO_LineEnd_Check} =High ,等待3000后停止转动,发送 FinishEnter"); LogUtil.info(logName + $"已收到 {Config.IO_LineEnd_Check} =High ,等待3000后停止转动,发送 FinishEnter");
} }
//等待200毫秒后停止转动 //等待200毫秒后停止转动
Thread.Sleep(3000); Thread.Sleep(3000);
...@@ -627,11 +660,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -627,11 +660,11 @@ namespace OnlineStore.DeviceLibrary
LineStop(); LineStop();
//料串可离开 //料串可离开
AgvClient.SetStatus(AgvName, "", ClientAction.FinishEnter, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, "", ClientAction.FinishEnter, ClientLevel.High, true);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
Thread.Sleep(10000); Thread.Sleep(10000);
AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, "", ClientAction.None, ClientLevel.High, true);
}); });
ProcessShelfEnter = false; ProcessShelfEnter = false;
LogUtil.info(logName + " 结束"); LogUtil.info(logName + " 结束");
...@@ -643,7 +676,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -643,7 +676,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
Thread.Sleep(3000); Thread.Sleep(3000);
AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, "", ClientAction.None, ClientLevel.High, true);
}); });
} }
} }
...@@ -667,31 +700,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -667,31 +700,31 @@ namespace OnlineStore.DeviceLibrary
//AGV已到达,将料串送入AGV中 //AGV已到达,将料串送入AGV中
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
string logName = Name + "料串" + rfid + "[" + AgvName + "->AGV ] "; string logName = Name + "料串" + rfid + "[" + Config.AgvName + "->AGV ] ";
try try
{ {
//AgvClient.SetStatus(AgvName, CurrShelfId, ClientAction.None, ClientLevel.High, true); //AgvClient.SetStatus(Config.AgvName, CurrShelfId, ClientAction.None, ClientLevel.High, true);
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH) || Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH) || Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH))
{ {
ProcessShelfOut = true; ProcessShelfOut = true;
LineBack(); LineBack();
bool result = Robot.WaitIo(IO_LineIn_Check, IO_VALUE.LOW, 60000); bool result = Robot.WaitIo(Config.IO_LineIn_Check, IO_VALUE.LOW, 60000);
if (!result) if (!result)
{ {
LogUtil.error(logName + $" 等待 { IO_LineIn_Check}=LOW超时,等待8000后停止转动,发送FinishLeave"); LogUtil.error(logName + $" 等待 { Config.IO_LineIn_Check}=LOW超时,等待8000后停止转动,发送FinishLeave");
} }
else else
{ {
LogUtil.info(logName + $" 已收到 {IO_LineIn_Check}=LOW ,等待8000后停止转动,发送FinishLeave"); LogUtil.info(logName + $" 已收到 {Config.IO_LineIn_Check}=LOW ,等待8000后停止转动,发送FinishLeave");
} }
//再转动2000 //再转动2000
Thread.Sleep(8000); Thread.Sleep(8000);
LineStop(); LineStop();
AgvClient.SetStatus(AgvName, CurrShelf.ShelfRfid, ClientAction.FinishLeave, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, CurrShelf.ShelfRfid, ClientAction.FinishLeave, ClientLevel.High, true);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
Thread.Sleep(10000); Thread.Sleep(10000);
AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, "", ClientAction.None, ClientLevel.High, true);
}); });
ProcessShelfOut = false; ProcessShelfOut = false;
LogUtil.info(logName + "结束,停止转动,清空料串[" + CurrShelf.ShelfRfid + "] "); LogUtil.info(logName + "结束,停止转动,清空料串[" + CurrShelf.ShelfRfid + "] ");
...@@ -703,7 +736,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -703,7 +736,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
Thread.Sleep(3000); Thread.Sleep(3000);
AgvClient.SetStatus(AgvName, "", ClientAction.None, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvName, "", ClientAction.None, ClientLevel.High, true);
}); });
} }
} }
...@@ -746,7 +779,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -746,7 +779,7 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
string configStr = ""; string configStr = "";
if (EquipType.Equals(1)) if (ShelfType.Equals(1))
{ {
configStr = Setting_Init.AShelfInfo; configStr = Setting_Init.AShelfInfo;
} }
...@@ -769,7 +802,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -769,7 +802,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
RFIDData rfidD = RFIDManager.ReadRFID(RfidIP); RFIDData rfidD = RFIDManager.ReadRFID(Config.RfidIP);
CurrShelf = new ShelfInfo(rfidD.StrData, state, xnRfid); CurrShelf = new ShelfInfo(rfidD.StrData, state, xnRfid);
BufferDataManager.SaveData<ShelfInfo>(configStr, CurrShelf); BufferDataManager.SaveData<ShelfInfo>(configStr, CurrShelf);
LogUtil.info(Name + "当前料串信息:" + CurrShelf.ToStr()); LogUtil.info(Name + "当前料串信息:" + CurrShelf.ToStr());
......
...@@ -14,9 +14,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,9 +14,9 @@ namespace OnlineStore.DeviceLibrary
public partial class InputEquip : EquipBase public partial class InputEquip : EquipBase
{ {
public InputEquip_Config Config; public InputEquip_Config Config;
public AxisBean MiddleAxis = null; public AxisBean MiddleAxis = null;
public AxisBean UpdownAxis = null; public AxisBean UpdownAxis = null;
private AxisBean[] moveAxisArray; private AxisBean[] moveAxisArray;
...@@ -54,8 +54,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -54,8 +54,10 @@ namespace OnlineStore.DeviceLibrary
BatchMove_A = new BatchMoveBean(Config, BatchAxis_A, 1); BatchMove_A = new BatchMoveBean(Config, BatchAxis_A, 1);
BatchMove_B = new BatchMoveBean(config, BatchAxis_B, 2); BatchMove_B = new BatchMoveBean(config, BatchAxis_B, 2);
runStatus = RunStatus.Wait;
} }
#region 启动,复位,停止 处理
public override bool StartRun() public override bool StartRun()
{ {
...@@ -70,7 +72,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -70,7 +72,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
SetAllTimer(false); SetAllTimer(false);
MoveInfo.EndMove(); MoveInfo.EndMove();
LogInfo("StartRun : 开始启动 "); LogInfo("StartRun : 开始启动 ");
runStatus = RunStatus.HomeMoving; runStatus = RunStatus.HomeMoving;
...@@ -95,7 +97,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -95,7 +97,7 @@ namespace OnlineStore.DeviceLibrary
} }
LogInfo("Reset 开始重置 "); LogInfo("Reset 开始重置 ");
runStatus = RunStatus.Reset; runStatus = RunStatus.Reset;
MoveInfo.NewMove(MoveType.Reset); MoveInfo.NewMove(MoveType.Reset);
StartReset(); StartReset();
SetAllTimer(true); SetAllTimer(true);
return true; return true;
...@@ -103,7 +105,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,7 +105,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void StartReset() private void StartReset()
{ {
//复位时设置状态为none //复位时设置状态为none
AgvClient.SetStatus(Config.AgvName_B); AgvClient.SetStatus(Config.AgvName_B);
AgvClient.SetStatus(Config.AgvName_A); AgvClient.SetStatus(Config.AgvName_A);
...@@ -113,7 +115,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -113,7 +115,7 @@ namespace OnlineStore.DeviceLibrary
isInSuddenDown = false; isInSuddenDown = false;
isNoAirpressure_Check = false; isNoAirpressure_Check = false;
MoveInfo.NextMoveStep(StepEnum.IR01_Wait); MoveInfo.NextMoveStep(StepEnum.IR01_Wait);
BatchMove_A.Reset(); BatchMove_A.Reset();
BatchMove_B.Reset(); BatchMove_B.Reset();
LogInfo($"复位 {MoveInfo.SLog} :批量轴开始复位"); LogInfo($"复位 {MoveInfo.SLog} :批量轴开始复位");
...@@ -136,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
// 1,处于A,B,NG料口是,可以直接回取料升降轴。 // 1,处于A,B,NG料口是,可以直接回取料升降轴。
// 2,处于A, B两个暂存区时,升降轴先运动到该暂存区的取放料高点,旋转轴再回原点或待机点。 // 2,处于A, B两个暂存区时,升降轴先运动到该暂存区的取放料高点,旋转轴再回原点或待机点。
//验证旋转轴位置 TODO //验证旋转轴位置 TODO
if (MiddleAxis.IsInPosition(Config.Middle_P4_AUpper) ) if (MiddleAxis.IsInPosition(Config.Middle_P4_AUpper))
{ {
MoveInfo.NextMoveStep(StepEnum.IR02_UpdownUpMove); MoveInfo.NextMoveStep(StepEnum.IR02_UpdownUpMove);
LogInfo($"复位 {MoveInfo.SLog}:当前旋转轴在 A上暂存区 {Config.Middle_P4_AUpper},升降轴先到P4:{Config.Updown_P4_AUpperH}"); LogInfo($"复位 {MoveInfo.SLog}:当前旋转轴在 A上暂存区 {Config.Middle_P4_AUpper},升降轴先到P4:{Config.Updown_P4_AUpperH}");
...@@ -204,7 +206,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,7 +206,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StepEnum.IR07_ClampRelax); MoveInfo.NextMoveStep(StepEnum.IR07_ClampRelax);
LogInfo($"复位{MoveInfo.SLog}:夹爪气缸放松"); LogInfo($"复位{MoveInfo.SLog}:夹爪气缸放松");
ClampRelax(MoveInfo,MoveInfo.MoveParam.PosInfo.barcode); ClampRelax(MoveInfo, MoveInfo.MoveParam.PosInfo.barcode);
} }
else if (MoveInfo.IsStep(StepEnum.IR07_ClampRelax)) else if (MoveInfo.IsStep(StepEnum.IR07_ClampRelax))
{ {
...@@ -246,13 +248,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -246,13 +248,14 @@ namespace OnlineStore.DeviceLibrary
AgvClient.SetStatus(Config.AgvName_A); AgvClient.SetStatus(Config.AgvName_A);
AgvClient.SetStatus(Config.AgvName_B); AgvClient.SetStatus(Config.AgvName_B);
MoveInfo.EndMove(); runStatus = RunStatus.Wait;
MoveInfo.EndMove();
BatchMove_A.StopMove(); BatchMove_A.StopMove();
BatchMove_B.StopMove(); BatchMove_B.StopMove();
UpdownAxis.SuddenStop(); UpdownAxis.SuddenStop();
MiddleAxis.SuddenStop(); MiddleAxis.SuddenStop();
CloseAllAxis(); CloseAllAxis();
} }
...@@ -260,10 +263,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -260,10 +263,11 @@ namespace OnlineStore.DeviceLibrary
public override void StopRun() public override void StopRun()
{ {
SetAllTimer(false); SetAllTimer(false);
runStatus = RunStatus.Wait; runStatus = RunStatus.Wait;
StopMove(); StopMove();
} }
#endregion
protected override void BaseTimerProcess() protected override void BaseTimerProcess()
{ {
...@@ -273,71 +277,83 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,71 +277,83 @@ namespace OnlineStore.DeviceLibrary
} }
BusyMoveProcess(); BusyMoveProcess();
IOTimeOutProcess(); IOTimeOutProcess();
//判断流水线打开了才可以运行 //判断流水线打开了才可以运行
List<BatchMoveBean> BatchMoveList = new List<BatchMoveBean>() { BatchMove_A, BatchMove_B };
if (MoveInfo.MoveType.Equals(MoveType.None) && NoErrorAlarm()) if (MoveInfo.MoveType.Equals(MoveType.None) && NoErrorAlarm())
{ {
//若左侧或右侧在等待扫码结束的状态,需要开始去取料 //若左侧或右侧在等待扫码结束的状态,需要开始去取料
foreach (BatchMoveBean moveBean in BatchMoveList)
if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IB10_ScanOK))
{ {
LogInfo("A侧开始取料"); if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB10_ScanOK))
StartInstore(BatchMove_A.GetInstoreParam()); {
LogInfo(moveBean.Name + "开始取料");
StartInstore(moveBean.GetInstoreParam());
break;
}
} }
else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IB10_ScanOK)) }
if (MoveInfo.MoveType.Equals(MoveType.None) && NoErrorAlarm())
{
if (CheckStartOutPos("A下暂存区", BufferDataManager.AOutStoreInfo, BatchMoveList))
{ {
LogInfo("B侧开始取料");
StartInstore(BatchMove_B.GetInstoreParam());
} }
//TODO 如果出料暂存区有料,且空料串准备完成,开始出料 else if (CheckStartOutPos("B下暂存区", BufferDataManager.BOutStoreInfo, BatchMoveList))
else if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
{ {
if (BufferDataManager.AOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 1;
LogInfo($"A下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
else if (BufferDataManager.BOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 1;
LogInfo($"B下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
} }
else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IS11_ShelfReady)) else
{ {
//如果有物料且不能放料,需要送一个料串离开
if (BufferDataManager.AOutStoreInfo != null) if (BufferDataManager.AOutStoreInfo != null)
{ {
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo); CheckStartOutPos("A下暂存区", BufferDataManager.AOutStoreInfo, BatchMoveList, true);
param.ShelfType = 2;
LogInfo($"A下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
} }
else if (BufferDataManager.BOutStoreInfo != null) else if (BufferDataManager.BOutStoreInfo != null)
{ {
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo); CheckStartOutPos("B下暂存区", BufferDataManager.BOutStoreInfo, BatchMoveList, true);
param.ShelfType = 2;
LogInfo($"B下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
} }
} }
} }
foreach (BatchMoveBean moveBean in BatchMoveList)
{
moveBean.TimerProcess();
}
if (NoErrorAlarm()) if (NoErrorAlarm())
{ {
CheckAxisAlarm(); CheckAxisAlarm();
} }
} }
private bool CheckStartOutPos(string posType, InOutPosInfo posInfo, List<BatchMoveBean> BatchMoveList, bool shelfAutoLeave = false)
{
if (posInfo != null)
{
foreach (BatchMoveBean moveBean in BatchMoveList)
{
if (moveBean.ShelfReadyOut(BufferDataManager.AOutStoreInfo, shelfAutoLeave))
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo.ToCopy());
param.ShelfType = moveBean.ShelfType;
LogInfo($"{posType}物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
return true;
break;
}
}
}
return false;
}
internal bool CanStartWork() internal bool CanStartWork()
{ {
//是否可以开始新的料串入料 //是否可以开始新的料串入料
if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.InStore)) if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
StepEnum step = BatchMove_A.MoveInfo.MoveStep; StepEnum step = BatchMove_A.MoveInfo.MoveStep;
if (step < StepEnum.IB21_BatchToP1) if (step < StepEnum.IB21_BatchToP1)
{ {
return false; return false;
...@@ -345,15 +361,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -345,15 +361,15 @@ namespace OnlineStore.DeviceLibrary
} }
else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.InStore)) else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
StepEnum step = BatchMove_B.MoveInfo.MoveStep; StepEnum step = BatchMove_B.MoveInfo.MoveStep;
if (step < StepEnum.IB21_BatchToP1) if (step < StepEnum.IB21_BatchToP1)
{ {
return false; return false;
} }
} }
return true ; return true;
} }
private DateTime checkAlarmTime = DateTime.Now; private DateTime checkAlarmTime = DateTime.Now;
private void CheckAxisAlarm() private void CheckAxisAlarm()
{ {
...@@ -379,17 +395,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -379,17 +395,17 @@ namespace OnlineStore.DeviceLibrary
foreach (AxisBean axisInfo in moveAxisArray) foreach (AxisBean axisInfo in moveAxisArray)
{ {
if (AxisIsAlarm(axisInfo)) if (AxisIsAlarm(axisInfo))
{ {
return; return;
} }
} }
if (AxisIsAlarm(BatchMove_A.BatchAxis,false )) if (AxisIsAlarm(BatchMove_A.BatchAxis, false))
{ {
BatchMove_A.WarnMsg = WarnMsg; BatchMove_A.WarnMsg = WarnMsg;
BatchMove_A.Alarm(AlarmType.AxisAlarm); BatchMove_A.Alarm(AlarmType.AxisAlarm);
return; return;
} }
if (AxisIsAlarm(BatchMove_B.BatchAxis,false )) if (AxisIsAlarm(BatchMove_B.BatchAxis, false))
{ {
BatchMove_B.WarnMsg = WarnMsg; BatchMove_B.WarnMsg = WarnMsg;
BatchMove_B.Alarm(AlarmType.AxisAlarm); BatchMove_B.Alarm(AlarmType.AxisAlarm);
...@@ -403,7 +419,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,7 +419,7 @@ namespace OnlineStore.DeviceLibrary
foreach (AxisBean axis in moveAxisArray) foreach (AxisBean axis in moveAxisArray)
{ {
string outMsg = ""; string outMsg = "";
if (!axis.Open(true, out outMsg)) if (!axis.Open(true, out outMsg))
{ {
LogUtil.info(outMsg); LogUtil.info(outMsg);
return false; return false;
...@@ -421,7 +437,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -421,7 +437,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void ClampWork(DeviceMoveInfo moveInfo,bool isCheck,params string[] codes) private void ClampWork(DeviceMoveInfo moveInfo, bool isCheck, params string[] codes)
{ {
if (Config.UseClampJaw.Equals(1)) if (Config.UseClampJaw.Equals(1))
{ {
...@@ -433,7 +449,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -433,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void ClampRelax(DeviceMoveInfo moveInfo ,params string[] codes) private void ClampRelax(DeviceMoveInfo moveInfo, params string[] codes)
{ {
if (Config.UseClampJaw.Equals(1)) if (Config.UseClampJaw.Equals(1))
{ {
...@@ -444,7 +460,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -444,7 +460,27 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public bool IsNoReelAlarm()
{
if (runStatus.Equals(RunStatus.Busy) && alarmType.Equals(AlarmType.IoSingleTimeOut))
{
if (MoveInfo.MoveType.Equals(MoveType.InStore) && MoveInfo.MoveStep.Equals(StepEnum.II08_ClampWork))
{
return true;
}
else if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveStep.Equals(StepEnum.IO05_ClampWork))
{
return true;
}
else if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveStep.Equals(StepEnum.IO15_ClampWork))
{
return true;
}
}
return false;
}
} }
} }
...@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
partial class InputEquip partial class InputEquip
{ {
public bool ClampEmptyMove = false; public bool ClampEmptyMove = false;
protected override bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait ) protected override bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait)
{ {
TimeSpan span = DateTime.Now - moveInfo.LastSetpTime; TimeSpan span = DateTime.Now - moveInfo.LastSetpTime;
if (wait.WaitType.Equals(WaitEnum.W004_ClampReached)) if (wait.WaitType.Equals(WaitEnum.W004_ClampReached))
...@@ -55,28 +55,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,28 +55,45 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = AxisManager.instance.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(1); wait.IsEnd = AxisManager.instance.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(1);
} }
return wait.IsEnd; return wait.IsEnd;
} }
#region 入库 #region 入库
public override bool StartInstore(InOutParam param) public override bool StartInstore(InOutParam param)
{ {
if (!NoAlarm()) if (!NoAlarm())
{ {
LogInfo("报警中,无法开始取料入库:" + param.PosInfo.ToStr() ); LogInfo("报警中,无法开始取料入库:" + param.PosInfo.ToStr());
return false; return false;
} }
if (MoveInfo.MoveType.Equals(MoveType.None)) if (MoveInfo.MoveType.Equals(MoveType.None))
{ {
MoveInfo.NewMove(MoveType.InStore,param ); runStatus = RunStatus.Busy;
MoveInfo.NextMoveStep(StepEnum.II01_UpdownToP1); MoveInfo.NewMove(MoveType.InStore, param);
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed); if (MiddleAxis.IsInPosition(Config.Middle_P1))
MoveLog($"开始入库{MoveInfo.SLog}: 料串{param.ShelfType},升降轴先返回P1{Config.Updown_P1}"); {
return true; if (UpdownAxis.IsInPosition(Config.Updown_P1))
{
ToShelfMove();
}
else
{
MoveInfo.NextMoveStep(StepEnum.II01_UpdownToP1);
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed);
MoveLog($"开始入库{param.ShelfType}{MoveInfo.SLog}: 升降轴先返回P1{Config.Updown_P1}");
}
}
else
{
MoveInfo.NextMoveStep(StepEnum.II00_MiddleToP1);
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_Speed);
MoveLog($"开始入库{MoveInfo.SLog}: 料串{param.ShelfType},旋转轴先返回P1{Config.Middle_P1}");
}
return true;
} }
return false; return false;
} }
protected override void InstoreProcess() protected override void InstoreProcess()
...@@ -92,28 +109,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,28 +109,24 @@ namespace OnlineStore.DeviceLibrary
int shelf = MoveInfo.MoveParam.ShelfType; int shelf = MoveInfo.MoveParam.ShelfType;
#region 入库取料,获取库位号 #region 入库取料,获取库位号
if (MoveInfo.IsStep(StepEnum.II01_UpdownToP1)) if (MoveInfo.IsStep(StepEnum.II00_MiddleToP1))
{ {
if (shelf.Equals(1)) if (UpdownAxis.IsInPosition(Config.Updown_P1))
{ {
MoveInfo.NextMoveStep(StepEnum.II02_MIddleToP2); ToShelfMove();
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 旋转轴到P2(A料口取料点){Config.Middle_P2_ATake},等待{IO_Type.MAxis_Check_A}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P2_ATake, Config.Middle_P2_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_A, IO_VALUE.HIGH));
}
else if (shelf.Equals(2))
{
MoveInfo.NextMoveStep(StepEnum.II05_MIddleToP3);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 旋转轴到P3(B料口取料点){Config.Middle_P3_BTake},等待{IO_Type.MAxis_Check_B}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P3_BTake, Config.Middle_P3_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_B, IO_VALUE.HIGH));
} }
else else
{ {
MoveLog($"入库{MoveInfo.SLog}未找到料串{shelf},结束处理"); MoveInfo.NextMoveStep(StepEnum.II01_UpdownToP1);
MoveInfo.EndMove(); UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 升降轴先返回P1{Config.Updown_P1}");
} }
} }
if (MoveInfo.IsStep(StepEnum.II01_UpdownToP1))
{
ToShelfMove();
}
else if (MoveInfo.IsStep(StepEnum.II02_MIddleToP2)) else if (MoveInfo.IsStep(StepEnum.II02_MIddleToP2))
{ {
MoveInfo.NextMoveStep(StepEnum.II03_UpdownToP2); MoveInfo.NextMoveStep(StepEnum.II03_UpdownToP2);
...@@ -142,7 +155,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,7 +155,16 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.II09_UpdownToP1)) else if (MoveInfo.IsStep(StepEnum.II09_UpdownToP1))
{ {
II10_WaitAxisCheck(); //如果是测试,直接开始取目标位置
if (MoveInfo.MoveParam.PosInfo.barcode.EndsWith("TEST"))
{
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 条码 {MoveInfo.MoveParam.PosInfo.barcode}为测试料,直接去目标位置");
StrartToTargetP(MoveInfo.MoveParam.PosInfo);
}
else
{
II10_WaitAxisCheck();
}
} }
else if (MoveInfo.IsStep(StepEnum.II10_WaitAxisCheck)) else if (MoveInfo.IsStep(StepEnum.II10_WaitAxisCheck))
...@@ -191,28 +213,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -191,28 +213,11 @@ namespace OnlineStore.DeviceLibrary
if (LastResult.Equals(98)) if (LastResult.Equals(98))
{ {
//出库料 暂不处理出库,全部入库 //出库料 暂不处理出库,全部入库
}
//判断是A还是B
if (LastPosInfo.IsNG)
{
MoveInfo.NextMoveStep(StepEnum.II81_UpdownToP8);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: NG料{LastPosInfo.ToStr()} 升降轴到P8(NG料区放料高点){Config.Updown_P8_NGH}");
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P8_NGH, Config.Updown_P8_Speed);
} }
else if (LastPosInfo.PosId.Contains("AA")) StrartToTargetP(LastPosInfo);
{
MoveInfo.NextMoveStep(StepEnum.II41_WaitNoReel);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: A侧入库料{LastPosInfo.ToStr()} 等待A上暂存区无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_A, IO_VALUE.LOW));
}
else
{
MoveInfo.NextMoveStep(StepEnum.II61_WaitNoReel);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: B侧入库料{LastPosInfo.ToStr()} 等待B上暂存区无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_B, IO_VALUE.LOW));
}
} }
else if (MoveInfo.IsTimeOut(15)) else if (MoveInfo.IsTimeOut(15))
{ {
...@@ -272,6 +277,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -272,6 +277,7 @@ namespace OnlineStore.DeviceLibrary
MoveLog($" 入料->A侧放料结束,更新A上暂存区物料{MoveInfo.MoveParam.PosInfo.ToStr()}"); MoveLog($" 入料->A侧放料结束,更新A上暂存区物料{MoveInfo.MoveParam.PosInfo.ToStr()}");
BufferDataManager.AInStoreInfo = MoveInfo.MoveParam.PosInfo; BufferDataManager.AInStoreInfo = MoveInfo.MoveParam.PosInfo;
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = RunStatus.Runing;
} }
#endregion #endregion
...@@ -326,6 +332,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -326,6 +332,7 @@ namespace OnlineStore.DeviceLibrary
MoveLog($" 入料->B侧放料结束,更新B上暂存区物料{MoveInfo.MoveParam.PosInfo.ToStr()}"); MoveLog($" 入料->B侧放料结束,更新B上暂存区物料{MoveInfo.MoveParam.PosInfo.ToStr()}");
BufferDataManager.BInStoreInfo = MoveInfo.MoveParam.PosInfo; BufferDataManager.BInStoreInfo = MoveInfo.MoveParam.PosInfo;
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = RunStatus.Runing;
} }
#endregion #endregion
...@@ -362,12 +369,60 @@ namespace OnlineStore.DeviceLibrary ...@@ -362,12 +369,60 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.II86_MiddleToP1)) else if (MoveInfo.IsStep(StepEnum.II86_MiddleToP1))
{ {
MoveLog($" 入料->NG箱放料结束"); MoveLog($" 入料->NG箱放料结束");
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = RunStatus.Runing;
} }
#endregion #endregion
} }
private void ToShelfMove()
{
int shelf = MoveInfo.MoveParam.ShelfType;
if (shelf.Equals(1))
{
MoveInfo.NextMoveStep(StepEnum.II02_MIddleToP2);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 旋转轴到P2(A料口取料点){Config.Middle_P2_ATake},等待{IO_Type.MAxis_Check_A}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P2_ATake, Config.Middle_P2_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_A, IO_VALUE.HIGH));
}
else if (shelf.Equals(2))
{
MoveInfo.NextMoveStep(StepEnum.II05_MIddleToP3);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: 旋转轴到P3(B料口取料点){Config.Middle_P3_BTake},等待{IO_Type.MAxis_Check_B}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P3_BTake, Config.Middle_P3_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_B, IO_VALUE.HIGH));
}
else
{
MoveLog($"入库{MoveInfo.SLog}未找到料串{shelf},结束处理");
MoveInfo.EndMove();
runStatus = RunStatus.Runing;
}
}
private void StrartToTargetP(InOutPosInfo lastPosInfo)
{
int shelf = MoveInfo.MoveParam.ShelfType;
//判断是A还是B
if (LastPosInfo.IsNG)
{
MoveInfo.NextMoveStep(StepEnum.II81_UpdownToP8);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: NG料{LastPosInfo.ToStr()} 升降轴到P8(NG料区放料高点){Config.Updown_P8_NGH}");
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P8_NGH, Config.Updown_P8_Speed);
}
else if (LastPosInfo.PosSide.Equals("A"))
{
MoveInfo.NextMoveStep(StepEnum.II41_WaitNoReel);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: A侧入库料{LastPosInfo.ToStr()} 等待A上暂存区无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_A, IO_VALUE.LOW));
}
else
{
MoveInfo.NextMoveStep(StepEnum.II61_WaitNoReel);
MoveLog($"入库取料{shelf}{MoveInfo.SLog}: B侧入库料{LastPosInfo.ToStr()} 等待B上暂存区无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_B, IO_VALUE.LOW));
}
}
private Task getPosTask = null; private Task getPosTask = null;
private InOutPosInfo LastPosInfo = null; private InOutPosInfo LastPosInfo = null;
...@@ -486,16 +541,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -486,16 +541,36 @@ namespace OnlineStore.DeviceLibrary
int startp = param.PosInfo.GetPosType(); int startp = param.PosInfo.GetPosType();
if (startp.Equals(1)) if (startp.Equals(1))
{ {
runStatus = RunStatus.Busy;
MoveInfo.NewMove(MoveType.OutStore, param); MoveInfo.NewMove(MoveType.OutStore, param);
MoveInfo.NextMoveStep(StepEnum.IO01_ReelCheck); MoveInfo.NextMoveStep(StepEnum.IO01_ReelCheck);
MoveLog($"开始A下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1"); if (!MiddleAxis.IsInPosition(Config.Middle_P1))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_Speed);
MoveLog($"开始A下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1,旋转轴到P1{Config.Middle_P1}");
}
else
{
MoveLog($"开始A下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1");
}
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_A, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_A, IO_VALUE.HIGH));
} }
else if (startp.Equals(2)) else if (startp.Equals(2))
{ {
runStatus = RunStatus.Busy;
MoveInfo.NewMove(MoveType.OutStore, param); MoveInfo.NewMove(MoveType.OutStore, param);
MoveInfo.NextMoveStep(StepEnum.IO11_ReelCheck); MoveInfo.NextMoveStep(StepEnum.IO11_ReelCheck);
MoveLog($"开始B下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1"); if (!MiddleAxis.IsInPosition(Config.Middle_P1))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_Speed);
MoveLog($"开始B下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1,旋转轴到P1{Config.Middle_P1}");
}
else
{
MoveLog($"开始B下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1");
}
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_B, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_B, IO_VALUE.HIGH));
} }
else else
...@@ -667,48 +742,56 @@ namespace OnlineStore.DeviceLibrary ...@@ -667,48 +742,56 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IO33_MiddleToP1)) else if (MoveInfo.IsStep(StepEnum.IO33_MiddleToP1))
{ {
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = RunStatus.Runing;
MoveLog($"出库->料串 {MoveInfo.SLog}: 放料完成"); MoveLog($"出库->料串 {MoveInfo.SLog}: 放料完成");
} }
#endregion #endregion
} }
private bool MiddleToShelf() private bool MiddleToShelf()
{ {
bool isTest = MoveInfo.MoveParam.PosInfo.barcode.EndsWith("TEST");
int shelf = MoveInfo.MoveParam.ShelfType; int shelf = MoveInfo.MoveParam.ShelfType;
if (shelf.Equals(1) && BatchMove_A.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IS13_WaitReel)) if (shelf.Equals(1))
{
ClearTimeoutAlarm("等待料串可放料");
MoveInfo.NextMoveStep(StepEnum.IO23_MiddleToP2);
MoveLog($"出库->A料串 {MoveInfo.SLog}: 旋转轴到P2(A料口取料点){Config.Middle_P2_ATake},等待{IO_Type.MAxis_Check_A}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P2_ATake, Config.Middle_P2_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_A, IO_VALUE.HIGH));
return true;
}
else if (shelf.Equals(2) && BatchMove_B.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IS13_WaitReel))
{ {
ClearTimeoutAlarm("等待料串可放料"); bool shelfOk = BatchMove_A.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IS13_WaitReel);
MoveInfo.NextMoveStep(StepEnum.IO27_MiddleToP3); if (isTest || shelfOk)
MoveLog($"出库->B料串 {MoveInfo.SLog}: 旋转轴到P3(B料口取料点){Config.Middle_P3_BTake},等待{IO_Type.MAxis_Check_B}信号亮"); {
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P3_BTake, Config.Middle_P3_Speed); ClearTimeoutAlarm("等待料串可放料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_B, IO_VALUE.HIGH)); MoveInfo.NextMoveStep(StepEnum.IO23_MiddleToP2);
return true; MoveLog($"出库->A料串 {MoveInfo.SLog}: 旋转轴到P2(A料口取料点){Config.Middle_P2_ATake},等待{IO_Type.MAxis_Check_A}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P2_ATake, Config.Middle_P2_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_A, IO_VALUE.HIGH));
return true;
}
} }
else else if (shelf.Equals(2))
{ {
return false; bool shelfOk = BatchMove_B.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IS13_WaitReel);
if (isTest || shelfOk)
{
ClearTimeoutAlarm("等待料串可放料");
MoveInfo.NextMoveStep(StepEnum.IO27_MiddleToP3);
MoveLog($"出库->B料串 {MoveInfo.SLog}: 旋转轴到P3(B料口取料点){Config.Middle_P3_BTake},等待{IO_Type.MAxis_Check_B}信号亮");
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P3_BTake, Config.Middle_P3_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_B, IO_VALUE.HIGH));
return true;
}
} }
}
return false;
}
private void ShelfBatchAxisDown() private void ShelfBatchAxisDown()
{ {
int shelf = MoveInfo.MoveParam.ShelfType; int shelf = MoveInfo.MoveParam.ShelfType;
//判断料串是否完成 //判断料串是否完成
if (shelf.Equals(1) && BatchMove_A.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IS11_ShelfReady)) if (shelf.Equals(1))
{ {
BatchMove_A.NewReelOut(MoveInfo.MoveParam.PosInfo); BatchMove_A.NewReelOut(MoveInfo.MoveParam.PosInfo);
} }
else if (shelf.Equals(2) && BatchMove_B.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IS11_ShelfReady)) else if (shelf.Equals(2))
{ {
BatchMove_B.NewReelOut(MoveInfo.MoveParam.PosInfo); BatchMove_B.NewReelOut(MoveInfo.MoveParam.PosInfo);
} }
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
this.tabPage2.Controls.Add(this.panel1); this.tabPage2.Controls.Add(this.panel1);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(192, 67); this.tabPage2.Size = new System.Drawing.Size(988, 605);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 设备状态 "; this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(192, 67); this.panel1.Size = new System.Drawing.Size(988, 605);
this.panel1.TabIndex = 1; this.panel1.TabIndex = 1;
// //
// tableLayoutPanel1 // tableLayoutPanel1
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(192, 67); this.tableLayoutPanel1.Size = new System.Drawing.Size(988, 605);
this.tableLayoutPanel1.TabIndex = 0; this.tableLayoutPanel1.TabIndex = 0;
// //
// InputControl // InputControl
...@@ -184,10 +184,10 @@ ...@@ -184,10 +184,10 @@
this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2); this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2);
this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill; this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.InputControl.EquipText = "上料机构"; this.InputControl.EquipText = "上料机构";
this.InputControl.Location = new System.Drawing.Point(3, 43); this.InputControl.Location = new System.Drawing.Point(3, 376);
this.InputControl.MoveInfo = "暂无出入库"; this.InputControl.MoveInfo = "暂无出入库";
this.InputControl.Name = "InputControl"; this.InputControl.Name = "InputControl";
this.InputControl.Size = new System.Drawing.Size(186, 6); this.InputControl.Size = new System.Drawing.Size(982, 109);
this.InputControl.TabIndex = 5; this.InputControl.TabIndex = 5;
this.InputControl.WorkStatus = "暂未启动"; this.InputControl.WorkStatus = "暂未启动";
// //
...@@ -197,10 +197,10 @@ ...@@ -197,10 +197,10 @@
this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA1.ColorStatus = System.Drawing.Color.White; this.ReelControlA1.ColorStatus = System.Drawing.Color.White;
this.ReelControlA1.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlA1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA1.Location = new System.Drawing.Point(3, 25); this.ReelControlA1.Location = new System.Drawing.Point(3, 204);
this.ReelControlA1.Name = "ReelControlA1"; this.ReelControlA1.Name = "ReelControlA1";
this.ReelControlA1.ReelText = "暂存区物料"; this.ReelControlA1.ReelText = "暂存区物料";
this.ReelControlA1.Size = new System.Drawing.Size(90, 3); this.ReelControlA1.Size = new System.Drawing.Size(488, 80);
this.ReelControlA1.TabIndex = 0; this.ReelControlA1.TabIndex = 0;
// //
// ReelControlA2 // ReelControlA2
...@@ -209,10 +209,10 @@ ...@@ -209,10 +209,10 @@
this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA2.ColorStatus = System.Drawing.Color.White; this.ReelControlA2.ColorStatus = System.Drawing.Color.White;
this.ReelControlA2.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlA2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA2.Location = new System.Drawing.Point(3, 34); this.ReelControlA2.Location = new System.Drawing.Point(3, 290);
this.ReelControlA2.Name = "ReelControlA2"; this.ReelControlA2.Name = "ReelControlA2";
this.ReelControlA2.ReelText = "暂存区物料"; this.ReelControlA2.ReelText = "暂存区物料";
this.ReelControlA2.Size = new System.Drawing.Size(90, 3); this.ReelControlA2.Size = new System.Drawing.Size(488, 80);
this.ReelControlA2.TabIndex = 1; this.ReelControlA2.TabIndex = 1;
// //
// ReelControlB1 // ReelControlB1
...@@ -221,10 +221,10 @@ ...@@ -221,10 +221,10 @@
this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB1.ColorStatus = System.Drawing.Color.White; this.ReelControlB1.ColorStatus = System.Drawing.Color.White;
this.ReelControlB1.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlB1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB1.Location = new System.Drawing.Point(99, 25); this.ReelControlB1.Location = new System.Drawing.Point(497, 204);
this.ReelControlB1.Name = "ReelControlB1"; this.ReelControlB1.Name = "ReelControlB1";
this.ReelControlB1.ReelText = "暂存区物料"; this.ReelControlB1.ReelText = "暂存区物料";
this.ReelControlB1.Size = new System.Drawing.Size(90, 3); this.ReelControlB1.Size = new System.Drawing.Size(488, 80);
this.ReelControlB1.TabIndex = 2; this.ReelControlB1.TabIndex = 2;
// //
// ReelControlB2 // ReelControlB2
...@@ -233,10 +233,10 @@ ...@@ -233,10 +233,10 @@
this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB2.ColorStatus = System.Drawing.Color.White; this.ReelControlB2.ColorStatus = System.Drawing.Color.White;
this.ReelControlB2.Dock = System.Windows.Forms.DockStyle.Fill; this.ReelControlB2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB2.Location = new System.Drawing.Point(99, 34); this.ReelControlB2.Location = new System.Drawing.Point(497, 290);
this.ReelControlB2.Name = "ReelControlB2"; this.ReelControlB2.Name = "ReelControlB2";
this.ReelControlB2.ReelText = "暂存区物料"; this.ReelControlB2.ReelText = "暂存区物料";
this.ReelControlB2.Size = new System.Drawing.Size(90, 3); this.ReelControlB2.Size = new System.Drawing.Size(488, 80);
this.ReelControlB2.TabIndex = 3; this.ReelControlB2.TabIndex = 3;
// //
// BoxControl // BoxControl
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
this.BoxControl.Location = new System.Drawing.Point(3, 3); this.BoxControl.Location = new System.Drawing.Point(3, 3);
this.BoxControl.MoveInfo = "暂无出入库"; this.BoxControl.MoveInfo = "暂无出入库";
this.BoxControl.Name = "BoxControl"; this.BoxControl.Name = "BoxControl";
this.BoxControl.Size = new System.Drawing.Size(186, 16); this.BoxControl.Size = new System.Drawing.Size(982, 195);
this.BoxControl.TabIndex = 4; this.BoxControl.TabIndex = 4;
this.BoxControl.WorkStatus = "暂未启动"; this.BoxControl.WorkStatus = "暂未启动";
// //
...@@ -261,10 +261,10 @@ ...@@ -261,10 +261,10 @@
this.ShelfAControl.ColorStatus = System.Drawing.Color.White; this.ShelfAControl.ColorStatus = System.Drawing.Color.White;
this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfAControl.EquipText = "A料口"; this.ShelfAControl.EquipText = "A料口";
this.ShelfAControl.Location = new System.Drawing.Point(3, 55); this.ShelfAControl.Location = new System.Drawing.Point(3, 491);
this.ShelfAControl.MoveInfo = "暂无出入库"; this.ShelfAControl.MoveInfo = "暂无出入库";
this.ShelfAControl.Name = "ShelfAControl"; this.ShelfAControl.Name = "ShelfAControl";
this.ShelfAControl.Size = new System.Drawing.Size(90, 9); this.ShelfAControl.Size = new System.Drawing.Size(488, 111);
this.ShelfAControl.TabIndex = 6; this.ShelfAControl.TabIndex = 6;
this.ShelfAControl.WorkStatus = "暂未启动"; this.ShelfAControl.WorkStatus = "暂未启动";
// //
...@@ -275,10 +275,10 @@ ...@@ -275,10 +275,10 @@
this.ShelfBControl.ColorStatus = System.Drawing.Color.White; this.ShelfBControl.ColorStatus = System.Drawing.Color.White;
this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill; this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfBControl.EquipText = "B料口"; this.ShelfBControl.EquipText = "B料口";
this.ShelfBControl.Location = new System.Drawing.Point(99, 55); this.ShelfBControl.Location = new System.Drawing.Point(497, 491);
this.ShelfBControl.MoveInfo = "暂无出入库"; this.ShelfBControl.MoveInfo = "暂无出入库";
this.ShelfBControl.Name = "ShelfBControl"; this.ShelfBControl.Name = "ShelfBControl";
this.ShelfBControl.Size = new System.Drawing.Size(90, 9); this.ShelfBControl.Size = new System.Drawing.Size(488, 111);
this.ShelfBControl.TabIndex = 7; this.ShelfBControl.TabIndex = 7;
this.ShelfBControl.WorkStatus = "暂未启动"; this.ShelfBControl.WorkStatus = "暂未启动";
// //
......
...@@ -43,9 +43,9 @@ namespace OnlineStore.XLRStore ...@@ -43,9 +43,9 @@ namespace OnlineStore.XLRStore
LogUtil.error("加载配置失败,直接退出程序"); LogUtil.error("加载配置失败,直接退出程序");
Application.Exit(); Application.Exit();
return; return;
} }
LoadStoreData(); LoadStoreData();
this.Opacity = 100; this.Opacity = 100;
this.Visible = true; this.Visible = true;
...@@ -64,17 +64,17 @@ namespace OnlineStore.XLRStore ...@@ -64,17 +64,17 @@ namespace OnlineStore.XLRStore
string title = ConfigAppSettings.GetValue(Setting_Init.App_Title); string title = ConfigAppSettings.GetValue(Setting_Init.App_Title);
this.Text = title; this.Text = title;
this.notifyIcon1.Text = title; this.notifyIcon1.Text = title;
int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun); int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
StoreBean = StoreManager.XLRStore; StoreBean = StoreManager.XLRStore;
if (StoreBean == null) if (StoreBean == null)
{ {
Application.Exit(); Application.Exit();
return; return;
} }
inputEquip = new FrmInputEquip(StoreManager.XLRStore.inputEquip); inputEquip = new FrmInputEquip(StoreManager.XLRStore.inputEquip);
AddForm(" 入料机构 ", inputEquip); AddForm(" 入料机构 ", inputEquip);
box = new FrmBoxEquip(StoreManager.XLRStore.boxEquip); box = new FrmBoxEquip(StoreManager.XLRStore.boxEquip);
AddForm(" 仓储机构 ", box); AddForm(" 仓储机构 ", box);
托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1); 托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1);
...@@ -95,7 +95,7 @@ namespace OnlineStore.XLRStore ...@@ -95,7 +95,7 @@ namespace OnlineStore.XLRStore
{ {
启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器"; 启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
} }
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
lastLogTime = DateTime.Now.AddMinutes(-10); lastLogTime = DateTime.Now.AddMinutes(-10);
this.Opacity = 100; this.Opacity = 100;
...@@ -112,9 +112,36 @@ namespace OnlineStore.XLRStore ...@@ -112,9 +112,36 @@ namespace OnlineStore.XLRStore
InputControl.InitData(StoreManager.XLRStore.inputEquip.Name); InputControl.InitData(StoreManager.XLRStore.inputEquip.Name);
ShelfAControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_A.Name); ShelfAControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_A.Name);
ShelfBControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_B.Name); ShelfBControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_B.Name);
BoxControl.DoubleClick += BoxControl_DoubleClick;
InputControl.DoubleClick += InputControl_DoubleClick;
ShelfAControl.DoubleClick += ShelfAControl_DoubleClick;
ShelfBControl.DoubleClick += ShelfBControl_DoubleClick;
LoadOk = true; LoadOk = true;
} }
private void ShelfBControl_DoubleClick(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 2;
inputEquip.tabControl1.SelectedIndex = 4;
}
private void ShelfAControl_DoubleClick(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 2;
inputEquip.tabControl1.SelectedIndex = 3;
}
private void InputControl_DoubleClick(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 2;
inputEquip.tabControl1.SelectedIndex = 0;
}
private void BoxControl_DoubleClick(object sender, EventArgs e)
{
tabControl1.SelectedIndex = 3;
}
private void LinkClear_ClickA1(object sender, EventArgs e) private void LinkClear_ClickA1(object sender, EventArgs e)
{ {
if (BufferDataManager.AInStoreInfo == null) if (BufferDataManager.AInStoreInfo == null)
......
...@@ -19,20 +19,6 @@ ...@@ -19,20 +19,6 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBatchMove)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBatchMove));
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnScan = new System.Windows.Forms.Button(); this.btnScan = new System.Windows.Forms.Button();
this.lblTestMsg = new System.Windows.Forms.Label();
this.btnTestStop = new System.Windows.Forms.Button();
this.btnStartTest = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.XLRStore.AxisMoveControl();
this.lblCurrInfo = new System.Windows.Forms.Label();
this.lblWarnMsg = new System.Windows.Forms.Label();
this.panBase = new System.Windows.Forms.Panel();
this.chbDebug = new System.Windows.Forms.CheckBox();
this.btnScanTest = new System.Windows.Forms.Button();
this.lblAgvInfo = new System.Windows.Forms.Label();
this.btnShelfOut = new System.Windows.Forms.Button();
this.chbAutoOut = new System.Windows.Forms.CheckBox();
this.btnStart = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.LineStop_A = new System.Windows.Forms.Button(); this.LineStop_A = new System.Windows.Forms.Button();
...@@ -41,14 +27,28 @@ ...@@ -41,14 +27,28 @@
this.Shelf_StopUp_A = new System.Windows.Forms.Button(); this.Shelf_StopUp_A = new System.Windows.Forms.Button();
this.LineStart_A = new System.Windows.Forms.Button(); this.LineStart_A = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnStartTest = new System.Windows.Forms.Button();
this.lblTestMsg = new System.Windows.Forms.Label();
this.btnTestStop = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
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.panBase.SuspendLayout(); this.btnSave = new System.Windows.Forms.Button();
this.panBase = new System.Windows.Forms.Panel();
this.chbDebug = new System.Windows.Forms.CheckBox();
this.btnScanTest = new System.Windows.Forms.Button();
this.lblAgvInfo = new System.Windows.Forms.Label();
this.btnShelfOut = new System.Windows.Forms.Button();
this.chbAutoOut = new System.Windows.Forms.CheckBox();
this.lblCurrInfo = new System.Windows.Forms.Label();
this.lblWarnMsg = new System.Windows.Forms.Label();
this.btnReset = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.XLRStore.AxisMoveControl();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panBase.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// timer1 // timer1
...@@ -68,196 +68,6 @@ ...@@ -68,196 +68,6 @@
this.btnScan.Text = "扫码测试"; this.btnScan.Text = "扫码测试";
this.btnScan.UseVisualStyleBackColor = false; this.btnScan.UseVisualStyleBackColor = false;
// //
// lblTestMsg
//
this.lblTestMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTestMsg.ForeColor = System.Drawing.Color.Black;
this.lblTestMsg.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTestMsg.Location = new System.Drawing.Point(4, 68);
this.lblTestMsg.Name = "lblTestMsg";
this.lblTestMsg.Size = new System.Drawing.Size(438, 43);
this.lblTestMsg.TabIndex = 322;
this.lblTestMsg.Text = "测试信息:";
this.lblTestMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnTestStop
//
this.btnTestStop.BackColor = System.Drawing.SystemColors.Control;
this.btnTestStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnTestStop.Enabled = false;
this.btnTestStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTestStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTestStop.ForeColor = System.Drawing.Color.Blue;
this.btnTestStop.Location = new System.Drawing.Point(192, 26);
this.btnTestStop.Name = "btnTestStop";
this.btnTestStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnTestStop.Size = new System.Drawing.Size(154, 34);
this.btnTestStop.TabIndex = 321;
this.btnTestStop.Text = "提升轴停止";
this.btnTestStop.UseVisualStyleBackColor = true;
this.btnTestStop.Click += new System.EventHandler(this.btnTestStop_Click);
//
// btnStartTest
//
this.btnStartTest.BackColor = System.Drawing.SystemColors.Control;
this.btnStartTest.Cursor = System.Windows.Forms.Cursors.Default;
this.btnStartTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartTest.ForeColor = System.Drawing.Color.Blue;
this.btnStartTest.Location = new System.Drawing.Point(21, 26);
this.btnStartTest.Name = "btnStartTest";
this.btnStartTest.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnStartTest.Size = new System.Drawing.Size(154, 34);
this.btnStartTest.TabIndex = 319;
this.btnStartTest.Text = "上料提升轴运动开始";
this.btnStartTest.UseVisualStyleBackColor = true;
this.btnStartTest.Click += new System.EventHandler(this.btnStartTest_Click);
//
// axisMoveControl1
//
this.axisMoveControl1.Location = new System.Drawing.Point(6, 128);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(490, 398);
this.axisMoveControl1.TabIndex = 219;
//
// lblCurrInfo
//
this.lblCurrInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCurrInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCurrInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblCurrInfo.Location = new System.Drawing.Point(3, 3);
this.lblCurrInfo.Name = "lblCurrInfo";
this.lblCurrInfo.Size = new System.Drawing.Size(931, 47);
this.lblCurrInfo.TabIndex = 279;
this.lblCurrInfo.Text = "当前料盘:";
//
// lblWarnMsg
//
this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblWarnMsg.Location = new System.Drawing.Point(3, 53);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(930, 23);
this.lblWarnMsg.TabIndex = 246;
this.lblWarnMsg.Text = "等待启动";
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panBase
//
this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panBase.Controls.Add(this.chbDebug);
this.panBase.Controls.Add(this.btnScanTest);
this.panBase.Controls.Add(this.lblAgvInfo);
this.panBase.Controls.Add(this.btnShelfOut);
this.panBase.Controls.Add(this.chbAutoOut);
this.panBase.Controls.Add(this.lblCurrInfo);
this.panBase.Controls.Add(this.lblWarnMsg);
this.panBase.Controls.Add(this.btnStart);
this.panBase.Location = new System.Drawing.Point(4, 4);
this.panBase.Name = "panBase";
this.panBase.Size = new System.Drawing.Size(940, 122);
this.panBase.TabIndex = 260;
//
// chbDebug
//
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(312, 86);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 325;
this.chbDebug.Text = "调试状态";
this.chbDebug.UseVisualStyleBackColor = true;
//
// btnScanTest
//
this.btnScanTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnScanTest.BackColor = System.Drawing.Color.White;
this.btnScanTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnScanTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnScanTest.Location = new System.Drawing.Point(690, 78);
this.btnScanTest.Name = "btnScanTest";
this.btnScanTest.Size = new System.Drawing.Size(120, 40);
this.btnScanTest.TabIndex = 283;
this.btnScanTest.Text = "扫码测试";
this.btnScanTest.UseVisualStyleBackColor = false;
this.btnScanTest.Click += new System.EventHandler(this.btnScanTest_Click);
//
// lblAgvInfo
//
this.lblAgvInfo.AutoSize = true;
this.lblAgvInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAgvInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblAgvInfo.Location = new System.Drawing.Point(5, 89);
this.lblAgvInfo.Name = "lblAgvInfo";
this.lblAgvInfo.Size = new System.Drawing.Size(61, 17);
this.lblAgvInfo.TabIndex = 282;
this.lblAgvInfo.Text = "AGV 状态";
//
// btnShelfOut
//
this.btnShelfOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnShelfOut.BackColor = System.Drawing.Color.White;
this.btnShelfOut.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnShelfOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShelfOut.Location = new System.Drawing.Point(568, 78);
this.btnShelfOut.Name = "btnShelfOut";
this.btnShelfOut.Size = new System.Drawing.Size(120, 40);
this.btnShelfOut.TabIndex = 281;
this.btnShelfOut.Text = "送出料串";
this.btnShelfOut.UseVisualStyleBackColor = false;
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(398, 86);
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);
//
// btnStart
//
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStart.BackColor = System.Drawing.Color.White;
this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.Location = new System.Drawing.Point(812, 78);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(120, 40);
this.btnStart.TabIndex = 86;
this.btnStart.Text = "复位";
this.btnStart.UseVisualStyleBackColor = false;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// btnSave
//
this.btnSave.BackColor = System.Drawing.SystemColors.Control;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Default;
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.ForeColor = System.Drawing.Color.Blue;
this.btnSave.Location = new System.Drawing.Point(274, 70);
this.btnSave.Name = "btnSave";
this.btnSave.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnSave.Size = new System.Drawing.Size(118, 34);
this.btnSave.TabIndex = 323;
this.btnSave.Text = "保存位置";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// panel2 // panel2
// //
this.panel2.Controls.Add(this.groupBox3); this.panel2.Controls.Add(this.groupBox3);
...@@ -362,6 +172,51 @@ ...@@ -362,6 +172,51 @@
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "上料轴运动测试"; this.groupBox2.Text = "上料轴运动测试";
// //
// btnStartTest
//
this.btnStartTest.BackColor = System.Drawing.SystemColors.Control;
this.btnStartTest.Cursor = System.Windows.Forms.Cursors.Default;
this.btnStartTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartTest.ForeColor = System.Drawing.Color.Blue;
this.btnStartTest.Location = new System.Drawing.Point(21, 26);
this.btnStartTest.Name = "btnStartTest";
this.btnStartTest.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnStartTest.Size = new System.Drawing.Size(154, 34);
this.btnStartTest.TabIndex = 319;
this.btnStartTest.Text = "上料提升轴运动开始";
this.btnStartTest.UseVisualStyleBackColor = true;
this.btnStartTest.Click += new System.EventHandler(this.btnStartTest_Click);
//
// lblTestMsg
//
this.lblTestMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTestMsg.ForeColor = System.Drawing.Color.Black;
this.lblTestMsg.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTestMsg.Location = new System.Drawing.Point(4, 68);
this.lblTestMsg.Name = "lblTestMsg";
this.lblTestMsg.Size = new System.Drawing.Size(438, 43);
this.lblTestMsg.TabIndex = 322;
this.lblTestMsg.Text = "测试信息:";
this.lblTestMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnTestStop
//
this.btnTestStop.BackColor = System.Drawing.SystemColors.Control;
this.btnTestStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnTestStop.Enabled = false;
this.btnTestStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTestStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTestStop.ForeColor = System.Drawing.Color.Blue;
this.btnTestStop.Location = new System.Drawing.Point(192, 26);
this.btnTestStop.Name = "btnTestStop";
this.btnTestStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnTestStop.Size = new System.Drawing.Size(154, 34);
this.btnTestStop.TabIndex = 321;
this.btnTestStop.Text = "提升轴停止";
this.btnTestStop.UseVisualStyleBackColor = true;
this.btnTestStop.Click += new System.EventHandler(this.btnTestStop_Click);
//
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.batchAxisP2); this.groupBox1.Controls.Add(this.batchAxisP2);
...@@ -398,6 +253,151 @@ ...@@ -398,6 +253,151 @@
this.batchAxisP1.Size = new System.Drawing.Size(233, 41); this.batchAxisP1.Size = new System.Drawing.Size(233, 41);
this.batchAxisP1.TabIndex = 324; this.batchAxisP1.TabIndex = 324;
// //
// btnSave
//
this.btnSave.BackColor = System.Drawing.SystemColors.Control;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Default;
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.ForeColor = System.Drawing.Color.Blue;
this.btnSave.Location = new System.Drawing.Point(274, 70);
this.btnSave.Name = "btnSave";
this.btnSave.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnSave.Size = new System.Drawing.Size(118, 34);
this.btnSave.TabIndex = 323;
this.btnSave.Text = "保存位置";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// panBase
//
this.panBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panBase.Controls.Add(this.chbDebug);
this.panBase.Controls.Add(this.btnScanTest);
this.panBase.Controls.Add(this.lblAgvInfo);
this.panBase.Controls.Add(this.btnShelfOut);
this.panBase.Controls.Add(this.chbAutoOut);
this.panBase.Controls.Add(this.lblCurrInfo);
this.panBase.Controls.Add(this.lblWarnMsg);
this.panBase.Controls.Add(this.btnReset);
this.panBase.Location = new System.Drawing.Point(4, 4);
this.panBase.Name = "panBase";
this.panBase.Size = new System.Drawing.Size(940, 122);
this.panBase.TabIndex = 260;
//
// chbDebug
//
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(312, 86);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 325;
this.chbDebug.Text = "调试状态";
this.chbDebug.UseVisualStyleBackColor = true;
//
// btnScanTest
//
this.btnScanTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnScanTest.BackColor = System.Drawing.Color.White;
this.btnScanTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnScanTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnScanTest.Location = new System.Drawing.Point(690, 78);
this.btnScanTest.Name = "btnScanTest";
this.btnScanTest.Size = new System.Drawing.Size(120, 40);
this.btnScanTest.TabIndex = 283;
this.btnScanTest.Text = "扫码测试";
this.btnScanTest.UseVisualStyleBackColor = false;
this.btnScanTest.Click += new System.EventHandler(this.btnScanTest_Click);
//
// lblAgvInfo
//
this.lblAgvInfo.AutoSize = true;
this.lblAgvInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAgvInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblAgvInfo.Location = new System.Drawing.Point(5, 89);
this.lblAgvInfo.Name = "lblAgvInfo";
this.lblAgvInfo.Size = new System.Drawing.Size(61, 17);
this.lblAgvInfo.TabIndex = 282;
this.lblAgvInfo.Text = "AGV 状态";
//
// btnShelfOut
//
this.btnShelfOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnShelfOut.BackColor = System.Drawing.Color.White;
this.btnShelfOut.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnShelfOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShelfOut.Location = new System.Drawing.Point(568, 78);
this.btnShelfOut.Name = "btnShelfOut";
this.btnShelfOut.Size = new System.Drawing.Size(120, 40);
this.btnShelfOut.TabIndex = 281;
this.btnShelfOut.Text = "送出料串";
this.btnShelfOut.UseVisualStyleBackColor = false;
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(398, 86);
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
//
this.lblCurrInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCurrInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCurrInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblCurrInfo.Location = new System.Drawing.Point(3, 3);
this.lblCurrInfo.Name = "lblCurrInfo";
this.lblCurrInfo.Size = new System.Drawing.Size(931, 47);
this.lblCurrInfo.TabIndex = 279;
this.lblCurrInfo.Text = "当前料盘:";
//
// lblWarnMsg
//
this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblWarnMsg.Location = new System.Drawing.Point(3, 53);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(930, 23);
this.lblWarnMsg.TabIndex = 246;
this.lblWarnMsg.Text = "等待启动";
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnReset
//
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnReset.BackColor = System.Drawing.Color.White;
this.btnReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReset.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReset.Location = new System.Drawing.Point(812, 78);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(120, 40);
this.btnReset.TabIndex = 86;
this.btnReset.Text = "复位";
this.btnReset.UseVisualStyleBackColor = false;
this.btnReset.Click += new System.EventHandler(this.btnStart_Click);
//
// axisMoveControl1
//
this.axisMoveControl1.Location = new System.Drawing.Point(6, 128);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(490, 398);
this.axisMoveControl1.TabIndex = 219;
//
// FrmBatchMove // FrmBatchMove
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -408,16 +408,16 @@ ...@@ -408,16 +408,16 @@
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FrmBatchMove"; this.Name = "FrmBatchMove";
this.Text = "上料模块"; this.Text = "入料口";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTest_FormClosing);
this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load); this.Load += new System.EventHandler(this.FrmStoreIOStatus_Load);
this.Shown += new System.EventHandler(this.FrmIOStatus_Shown); this.Shown += new System.EventHandler(this.FrmIOStatus_Shown);
this.panBase.ResumeLayout(false);
this.panBase.PerformLayout();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.panBase.ResumeLayout(false);
this.panBase.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
private System.Windows.Forms.Label lblCurrInfo; private System.Windows.Forms.Label lblCurrInfo;
private System.Windows.Forms.Label lblWarnMsg; private System.Windows.Forms.Label lblWarnMsg;
protected System.Windows.Forms.Panel panBase; protected System.Windows.Forms.Panel panBase;
protected System.Windows.Forms.Button btnStart; protected System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Label lblTestMsg; private System.Windows.Forms.Label lblTestMsg;
internal System.Windows.Forms.Button btnTestStop; internal System.Windows.Forms.Button btnTestStop;
internal System.Windows.Forms.Button btnStartTest; internal System.Windows.Forms.Button btnStartTest;
......
...@@ -42,7 +42,15 @@ namespace OnlineStore.XLRStore ...@@ -42,7 +42,15 @@ namespace OnlineStore.XLRStore
} }
lblWarnMsg.Text = moveBean.WarnMsg; lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr(); lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.AgvName + " :" + AgvClient.GetAction(moveBean.AgvName); lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName);
if (StoreManager.XLRStore.inputEquip.runStatus > RunStatus.Wait)
{
btnReset.Enabled = true;
}
else
{
btnReset.Enabled = false;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -72,11 +80,11 @@ namespace OnlineStore.XLRStore ...@@ -72,11 +80,11 @@ namespace OnlineStore.XLRStore
this.chbAutoOut.Checked = moveBean.ShelfAutoOut; this.chbAutoOut.Checked = moveBean.ShelfAutoOut;
axisMoveControl1.LoadData(StoreManager.XLRStore.inputEquip, new AxisBean[] { moveBean.BatchAxis }); axisMoveControl1.LoadData(StoreManager.XLRStore.inputEquip, new AxisBean[] { moveBean.BatchAxis });
batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.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.BatchAxisP2 ); batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.Config.BatchAxisP2 );
lblWarnMsg.Text = moveBean.WarnMsg; lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr(); lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.AgvName + " :" + AgvClient.GetAction(moveBean.AgvName); lblAgvInfo.Text = "AGV " + moveBean.Config.AgvName + " :" + AgvClient.GetAction(moveBean.Config.AgvName);
IsLoad = true; IsLoad = true;
} }
...@@ -90,7 +98,7 @@ namespace OnlineStore.XLRStore ...@@ -90,7 +98,7 @@ namespace OnlineStore.XLRStore
private void btnStart_Click(object sender, EventArgs e) private void btnStart_Click(object sender, EventArgs e)
{ {
moveBean.Reset(); moveBean.Reset();
LogUtil.info(moveBean.Name + "点击:" + btnStart.Text); LogUtil.info(moveBean.Name + "点击:" + btnReset.Text);
} }
...@@ -98,9 +106,9 @@ namespace OnlineStore.XLRStore ...@@ -98,9 +106,9 @@ namespace OnlineStore.XLRStore
{ {
int p1 = batchAxisP1.PointValue; int p1 = batchAxisP1.PointValue;
int p2 = batchAxisP2.PointValue; int p2 = batchAxisP2.PointValue;
moveBean.BatchAxisP1 = p1; moveBean.Config.BatchAxisP1 = p1;
moveBean.BatchAxisP2 = p2; moveBean.Config.BatchAxisP2 = p2;
if (moveBean.EquipType.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;
...@@ -129,8 +137,8 @@ namespace OnlineStore.XLRStore ...@@ -129,8 +137,8 @@ namespace OnlineStore.XLRStore
if (isServoOn && isStop) if (isServoOn && isStop)
{ {
//判断提升轴是否停止且到位 //判断提升轴是否停止且到位
TargetP2 = moveBean.BatchAxisP2; TargetP2 = moveBean.Config.BatchAxisP2;
LogUtil.info(moveBean.Name + "点击:" + btnStartTest.Text + ",目标位置:" + moveBean.BatchAxisP2); LogUtil.info(moveBean.Name + "点击:" + btnStartTest.Text + ",目标位置:" + moveBean.Config.BatchAxisP2);
moveBean.BatchAxisToP2(true, false, true); moveBean.BatchAxisToP2(true, false, true);
lblTestMsg.Text = "开始入料运动,目标位置[" + TargetP2 + "] ,开始位置[" + moveBean.StartMovePosition + "],"; lblTestMsg.Text = "开始入料运动,目标位置[" + TargetP2 + "] ,开始位置[" + moveBean.StartMovePosition + "],";
StartTest = true; StartTest = true;
...@@ -235,7 +243,7 @@ namespace OnlineStore.XLRStore ...@@ -235,7 +243,7 @@ namespace OnlineStore.XLRStore
{ {
return; return;
} }
string camera = moveBean.CameraName; string camera = moveBean.Config.CameraName;
List<string> LastCodeList = CodeManager.CameraScan(camera, moveBean.Name.Trim() + "测试"); List<string> LastCodeList = CodeManager.CameraScan(camera, moveBean.Name.Trim() + "测试");
string msg = CodeManager.ProcessCode(LastCodeList); string msg = CodeManager.ProcessCode(LastCodeList);
LogUtil.info(moveBean.Name + "[" + camera + "]扫码测试结果:\r\n" + msg); LogUtil.info(moveBean.Name + "[" + camera + "]扫码测试结果:\r\n" + msg);
...@@ -272,7 +280,7 @@ namespace OnlineStore.XLRStore ...@@ -272,7 +280,7 @@ namespace OnlineStore.XLRStore
LogUtil.info(moveBean.Name + "点击:" + LineStop_A.Text); LogUtil.info(moveBean.Name + "点击:" + LineStop_A.Text);
moveBean.LineStop(); moveBean.LineStop();
} }
} }
} }
......
...@@ -93,11 +93,13 @@ namespace OnlineStore.XLRStore ...@@ -93,11 +93,13 @@ namespace OnlineStore.XLRStore
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox12 = new System.Windows.Forms.GroupBox(); this.groupBox12 = new System.Windows.Forms.GroupBox();
this.btnOutTest = new System.Windows.Forms.Button(); this.cmbOutstorePos = new System.Windows.Forms.ComboBox();
this.cmbOutShelf = new System.Windows.Forms.ComboBox(); this.cmbInstorePos = new System.Windows.Forms.ComboBox();
this.btnOutStoreTest = new System.Windows.Forms.Button();
this.cmbOutStartP = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.cmbOutStart = new System.Windows.Forms.ComboBox(); this.cmbOutShelf = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button(); this.BtnInStoreTest = new System.Windows.Forms.Button();
this.cmbInstoreTargetP = new System.Windows.Forms.ComboBox(); this.cmbInstoreTargetP = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.cmbInstoreShelf = new System.Windows.Forms.ComboBox(); this.cmbInstoreShelf = new System.Windows.Forms.ComboBox();
...@@ -158,11 +160,10 @@ namespace OnlineStore.XLRStore ...@@ -158,11 +160,10 @@ namespace OnlineStore.XLRStore
this.tabPage2.Location = new System.Drawing.Point(4, 26); this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(957, 561); this.tabPage2.Size = new System.Drawing.Size(986, 561);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 伺服信息 "; this.tabPage2.Text = " 伺服信息 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
this.tabPage2.Click += new System.EventHandler(this.tabPage2_Click);
// //
// chbPointEditEnable // chbPointEditEnable
// //
...@@ -552,7 +553,7 @@ namespace OnlineStore.XLRStore ...@@ -552,7 +553,7 @@ namespace OnlineStore.XLRStore
this.tabPage1.Location = new System.Drawing.Point(4, 26); this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(957, 561); this.tabPage1.Size = new System.Drawing.Size(986, 561);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " IO列表 "; this.tabPage1.Text = " IO列表 ";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
...@@ -1048,11 +1049,13 @@ namespace OnlineStore.XLRStore ...@@ -1048,11 +1049,13 @@ namespace OnlineStore.XLRStore
// //
// groupBox12 // groupBox12
// //
this.groupBox12.Controls.Add(this.btnOutTest); this.groupBox12.Controls.Add(this.cmbOutstorePos);
this.groupBox12.Controls.Add(this.cmbOutShelf); this.groupBox12.Controls.Add(this.cmbInstorePos);
this.groupBox12.Controls.Add(this.btnOutStoreTest);
this.groupBox12.Controls.Add(this.cmbOutStartP);
this.groupBox12.Controls.Add(this.label2); this.groupBox12.Controls.Add(this.label2);
this.groupBox12.Controls.Add(this.cmbOutStart); this.groupBox12.Controls.Add(this.cmbOutShelf);
this.groupBox12.Controls.Add(this.button1); this.groupBox12.Controls.Add(this.BtnInStoreTest);
this.groupBox12.Controls.Add(this.cmbInstoreTargetP); this.groupBox12.Controls.Add(this.cmbInstoreTargetP);
this.groupBox12.Controls.Add(this.label1); this.groupBox12.Controls.Add(this.label1);
this.groupBox12.Controls.Add(this.cmbInstoreShelf); this.groupBox12.Controls.Add(this.cmbInstoreShelf);
...@@ -1063,17 +1066,62 @@ namespace OnlineStore.XLRStore ...@@ -1063,17 +1066,62 @@ namespace OnlineStore.XLRStore
this.groupBox12.TabStop = false; this.groupBox12.TabStop = false;
this.groupBox12.Text = "取料机构测试"; this.groupBox12.Text = "取料机构测试";
// //
// btnOutTest // cmbOutstorePos
//
this.cmbOutstorePos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutstorePos.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbOutstorePos.FormattingEnabled = true;
this.cmbOutstorePos.Location = new System.Drawing.Point(104, 70);
this.cmbOutstorePos.Name = "cmbOutstorePos";
this.cmbOutstorePos.Size = new System.Drawing.Size(142, 28);
this.cmbOutstorePos.TabIndex = 290;
//
// cmbInstorePos
//
this.cmbInstorePos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbInstorePos.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbInstorePos.FormattingEnabled = true;
this.cmbInstorePos.Location = new System.Drawing.Point(266, 28);
this.cmbInstorePos.Name = "cmbInstorePos";
this.cmbInstorePos.Size = new System.Drawing.Size(142, 28);
this.cmbInstorePos.TabIndex = 289;
//
// btnOutStoreTest
//
this.btnOutStoreTest.BackColor = System.Drawing.Color.White;
this.btnOutStoreTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStoreTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStoreTest.Location = new System.Drawing.Point(413, 67);
this.btnOutStoreTest.Name = "btnOutStoreTest";
this.btnOutStoreTest.Size = new System.Drawing.Size(135, 34);
this.btnOutStoreTest.TabIndex = 288;
this.btnOutStoreTest.Text = "取料出库测试";
this.btnOutStoreTest.UseVisualStyleBackColor = false;
this.btnOutStoreTest.Click += new System.EventHandler(this.btnOutStoreTest_Click);
//
// cmbOutStartP
//
this.cmbOutStartP.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutStartP.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbOutStartP.FormattingEnabled = true;
this.cmbOutStartP.Items.AddRange(new object[] {
"A下暂存区",
"B下暂存区"});
this.cmbOutStartP.Location = new System.Drawing.Point(9, 70);
this.cmbOutStartP.Name = "cmbOutStartP";
this.cmbOutStartP.Size = new System.Drawing.Size(90, 28);
this.cmbOutStartP.TabIndex = 287;
this.cmbOutStartP.SelectedIndexChanged += new System.EventHandler(this.cmbOutShelf_SelectedIndexChanged);
// //
this.btnOutTest.BackColor = System.Drawing.Color.White; // label2
this.btnOutTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; //
this.btnOutTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.AutoSize = true;
this.btnOutTest.Location = new System.Drawing.Point(306, 71); this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutTest.Name = "btnOutTest"; this.label2.Location = new System.Drawing.Point(251, 74);
this.btnOutTest.Size = new System.Drawing.Size(135, 34); this.label2.Name = "label2";
this.btnOutTest.TabIndex = 288; this.label2.Size = new System.Drawing.Size(31, 20);
this.btnOutTest.Text = "取料出库测试"; this.label2.TabIndex = 286;
this.btnOutTest.UseVisualStyleBackColor = false; this.label2.Text = "-->";
// //
// cmbOutShelf // cmbOutShelf
// //
...@@ -1083,45 +1131,23 @@ namespace OnlineStore.XLRStore ...@@ -1083,45 +1131,23 @@ namespace OnlineStore.XLRStore
this.cmbOutShelf.Items.AddRange(new object[] { this.cmbOutShelf.Items.AddRange(new object[] {
"A料口", "A料口",
"B料口"}); "B料口"});
this.cmbOutShelf.Location = new System.Drawing.Point(175, 74); this.cmbOutShelf.Location = new System.Drawing.Point(287, 70);
this.cmbOutShelf.Name = "cmbOutShelf"; this.cmbOutShelf.Name = "cmbOutShelf";
this.cmbOutShelf.Size = new System.Drawing.Size(121, 28); this.cmbOutShelf.Size = new System.Drawing.Size(121, 28);
this.cmbOutShelf.TabIndex = 287; this.cmbOutShelf.TabIndex = 285;
// //
// label2 // BtnInStoreTest
// //
this.label2.AutoSize = true; this.BtnInStoreTest.BackColor = System.Drawing.Color.White;
this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.BtnInStoreTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label2.Location = new System.Drawing.Point(146, 78); this.BtnInStoreTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Name = "label2"; this.BtnInStoreTest.Location = new System.Drawing.Point(413, 25);
this.label2.Size = new System.Drawing.Size(31, 20); this.BtnInStoreTest.Name = "BtnInStoreTest";
this.label2.TabIndex = 286; this.BtnInStoreTest.Size = new System.Drawing.Size(135, 34);
this.label2.Text = "-->"; this.BtnInStoreTest.TabIndex = 284;
// this.BtnInStoreTest.Text = "取料入库测试";
// cmbOutStart this.BtnInStoreTest.UseVisualStyleBackColor = false;
// this.BtnInStoreTest.Click += new System.EventHandler(this.BtnInStoreTest_Click);
this.cmbOutStart.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbOutStart.FormattingEnabled = true;
this.cmbOutStart.Items.AddRange(new object[] {
"A上暂存区",
"B上暂存区"});
this.cmbOutStart.Location = new System.Drawing.Point(19, 74);
this.cmbOutStart.Name = "cmbOutStart";
this.cmbOutStart.Size = new System.Drawing.Size(121, 28);
this.cmbOutStart.TabIndex = 285;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.White;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(306, 25);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(135, 34);
this.button1.TabIndex = 284;
this.button1.Text = "取料入库测试";
this.button1.UseVisualStyleBackColor = false;
// //
// cmbInstoreTargetP // cmbInstoreTargetP
// //
...@@ -1131,16 +1157,17 @@ namespace OnlineStore.XLRStore ...@@ -1131,16 +1157,17 @@ namespace OnlineStore.XLRStore
this.cmbInstoreTargetP.Items.AddRange(new object[] { this.cmbInstoreTargetP.Items.AddRange(new object[] {
"A上暂存区", "A上暂存区",
"B上暂存区"}); "B上暂存区"});
this.cmbInstoreTargetP.Location = new System.Drawing.Point(175, 28); this.cmbInstoreTargetP.Location = new System.Drawing.Point(171, 28);
this.cmbInstoreTargetP.Name = "cmbInstoreTargetP"; this.cmbInstoreTargetP.Name = "cmbInstoreTargetP";
this.cmbInstoreTargetP.Size = new System.Drawing.Size(121, 28); this.cmbInstoreTargetP.Size = new System.Drawing.Size(90, 28);
this.cmbInstoreTargetP.TabIndex = 2; this.cmbInstoreTargetP.TabIndex = 2;
this.cmbInstoreTargetP.SelectedIndexChanged += new System.EventHandler(this.cmbInstoreTargetP_SelectedIndexChanged);
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(146, 32); this.label1.Location = new System.Drawing.Point(135, 32);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(31, 20); this.label1.Size = new System.Drawing.Size(31, 20);
this.label1.TabIndex = 1; this.label1.TabIndex = 1;
...@@ -1154,7 +1181,7 @@ namespace OnlineStore.XLRStore ...@@ -1154,7 +1181,7 @@ namespace OnlineStore.XLRStore
this.cmbInstoreShelf.Items.AddRange(new object[] { this.cmbInstoreShelf.Items.AddRange(new object[] {
"A料口", "A料口",
"B料口"}); "B料口"});
this.cmbInstoreShelf.Location = new System.Drawing.Point(19, 28); this.cmbInstoreShelf.Location = new System.Drawing.Point(9, 28);
this.cmbInstoreShelf.Name = "cmbInstoreShelf"; this.cmbInstoreShelf.Name = "cmbInstoreShelf";
this.cmbInstoreShelf.Size = new System.Drawing.Size(121, 28); this.cmbInstoreShelf.Size = new System.Drawing.Size(121, 28);
this.cmbInstoreShelf.TabIndex = 0; this.cmbInstoreShelf.TabIndex = 0;
...@@ -1294,7 +1321,6 @@ namespace OnlineStore.XLRStore ...@@ -1294,7 +1321,6 @@ namespace OnlineStore.XLRStore
private System.Windows.Forms.Label lblwidth; private System.Windows.Forms.Label lblwidth;
private System.Windows.Forms.Label lblMoveInfo; private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.Label lblThisSta; private System.Windows.Forms.Label lblThisSta;
private System.Windows.Forms.TabControl tabControl1;
protected System.Windows.Forms.Panel panBase; protected System.Windows.Forms.Panel panBase;
protected System.Windows.Forms.CheckBox chbMoveStop; protected System.Windows.Forms.CheckBox chbMoveStop;
protected System.Windows.Forms.Label lblName; protected System.Windows.Forms.Label lblName;
...@@ -1334,14 +1360,17 @@ namespace OnlineStore.XLRStore ...@@ -1334,14 +1360,17 @@ namespace OnlineStore.XLRStore
private System.Windows.Forms.GroupBox groupBox11; private System.Windows.Forms.GroupBox groupBox11;
private System.Windows.Forms.GroupBox groupBox12; private System.Windows.Forms.GroupBox groupBox12;
private System.Windows.Forms.ComboBox cmbInstoreShelf; private System.Windows.Forms.ComboBox cmbInstoreShelf;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button BtnInStoreTest;
private System.Windows.Forms.ComboBox cmbInstoreTargetP; private System.Windows.Forms.ComboBox cmbInstoreTargetP;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnOutTest; private System.Windows.Forms.Button btnOutStoreTest;
private System.Windows.Forms.ComboBox cmbOutShelf;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbOutStart;
private System.Windows.Forms.CheckBox chbPointEditEnable; private System.Windows.Forms.CheckBox chbPointEditEnable;
public System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.ComboBox cmbInstorePos;
private System.Windows.Forms.ComboBox cmbOutstorePos;
private System.Windows.Forms.ComboBox cmbOutStartP;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbOutShelf;
} }
} }
...@@ -184,7 +184,7 @@ namespace OnlineStore.XLRStore ...@@ -184,7 +184,7 @@ namespace OnlineStore.XLRStore
return; return;
} }
clampJawControl1.UpdateSta(); clampJawControl1.UpdateSta();
ReadIOList(); ReadIOList();
lblName.BackColor = inputEquip.GetShowColor(); lblName.BackColor = inputEquip.GetShowColor();
if (inputEquip.runStatus > RunStatus.Wait) if (inputEquip.runStatus > RunStatus.Wait)
{ {
...@@ -199,11 +199,28 @@ namespace OnlineStore.XLRStore ...@@ -199,11 +199,28 @@ namespace OnlineStore.XLRStore
{ {
FormStatus(false); FormStatus(false);
} }
} }
lblThisSta.Text = inputEquip.WarnMsg; lblThisSta.Text = inputEquip.WarnMsg;
lblMoveInfo.Text = inputEquip.GetMoveStr(); lblMoveInfo.Text = inputEquip.GetMoveStr();
if (inputEquip.runStatus.Equals(RunStatus.Runing) && inputEquip.MoveInfo.MoveType.Equals(MoveType.None))
{
groupBox12.Enabled = true;
}
else
{
groupBox12.Enabled = false;
}
if (inputEquip.IsNoReelAlarm() && (!inputEquip.ClampEmptyMove))
{
btnHlhasReel.Visible = true;
}
else
{
btnHlhasReel.Visible = false;
}
string text = ""; string text = "";
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -289,6 +306,13 @@ namespace OnlineStore.XLRStore ...@@ -289,6 +306,13 @@ namespace OnlineStore.XLRStore
private void FrmInputEquip_Load(object sender, EventArgs e) private void FrmInputEquip_Load(object sender, EventArgs e)
{ {
cmbInstoreShelf.SelectedIndex = 0;
cmbInstoreTargetP.SelectedIndex = 0;
cmbOutStartP.SelectedIndex = 0;
cmbOutShelf.SelectedIndex = 0;
LoadPosList(cmbInstorePos, 0);
LoadPosList(cmbOutstorePos, 0);
chbDebug.Checked = inputEquip.IsDebug; chbDebug.Checked = inputEquip.IsDebug;
chbMoveStop.Checked = inputEquip.MoveStop; chbMoveStop.Checked = inputEquip.MoveStop;
if (inputEquip.ClampJaw == null) if (inputEquip.ClampJaw == null)
...@@ -618,9 +642,73 @@ namespace OnlineStore.XLRStore ...@@ -618,9 +642,73 @@ namespace OnlineStore.XLRStore
chbPointEditEnable.Checked = false; chbPointEditEnable.Checked = false;
} }
private void tabPage2_Click(object sender, EventArgs e) private void BtnInStoreTest_Click(object sender, EventArgs e)
{ {
int startShelf = cmbInstoreShelf.SelectedIndex + 1;
string pos = cmbInstorePos.Text;
if (String.IsNullOrEmpty(pos))
{
MessageBox.Show("请选择目标库位", "提示" );
return;
}
BoxPosition posiiton = CSVPositionReader<BoxPosition>.GetPositon(pos);
InOutParam param = new InOutParam(new InOutPosInfo("InstoreTEST", pos,posiiton.BagHigh,posiiton.BagWidth));
param.ShelfType = startShelf;
LogUtil.info("点击 " + BtnInStoreTest.Text + " :料串["+ startShelf +"]->" + param.PosInfo.ToStr());
inputEquip.StartInstore(param);
}
private void btnOutStoreTest_Click(object sender, EventArgs e)
{
int startShelf = cmbOutShelf.SelectedIndex + 1;
string pos = cmbOutstorePos.Text;
if (String.IsNullOrEmpty(pos))
{
MessageBox.Show("请选择目标库位", "提示");
return;
}
BoxPosition posiiton = CSVPositionReader<BoxPosition>.GetPositon(pos);
InOutParam param = new InOutParam(new InOutPosInfo("OutstoreTEST", pos, posiiton.BagHigh, posiiton.BagWidth));
param.ShelfType = startShelf;
LogUtil.info("点击 " + btnOutStoreTest.Text + " :" + param.PosInfo.ToStr()+ "->料串[" + startShelf + "]");
inputEquip.StartOutstore(param);
}
private void cmbInstoreTargetP_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
LoadPosList(cmbInstorePos, cmbInstoreTargetP.SelectedIndex);
}
private void cmbOutShelf_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
LoadPosList(cmbOutstorePos, cmbOutStartP.SelectedIndex);
}
private void LoadPosList(ComboBox cmb, int pIndex)
{
List<string> allList = StoreManager.XLRStore.boxEquip.PositionNumList;
List<string> positions = new List<string>();
if (pIndex.Equals(0))
{
positions = (from m in StoreManager.XLRStore.boxEquip.PositionNumList where m.Contains("AA") select m).ToList<string>();
} else if (pIndex.Equals(1))
{
positions = (from m in StoreManager.XLRStore.boxEquip.PositionNumList where m.Contains("BB") select m).ToList<string>();
}
cmb.Items.Clear();
cmb.DataSource = positions;
if (positions.Count > 0)
{
cmb.SelectedIndex = 0;
}
} }
} }
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
this.lblShelf.TabIndex = 0; this.lblShelf.TabIndex = 0;
this.lblShelf.Text = "料架号:"; this.lblShelf.Text = "料架号:";
this.lblShelf.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblShelf.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblShelf.DoubleClick += new System.EventHandler(this.lblStatus_DoubleClick); this.lblShelf.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblShelf.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblShelf.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblShelf.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblShelf.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
this.lblText.TabIndex = 1; this.lblText.TabIndex = 1;
this.lblText.Text = "移栽D1-1_1"; this.lblText.Text = "移栽D1-1_1";
this.lblText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblText.DoubleClick += new System.EventHandler(this.lblName_DoubleClick); this.lblText.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblText.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblText.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblText.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblText.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
this.lblStatus.TabIndex = 2; this.lblStatus.TabIndex = 2;
this.lblStatus.Text = "暂未启动"; this.lblStatus.Text = "暂未启动";
this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblStatus.DoubleClick += new System.EventHandler(this.lblStatus_DoubleClick); this.lblStatus.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblStatus.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblStatus.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblStatus.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblStatus.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
this.lblMoveInfo.TabIndex = 3; this.lblMoveInfo.TabIndex = 3;
this.lblMoveInfo.Text = "暂无出入库"; this.lblMoveInfo.Text = "暂无出入库";
this.lblMoveInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblMoveInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblMoveInfo.DoubleClick += new System.EventHandler(this.lblStatus_DoubleClick); this.lblMoveInfo.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblMoveInfo.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblMoveInfo.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblMoveInfo.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblMoveInfo.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
this.lblDebug.Size = new System.Drawing.Size(48, 17); this.lblDebug.Size = new System.Drawing.Size(48, 17);
this.lblDebug.TabIndex = 5; this.lblDebug.TabIndex = 5;
this.lblDebug.Text = "启用✔"; this.lblDebug.Text = "启用✔";
this.lblDebug.DoubleClick += new System.EventHandler(this.lblStatus_DoubleClick); this.lblDebug.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblDebug.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblDebug.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblDebug.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblDebug.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
this.panName.Name = "panName"; this.panName.Name = "panName";
this.panName.Size = new System.Drawing.Size(248, 28); this.panName.Size = new System.Drawing.Size(248, 28);
this.panName.TabIndex = 7; this.panName.TabIndex = 7;
this.panName.DoubleClick += new System.EventHandler(this.panName_DoubleClick); this.panName.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.panName.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.panName.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.panName.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.panName.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
this.lblWarn.Size = new System.Drawing.Size(242, 42); this.lblWarn.Size = new System.Drawing.Size(242, 42);
this.lblWarn.TabIndex = 8; this.lblWarn.TabIndex = 8;
this.lblWarn.Text = "暂无报警"; this.lblWarn.Text = "暂无报警";
this.lblWarn.DoubleClick += new System.EventHandler(this.lblStatus_DoubleClick); this.lblWarn.DoubleClick += new System.EventHandler(this.panName_DoubleClick_1);
this.lblWarn.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter); this.lblWarn.MouseEnter += new System.EventHandler(this.lblDebug_MouseEnter);
this.lblWarn.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave); this.lblWarn.MouseLeave += new System.EventHandler(this.lblDebug_MouseLeave);
// //
......
...@@ -108,42 +108,7 @@ namespace OnlineStore.XLRStore ...@@ -108,42 +108,7 @@ namespace OnlineStore.XLRStore
private void EquipControl_Load(object sender, EventArgs e) private void EquipControl_Load(object sender, EventArgs e)
{ {
} }
private void lblName_DoubleClick(object sender, EventArgs e)
{
this.OnDoubleClick(e);
}
private void lblName_MouseEnter(object sender, EventArgs e)
{
this.OnMouseEnter(e);
}
private void panName_MouseEnter(object sender, EventArgs e)
{
this.OnMouseEnter(e);
}
private void panName_DoubleClick(object sender, EventArgs e)
{
this.OnDoubleClick(e);
}
private void lblStatus_DoubleClick(object sender, EventArgs e)
{
this.OnDoubleClick(e);
}
private void lblStatus_MouseEnter(object sender, EventArgs e)
{
this.OnMouseEnter(e);
}
private void lblBox_MouseEnter(object sender, EventArgs e)
{
this.OnMouseEnter(e);
}
private void lblDebug_MouseEnter(object sender, EventArgs e) private void lblDebug_MouseEnter(object sender, EventArgs e)
{ {
...@@ -165,5 +130,10 @@ namespace OnlineStore.XLRStore ...@@ -165,5 +130,10 @@ namespace OnlineStore.XLRStore
{ {
SelectStyle(); SelectStyle();
} }
private void panName_DoubleClick_1(object sender, EventArgs e)
{
this.OnDoubleClick(e);
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!