|
|
|
|
using HslCommunication.Profinet.Siemens;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Entity;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Entity.PptPlan;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing
|
|
|
|
|
{
|
|
|
|
|
public class PlcWeighbridgePlanHelper
|
|
|
|
|
{
|
|
|
|
|
public static event EventHandler OnUpdateRjPlanStateFromPlc;
|
|
|
|
|
#region 事件定义
|
|
|
|
|
|
|
|
|
|
public static object sender = null;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 更新任务状态
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新任务状态
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static void ExecPlanState()
|
|
|
|
|
{
|
|
|
|
|
bool result = true;
|
|
|
|
|
string planId = string.Empty;
|
|
|
|
|
|
|
|
|
|
#region 获取当前计划号,判断当前计划状态
|
|
|
|
|
//读取配方编码获取配方物料所在的工位,根据工位查询状态
|
|
|
|
|
//当PLC状态未"1" PLC准备好 上位机读取数据
|
|
|
|
|
//存盘完成后上位机需要将PLC点位置为2
|
|
|
|
|
//点位DBW0 设定PLC需要执行次数,点位DBW212 为计量秤称量批次,可以此判断计划是否完成
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
result = false;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//SavePlcData();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
finally { result = true; }
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 更新溶剂状态
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新溶剂状态
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void UpdateWeighbridge1PlanData()
|
|
|
|
|
{
|
|
|
|
|
//状态1,存盘信号
|
|
|
|
|
SiemensS7Net plc = PlcConnect.Instance;
|
|
|
|
|
int status = plc.ReadInt16("DB110.DBW1756").Content;//报表准备好
|
|
|
|
|
Console.WriteLine($"报表准备状态:{status}");
|
|
|
|
|
if (status == 1)
|
|
|
|
|
{
|
|
|
|
|
ReadMaterData1();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新溶剂状态
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void UpdateWeighbridge2PlanData()
|
|
|
|
|
{
|
|
|
|
|
//状态1,存盘信号
|
|
|
|
|
SiemensS7Net plc = PlcConnect.Instance;
|
|
|
|
|
int status = plc.ReadInt16("DB111.DBW1756").Content;//报表准备好
|
|
|
|
|
Console.WriteLine($"报表准备状态:{status}");
|
|
|
|
|
if (status == 1)
|
|
|
|
|
{
|
|
|
|
|
ReadMaterData2();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 1号地磅
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 1号地磅
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="serial"></param>
|
|
|
|
|
public static void ReadMaterData1()
|
|
|
|
|
{
|
|
|
|
|
string RMatCode = string.Empty;
|
|
|
|
|
decimal RActWeight = 0M;
|
|
|
|
|
decimal RActTol = 0M;
|
|
|
|
|
decimal RRate = 0M;
|
|
|
|
|
decimal RPureWeight = 0M;
|
|
|
|
|
decimal XTotalWeigh = 0M;
|
|
|
|
|
decimal XTotalError = 0M;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var list = SolventPlanHelper.GetPlan();
|
|
|
|
|
if (list==null||list.Count == 0) return;
|
|
|
|
|
SiemensS7Net plc = PlcConnect.Instance;
|
|
|
|
|
int reqSerial = plc.ReadInt16("DB110.DBW22").Content;//设定批次
|
|
|
|
|
int batch = plc.ReadInt16("DB110.DBW2").Content;//完成数量
|
|
|
|
|
for (int i = 1; i <= 50; i++)
|
|
|
|
|
{
|
|
|
|
|
#region 读取
|
|
|
|
|
switch (i)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW636").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW638").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW640").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW642").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW644").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW646").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW648").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW650").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW652").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW654").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW656").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW658").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW660").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW662").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW664").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW666").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW668").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW670").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW672").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW674").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW676").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW678").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW680").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW682").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW684").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW686").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW688").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW690").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW692").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW694").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW696").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW698").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW700").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW702").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW704").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW706").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW708").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW710").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW712").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW714").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW716").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW718").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW720").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW722").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW724").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 10:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW726").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW728").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW730").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW732").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW734").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 11:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW736").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW738").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW740").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW742").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW744").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 12:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW746").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW748").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW750").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW752").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW754").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 13:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW756").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW758").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW760").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW762").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW764").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 14:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW766").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW768").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW770").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW772").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW774").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 15:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW776").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW778").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW780").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW782").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW784").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 16:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW786").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW788").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW790").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW792").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW794").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 17:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW796").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW798").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW800").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW802").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW804").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 18:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW806").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW808").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW810").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW812").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW814").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 19:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW816").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW818").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW820").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW822").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW824").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 20:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW826").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW828").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW830").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW832").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW834").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 21:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW836").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW838").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW840").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW842").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW844").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 22:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW826").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW828").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW830").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW832").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW834").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 23:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW856").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW858").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW860").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW862").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW864").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 24:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW866").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW868").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW870").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW872").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW874").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 25:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW876").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW878").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW880").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW882").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW884").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 26:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW886").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW888").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW890").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW892").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW894").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 27:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW896").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW898").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW900").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW902").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW904").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 28:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW906").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW908").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW910").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW912").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW914").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 29:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW916").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW918").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW920").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW922").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW924").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 30:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW926").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW928").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW930").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW932").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW934").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 31:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW936").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW938").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW940").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW942").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW944").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 32:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW946").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW948").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW950").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW952").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW954").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 33:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW956").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW958").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW960").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW962").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW964").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 34:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW966").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW968").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW970").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW972").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW974").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 35:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW976").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW978").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW980").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW982").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW984").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 36:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW986").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW988").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW990").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW992").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW994").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 37:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW996").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW998").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1000").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1002").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1004").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 38:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1006").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1008").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1010").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1012").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1014").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 39:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1016").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1018").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1020").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1022").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1024").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 40:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1026").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1028").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1030").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1032").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1034").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 41:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1036").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1038").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1040").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1042").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1044").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 42:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1046").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1048").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1050").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1052").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1054").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 43:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1056").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1058").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1060").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1062").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1064").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 44:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1066").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1068").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1070").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1072").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1074").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 45:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1076").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1078").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1080").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1082").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1084").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 46:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1086").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1088").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1090").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1092").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1094").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 47:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1096").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1098").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1100").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1102").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1104").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 48:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1106").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1108").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1110").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1112").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1114").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 49:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1116").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1118").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1120").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1122").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1124").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 50:
|
|
|
|
|
RMatCode = plc.ReadString("DB110.DBW1126").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1128").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1130").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1132").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB110.DBW1134").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
#region 剩余以后在加,先添加50种
|
|
|
|
|
//case 51:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData50_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 52:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData51_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 53:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData52_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 54:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData53_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 55:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData54_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 56:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData55_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 57:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData56_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 58:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData57_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 59:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData58_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 60:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData59_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 61:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData60_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 62:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData61_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 63:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData62_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 64:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData63_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 65:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData64_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 66:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData65_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 67:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData66_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 68:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData67_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 69:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData68_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 70:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData69_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 71:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData70_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 72:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData71_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 73:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData72_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 74:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData73_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 75:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData74_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 76:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData75_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 77:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData76_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 78:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData77_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 79:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData78_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 80:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData79_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 81:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData80_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 82:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData81_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 83:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData82_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 84:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData83_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 85:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData84_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 86:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData85_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 87:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData86_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 88:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData87_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 89:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData88_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 90:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData89_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 91:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData90_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 92:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData91_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 93:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData92_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 94:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData93_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 95:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData94_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 96:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData95_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 97:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData96_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 98:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData97_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 99:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData98_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 100:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData99_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
#endregion
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
if (RActWeight == 0) continue;
|
|
|
|
|
XTotalWeigh = XTotalWeigh + RActWeight;
|
|
|
|
|
XTotalError = XTotalError + RActTol;
|
|
|
|
|
|
|
|
|
|
int materialNo = plc.ReadInt16("DB110.DBW1758").Content;///称量物料序号,判断物料码是不是我传入的物料码,如果是则没有问题
|
|
|
|
|
var plan = list.FirstOrDefault(d => d.MID == materialNo);
|
|
|
|
|
if (plan == null)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
decimal drate = Convert.ToDecimal(RRate / 10);
|
|
|
|
|
decimal rPureWeight = Convert.ToDecimal(RPureWeight);
|
|
|
|
|
SaveToHwPlan(plan, batch, i.ToString(), RActWeight, RActTol, drate, rPureWeight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var rtplan = list.FirstOrDefault();
|
|
|
|
|
var finishedNum = plc.ReadInt16("DB110.DBW2").Content;
|
|
|
|
|
decimal totalWeight = rtplan.Plan_TotalWeight + XTotalWeigh;
|
|
|
|
|
decimal totalError = rtplan.Plan_TotalError + RActTol;
|
|
|
|
|
//更新计划完成状态
|
|
|
|
|
if (finishedNum == rtplan.Plan_Num)
|
|
|
|
|
{
|
|
|
|
|
bool result= SolventPlanHelper.UpdatePlan(rtplan.Plan_Id, finishedNum, 8, totalWeight, totalError);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
//完成后写入清空信号
|
|
|
|
|
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.solvent_status, new object[] { 1 });//存盘以后置为1 需要加料
|
|
|
|
|
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.solvent_reportReady, new object[] { 0 });
|
|
|
|
|
plc.Write("DB110.DBW1756", short.Parse("0"));
|
|
|
|
|
//刷新前端 计划
|
|
|
|
|
if (OnUpdateRjPlanStateFromPlc != null)
|
|
|
|
|
{
|
|
|
|
|
OnUpdateRjPlanStateFromPlc(sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bool result = SolventPlanHelper.UpdateRealNum(rtplan.Plan_Id, finishedNum, totalWeight, totalError);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
plc.Write("DB110.DBW1756", short.Parse("0"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"发生异常,请联系系统管理员!异常原因:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
GC.Collect();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 2号地磅
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 1号地磅
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="serial"></param>
|
|
|
|
|
public static void ReadMaterData2()
|
|
|
|
|
{
|
|
|
|
|
string RMatCode = string.Empty;
|
|
|
|
|
decimal RActWeight = 0M;
|
|
|
|
|
decimal RActTol = 0M;
|
|
|
|
|
decimal RRate = 0M;
|
|
|
|
|
decimal RPureWeight = 0M;
|
|
|
|
|
decimal XTotalWeigh = 0M;
|
|
|
|
|
decimal XTotalError = 0M;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var list = SolventPlanHelper.GetPlan2();
|
|
|
|
|
if (list == null || list.Count == 0) return;
|
|
|
|
|
SiemensS7Net plc = PlcConnect.Instance;
|
|
|
|
|
int reqSerial = plc.ReadInt16("DB111.DBW22").Content;//设定批次
|
|
|
|
|
int batch = plc.ReadInt16("DB111.DBW2").Content;//完成数量
|
|
|
|
|
for (int i = 1; i <= 50; i++)
|
|
|
|
|
{
|
|
|
|
|
#region 读取
|
|
|
|
|
switch (i)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW636").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW638").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW640").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW642").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW644").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW646").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW648").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW650").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW652").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW654").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW656").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW658").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW660").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW662").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW664").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW666").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW668").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW670").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW672").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW674").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW676").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW678").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW680").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW682").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW684").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW686").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW688").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW690").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW692").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW694").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW696").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW698").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW700").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW702").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW704").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW706").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW708").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW710").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW712").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW714").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW716").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW718").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW720").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW722").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW724").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 10:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW726").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW728").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW730").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW732").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW734").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 11:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW736").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW738").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW740").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW742").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW744").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 12:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW746").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW748").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW750").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW752").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW754").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 13:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW756").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW758").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW760").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW762").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW764").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 14:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW766").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW768").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW770").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW772").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW774").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 15:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW776").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW778").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW780").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW782").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW784").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 16:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW786").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW788").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW790").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW792").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW794").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 17:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW796").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW798").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW800").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW802").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW804").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 18:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW806").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW808").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW810").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW812").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW814").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 19:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW816").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW818").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW820").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW822").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW824").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 20:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW826").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW828").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW830").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW832").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW834").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 21:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW836").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW838").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW840").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW842").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW844").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 22:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW826").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW828").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW830").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW832").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW834").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 23:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW856").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW858").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW860").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW862").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW864").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 24:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW866").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW868").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW870").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW872").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW874").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 25:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW876").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW878").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW880").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW882").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW884").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 26:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW886").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW888").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW890").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW892").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW894").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 27:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW896").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW898").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW900").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW902").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW904").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 28:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW906").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW908").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW910").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW912").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW914").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 29:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW916").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW918").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW920").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW922").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW924").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 30:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW926").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW928").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW930").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW932").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW934").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 31:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW936").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW938").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW940").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW942").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW944").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 32:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW946").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW948").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW950").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW952").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW954").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 33:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW956").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW958").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW960").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW962").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW964").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 34:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW966").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW968").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW970").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW972").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW974").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 35:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW976").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW978").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW980").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW982").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW984").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 36:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW986").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW988").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW990").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW992").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW994").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 37:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW996").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW998").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1000").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1002").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1004").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 38:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1006").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1008").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1010").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1012").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1014").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 39:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1016").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1018").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1020").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1022").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1024").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 40:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1026").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1028").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1030").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1032").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1034").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 41:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1036").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1038").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1040").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1042").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1044").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 42:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1046").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1048").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1050").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1052").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1054").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 43:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1056").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1058").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1060").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1062").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1064").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 44:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1066").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1068").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1070").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1072").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1074").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 45:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1076").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1078").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1080").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1082").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1084").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 46:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1086").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1088").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1090").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1092").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1094").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 47:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1096").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1098").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1100").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1102").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1104").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 48:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1106").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1108").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1110").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1112").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1114").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 49:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1116").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1118").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1120").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1122").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1124").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
case 50:
|
|
|
|
|
RMatCode = plc.ReadString("DB111.DBW1126").Content;
|
|
|
|
|
RActWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1128").Content) / 10;
|
|
|
|
|
RActTol = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1130").Content) / 10;
|
|
|
|
|
RRate = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1132").Content) / 10;
|
|
|
|
|
RPureWeight = Convert.ToDecimal(plc.ReadInt16("DB111.DBW1134").Content) / 10;
|
|
|
|
|
break;
|
|
|
|
|
#region 剩余以后在加,先添加50种
|
|
|
|
|
//case 51:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData50_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData50_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 52:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData51_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData51_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 53:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData52_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData52_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 54:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData53_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData53_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 55:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData54_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData54_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 56:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData55_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData55_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 57:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData56_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData56_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 58:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData57_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData57_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 59:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData58_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData58_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 60:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData59_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData59_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 61:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData60_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData60_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 62:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData61_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData61_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 63:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData62_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData62_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 64:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData63_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData63_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 65:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData64_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData64_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 66:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData65_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData65_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 67:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData66_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData66_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 68:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData67_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData67_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 69:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData68_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData68_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 70:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData69_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData69_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 71:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData70_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData70_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 72:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData71_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData71_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 73:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData72_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData72_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 74:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData73_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData73_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 75:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData74_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData74_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 76:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData75_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData75_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 77:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData76_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData76_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 78:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData77_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData77_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 79:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData78_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData78_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 80:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData79_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData79_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 81:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData80_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData80_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 82:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData81_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData81_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 83:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData82_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData82_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 84:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData83_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData83_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 85:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData84_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData84_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 86:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData85_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData85_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 87:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData86_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData86_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 88:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData87_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData87_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 89:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData88_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData88_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 90:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData89_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData89_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 91:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData90_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData90_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 92:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData91_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData91_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 93:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData92_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData92_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 94:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData93_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData93_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 95:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData94_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData94_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 96:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData95_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData95_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 97:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData96_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData96_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 98:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData97_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData97_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 99:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData98_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData98_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
//case 100:
|
|
|
|
|
// RMatCode = BasePlcHelper.Instance.solvent_SaveData99_RMatCode1.NowValue.ToString();
|
|
|
|
|
// RActWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RActWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RActTol = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RActTol_1.NowValue.ToInt()) / 10;//实际差值
|
|
|
|
|
// RRate = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RRate_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// RPureWeight = Convert.ToDecimal(BasePlcHelper.Instance.solvent_SaveData99_RPureWeight_1.NowValue.ToInt()) / 10;
|
|
|
|
|
// break;
|
|
|
|
|
#endregion
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
if (RActWeight == 0) continue;
|
|
|
|
|
XTotalWeigh = XTotalWeigh + RActWeight;
|
|
|
|
|
XTotalError = XTotalError + RActTol;
|
|
|
|
|
|
|
|
|
|
int materialNo = plc.ReadInt16("DB111.DBW1758").Content;///称量物料序号,判断物料码是不是我传入的物料码,如果是则没有问题
|
|
|
|
|
var plan = list.FirstOrDefault(d => d.MID == materialNo);
|
|
|
|
|
if (plan == null)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
decimal drate = Convert.ToDecimal(RRate / 10);
|
|
|
|
|
decimal rPureWeight = Convert.ToDecimal(RPureWeight);
|
|
|
|
|
SaveToHwPlan(plan, batch, i.ToString(), RActWeight, RActTol, drate, rPureWeight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var rtplan = list.FirstOrDefault();
|
|
|
|
|
var finishedNum = plc.ReadInt16("DB111.DBW2").Content;
|
|
|
|
|
decimal totalWeight = rtplan.Plan_TotalWeight + XTotalWeigh;
|
|
|
|
|
decimal totalError = rtplan.Plan_TotalError + RActTol;
|
|
|
|
|
//更新计划完成状态
|
|
|
|
|
if (finishedNum == rtplan.Plan_Num)
|
|
|
|
|
{
|
|
|
|
|
bool result = SolventPlanHelper.UpdatePlan(rtplan.Plan_Id, finishedNum, 8, totalWeight, totalError);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
//完成后写入清空信号
|
|
|
|
|
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.solvent_status, new object[] { 1 });//存盘以后置为1 需要加料
|
|
|
|
|
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.solvent_reportReady, new object[] { 0 });
|
|
|
|
|
plc.Write("DB111.DBW1756", short.Parse("0"));
|
|
|
|
|
//刷新前端 计划
|
|
|
|
|
if (OnUpdateRjPlanStateFromPlc != null)
|
|
|
|
|
{
|
|
|
|
|
OnUpdateRjPlanStateFromPlc(sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bool result = SolventPlanHelper.UpdateRealNum(rtplan.Plan_Id, finishedNum, totalWeight, totalError);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
plc.Write("DB111.DBW1756", short.Parse("0"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"发生异常,请联系系统管理员!异常原因:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
GC.Collect();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 保存计划执行数据
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存计划执行数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item"></param>
|
|
|
|
|
/// <param name="batch"></param>
|
|
|
|
|
/// <param name="RMatCode"></param>
|
|
|
|
|
/// <param name="realWeight"></param>
|
|
|
|
|
/// <param name="realError"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool SaveToHwPlan(MetagePlan item, int batch, string RMatCode, decimal realWeight, decimal realError, decimal RRate, decimal RPureWeight)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Hw_plan plan = SolventPlanHelper.GetRtPlan(item.Plan_Id, batch);
|
|
|
|
|
if (plan!=null&&!string.IsNullOrEmpty(plan.Plan_Id))
|
|
|
|
|
{
|
|
|
|
|
decimal total_Weight = plan == null ? 0 :plan.Total_Weight;
|
|
|
|
|
decimal total_Error = plan == null ? 0 : plan.Total_Error;
|
|
|
|
|
decimal totalWeight = total_Weight + realWeight;
|
|
|
|
|
decimal totalError = total_Error + realError;
|
|
|
|
|
|
|
|
|
|
//保存物料
|
|
|
|
|
Hw_weigh weigh = new Hw_weigh();
|
|
|
|
|
weigh.Dosing_ID = plan == null ? "0" : plan.Dosing_Id;
|
|
|
|
|
weigh.Plan_ID = item.Plan_Id;
|
|
|
|
|
weigh.Recipe_ID = item.Recipe_ID;
|
|
|
|
|
weigh.Material_ID = item.MaterialID;
|
|
|
|
|
weigh.Material_Name = item.Material_name;
|
|
|
|
|
weigh.Set_Weight = item.Set_Weight;
|
|
|
|
|
weigh.Set_Error = item.Set_Error;
|
|
|
|
|
weigh.Real_Weight = realWeight;
|
|
|
|
|
weigh.Real_Error = realError;
|
|
|
|
|
weigh.Dosing_ID = batch.ToString();//标记为批次
|
|
|
|
|
weigh.EndTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
weigh.RRate = RRate;
|
|
|
|
|
weigh.RPureWeight = RPureWeight;
|
|
|
|
|
|
|
|
|
|
plan.Total_Weight = totalWeight;
|
|
|
|
|
plan.Total_Error = totalError;
|
|
|
|
|
|
|
|
|
|
var result = SolventPlanHelper.SaveToSolvenDB2(plan, weigh);
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SiemensS7Net plc = PlcConnect.Instance;
|
|
|
|
|
//保存计划
|
|
|
|
|
Hw_plan hwPlan = new Hw_plan();
|
|
|
|
|
hwPlan.Plan_Id = item.Plan_Id;
|
|
|
|
|
hwPlan.Dosing_Id = plan == null ? "0" : item.Dosing_Id;
|
|
|
|
|
hwPlan.Plan_Serial = item.Plan_Serial;
|
|
|
|
|
hwPlan.Recipe_ID = item.Recipe_ID;
|
|
|
|
|
hwPlan.Recipe_Name = item.Recipe_Name;
|
|
|
|
|
hwPlan.Version = item.Version;
|
|
|
|
|
hwPlan.Plan_Num = item.Plan_Num;
|
|
|
|
|
hwPlan.Real_Num = plc.ReadInt16("DB110.DBW2").Content;
|
|
|
|
|
hwPlan.Shift_Id = item.Shift_Id;
|
|
|
|
|
hwPlan.Shift_Class = item.Shift_Class;
|
|
|
|
|
hwPlan.Total_Weight = realWeight;
|
|
|
|
|
hwPlan.Total_Error = realError;
|
|
|
|
|
hwPlan.IsRetransmission = item.IsRetransmission;
|
|
|
|
|
hwPlan.Retransmission_Num = item.Retransmission_Num;
|
|
|
|
|
|
|
|
|
|
//保存物料
|
|
|
|
|
Hw_weigh weigh = new Hw_weigh();
|
|
|
|
|
|
|
|
|
|
weigh.Plan_ID = item.Plan_Id;
|
|
|
|
|
weigh.Recipe_ID = item.Recipe_ID;
|
|
|
|
|
weigh.Material_ID = item.MaterialID;
|
|
|
|
|
weigh.Material_Name = item.Material_name;
|
|
|
|
|
weigh.Set_Weight = item.Set_Weight;
|
|
|
|
|
weigh.Set_Error = item.Set_Error;
|
|
|
|
|
weigh.Real_Weight = realWeight;
|
|
|
|
|
weigh.Real_Error = realError;
|
|
|
|
|
weigh.Dosing_ID = batch.ToString();//改为记录批次
|
|
|
|
|
weigh.EndTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
weigh.RRate = RRate;
|
|
|
|
|
weigh.RPureWeight = RPureWeight;
|
|
|
|
|
|
|
|
|
|
var addPlan = SolventPlanHelper.SaveToSolvenDB(hwPlan, weigh);
|
|
|
|
|
if (addPlan)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex.Message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|