Commit e82ac874 张东亮

IDHIK 依赖库版本改为3.0.2

1 个父辈 e206a467
......@@ -128,52 +128,6 @@ namespace OnlineStore.Common.util
}
/// <summary>
/// 检查料串状态
/// </summary>
/// <param name="isright">true右侧步骤判断</param>
/// <param name="mostop"></param>
/// <returns></returns>
public static string ShelfStatus(bool isright,int mostop)
{
if (mostop==0)
{
return "IDLE";
}
if (isright)
{
if (mostop >= 24 && mostop <= 28)//出料中
{
return "EMPTY_OUT";
}
if (mostop >= 30 && mostop <= 35)//入料中
{
return "LOADING";
}
if (mostop == 20 || mostop == 23)//料串已清空,等待取走料串
{
return "EMPTY_OUT";
}
return "LOADING";//运行中-入库中
}
else
{
if (mostop>=49&&mostop<=54)//出料中
{
return "FULL_OUT";
}
if (mostop >= 55 && mostop <= 60)//入料中
{
return "UNLOADING";
}
if (mostop == 47 || mostop == 48)//料串已满,等待取走料串
{
return "FULL_OUT";
}
return "UNLOADING";//运行中-出库中
}
}
private static string BitMapToBase64(Bitmap bitmap, int width, int height, int quality)
{
try
......
......@@ -6,6 +6,8 @@ namespace DeviceLibrary
{
partial class MainMachine
{
public bool RightShelfEmpty = false;
public bool LeftShelfFull = false;
void IOMonitor()
{
//agv感应io处理逻辑
......@@ -121,12 +123,22 @@ namespace DeviceLibrary
//右侧料串已空
if (RightMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH) && RightShelfNoTray)
{
RightShelfEmpty = true;
Msg.add(crc.GetString("Res0093","右侧料串已空,等待取走料串"), MsgLevel.warning);
}
else
{
RightShelfEmpty = false;
}
//左侧料串已满
if (LeftMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH) && LeftShelfNoTray)
{
Msg.add(crc.GetString("Res0094","左侧料串已满,等待取走料串"), MsgLevel.warning);
LeftShelfFull = true;
Msg.add(crc.GetString("Res0094", "左侧料串已满,等待取走料串"), MsgLevel.warning);
}
else
{
LeftShelfFull = false;
}
}
}
......
......@@ -12,6 +12,7 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Policy;
using System.Text;
using System.Threading;
......@@ -493,16 +494,20 @@ namespace DeviceLibrary
//msg.msgParams = new string[] { addressValue.GetStateStr() };
msg.msg = addressValue.GetStateStr();
equipMsgs.Add(msg);
if(RobotManage.mainMachine.runStatus == RunStatus.Running)
{
if (addressValue.Name == crc.GetString("Res0039", "右侧取料"))
{
dic.Add("inShelfType", ShelfType.smallReel.ToString());
dic.Add("inShelfStatus", UnifiedDataHandler.ShelfStatus(true, Convert.ToInt32(addressValue.MoveStep)));
dic.Add("inShelfStatus", ShelfStatus(true, Convert.ToInt32(addressValue.MoveStep)));
}
if (addressValue.Name == crc.GetString("Res0051", "左侧放料"))
{
dic.Add("outShelfType", ShelfType.smallReel.ToString());
dic.Add("outShelfStatus", UnifiedDataHandler.ShelfStatus(false, Convert.ToInt32(addressValue.MoveStep)));
dic.Add("outShelfStatus", ShelfStatus(false, Convert.ToInt32(addressValue.MoveStep)));
}
}
}
}
}
......@@ -522,7 +527,78 @@ namespace DeviceLibrary
return equipMsgs;
}
/// <summary>
/// 检查料串状态
/// </summary>
/// <param name="isright">true右侧步骤判断</param>
/// <param name="mostop"></param>
/// <returns></returns>
public string ShelfStatus(bool isright, int mostop)
{
if (isright)
{
//OFFLINE = 离线;
//IDLE = 空闲;
//LOADING = 入料中;
//EMPTY_OUT = 空料串需要取走
if (mostop == 0)
{
if (RobotManage.mainMachine.RightShelfEmpty)
{
return "EMPTY_OUT";
}
return "IDLE";
}
if (mostop >= 24 && mostop <= 28)//出料中
{
return "EMPTY_OUT";
}
if (mostop >= 30 && mostop <= 35)//入料中
{
return "LOADING";
}
if (mostop == 20 || mostop == 23)//料串已清空,等待取走料串
{
return "EMPTY_OUT";
}
return "LOADING";//运行中-入库中
}
else
{
//OFFLINE = 离线;
//IDLE = 空闲;
//UNLOADING = 出料中;
//NEED_EMPTY = 需要空料串出库;
//FULL_OUT = 满料串需要取走
if (mostop == 0)
{
if (RobotManage.mainMachine.LeftShelfFull)
{
return "FULL_OUT";
}
else if (RobotManage.mainMachine.IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.LOW))
{
return "NEED_EMPTY";
}
return "IDLE";
}
if (mostop >= 49 && mostop <= 54)//出料中
{
return "FULL_OUT";
}
if (mostop >= 55 && mostop <= 60)//入料中
{
return "UNLOADING";
}
if (mostop == 47 || mostop == 48)//料串已满,等待取走料串
{
return "FULL_OUT";
}
return "UNLOADING";//运行中-出库中
}
}
public bool SendNGInfo(string ngmsg)
{
try
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!