add - 输送界面添加押送管状态显示 暂未连接PLC 完善报警

dep_deliver
wangsr 11 months ago
parent 83267cf4ff
commit 656588f80f

@ -38,9 +38,12 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
DB91Helper DB91 = new DB91Helper();
DB137Helper DB137 = new DB137Helper();
DB120Helper DB120 = new DB120Helper();
DB141Helper DB141 = new DB141Helper();
byte[] b1;
byte[] b90; //db1/90的byte数组
byte[] b90; //db1/90/91的byte数组
byte[] b91;
byte[] b141;
/// <summary>
/// 所有Alarm点位
@ -722,6 +725,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
{
b1 = DB1.bytes;
b90 = DB90.bytes;
b91 = DB91.bytes;
b141 = DB141.bytes;
StringBuilder sb = new StringBuilder();
@ -742,6 +747,20 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
sb.Append(rows["Alarm_Cn_Info"].ToString());
sb.Append(@" \ ");
}
else if ((int)rows["Alarm_Block"] == 91 && b91[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
{
sb.Append(rows["Alarm_Other_Info"].ToString());
sb.Append(" ");
sb.Append(rows["Alarm_Cn_Info"].ToString());
sb.Append(@" \ ");
}
else if ((int)rows["Alarm_Block"] == 141 && b141[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true)
{
sb.Append(rows["Alarm_Other_Info"].ToString());
sb.Append(" ");
sb.Append(rows["Alarm_Cn_Info"].ToString());
sb.Append(@" \ ");
}
}
string str = sb.ToString();

@ -64,6 +64,31 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity
public MCLabel PR1PCP02 { get; set; }
public MCLabel PR1PCP03 { get; set; }
public MCLabel PFTStatus1 { get; set; }
public MCLabel PFTStatus2 { get; set; }
public MCLabel PFTStatus3 { get; set; }
public MCLabel PFTStatus4 { get; set; }
public MCLabel PFTStatus5 { get; set; }
public MCLabel PFTStatus6 { get; set; }
public MCLabel PFTStepCode1 { get; set; }
public MCLabel PFTStepCode2 { get; set; }
public MCLabel PFTStepCode3 { get; set; }
public MCLabel PFTStepCode4 { get; set; }
public MCLabel PFTStepCode5 { get; set; }
public MCLabel PFTStepCode6 { get; set; }
public MCLabel PFTStepName1 { get; set; }
public MCLabel PFTStepName2 { get; set; }
public MCLabel PFTStepName3 { get; set; }
public MCLabel PFTStepName4 { get; set; }
public MCLabel PFTStepName5 { get; set; }
public MCLabel PFTStepName6 { get; set; }
public MCLabel PFTStepTime1 { get; set; }
public MCLabel PFTStepTime2 { get; set; }
public MCLabel PFTStepTime3 { get; set; }
public MCLabel PFTStepTime4 { get; set; }
public MCLabel PFTStepTime5 { get; set; }
public MCLabel PFTStepTime6 { get; set; }
}
internal class LjSwitchEntity

@ -21,7 +21,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverPressureSetting
ConveyorTimer conveyorTimerB = new ConveyorTimer();
ConveyorTimer conveyorTimerC = new ConveyorTimer();
string Alarm = "组数值超出取值范围大于0小于50";
string Alarm = "组数值超出取值范围大于0小于200";
if (!SetValueWithJudge(conveyorA,
Convert.ToSingle(BoxE.ASetValue1.MCValue.ToString()),

@ -192,6 +192,12 @@ namespace Mesnac.Action.ChemicalWeighing.Util
obj.Text = Convert.ToString(set);
obj.ForeColor = color;
}
/// <summary>
/// 文本标签布尔转换
/// </summary>
/// <param name="obj"></param>
/// <param name="state"></param>
/// <param name="flag">1为自动手动、2为启动停止</param>
public static void SetMCLabel(MCLabel obj, bool state, int flag)
{
if (flag == 1)

@ -0,0 +1,19 @@
using HslCommunication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataBlockHelper.DBHelpers
{
public class DB141Helper : DBHelper
{
public DB141Helper()
{
bytes = PlcConnect.Instance.Read("DB141.0.0", 7).Content;
}
}
}

@ -54,6 +54,7 @@
<Compile Include="DBHelpers\DB120WriteHelp.cs" />
<Compile Include="DBHelpers\DB137Helper.cs" />
<Compile Include="DBHelpers\DB137WriterHelper.cs" />
<Compile Include="DBHelpers\DB141Helper.cs" />
<Compile Include="DBHelpers\DB1Helper.cs" />
<Compile Include="DBHelpers\DB2102Helper.cs" />
<Compile Include="DBHelpers\DB2103Helper.cs" />

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