确认设置螺旋

dep
我叫锄头 11 months ago
parent b3ffd6a73c
commit 6378b8faa9

@ -360,9 +360,40 @@ 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);
}
}

@ -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 = "称量未结束 请稍后";

Loading…
Cancel
Save