Commit 3593d886 LN

增加托盘状态上传

1 个父辈 1b35020e
......@@ -352,6 +352,7 @@ namespace OnlineStore.DeviceLibrary
//此处先对托盘号进行验证
preTrayNum = currTrayNum;
currTrayNum = RFIDManager.GetTrayNum(Name, DeviceID, true);
SServerManager.updateTray(currTrayNum);
if (String.IsNullOrEmpty(RFIDIP)) { }
else
{
......
......@@ -452,6 +452,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog("托盘阻挡" + MoveInfo.SLog + " 等待1秒后再次验证");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
}
else
{
......
......@@ -66,6 +66,7 @@ namespace OnlineStore.DeviceLibrary
foreach (FeedingEquip_Config config in feedMap.Values)
{
FeedingEquip equip = new FeedingEquip(lineConfig.CID, config);
LogUtil.info(Name + $" {equip.Name} DeviceID: {equip.DeviceID} ");
//增加AGV小车客户端
AgvClient.NodeList.Add(config.AgvInName);
AgvClient.NodeList.Add(config.AgvOutName);
......@@ -76,14 +77,16 @@ namespace OnlineStore.DeviceLibrary
}
foreach (MoveEquip_Config config in configList.Values)
{
MoveEquip equip = new MoveEquip(lineConfig.CID, config);
MoveEquip equip = new MoveEquip(lineConfig.CID, config);
LogUtil.info(Name + $" {equip.Name} DeviceID: {equip.DeviceID} ");
AddDeviceName(ioList, config.IOIPList);
MoveEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip);
}
foreach (HYEquip_Config config in hyConfigMap.Values)
{
HYEquipBase equip =HYEquipBase.GetHY( lineConfig.CID, config);
HYEquipBase equip =HYEquipBase.GetHY( lineConfig.CID, config);
LogUtil.info(Name + $" {equip.Name} DeviceID: {equip.DeviceID} ");
AddDeviceName(ioList, config.IOIPList);
HYEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip);
......
......@@ -21,7 +21,8 @@ namespace OnlineStore.DeviceLibrary
private void Update_T3C1_TrayNum()
{
T3C1_TrayNum = RFIDManager.GetTrayNum(T3C1_MoveInfo.Name, 300);
T3C1_TrayNum = RFIDManager.GetTrayNum(T3C1_MoveInfo.Name, 300);
SServerManager.updateTray(T3C1_TrayNum);
}
public void T3C1_Stop(LineMoveInfo moveInfo = null)
{
......
......@@ -786,6 +786,34 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
///rest/api/qisda/device/updateTray?trayId=xxx
private static string Addr_updateTray = "/rest/api/qisda/device/updateTray";
public static void updateTray(int trayNum)
{
Task.Factory.StartNew(delegate
{
try
{
//code= 0 表示正常,其他为异常
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("trayId", "E" + trayNum);//
string server = GetAddr(Addr_updateTray, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Get(server);
LogUtil.debug("updateTray [" + trayNum + "] " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
LogUtil.error("updateTray [" + trayNum + "] 出错", ex);
}
});
}
}
public class ReturnData
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!