dep
wangsr 11 months ago
commit dd92dd9102

@ -360,11 +360,42 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
//设置现场重量
if(ButtonE.GelSetWeight == runtime.Sender)
{
var singE = ControlsHelper.SingleSelect(RadioE);
if (singE == 0)
{
MessageBox.Show("请选择湿混机");
}
else
{
float t = Convert.ToSingle(TextE.ManualTolerance.MCValue.ToString());
float w = Convert.ToSingle(TextE.ManualWeight.MCValue.ToString());
int no = (singE + 1) / 2;
string message = $"确认设置螺旋{no} 现场重量 {w}";
if (MessageBox.Show($"{message}", "现场参数确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
if (t < 0.1)
{
MessageBox.Show("公差不能小于0.1");
return;
}
SetValue value = new SetValue()
{
Value = w,
Toterance = t
};
PlcAutoWriteHelper.WetSetWeight(value, RadioE);
}
}
#endregion

@ -815,6 +815,49 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
public static bool WetSetWeight(SetValue value, MCRadioButtonEntity RadioE)
{
var singE = ControlsHelper.SingleSelect(RadioE);
switch (singE)
{
case 1:
case 2:
DB2105WriteHelper.WriteSetValueH1(value);
break;
case 3:
case 4:
DB2105WriteHelper.WriteSetValueH2(value);
break;
case 5:
case 6:
DB2105WriteHelper.WriteSetValueH3(value);
break;
case 7:
case 8:
DB2105WriteHelper.WriteSetValueH4(value);
break;
default:
MessageBox.Show("当前未选择产线!");
return false;
}
return true;
}
private static void ShowError()
{
string message = "称量未结束 请稍后";

@ -298,10 +298,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]);
}
ReadFlag += 1;
if (ReadFlag >= 10)
if (ReadFlag >= 20)
{
ReadFlag = 0;
var readName = UserInfo.Instance.RealName;
if (UserJudge.IsNormalUser())
{
ReportReadDb.ReadFeededDry();
@ -842,33 +842,34 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
PlcReadTemp.DV2PCP01_SetL = DB2102.DV2PCP01.SetLeft;
PlcReadTemp.DV2PCP02_SetL = DB2102.DV2PCP02.SetLeft;
PlcReadTemp.DV2PCP03_SetL = DB2102.DV2PCP03.SetLeft;
PlcReadTemp.DV2PCP04_SetL = DB2102.DV2PCP04.SetLeft;
PlcReadTemp.DV2PCP05_SetL = DB2102.DV2PCP05.SetLeft;
PlcReadTemp.DV2PCP06_SetL = DB2102.DV2PCP06.SetLeft;
PlcReadTemp.DV2PCP07_SetL = DB2102.DV2PCP07.SetLeft;
PlcReadTemp.DV2PCP08_SetL = DB2102.DV2PCP08.SetLeft;
PlcReadTemp.DV2PCP09_SetL = DB2102.DV2PCP09.SetLeft;
PlcReadTemp.DV2PCP10_SetL = DB2102.DV2PCP10.SetLeft;
PlcReadTemp.DV2PCP11_SetL = DB2102.DV2PCP11.SetLeft;
PlcReadTemp.DV2PCP12_SetL = DB2102.DV2PCP12.SetLeft;
PlcReadTemp.DV2PCP13_SetL = DB2102.DV2PCP13.SetLeft;
PlcReadTemp.DV2PCP01_SetR = DB2102.DV2PCP01.SetRight;
PlcReadTemp.DV2PCP02_SetR = DB2102.DV2PCP02.SetRight;
PlcReadTemp.DV2PCP03_SetR = DB2102.DV2PCP03.SetRight;
PlcReadTemp.DV2PCP04_SetR = DB2102.DV2PCP04.SetRight;
PlcReadTemp.DV2PCP05_SetR = DB2102.DV2PCP05.SetRight;
PlcReadTemp.DV2PCP06_SetR = DB2102.DV2PCP06.SetRight;
PlcReadTemp.DV2PCP07_SetR = DB2102.DV2PCP07.SetRight;
PlcReadTemp.DV2PCP08_SetR = DB2102.DV2PCP08.SetRight;
PlcReadTemp.DV2PCP09_SetR = DB2102.DV2PCP09.SetRight;
PlcReadTemp.DV2PCP10_SetR = DB2102.DV2PCP10.SetRight;
PlcReadTemp.DV2PCP11_SetR = DB2102.DV2PCP11.SetRight;
PlcReadTemp.DV2PCP12_SetR = DB2102.DV2PCP12.SetRight;
PlcReadTemp.DV2PCP13_SetR = DB2102.DV2PCP13.SetRight;
//位置获取的不对 不应该获取set LeftPosition
PlcReadTemp.DV2PCP01_SetL = DB2102.DV2PCP01.LeftPosition;
PlcReadTemp.DV2PCP02_SetL = DB2102.DV2PCP02.LeftPosition;
PlcReadTemp.DV2PCP03_SetL = DB2102.DV2PCP03.LeftPosition;
PlcReadTemp.DV2PCP04_SetL = DB2102.DV2PCP04.LeftPosition;
PlcReadTemp.DV2PCP05_SetL = DB2102.DV2PCP05.LeftPosition;
PlcReadTemp.DV2PCP06_SetL = DB2102.DV2PCP06.LeftPosition;
PlcReadTemp.DV2PCP07_SetL = DB2102.DV2PCP07.LeftPosition;
PlcReadTemp.DV2PCP08_SetL = DB2102.DV2PCP08.LeftPosition;
PlcReadTemp.DV2PCP09_SetL = DB2102.DV2PCP09.LeftPosition;
PlcReadTemp.DV2PCP10_SetL = DB2102.DV2PCP10.LeftPosition;
PlcReadTemp.DV2PCP11_SetL = DB2102.DV2PCP11.LeftPosition;
PlcReadTemp.DV2PCP12_SetL = DB2102.DV2PCP12.LeftPosition;
PlcReadTemp.DV2PCP13_SetL = DB2102.DV2PCP13.LeftPosition;
PlcReadTemp.DV2PCP01_SetR = DB2102.DV2PCP01.RightPosition;
PlcReadTemp.DV2PCP02_SetR = DB2102.DV2PCP02.RightPosition;
PlcReadTemp.DV2PCP03_SetR = DB2102.DV2PCP03.RightPosition;
PlcReadTemp.DV2PCP04_SetR = DB2102.DV2PCP04.RightPosition;
PlcReadTemp.DV2PCP05_SetR = DB2102.DV2PCP05.RightPosition;
PlcReadTemp.DV2PCP06_SetR = DB2102.DV2PCP06.RightPosition;
PlcReadTemp.DV2PCP07_SetR = DB2102.DV2PCP07.RightPosition;
PlcReadTemp.DV2PCP08_SetR = DB2102.DV2PCP08.RightPosition;
PlcReadTemp.DV2PCP09_SetR = DB2102.DV2PCP09.RightPosition;
PlcReadTemp.DV2PCP10_SetR = DB2102.DV2PCP10.RightPosition;
PlcReadTemp.DV2PCP11_SetR = DB2102.DV2PCP11.RightPosition;
PlcReadTemp.DV2PCP12_SetR = DB2102.DV2PCP12.RightPosition;
PlcReadTemp.DV2PCP13_SetR = DB2102.DV2PCP13.RightPosition;
PlcReadTemp.DV2PCP01_AlarmL = DB2102.DV2PCP01.AlarmLeftPosition;
PlcReadTemp.DV2PCP02_AlarmL = DB2102.DV2PCP02.AlarmLeftPosition;

@ -133,17 +133,17 @@ namespace Mesnac.Action.ChemicalWeighing.Report
private static void FeededDry(int deviceno, ReportDosEntity entity)
{
DB2107WriteHelper.CleanSpare(deviceno);
int no = deviceno * 2;
if (entity.eqNo == 1)
{
no = no - 1;
}
var actValue = Convert.ToInt32(entity.actValue);
string logName = $"螺旋{deviceno}向湿混机 [{no}] 投料 {actValue}";
string logName = $"用户[{UserInfo.Instance.UserName}] 螺旋{deviceno}向湿混机 [{no}] 投料 {actValue}";
LoggingService<ReportReadDb>.Info(logName);
LjLogControl.ManualLogControl(logName, actValue, 4, no, 2);
DB2107WriteHelper.CleanSpare(deviceno);
}
public static void ReadReport()

Loading…
Cancel
Save