Просмотр исходного кода

增加AGV任务执行优先级

master
Mr_z 1 год назад
Родитель
Сommit
60cbc8cf4b
6 измененных файлов: 82 добавлений и 45 удалений
  1. +30
    -31
      BPASmartClient.AGV/AGVHelper.cs
  2. +1
    -1
      FryPot_DosingSystem/App.config
  3. +28
    -9
      FryPot_DosingSystem/Control/DosingLogicControl.cs
  4. +3
    -2
      FryPot_DosingSystem/Control/GlobalVariable.cs
  5. +5
    -0
      FryPot_DosingSystem/Model/MaterialType.cs
  6. +15
    -2
      FryPot_DosingSystem/View/NewRecipeView.xaml

+ 30
- 31
BPASmartClient.AGV/AGVHelper.cs Просмотреть файл

@@ -96,9 +96,8 @@ namespace BPASmartClient.AGV
/// AGV去1号线体装桶到炒锅1
/// </summary>
/// <returns></returns>
public string AgvToLineOneLoadRoller(string robotJobId)
public string AgvToLineOneLoadRoller(string robotJobId, int priority=1)
{

//bool b = Convert.ToBoolean(config.AppSettings.Settings["appKey"].Value);//配置文件信息读取
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -113,7 +112,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value);//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -160,7 +159,7 @@ namespace BPASmartClient.AGV
/// AGV去1号线体装桶到炒锅4
/// </summary>
/// <returns></returns>
public string AgvFromLineOneToFryFourLoadRoller(string robotJobId)
public string AgvFromLineOneToFryFourLoadRoller(string robotJobId, int priority = 1)
{

//bool b = Convert.ToBoolean(config.AppSettings.Settings["appKey"].Value);//配置文件信息读取
@@ -177,7 +176,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value);//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -223,7 +222,7 @@ namespace BPASmartClient.AGV
/// AGV去2号线体装桶到炒锅2
/// </summary>
/// <returns></returns>
public string AgvToLineTwoLoadRoller(string robotJobId)
public string AgvToLineTwoLoadRoller(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -238,7 +237,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority =Convert.ToInt32( config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority =priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -278,7 +277,7 @@ namespace BPASmartClient.AGV
/// AGV去2号线体装桶到炒锅5
/// </summary>
/// <returns></returns>
public string AgvFromLineTwoToFryFiveLoadRoller(string robotJobId)
public string AgvFromLineTwoToFryFiveLoadRoller(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -293,7 +292,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -333,7 +332,7 @@ namespace BPASmartClient.AGV
/// AGV去3号线体装桶
/// </summary>
/// <returns></returns>
public string AgvToLineThreeLoadRoller(string robotJobId)
public string AgvToLineThreeLoadRoller(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -348,7 +347,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -388,7 +387,7 @@ namespace BPASmartClient.AGV
/// AGV从清洗台到4号线体卸桶
/// </summary>
/// <returns></returns>
public string AgvFromCleanToLineFourUnLoadRoller(string robotJobId)
public string AgvFromCleanToLineFourUnLoadRoller(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -403,7 +402,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -443,7 +442,7 @@ namespace BPASmartClient.AGV
/// AGV离开炒锅1
/// </summary>
/// <returns></returns>
public string AgvLeaveFryPotOne(string robotJobId)
public string AgvLeaveFryPotOne(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -458,7 +457,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -498,7 +497,7 @@ namespace BPASmartClient.AGV
/// AGV离开炒锅2
/// </summary>
/// <returns></returns>
public string AgvLeaveFryPotTwo(string robotJobId)
public string AgvLeaveFryPotTwo(string robotJobId, int priority = 1 )
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -513,7 +512,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -553,7 +552,7 @@ namespace BPASmartClient.AGV
/// AGV离开炒锅3
/// </summary>
/// <returns></returns>
public string AgvLeaveFryPotThree(string robotJobId)
public string AgvLeaveFryPotThree(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -568,7 +567,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -608,7 +607,7 @@ namespace BPASmartClient.AGV
/// AGV离开炒锅4
/// </summary>
/// <returns></returns>
public string AgvLeaveFryPotFour(string robotJobId)
public string AgvLeaveFryPotFour(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -623,7 +622,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -663,7 +662,7 @@ namespace BPASmartClient.AGV
/// AGV离开炒锅5
/// </summary>
/// <returns></returns>
public string AgvLeaveFryPotFive(string robotJobId)
public string AgvLeaveFryPotFive(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -678,7 +677,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -719,7 +718,7 @@ namespace BPASmartClient.AGV
/// AGV从1号线运空桶洗桶
/// </summary>
/// <returns></returns>
public string AgvLeaveLOneToClean(string robotJobId)
public string AgvLeaveLOneToClean(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -734,7 +733,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -774,7 +773,7 @@ namespace BPASmartClient.AGV
/// AGV从2号线运空桶洗桶
/// </summary>
/// <returns></returns>
public string AgvLeaveLTwoToClean(string robotJobId)
public string AgvLeaveLTwoToClean(string robotJobId,int priority=1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -789,7 +788,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -829,7 +828,7 @@ namespace BPASmartClient.AGV
/// AGV从3号线运空桶洗桶
/// </summary>
/// <returns></returns>
public string AgvLeaveLThreeToClean(string robotJobId)
public string AgvLeaveLThreeToClean(string robotJobId,int priority=1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -844,7 +843,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据
@@ -884,7 +883,7 @@ namespace BPASmartClient.AGV
/// AGV从洗桶处运桶到4号洗桶线
/// </summary>
/// <returns></returns>
public string AgvLeaveCleanToLFour(string robotJobId)
public string AgvLeaveCleanToLFour(string robotJobId, int priority = 1)
{
string url = AGVRequestUrl.GetInstance.TaskSendUrl;
//请求报文头
@@ -899,7 +898,7 @@ namespace BPASmartClient.AGV
AGVModel httpModel = new AGVModel();
httpModel.robotJobId = robotJobId;//上游提供
httpModel.warehouseId = long.Parse(config.AppSettings.Settings["warehouseId"].Value); //仓库编号
httpModel.jobPriority = Convert.ToInt32(config.AppSettings.Settings["jobPriority"].Value);//任务执行的优先级
httpModel.jobPriority = priority;//任务执行的优先级
httpModel.jobPriorityType = Convert.ToInt32(config.AppSettings.Settings["jobPriorityType"].Value); ;//0:根据优先级来执行,1:强制执行
httpModel.jobType = config.AppSettings.Settings["jobType"].Value; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
//详细任务数据


+ 1
- 1
FryPot_DosingSystem/App.config Просмотреть файл

@@ -8,7 +8,7 @@
<add key ="version" value="2.7"/>
<add key="warehouseId" value="1"/>
<add key="jobPriority" value="1"/>
<add key="jobPriorityType" value="1"/>
<add key="jobPriorityType" value="0"/>
<add key="jobType" value="POINT_ROLLER_MOVE"/>
<add key="autoLoad" value="true"/>
<add key="enableIOLoad" value="false"/>


+ 28
- 9
FryPot_DosingSystem/Control/DosingLogicControl.cs Просмотреть файл

@@ -34,6 +34,8 @@ namespace FryPot_DosingSystem.Control
public static DosingLogicControl GetInstance => _instance ??= new DosingLogicControl();

public ushort[] RollerNum = new ushort[] { 101, 102, 103, 104, 105, 106, 107, 108, 201, 202, 203, 204, 205, 206, 207, 208, 301, 302, 303, 304, 305, 306, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 501, 502, 503, 504, 505, 506, 507, 508 };

/// <summary>
/// 桶净重
/// </summary>r
@@ -173,7 +175,7 @@ namespace FryPot_DosingSystem.Control
public NewRecipeModel potThreeCurrentRecipe = null;
public NewRecipeModel potFourCurrentRecipe = null;
public NewRecipeModel potFiveCurrentRecipe = null;
#endregion
/// <summary>
/// 调试命令注册
@@ -5029,7 +5031,6 @@ namespace FryPot_DosingSystem.Control
DeviceOperate.GetInstance.WritePlcData("D1063", 0);
}
}

FryPotOneOrFourOutEmpetyRollerOperate();
if (OutputMaterialQuene.TryDequeue(out MaterialInfo materialInfo))//空桶出桶后,出料原料队列移除对应原料
{
@@ -5718,6 +5719,9 @@ namespace FryPot_DosingSystem.Control
globalVar.agvArriveUpLoad = false;
globalVar.AgvToFryPot = true;
//原料到位,agv到位,agv自行运料到炒锅

}
}

@@ -5885,7 +5889,6 @@ namespace FryPot_DosingSystem.Control
if (LThreeInputMaterialQuene.TryDequeue(out MaterialInfo materialInfo))
{
MessageNotify.GetInstance.ShowRunLog($"AGV正在装载{materialInfo.materialType.MaterialLoc}号料桶");

// globalVar.LThreeCurrentCookingStep++;
LThreeOutputMaterialQuene.Enqueue(materialInfo);
globalVar.agvArriveLThreeUpLoad = false;
@@ -6064,11 +6067,17 @@ namespace FryPot_DosingSystem.Control
string info;
if (globalVar.LOneFryPotSerial == 1)
{
info = AGVHelper.GetInstance.AgvToLineOneLoadRoller(id);
if (InputMaterialQuene.ElementAt(0).materialType.IsCommonMaterial)
info = AGVHelper.GetInstance.AgvToLineOneLoadRoller(id,2);
else
info = AGVHelper.GetInstance.AgvToLineOneLoadRoller(id);
}
else
{
info = AGVHelper.GetInstance.AgvFromLineOneToFryFourLoadRoller(id);
if (InputMaterialQuene.ElementAt(0).materialType.IsCommonMaterial)
info = AGVHelper.GetInstance.AgvFromLineOneToFryFourLoadRoller(id,2);
else
info = AGVHelper.GetInstance.AgvFromLineOneToFryFourLoadRoller(id);
}
LOnerobotJobId = id;
if (LineCarryTaskErrorCodeAnalysis(info, 1))
@@ -6129,6 +6138,7 @@ namespace FryPot_DosingSystem.Control
{
if (globalVar.rollerLineTwo.StationEight == LTwoInputMaterialQuene.ElementAt(0).materialType.MaterialLoc && !globalVar.rollerLineTwo.IsEpmtyBefore)//工位8上面是配方料桶
{

globalVar.rollerLineTwo.CanRun = false;
e: string id = Guid.NewGuid().ToString("D");
if (id == LOnerobotJobId || id == LTworobotJobId || id == LThreerobotJobId || id == LFourrobotJobId || id == LFiverobotJobId || id == LSixrobotJobId || LSevenrobotJobId.FirstOrDefault(p => p == id) != null || LEightrobotJobId.FirstOrDefault(p => p == id) != null || LNinerobotJobId.FirstOrDefault(p => p == id) != null || LTenrobotJobId.FirstOrDefault(p => p == id) != null)
@@ -6136,11 +6146,17 @@ namespace FryPot_DosingSystem.Control
string info;
if (globalVar.LTwoFryPotSerial == 2)
{
info = AGVHelper.GetInstance.AgvToLineTwoLoadRoller(id);
if (LTwoInputMaterialQuene.ElementAt(0).materialType.IsCommonMaterial)
info = AGVHelper.GetInstance.AgvToLineTwoLoadRoller(id, 2);
else
info = AGVHelper.GetInstance.AgvToLineTwoLoadRoller(id);
}
else
{
info = AGVHelper.GetInstance.AgvFromLineTwoToFryFiveLoadRoller(id);
if (LTwoInputMaterialQuene.ElementAt(0).materialType.IsCommonMaterial)
info = AGVHelper.GetInstance.AgvFromLineTwoToFryFiveLoadRoller(id,2);
else
info = AGVHelper.GetInstance.AgvFromLineTwoToFryFiveLoadRoller(id);
}
LTworobotJobId = id;
//Thread.Sleep(500);
@@ -6198,8 +6214,11 @@ namespace FryPot_DosingSystem.Control
e: string id = Guid.NewGuid().ToString("D");
if (id == LOnerobotJobId || id == LTworobotJobId || id == LThreerobotJobId || id == LFourrobotJobId || id == LFiverobotJobId || id == LSixrobotJobId || LSevenrobotJobId.FirstOrDefault(p => p == id) != null || LEightrobotJobId.FirstOrDefault(p => p == id) != null || LNinerobotJobId.FirstOrDefault(p => p == id) != null || LTenrobotJobId.FirstOrDefault(p => p == id) != null)
goto e;

string info = AGVHelper.GetInstance.AgvToLineThreeLoadRoller(id);
string info = string.Empty;
if (LThreeInputMaterialQuene.ElementAt(0).materialType.IsCommonMaterial)
info = AGVHelper.GetInstance.AgvToLineThreeLoadRoller(id,2);
else
info = AGVHelper.GetInstance.AgvToLineThreeLoadRoller(id);
LThreerobotJobId = id;
//Thread.Sleep(500);
if (LineCarryTaskErrorCodeAnalysis(info, 3))


+ 3
- 2
FryPot_DosingSystem/Control/GlobalVariable.cs Просмотреть файл

@@ -397,8 +397,7 @@ namespace FryPot_DosingSystem.Control
/// 洗桶就位信号
/// </summary>
public ushort WashRollerArriveSignal { get; set; }


}
/// <summary>
@@ -504,6 +503,7 @@ namespace FryPot_DosingSystem.Control
/// 洗桶就位信号
/// </summary>
public ushort WashRollerArriveSignal { get; set; }
}
/// <summary>
/// 滚筒线3相关变量
@@ -608,6 +608,7 @@ namespace FryPot_DosingSystem.Control
/// 洗桶就位信号
/// </summary>
public ushort WashRollerArriveSignal { get; set; }

}
/// <summary>


+ 5
- 0
FryPot_DosingSystem/Model/MaterialType.cs Просмотреть файл

@@ -35,6 +35,11 @@ namespace FryPot_DosingSystem.Model
/// </summary>
private ushort _materialLoc;
public ushort MaterialLoc { get { return _materialLoc; } set { _materialLoc = value; OnPropertyChanged(); } }
/// <summary>
/// 是否有多桶相同物料
/// </summary>
private bool _isCommonMaterial;
public bool IsCommonMaterial { get { return _isCommonMaterial; }set { _isCommonMaterial = value;OnPropertyChanged(); } }

public object Clone()
{


+ 15
- 2
FryPot_DosingSystem/View/NewRecipeView.xaml Просмотреть файл

@@ -425,7 +425,20 @@
BorderBrush="#e69519" Foreground="LightGray" Width="140" Margin="5,0,0,10" ></TextBox>
<TextBlock VerticalAlignment="Center" FontSize="14" Margin="4,0,0,10" Text="Kg" Foreground="#e69519" ></TextBlock>
</StackPanel>
<Button Grid.Column="4"
<StackPanel Orientation="Horizontal" Grid.Column="4">
<CheckBox IsChecked="{Binding IsCommonMaterial}" VerticalAlignment="Center" Margin="20,0,0,10"/>
<Button
Content="删除"
Width="70"
Height="30"
FontSize="14"
Margin="10,0,20,10"
Background="Transparent"
BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Center"
Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
CommandParameter="{Binding MaterialCode}"></Button>
</StackPanel>
<!--<Button Grid.Column="4"
Content="删除"
Width="100"
Height="30"
@@ -434,7 +447,7 @@
Background="Transparent"
BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Center"
Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
CommandParameter="{Binding MaterialCode}"></Button>
CommandParameter="{Binding MaterialCode}"></Button>-->
</Grid>
</ControlTemplate>
</RadioButton.Template>


Загрузка…
Отмена
Сохранить