Commit 763c406e 张东亮

入库完成后检查是否在库位,否则出库

1 个父辈 9b67e065
...@@ -156,304 +156,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -156,304 +156,7 @@ namespace OnlineStore.DeviceLibrary
} }
return codeStr; return codeStr;
} }
//public static string GetTraySize(string deviceName, int robotIndex, string codeStr, out int outSize, out bool isNg)
//{
// outSize = 0;
// isNg = false;
// string msg = "";
// try
// {
// if (String.IsNullOrEmpty(codeStr))
// {
// return msg = deviceName + "未扫到条码";
// }
// string logName = $"GetTraySize [{robotIndex }] [{codeStr}] :";
// if (string.IsNullOrEmpty(serverAddr))
// {
// LogUtil.error(deviceName + $"{logName}未找到服务器地址");
// return msg;
// }
// Dictionary<string, string> paramMap = new Dictionary<string, string>();
// paramMap.Add("robotIndex", robotIndex.ToString());// 参数: robotIndex = 机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
// paramMap.Add("barcode", codeStr);// barcode = 扫到的条码
// string server = GetAddr(Addr_getSize, paramMap);
// DateTime startTime = DateTime.Now;
// bool isTimeOut = false;
// string resultStr = HttpHelper.Post(server, "", Encoding.UTF8, 5000, out isTimeOut);
// LogUtil.info("GetTraySize " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// if (isTimeOut)
// {
// return msg = "获取尺寸超时";
// }
// //返回: { "code": 0, "msg":"ok", data: 7}
// ServerData serverResult = JsonHelper.DeserializeJsonToObject<ServerData>(resultStr);
// if (serverResult == null)
// {
// return msg = "没有收到服务器反馈";
// }
// else if (serverResult.code.Equals(0).Equals(false))
// {
// // code: 0为正常,其他为异常,
// //code不是0,直接NG
// isNg = true;
// return msg = $" [{ serverResult.code}]:" + serverResult.msg;
// }
// if (!serverResult.data.Equals(""))
// {
// // data:料盘直径,= 7时升起气缸
// outSize = Convert.ToInt32(serverResult.data);
// LogUtil.info(deviceName + $"{ logName} 获得尺寸:" + outSize);
// }
// }
// catch (Exception ex)
// {
// LogUtil.error(deviceName + " ", ex);
// }
// return "";
//}
public static string UpdateTrayLoc(string deviceName, string barcode, string status, string locInfo)
{
string msg = "";
try
{
if (String.IsNullOrEmpty(barcode))
{
return msg;
}
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "UpdateTrayLoc [" + barcode + "] [" + status + "] :未找到服务器地址");
return msg;
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode);//barcode = 料盘的条码
paramMap.Add("status", status); // status = 状态信息, 移栽 = MOVING, 流水线 = INLINE, 皮带线 = INBELT
paramMap.Add("locInfo", locInfo); // locInfo = 位置信息,移栽时为移栽编号,流水线时为托盘号,皮带线时为皮带线编号,机器人时为机器人编号
string server = GetAddr(Addr_updateLocInfo, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info("UpdateTrayLoc " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// 返回: { "code": 0, "msg":"ok", "data":""}
ServerData serverResult = JsonHelper.DeserializeJsonToObject<ServerData>(resultStr);
if (serverResult == null)
{
msg = deviceName + "UpdateTrayLoc【 " + barcode + "】【" + status + "】【" + locInfo + "】没有收到服务器反馈";
}
else if (serverResult.code.Equals(0).Equals(false))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg = deviceName + " UpdateTrayLoc【 " + barcode + "】【" + status + "】【" + locInfo + "】 :" + "[" + serverResult.code + "]" + serverResult.msg;
}
if (!msg.Equals(""))
{
LogUtil.error(msg);
}
}
catch (Exception ex)
{
LogUtil.error(deviceName + " ", ex);
}
return msg;
}
private static string Addr_clearPutInRfid = "/service/store/qisda/clearPutInRfid";
public static string clearPutInRfid(string deviceName, string rfid)
{
string msg = "";
try
{
if (String.IsNullOrEmpty(rfid))
{
return msg;
}
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "clearPutInRfid [" + rfid + "] :未找到服务器地址");
return msg;
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid);//rfid
string server = GetAddr(Addr_clearPutInRfid, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "clearPutInRfid " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
//皮带线获取尺寸后,料盘到达机器人取料位置进调用,如果未扫到码,或者没等到取料位置信号亮,可以不用调用
//> 地址:
//>>/rest/api/qisda/device/arrive3fRobotLocation
//>
//> 参数:
//>> - robotIndex=机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
//>
//> 返回:
//>>``
private static string Addr_arrive3fRobotLocation = "/rest/api/qisda/device/arrive3fRobotLocation";
public static string arrive3fRobotLocation(string deviceName, int robotIndex, string barcode)
{
string msg = "";
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "arrive3fRobotLocation [" + robotIndex + "][" + barcode + "] :未找到服务器地址");
return msg;
}
try
{
if (robotIndex <= 0)
{
return "robotIndex="+robotIndex;
}
DateTime startTime = DateTime.Now;
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("robotIndex", robotIndex.ToString());//rfid
paramMap.Add("barcode", barcode);
string server = GetAddr(Addr_arrive3fRobotLocation, paramMap);
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "arrive3fRobotLocation " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
msg = deviceName + " " + ex.ToString();
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
// 分盘料/紧急料放上料串或料架时调用 /rest/api/qisda/device/afterPutCut
private static string Addr_afterPutCut = "/rest/api/qisda/device/afterPutCut";
public static string afterPutCut(string deviceName, string rfid, string barcode, string cid, int rfidLoc, out TaskData afterData)
{
afterData = null;
string msg = "";
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "afterPutCut [" + rfid + "][" + barcode + "][" + cid + "][" + rfidLoc + "] :未找到服务器地址");
return msg;
}
try
{
//参数:
//cid: 料仓cid,流水线可传入空
//barcode : 条码
//rfid : RFID
//rfidLoc: 料架位置,流水线可传-1
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码
paramMap.Add("rfid", rfid); // rfid = 料架的RFID信息
paramMap.Add("rfidLoc", rfidLoc.ToString()); // rfidLoc=料架的架位信息
paramMap.Add("cid", cid); // 料仓cid,流水线可传入空
string server = GetAddr(Addr_afterPutCut, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
if (barcode != "")
{
LogUtil.info(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
else
{
LogUtil.debug(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
//> 返回:
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
//>>
//>> - code: 0为正常,其他为异常,
//>> - msg:消息,
//>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识, value为空闲仓位)
//>> - cutPackageTask: 表示当前包装仓的分盘任务数
//>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
//>> - cutTask: 表示流水线分盘任务数
//>> - urgentTask: 表示流水线紧急料任务数
AfterPutData serverResult = JsonHelper.DeserializeJsonToObject<AfterPutData>(resultStr);
if (serverResult == null)
{
return msg = deviceName + "afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】没有收到服务器反馈";
}
else if (serverResult.code.Equals(0).Equals(false))
{
return msg = deviceName + " afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】 :" + serverResult.msg;
}
afterData = serverResult.data;
return "";
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
// 分盘料/紧急料启动时获取料架的虚拟RFID调用 地址: /rest/api/qisda/device/findTempRfid
private static string Addr_findTempRfid = "/rest/api/qisda/device/findTempRfid";
public static string findTempRfid(string deviceName, string rfid, out string tempRfid)
{
tempRfid = "";
string msg = "";
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "findTempRfid [" + rfid + "] :未找到服务器地址");
return msg;
}
try
{
// 参数: rfid: RFID
// 返回: "code": 0, "msg":"ok", "data":{ "tempRfid":""}
// code: 0为正常,其他为异常,
//msg: 消息,
//data: tempRfid: 表示当前料架(料串)对应的虚拟RFID
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid); // rfid: RFID
string server = GetAddr(Addr_findTempRfid, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "findTempRfid " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null)
{
return msg = deviceName + " findTempRfid【 " + rfid + "】 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
return msg = deviceName + " findTempRfid【 " + rfid + "】 :" + data.msg;
}
if (data.data != null && data.data.ContainsKey("tempRfid"))
{
tempRfid = data.data["tempRfid"];
}
return "";
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
// 取消任务地址: /cancelPutInTask //参数: barcode
private static string Addr_cancelPutInTask = "/rest/api/qisda/device/cancelPutInTask"; private static string Addr_cancelPutInTask = "/rest/api/qisda/device/cancelPutInTask";
public static string cancelPutInTask(string deviceName, string barcode) public static string cancelPutInTask(string deviceName, string barcode)
{ {
...@@ -653,36 +356,50 @@ namespace OnlineStore.DeviceLibrary ...@@ -653,36 +356,50 @@ namespace OnlineStore.DeviceLibrary
return 999; return 999;
} }
public static void SendPosToStoreCheck(string deviceName, InOutParam param) private static string Addr_InstorePosCheck = "/service/store/posQuery";
/// <summary>
/// 查询入库是否完成
/// </summary>
/// <param name="posName"></param>
/// <param name="barcode"></param>
/// <returns></returns>
public static bool InstorePosCheck(string posName,string barcode)
{ {
//if (param == null || param.IsNG) try
//{ {
// return; if (string.IsNullOrEmpty(serverAddr))
//} {
//int storeId = param.GetStoreId(); LogUtil.error("InstorePosCheck [" + barcode + "] :未找到服务器地址");
//MoveEquip moveEquip = StoreManager.XLRStore.MoveEquipMap[storeId]; return false;
//if (LineServer.BoxCanInStore(moveEquip.DeviceID)) }
//{
// LineServer.CheckInStorePos(storeId, param); Dictionary<string, string> paramMap = new Dictionary<string, string>();
//} paramMap.Add("posName", posName);
//else paramMap.Add("barcode", barcode);
//{ string server = GetAddr(Addr_InstorePosCheck, paramMap);
// //等待3秒后重发验证 DateTime startTime = DateTime.Now;
// Task.Factory.StartNew(delegate string resultStr = HttpHelper.Post(server, "");
// { LogUtil.info("InstorePosCheck " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// LogUtil.error(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
// Thread.Sleep(3000);
// LineServer.CheckInStorePos(storeId, param);
// });
//}
//lock (moveEquip.waitInListLock)
//{
// //如果当前正在出入库中,需要记录下来,等待空闲时执行
// LogUtil.info(deviceName + "[" + moveEquip.Name + " ]入库命令: " + param.ToStr() + "加入等待列表中!");
// moveEquip.waitInStoreList.Add(param);
//}
}
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null)
{
LogUtil.error(" InstorePosCheck【 " + barcode + "】 没有收到服务器反馈");
return false;
}
else if (data.code.Equals(0).Equals(true))
{
return true;
}
}
catch (Exception ex)
{
LogUtil.error($"InstorePosCheck:{posName},{barcode}",ex);
}
return false;
}
//14.异常看板 //14.异常看板
// > 地址: // > 地址:
...@@ -876,21 +593,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -876,21 +593,7 @@ namespace OnlineStore.DeviceLibrary
public object data { get; set; } public object data { get; set; }
} }
public class LocStatus
{
/// <summary>
/// 料盘位置:移栽 = MOVING
/// </summary>
public static string MOVING = "MOVING";
/// <summary>
/// 料盘位置:流水线 = INLINE
/// </summary>
public static string INLINE = "INLINE";
/// <summary>
/// 料盘位置:皮带线 = INBELT
/// </summary>
public static string INBELT = "INBELT";
}
public class ServerData public class ServerData
{ {
//{"code":0,"msg":"ok","data":"7"} //{"code":0,"msg":"ok","data":"7"}
......
...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
try try
{ {
OnTimerProcess(); OnTimerProcess();
if (IsDebug && runStatus <= RunStatus.Wait) if (runStatus <= RunStatus.Wait)
{ {
isInPro = false; isInPro = false;
return; return;
......
...@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary
} }
private void EquipStartRun(EquipBase moveEquip) private void EquipStartRun(EquipBase moveEquip)
{ {
if (moveEquip.IsDebug)
{
LogUtil.info(moveEquip.Name + "调试状态,暂不启动");
}
else
{ {
bool result = moveEquip.StartRun(); bool result = moveEquip.StartRun();
Thread.Sleep(60); Thread.Sleep(60);
...@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary
private void EquipReset(EquipBase equip, bool isNeedAllReset) private void EquipReset(EquipBase equip, bool isNeedAllReset)
{ {
//调试状态不再重置 //调试状态不再重置
if (!equip.IsDebug)
{ {
if (isNeedAllReset || (!equip.NoAlarm())) if (isNeedAllReset || (!equip.NoAlarm()))
{ {
...@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
foreach (EquipBase equip in this.equipsMap.Values) foreach (EquipBase equip in this.equipsMap.Values)
{ {
if (!equip.IsDebug)
{ {
equip.StopRun(); equip.StopRun();
} }
......
...@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary
{ {
//humBean.HumidityProcess(this); //humBean.HumidityProcess(this);
HumitureBean.ProcessAllHumidity(this); HumitureBean.ProcessAllHumidity(this);
if (IsDebug)
{
}
else
{ {
if (StoreManager.IsConnectServer) if (StoreManager.IsConnectServer)
{ {
...@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = ""; //WarnMsg = "";
//状态 //状态
boxStatus.status = (int)deviceStatus; boxStatus.status = (int)deviceStatus;
if (IsDebug) if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
{
boxStatus.status = (int)DeviceStatus.Debugging;
}
else if (runStatus.Equals(DeviceStatus.OutStoreBoxEnd) || runStatus.Equals(DeviceStatus.InStoreEnd))
{ {
boxStatus.data.Add(ParamDefine.posId, lastPosId); boxStatus.data.Add(ParamDefine.posId, lastPosId);
boxStatus.data.Add(ParamDefine.barcode, lastBarcode); boxStatus.data.Add(ParamDefine.barcode, lastBarcode);
...@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg); LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg);
continue; continue;
} }
else if (resultOperation.op.Equals(1)&&operation.seq.Equals(resultOperation.seq)) else if (resultOperation.op.Equals(1) && operation.seq.Equals(resultOperation.seq))
{ {
LogUtil.info(logName + " 成功" + $"【{JsonHelper.SerializeObject(resultOperation)}】"); LogUtil.info(logName + " 成功" + $"【{JsonHelper.SerializeObject(resultOperation)}】");
return true; return true;
......
...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
if (CheckASide()) if (CheckASide())
{ {
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo))) //if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if(PreInStoreCheck(BufferDataManager.BInStoreInfo)) if (PreInStoreCheck(BufferDataManager.BInStoreInfo))
{ {
inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy(); inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy();
return true; return true;
...@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
PullAxisToP1("入库"); PullAxisToP1("入库");
break; break;
case StepEnum.SI_01_PullAxis_Ready: case StepEnum.SI_01_PullAxis_Ready:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId,MoveInfo.MoveParam.PosInfo.barcode); SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition); MoveInfo.NextMoveStep(StepEnum.SI_01_Pull_Updown_ToPosition);
if (!IsMoveAxisInSafePos()) if (!IsMoveAxisInSafePos())
{ {
...@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); //MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
break; break;
case StepEnum.SI_08_ToPosition: case StepEnum.SI_08_ToPosition:
MoveInfo.NextMoveStep(StepEnum.SI_09_ToTray); MoveInfo.NextMoveStep(StepEnum.SI_09_ToTray);
LogInfo($"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_Inout_To_P2_P4(); PullAxis_Inout_To_P2_P4();
break; break;
case StepEnum.SI_09_ToTray: case StepEnum.SI_09_ToTray:
MoveInfo.NextMoveStep(StepEnum.SI_10_LiftTray); MoveInfo.NextMoveStep(StepEnum.SI_10_LiftTray);
...@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
} }
PullAxis_Inout_To_Cam(); PullAxis_Inout_To_Cam();
bool rtn = SServerManager.InstorePosCheck(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
if(!rtn)
{
InOutParam inOut= new InOutParam(new InOutPosInfo(MoveInfo.MoveParam.PosInfo.barcode, MoveInfo.MoveParam.PosInfo.PosId));
LogInfo($"入库 {MoveInfo.SLog}:验证入库完成失败,将该库位出库[{inOut.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
if (CheckASide())
{
waitAOutStoreList.Enqueue(inOut);
}
else
{
waitBOutStoreList.Enqueue(inOut);
}
}
break; break;
case StepEnum.SI_19_InoutBack: case StepEnum.SI_19_InoutBack:
if (!CheckInStoreOtherSideInfo()) if (!CheckInStoreOtherSideInfo())
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupDO = new System.Windows.Forms.GroupBox(); this.groupDO = new System.Windows.Forms.GroupBox();
this.ucHumitempure4 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure3 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure2 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure1 = new OnlineStore.XLRStore.UCHumitempure();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.lblInoutInfo = new System.Windows.Forms.Label(); this.lblInoutInfo = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
...@@ -54,20 +54,12 @@ ...@@ -54,20 +54,12 @@
this.lblStoreStatus = new System.Windows.Forms.Label(); this.lblStoreStatus = new System.Windows.Forms.Label();
this.btnStart = new System.Windows.Forms.Button(); this.btnStart = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.ucHumitempure1 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure2 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure3 = new OnlineStore.XLRStore.UCHumitempure();
this.ucHumitempure4 = new OnlineStore.XLRStore.UCHumitempure();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupDO.SuspendLayout(); this.groupDO.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.panBase.SuspendLayout(); this.panBase.SuspendLayout();
...@@ -292,6 +284,38 @@ ...@@ -292,6 +284,38 @@
this.groupDO.TabStop = false; this.groupDO.TabStop = false;
this.groupDO.Text = "温湿度"; this.groupDO.Text = "温湿度";
// //
// ucHumitempure4
//
this.ucHumitempure4.Location = new System.Drawing.Point(241, 203);
this.ucHumitempure4.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure4.Name = "ucHumitempure4";
this.ucHumitempure4.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure4.TabIndex = 3;
//
// ucHumitempure3
//
this.ucHumitempure3.Location = new System.Drawing.Point(12, 203);
this.ucHumitempure3.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure3.Name = "ucHumitempure3";
this.ucHumitempure3.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure3.TabIndex = 2;
//
// ucHumitempure2
//
this.ucHumitempure2.Location = new System.Drawing.Point(241, 28);
this.ucHumitempure2.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure2.Name = "ucHumitempure2";
this.ucHumitempure2.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure2.TabIndex = 1;
//
// ucHumitempure1
//
this.ucHumitempure1.Location = new System.Drawing.Point(12, 27);
this.ucHumitempure1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.ucHumitempure1.Name = "ucHumitempure1";
this.ucHumitempure1.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure1.TabIndex = 0;
//
// lblThisSta // lblThisSta
// //
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -299,7 +323,7 @@ ...@@ -299,7 +323,7 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red; this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(244, 140); this.lblThisSta.Location = new System.Drawing.Point(243, 291);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(736, 28); this.lblThisSta.Size = new System.Drawing.Size(736, 28);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
...@@ -321,8 +345,6 @@ ...@@ -321,8 +345,6 @@
// //
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox5);
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.groupBox6); this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Location = new System.Drawing.Point(4, 29); this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
...@@ -331,50 +353,6 @@ ...@@ -331,50 +353,6 @@
this.tabPage3.Text = " 设备状态 "; this.tabPage3.Text = " 设备状态 ";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
// //
// groupBox5
//
this.groupBox5.Controls.Add(this.pictureBox2);
this.groupBox5.Dock = System.Windows.Forms.DockStyle.Right;
this.groupBox5.Location = new System.Drawing.Point(495, 176);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(490, 342);
this.groupBox5.TabIndex = 280;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "B面相机";
//
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox2.Location = new System.Drawing.Point(3, 23);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(484, 316);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.pictureBox1);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Left;
this.groupBox2.Location = new System.Drawing.Point(0, 176);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(490, 342);
this.groupBox2.TabIndex = 279;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "A面相机";
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.DarkGray;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 23);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(484, 316);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// groupBox6 // groupBox6
// //
this.groupBox6.Controls.Add(this.lblInoutInfo); this.groupBox6.Controls.Add(this.lblInoutInfo);
...@@ -384,7 +362,7 @@ ...@@ -384,7 +362,7 @@
this.groupBox6.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox6.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox6.Location = new System.Drawing.Point(0, 0); this.groupBox6.Location = new System.Drawing.Point(0, 0);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(985, 176); this.groupBox6.Size = new System.Drawing.Size(985, 514);
this.groupBox6.TabIndex = 278; this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "当前状态"; this.groupBox6.Text = "当前状态";
...@@ -542,38 +520,6 @@ ...@@ -542,38 +520,6 @@
this.btnStop.UseVisualStyleBackColor = false; this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click); this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
// //
// ucHumitempure1
//
this.ucHumitempure1.Location = new System.Drawing.Point(12, 27);
this.ucHumitempure1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.ucHumitempure1.Name = "ucHumitempure1";
this.ucHumitempure1.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure1.TabIndex = 0;
//
// ucHumitempure2
//
this.ucHumitempure2.Location = new System.Drawing.Point(241, 28);
this.ucHumitempure2.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure2.Name = "ucHumitempure2";
this.ucHumitempure2.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure2.TabIndex = 1;
//
// ucHumitempure3
//
this.ucHumitempure3.Location = new System.Drawing.Point(12, 203);
this.ucHumitempure3.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure3.Name = "ucHumitempure3";
this.ucHumitempure3.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure3.TabIndex = 2;
//
// ucHumitempure4
//
this.ucHumitempure4.Location = new System.Drawing.Point(241, 203);
this.ucHumitempure4.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
this.ucHumitempure4.Name = "ucHumitempure4";
this.ucHumitempure4.Size = new System.Drawing.Size(194, 153);
this.ucHumitempure4.TabIndex = 3;
//
// FrmBoxEquip // FrmBoxEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
...@@ -596,10 +542,6 @@ ...@@ -596,10 +542,6 @@
this.groupDO.ResumeLayout(false); this.groupDO.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox6.ResumeLayout(false); this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout(); this.groupBox6.PerformLayout();
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
...@@ -644,10 +586,6 @@ ...@@ -644,10 +586,6 @@
protected System.Windows.Forms.Button btnStop; protected System.Windows.Forms.Button btnStop;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
protected System.Windows.Forms.Button btnDebugAxis; protected System.Windows.Forms.Button btnDebugAxis;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private UCHumitempure ucHumitempure4; private UCHumitempure ucHumitempure4;
private UCHumitempure ucHumitempure3; private UCHumitempure ucHumitempure3;
private UCHumitempure ucHumitempure2; private UCHumitempure ucHumitempure2;
......
using System; using Dolen.CV;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Runtime.CompilerServices;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using OnlineStore.DeviceLibrary;
using log4net;
using System.Reflection;
using UserFromControl; using UserFromControl;
using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using Dolen.CV;
namespace OnlineStore.XLRStore namespace OnlineStore.XLRStore
{ {
...@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore ...@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param> /// <param name="cameraArgs"></param>
private void BoxBean_camera_A_event(IPCameraEventArgs cameraArgs) private void BoxBean_camera_A_event(IPCameraEventArgs cameraArgs)
{ {
if (!this.IsHandleCreated) return; //if (!this.IsHandleCreated) return;
try //try
{ //{
this.Invoke(new Action(() => // this.Invoke(new Action(() =>
{ // {
if (!groupBox2.Text.Contains("-")) // if (!groupBox2.Text.Contains("-"))
groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"; // groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox1.Image = cameraArgs.Image; // pictureBox1.Image = cameraArgs.Image;
})); // }));
} //}
catch { } //catch { }
} }
private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs) private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs)
{ {
if (!this.IsHandleCreated) return; //if (!this.IsHandleCreated) return;
try //try
{ //{
this.Invoke(new Action(() => // this.Invoke(new Action(() =>
{ // {
if (!groupBox5.Text.Contains("-")) // if (!groupBox5.Text.Contains("-"))
groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"; // groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox2.Image = cameraArgs.Image; // pictureBox2.Image = cameraArgs.Image;
})); // }));
} //}
catch { } //catch { }
} }
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>(); protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
...@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore ...@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore
private void btnDebugAxis_Click(object sender, EventArgs e) private void btnDebugAxis_Click(object sender, EventArgs e)
{ {
//boxBean.IsDebug
if (frmAxisMove == null) if (frmAxisMove == null)
{ {
frmAxisMove = new FrmAxisMove(boxBean.IsDebug); frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
else else
{ {
if (frmAxisMove.IsDisposed) if (frmAxisMove.IsDisposed)
{ {
frmAxisMove = new FrmAxisMove(boxBean.IsDebug); frmAxisMove = new FrmAxisMove(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
else else
{ {
frmAxisMove.DebugStatus(boxBean.IsDebug); frmAxisMove.DebugStatus(true);
frmAxisMove.ShowDialog(); frmAxisMove.ShowDialog();
} }
} }
} }
private void chbDebug_CheckedChanged_1(object sender, EventArgs e)
{
}
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!