Commit dec60dc4 LN

1

1 个父辈 ce65c829
......@@ -494,25 +494,6 @@ namespace OnlineStore.Common
}
#endregion
#region 字节型转十六进制字符串
///// <summary>
///// 字节数组转16进制字符串
///// </summary>
///// <param name="bytes"></param>
///// <returns></returns>
//public static string byteToHexStr(byte[] bytes)
//{
// string returnStr = "";
// if (bytes != null)
// {
// for (int i = 0; i < bytes.Length; i++)
// {
// returnStr += bytes[i].ToString("X2");
// }
// }
// return returnStr;
//}
#endregion
#region 计算校验码
......
......@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary
return airValue;
}
#region 扫码枪代码
#region 是否已经接收到过出库信息
/// <summary>
///是否已经接收到过出库信息
......@@ -810,7 +810,7 @@ namespace OnlineStore.DeviceLibrary
{
msg = moveEquip.Name + "下降阻挡气缸";
TimeSpan rwSpan = DateTime.Now - preRWTime;
if (span.TotalSeconds > LineManager.Config.IOSingle_TimerOut*2)
if (span.TotalSeconds > LineManager.Config.IOSingle_TimerOut * 2)
{
SetWarnMsg(moveEquip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span));
LogUtil.error(moveEquip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span), 112);
......@@ -841,7 +841,7 @@ namespace OnlineStore.DeviceLibrary
else
{
//SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位");
LogUtil.error(Name+" "+ moveEquip.Name + "在复位过程中报警,需要重新复位,调用 moveEquip.Reset();");
LogUtil.error(Name + " " + moveEquip.Name + "在复位过程中报警,需要重新复位,调用 moveEquip.Reset();");
moveEquip.Reset();
//如果小于80秒,继续等待
if (span.TotalSeconds < 70)
......@@ -866,7 +866,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing;
lineStatus = LineStatus.StoreOnline;
MoveInfo.EndMove();
LogUtil.info(Name + "所有移栽模块复位完成,打开流水线,开始运转,耗时 ["+FormUtil.GetSpanStr(span)+"]");
LogUtil.info(Name + "所有移栽模块复位完成,打开流水线,开始运转,耗时 [" + FormUtil.GetSpanStr(span) + "]");
}
else if (span.TotalSeconds > 120)
{
......
......@@ -172,12 +172,6 @@ namespace OnlineStore.DeviceLibrary
public override bool StartInStoreMove(InOutParam param)
{
string posId = param != null ? param.PosId : "";
////调试模式移栽装置不需要有操作
//if (IsDebug)
//{
// LogInfo("需要入库【" + posId + "】处于调试模式,暂时不再进行出入库操作");
// return false ;
//}
if (runStatus.Equals(LineRunStatus.Runing))
{
runStatus = LineRunStatus.Busy;
......@@ -189,7 +183,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH);
return true;
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else
{
......
......@@ -28,11 +28,6 @@ namespace OnlineStore.DeviceLibrary
bool result = LineManager.Line.DLineStartOut(Config.DLineEquipNum, Config.DLineLineNum);
wait.IsEnd = result;
}
//else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore))
//{
// int storeId = checkWaitInfo.MoveParam.GetStoreId();
// wait.IsEnd = LineServer.BoxCanReviceTray(storeId);
//}
return false;
}
private Stopwatch trayCheckWait = new Stopwatch();
......@@ -349,12 +344,6 @@ namespace OnlineStore.DeviceLibrary
public override bool StartOutStoreMove(InOutParam param)
{
string posId = param != null ? param.PosId : "";
//调试模式移栽装置不需要有操作
//if (IsDebug)
//{
// LogInfo("需要出料【" + posId + "】处于调试模式,暂时不再进行出出料操作");
// return false;
//}
if (runStatus.Equals(LineRunStatus.Runing))
{
runStatus = LineRunStatus.Busy;
......
......@@ -13,18 +13,12 @@ namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
// public static Asa.RFID.RFIDReader RfidReader = new RFIDReader();
private static int DefaultTrayNum = ConfigAppSettings.GetIntValue(Setting_Init.DefaultTrayNum);
static RFIDManager()
{
// RfidReader.GetValue += RfidReader_GetValue;
}
public static void Open(string[] iparray)
{
string path = Application.StartupPath + @"\logs\rfid\";
// RFIDManager.RfidReader.LogPath = path;
// string[] rfidArray = rfidList.ToArray();
//连接rfip
RFIDReader.Open(null, iparray);
}
......@@ -74,10 +68,10 @@ namespace OnlineStore.DeviceLibrary
return 0;
}
public static RFIDData GetShelfId(int subType )
public static RFIDData GetShelfId(int subType)
{
string ip = GetRFIP(subType, 1);
RFIDData data= ReadRFID(ip,true);
RFIDData data = ReadRFID(ip, true);
//此处料串为B料架
//bytedata = data.ToData();
//if (data.RFType.Equals('B'))
......@@ -141,9 +135,10 @@ namespace OnlineStore.DeviceLibrary
try
{
RFIDReader.CloseAll();
}catch(Exception ex)
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:",ex);
LogUtil.error("关闭RFID出错:", ex);
}
}
}
......@@ -158,9 +153,17 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public int Num = 0;
public RFIDData(int num, int t)
{
if (t < 65)
{
RFType = '0';
}
else
{
this.RFType = (char)t;
}
this.Num = num;
}
......@@ -170,7 +173,14 @@ namespace OnlineStore.DeviceLibrary
{
if (data != null && data.Length > 2)
{
if (data[1] < 65)
{
RFType = '0';
}
else
{
RFType = (char)data[1];
}
Num = (int)(data[2]);
}
}
......@@ -179,6 +189,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("RFIP 数据【" + data + "】 获取编码失败");
}
}
public byte[] ToData()
{
return new byte[] { (byte)RFType, (byte)Num };
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!