|
|
|
@ -298,7 +298,7 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
obj_sidePanel.plc.WriteInt16("D6022", SmProductId.ToString());//产品号
|
|
|
|
|
string processNumber = GetProcessNumberBy(planInfo.MaterialCode);
|
|
|
|
|
obj_sidePanel.plc.WriteString("D6010", planInfo.MaterialSpecificatons);
|
|
|
|
|
// int surplus = planInfo.PlanAmount-planInfo.CompleteAmount;
|
|
|
|
|
//int surplus = planInfo.PlanAmount-planInfo.CompleteAmount;
|
|
|
|
|
int surplus = planInfo.PlanAmount;
|
|
|
|
|
obj_sidePanel.plc.WriteInt16("D6020", surplus.ToString());
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
@ -602,15 +602,12 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
//{
|
|
|
|
|
if (obj_backPanel != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021
|
|
|
|
|
obj_backPanel.plc.WriteString("D4000", planInfo.TaskCode);
|
|
|
|
|
obj_backPanel.plc.WriteInt16("D4022", productId.ToString());
|
|
|
|
|
string processNumber = GetProcessNumberBy(planInfo.MaterialCode);
|
|
|
|
|
obj_backPanel.plc.WriteString("D4010", planInfo.MaterialSpecificatons);
|
|
|
|
|
// int surplus = planInfo.PlanAmount - planInfo.CompleteAmount;//剩余计划数量
|
|
|
|
|
//int surplus = planInfo.PlanAmount - planInfo.CompleteAmount;//剩余计划数量
|
|
|
|
|
int surplus = planInfo.PlanAmount;//剩余计划数量
|
|
|
|
|
obj_backPanel.plc.WriteInt16("D4020", surplus.ToString());
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
@ -1328,7 +1325,7 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
{
|
|
|
|
|
if (obj_backPanel != null)
|
|
|
|
|
{
|
|
|
|
|
//计划编号10个字:D6000-D6009、物料编号10个字:D6010-D6019、计划数量1个字:D6020、应答字1个字D6021
|
|
|
|
|
//计划编号10个字:D4000-D4009、物料编号10个字:D4010-D4019、计划数量1个字:D4020、应答字1个字D4021
|
|
|
|
|
obj_backPanel.plc.WriteString("D4000", planInfo.TaskCode);
|
|
|
|
|
string processNumber = GetProcessNumberBy(planInfo.MaterialCode);
|
|
|
|
|
obj_backPanel.plc.WriteString("D4010", planInfo.MaterialSpecificatons);
|
|
|
|
@ -1476,6 +1473,9 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
lastComplateAmount = backPanelComplates.First().CompleteAmount;//最新的完工数量
|
|
|
|
|
backPanelComplate.OutPutAmount = complateAmount - lastComplateAmount;//实际产量
|
|
|
|
|
sumComplateAmount = backPanelComplates.Sum(x => x.OutPutAmount) + backPanelComplate.OutPutAmount; //计划总产量
|
|
|
|
|
|
|
|
|
|
//sumComplateAmount = sidePanelComplates.Sum(x => x.OutPutAmount) + sidePanelComplate.OutPutAmount;
|
|
|
|
|
//sumComplateAmount = complateAmount; // 改为plc读取的数量
|
|
|
|
|
if (backPanelComplate.OutPutAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
Thread.Sleep(5000);
|
|
|
|
|