Commit 4984321d LN

agv更新。盘高计算修改

1 个父辈 11602259
此文件类型无法预览
......@@ -14,7 +14,7 @@ namespace OnlineStore.AssemblyLine
{
public partial class FrmAgvTest : Form
{
private Asa.Client2 client;
private Asa.AgvClient client;
private string[] node = new string[] { "A1", "A2", "A3", "A4", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8" };
public FrmAgvTest()
......@@ -25,7 +25,7 @@ namespace OnlineStore.AssemblyLine
private void Form1_Load(object sender, EventArgs e)
{
label2.Text = "IP:" + ServerIp;
client = new Asa.Client2(ServerIp);
client = new Asa.AgvClient (ServerIp);
client.Log += Client_Log;
client.Arrive += AgvClient_Arrive;
// agvClient.CanEnter += AgvClient_CanEnter;
......@@ -33,16 +33,16 @@ namespace OnlineStore.AssemblyLine
// client.GetRFID += AgvClient_GetRFID;
}
private void AgvClient_Ready(string name, byte[] content)
private void AgvClient_Ready(string name, string rfid)
{
RFIDData data = new RFIDData(content);
LogUtil.info("FrmAgvTest 收到 AgvClient_Ready [" + name + "] [" + data.ToData() + "] ");
//RFIDData data = new RFIDData(content);
LogUtil.info("FrmAgvTest 收到 AgvClient_Ready [" + name + "] [" + rfid + "] ");
}
private void AgvClient_Arrive(string name, byte[] content)
private void AgvClient_Arrive(string name, string rfid)
{
RFIDData data = new RFIDData(content);
LogUtil.info("FrmAgvTest 收到 AgvClient_Arrive [" + name + "] [" + data.ToData() + "] ");
// RFIDData data = new RFIDData(content);
LogUtil.info("FrmAgvTest 收到 AgvClient_Arrive [" + name + "] [" + rfid + "] ");
}
//private static void AgvClient_GetRFID(string name, byte[] content)
......
20200403

20200408 盘高计算修改:如果检测出<=15,都按照8计算
agv更新
20200403
紧急出料不放太慢。
rfid不需要格式化。
上料模块批量轴上升时,如果不是第一次上升,最多上升100mm
......@@ -45,8 +51,6 @@ http发送去掉ping。
在阳光电源流水线的基础上新建佳世达流水线料项目
流水线SubType:1000
移栽出入仓模块:1-18
......
......@@ -13,7 +13,7 @@ namespace OnlineStore.DeviceLibrary
{
public static bool CurrCancelState = true;
private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp);
private static Asa.Client2 agvClient;
private static Asa.AgvClient agvClient;
public static Dictionary<string, Asa.ClientAction> actionMap = new Dictionary<string, Asa.ClientAction>();
public static List<string> NodeList = new List<string>();
private static bool isInit = false;
......@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
if (!isInit)
{
isInit = true;
agvClient = new Asa.Client2(ServerIp);
agvClient = new Asa.AgvClient(ServerIp);
agvClient.CancelState = true;
agvClient.Log += AgvClient_Log;
agvClient.Arrive += AgvClient_Arrive;
......@@ -81,38 +81,38 @@ namespace OnlineStore.DeviceLibrary
agvClient.SetStatus(id, "", shelfId, action, level);
UpdateAction(id, action);
}
private static void AgvClient_CloseDoor(string id, byte[] content)
private static void AgvClient_CloseDoor(string id, string rfid)
{
RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_CloseDoor [" + id + "] [" + data.NumStr() + "] ");
// RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_CloseDoor [" + id + "] [" + rfid + "] ");
}
private static void AgvClient_Ready(string id, byte[] content)
private static void AgvClient_Ready(string id, string rfid)
{
UpdateAction(id, ClientAction.Ready);
RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_Ready [" + id + "] [" + data.ToData() + "] ");
// RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_Ready [" + id + "] [" + rfid + "] ");
FeedingEquip equip = getFeedEquip(id);
if (equip == null)
{
LogUtil.error("收到 AgvClient_Ready [" + id + "] [" + data.ToData() + "] 未找到对应的设备 ,暂不处理");
LogUtil.error("收到 AgvClient_Ready [" + id + "] [" + rfid + "] 未找到对应的设备 ,暂不处理");
return;
}
equip.AgvReady(id, data);
equip.AgvReady(id, rfid);
}
private static void AgvClient_Arrive(string id, byte[] content)
private static void AgvClient_Arrive(string id, string rfid)
{
UpdateAction(id, ClientAction.Arrive);
RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_Arrive [" + id + "] [" + data.ToData() + "] ");
// RFIDData data = new RFIDData(content);
LogUtil.info("收到 AgvClient_Arrive [" + id + "] [" + rfid + "] ");
FeedingEquip equip = getFeedEquip(id);
if (equip == null)
{
LogUtil.error("收到 AgvClient_Ready [" + id + "] [" + data.ToData() + "] 未找到对应的设备 ,暂不处理 ");
LogUtil.error("收到 AgvClient_Ready [" + id + "] [" + rfid + "] 未找到对应的设备 ,暂不处理 ");
return;
}
equip.AgvArrive(id, data);
equip.AgvArrive(id, rfid);
}
private static FeedingEquip getFeedEquip(string nodeId)
......
......@@ -642,9 +642,9 @@ namespace OnlineStore.DeviceLibrary
return usable;
}
internal void AgvArrive(string nodeId, RFIDData data)
internal void AgvArrive(string nodeId, string rfid)
{
string logN = Name + "收到 AgvArrive 事件 [" + nodeId + "] [" + data.ToData() + "] ";
string logN = Name + "收到 AgvArrive 事件 [" + nodeId + "] [" + rfid + "] ";
if (nodeId.Equals(Config.AgvInName))
{
}
......@@ -654,9 +654,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(logN + ":" + "暂无处理");
}
internal void AgvReady(string nodeId, RFIDData data)
internal void AgvReady(string nodeId, string rfid)
{
string logN = Name + "收到 AgvReady 事件 [" + nodeId + "] [" + data.NumStr() + "] ";
string logN = Name + "收到 AgvReady 事件 [" + nodeId + "] [" + rfid + "] ";
if (nodeId.Equals(Config.AgvInName))
{
......
......@@ -1211,6 +1211,14 @@ namespace OnlineStore.DeviceLibrary
buchongStr = "(最后一盘料已补充5)";
height += 5;
}
//如果检测出<=15,都按照8计算
if (height <= 15)
{
LastHeight = 8;
}
else
{
List<int> heightList = LineManager.GetTrayList();
heightList = (from m in heightList orderby m descending select m).ToList<int>();
float minCha = height;
......@@ -1224,6 +1232,7 @@ namespace OnlineStore.DeviceLibrary
minCha = cha;
}
}
}
if (LastHeight <= 8) { LastHeight = 8; }
string code = CodeManager.ProcessCode(LastCodeList);
string msg = Name + " 计算盘高:上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后"+buchongStr+"[" + height + "]" + ",归类为【" + LastHeight + "mm】条码【"+code+"】";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!