change - plcreadchange

dep
wangsr 12 months ago
parent c0bb2f6f1a
commit 4fce1247ef

@ -122,8 +122,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDry
StepTime = entity.StepTime,
Temperature = entity.Temperature,
Speed = entity.Speed,
Currnet = entity.Currnet,
Pressure = entity.Pressure,
Currnet = entity.FeedValue,
Pressure = entity.ActTolerance,
};
return view;
}

@ -316,7 +316,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
{
return;
}
for (int i = 0; i < 6; i++)
for (int i = 0; i < 8; i++)
{
int deviceNo = i + 1;
//判断有没有done = false的设备记录如果为空就新建一条记录
@ -1385,11 +1385,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
{
if (PlcReadTemp.DM2DSF01L_Set)
{
PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[6].Speed.ToString());
PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[6].FeedValue.ToString());
}
else
{
PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[7].Speed.ToString());
PlcReadTemp.ValueWeight4 = Convert.ToInt32(DB2107.Weter[7].FeedValue.ToString());
}
}
@ -1549,34 +1549,34 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
SetControlCabinet(ControlCabinetE.PM1KDF01, PlcReadTemp.PM1KDF01_Set);
SetControlCabinet(ControlCabinetE.PM1LDF01, PlcReadTemp.PM1LDF01_Set);
SetMCLabel(LabelE.DryMode4, DB2107.Dryer[3].Mode ? "自动" : "手动", DB2107.Dryer[3].Mode ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.DryStatus4, DB2107.Dryer[3].Status ? "开启" : "关闭", DB2107.Dryer[3].Status ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.DryMode4, DB2107.Dryer[3].Mode, 1);
SetMCLabel(LabelE.DryStatus4, DB2107.Dryer[3].Status, 2);
SetMCLabel(LabelE.DryStepCode4, DB2107.Dryer[3].StepCode);
SetMCLabel(LabelE.DryStepName4, DryStepConvert(DB2107.Dryer[3].StepCode));
SetMCLabel(LabelE.DryTotalTime4, DB2107.Dryer[3].TotalTime);
SetMCLabel(LabelE.DryStepTime4, DB2107.Dryer[3].StepTime);
SetMCLabel(LabelE.GelMode7, DB2107.Gelater[6].Mode ? "自动" : "手动", DB2107.Gelater[6].Mode ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.GelStatus7, DB2107.Gelater[6].Status ? "开启" : "关闭", DB2107.Gelater[6].Status ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.GelMode7, DB2107.Gelater[6].Mode, 1);
SetMCLabel(LabelE.GelStatus7, DB2107.Gelater[6].Status, 2);
SetMCLabel(LabelE.GelStepCode7, DB2107.Gelater[6].StepCode);
SetMCLabel(LabelE.GelStepName7, GelStepConvert(DB2107.Gelater[6].StepCode));
SetMCLabel(LabelE.GelTotalTime7, DB2107.Gelater[6].TotalTime);
SetMCLabel(LabelE.GelStepTime7, DB2107.Gelater[6].StepTime);
SetMCLabel(LabelE.GelMode8, DB2107.Gelater[7].Mode ? "自动" : "手动", DB2107.Gelater[7].Mode ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.GelStatus8, DB2107.Gelater[7].Status ? "开启" : "关闭", DB2107.Gelater[7].Status ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.GelMode8, DB2107.Gelater[7].Mode, 1);
SetMCLabel(LabelE.GelStatus8, DB2107.Gelater[7].Status, 2);
SetMCLabel(LabelE.GelStepCode8, DB2107.Gelater[7].StepCode);
SetMCLabel(LabelE.GelStepName8, GelStepConvert(DB2107.Gelater[7].StepCode));
SetMCLabel(LabelE.GelTotalTime8, DB2107.Gelater[7].TotalTime);
SetMCLabel(LabelE.GelStepTime8, DB2107.Gelater[7].StepTime);
SetMCLabel(LabelE.WetMode7, DB2107.Weter[6].Mode ? "自动" : "手动", DB2107.Weter[6].Mode ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.WetStatus7, DB2107.Weter[6].Status ? "开启" : "关闭", DB2107.Weter[6].Status ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.WetMode7, DB2107.Weter[6].Mode, 1);
SetMCLabel(LabelE.WetStatus7, DB2107.Weter[6].Status, 2);
SetMCLabel(LabelE.WetStepCode7, DB2107.Weter[6].StepCode);
SetMCLabel(LabelE.WetStepName7, WetStepConvert(DB2107.Weter[6].StepCode));
SetMCLabel(LabelE.WetTotalTime7, DB2107.Weter[6].TotalTime);
SetMCLabel(LabelE.WetStepTime7, DB2107.Weter[6].StepTime);
SetMCLabel(LabelE.WetMode8, DB2107.Weter[7].Mode ? "自动" : "手动", DB2107.Weter[7].Mode ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.WetStatus8, DB2107.Weter[7].Status ? "开启" : "关闭", DB2107.Weter[7].Status ? Color.Green : Color.Yellow);
SetMCLabel(LabelE.WetMode8, DB2107.Weter[7].Mode, 1);
SetMCLabel(LabelE.WetStatus8, DB2107.Weter[7].Status, 2);
SetMCLabel(LabelE.WetStepCode8, DB2107.Weter[7].StepCode);
SetMCLabel(LabelE.WetStepName8, WetStepConvert(DB2107.Weter[7].StepCode));
SetMCLabel(LabelE.WetTotalTime8, DB2107.Weter[7].TotalTime);
@ -1782,6 +1782,18 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
obj.Text = Convert.ToString(set);
obj.ForeColor = color;
}
public void SetMCLabel(MCLabel obj, bool state, int flag)
{
if(flag == 1)
{
obj.Text = state ? "自动" : "手动";
}
else if(flag == 2)
{
obj.Text = state ? "开启" : "关闭";
}
obj.ForeColor = state ? Color.Green : Color.Yellow;
}
/// <summary>
/// 三通

@ -23,8 +23,8 @@ namespace DataBlockHelper.Entity.DB2107Entity
StepTime = PlcConnect.Instance.ByteTransform.TransInt32(content, 12);
Temperature = PlcConnect.Instance.ByteTransform.TransSingle(content, 16);
Speed = PlcConnect.Instance.ByteTransform.TransSingle(content, 20);
Currnet = PlcConnect.Instance.ByteTransform.TransSingle(content, 24);
Pressure = PlcConnect.Instance.ByteTransform.TransSingle(content, 28);
FeedValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 24);
ActTolerance = PlcConnect.Instance.ByteTransform.TransSingle(content, 28);
}
public bool Mode { get; private set; }
@ -36,8 +36,8 @@ namespace DataBlockHelper.Entity.DB2107Entity
public int StepTime { get; private set; }
public float Temperature { get; private set; }
public float Speed { get; private set; }
public float Currnet { get; private set; }
public float Pressure { get; private set; }
public float FeedValue { get; private set; }
public float ActTolerance { get; private set; }
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save