RunStatus

dep
我叫锄头 12 months ago
parent 0d00e4ccff
commit d6fba409f8

@ -739,16 +739,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 1: case 1:
case 2: case 2:
var h1 = dB2105.H1; var h1 = dB2105.H1;
if (h1.FeedStartR || h1.FeedStartL) if (h1.RunStatus)
{ {
if (h1.FeedStartL) ShowError();
{
Show(1, "左");
}
else
{
Show(1, "右");
}
return; return;
} }
break; break;
@ -756,16 +749,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 3: case 3:
case 4: case 4:
var h2 = dB2105.H2; var h2 = dB2105.H2;
if (h2.FeedStartR || h2.FeedStartL) if (h2.RunStatus)
{ {
if (h2.FeedStartL) ShowError();
{
Show(2, "左");
}
else
{
Show(2, "右");
}
return; return;
} }
break; break;
@ -773,16 +759,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 5: case 5:
case 6: case 6:
var h3 = dB2105.H3; var h3 = dB2105.H3;
if (h3.FeedStartR || h3.FeedStartL) if (h3.RunStatus)
{ {
if (h3.FeedStartL) ShowError();
{
Show(3, "左");
}
else
{
Show(3, "右");
}
return; return;
} }
break; break;
@ -791,16 +770,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 7: case 7:
case 8: case 8:
var h4 = dB2105.H4; var h4 = dB2105.H4;
if (h4.FeedStartR || h4.FeedStartL) if (h4.RunStatus)
{ {
if (h4.FeedStartL) ShowError();
{
Show(4, "左");
}
else
{
Show(4, "右");
}
return; return;
} }
break; break;
@ -877,9 +849,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
private static void Show(int no,string zuo) private static void ShowError()
{ {
string message = no + $"号{zuo}称量未结束"; string message = "称量未结束 请稍后";
MessageBox.Show(message); MessageBox.Show(message);
} }

@ -221,6 +221,7 @@ namespace DataBlockHelper.DBHelpers
manual.FeedStartL = first.GetBit(0); manual.FeedStartL = first.GetBit(0);
manual.FeedStartR = first.GetBit(1); manual.FeedStartR = first.GetBit(1);
manual.FeedStop = first.GetBit(2); manual.FeedStop = first.GetBit(2);
manual.RunStatus = first.GetBit(3);
manual.SetValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 2); manual.SetValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 2);
manual.Toterance = PlcConnect.Instance.ByteTransform.TransSingle(content, 6); manual.Toterance = PlcConnect.Instance.ByteTransform.TransSingle(content, 6);
@ -256,6 +257,9 @@ namespace DataBlockHelper.DBHelpers
public bool FeedStop { get; set; } public bool FeedStop { get; set; }
public bool RunStatus { get; set; }
public float SetValue { get; set; } public float SetValue { get; set; }

Loading…
Cancel
Save