糊化机添加自动手动按钮

dep
我叫锄头 11 months ago
parent 5e52da95b9
commit b318a0d47a

@ -115,6 +115,18 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity
public HslLanternSimple FeededPDG8 { get; set; } public HslLanternSimple FeededPDG8 { get; set; }
public HslLanternSimple FeededCW1 { get; set; }
public HslLanternSimple FeededCW2 { get; set; }
public HslLanternSimple FeededCW3 { get; set; }
public HslLanternSimple FeededCW4 { get; set; }
public HslLanternSimple FeededCW5 { get; set; }
public HslLanternSimple FeededCW6 { get; set; }
public HslLanternSimple FeededCW7 { get; set; }
public HslLanternSimple FeededCW8 { get; set; }
} }
public class HslSwitchEntity public class HslSwitchEntity

@ -42,6 +42,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
private DB2103Helper DB2103 = new DB2103Helper(); private DB2103Helper DB2103 = new DB2103Helper();
private DB2107Helper DB2107 = new DB2107Helper(); private DB2107Helper DB2107 = new DB2107Helper();
private DB2119Helper DB2119 = new DB2119Helper(); private DB2119Helper DB2119 = new DB2119Helper();
private ConcurrentDictionary<string, object> conCurrentCache = new ConcurrentDictionary<string, object>(); private ConcurrentDictionary<string, object> conCurrentCache = new ConcurrentDictionary<string, object>();
private Timer timer; private Timer timer;
@ -420,6 +421,15 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG7, ch.G7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG7, ch.G7);
ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG8, ch.G8); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG8, ch.G8);
var db2105=new DB2105Helper();
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW1, db2105.FeededCW1);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW2, db2105.FeededCW2);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW3, db2105.FeededCW3);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW4, db2105.FeededCW4);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW5, db2105.FeededCW5);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW6, db2105.FeededCW6);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW7, db2105.FeededCW7);
ControlsHelper.SetHslFeededCW1(HslLanternSimpleE.FeededCW8, db2105.FeededCW8);
ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM1, MinAnPlc.ReqD1); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM1, MinAnPlc.ReqD1);

@ -372,6 +372,23 @@ namespace Mesnac.Action.ChemicalWeighing.Util
} }
} }
//FeededCW1
public static void SetHslFeededCW1(HslLanternSimple lanternSimple, bool su)
{
if (su == true)
{
lanternSimple.LanternBackground = Color.Yellow;
}
else
{
lanternSimple.LanternBackground = Color.LimeGreen;
}
}
/// <summary> /// <summary>
/// 紫色胡工小灯 /// 紫色胡工小灯
/// </summary> /// </summary>

@ -118,7 +118,15 @@ namespace DataBlockHelper.DBHelpers
public bool FeededPdG8 => FeededPdG(108); public bool FeededPdG8 => FeededPdG(108);
public bool FeededCW1 => FeededCW(94);
public bool FeededCW2 => FeededCW(96);
public bool FeededCW3 => FeededCW(98);
public bool FeededCW4 => FeededCW(100);
public bool FeededCW5 => FeededCW(102);
public bool FeededCW6 => FeededCW(104);
public bool FeededCW7 => FeededCW(106);
public bool FeededCW8 => FeededCW(108);
public List<bool> ReadReadyG1 => ReadReady(94); public List<bool> ReadReadyG1 => ReadReady(94);
@ -218,6 +226,13 @@ namespace DataBlockHelper.DBHelpers
return pd; return pd;
} }
public bool FeededCW(int start)
{
var first = bytes.Skip(start).Take(1).First();
var pd = first.GetBit(7);
return pd;
}
public bool ReadReadyM(int start) public bool ReadReadyM(int start)
{ {
var first = bytes.Skip(start).Take(1).First(); var first = bytes.Skip(start).Take(1).First();

@ -1,6 +1,46 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MainDetail" children="Controls"> <Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MainDetail" children="Controls">
<Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="FeededGelM255" children="Controls"> <Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="FeededGelM255" children="Controls">
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW8" children="Controls">
<Property name="Location">1858, 492</Property>
<Property name="Name">FeededCW8</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW7" children="Controls">
<Property name="Location">1700, 492</Property>
<Property name="Name">FeededCW7</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW6" children="Controls">
<Property name="Location">1545, 492</Property>
<Property name="Name">FeededCW6</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW5" children="Controls">
<Property name="Location">1383, 491</Property>
<Property name="Name">FeededCW5</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW4" children="Controls">
<Property name="Location">1308, 491</Property>
<Property name="Name">FeededCW4</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW3" children="Controls">
<Property name="Location">1142, 491</Property>
<Property name="Name">FeededCW3</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW2" children="Controls">
<Property name="Location">993, 491</Property>
<Property name="Name">FeededCW2</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslLanternSimple, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FeededCW1" children="Controls">
<Property name="Location">832, 491</Property>
<Property name="Name">FeededCW1</Property>
<Property name="Size">7, 7</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.LjSwith, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="BU2CSF02" children="Controls"> <Object type="Mesnac.Controls.ChemicalWeighing.LjSwith, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="BU2CSF02" children="Controls">
<Property name="AlarmName" /> <Property name="AlarmName" />
<Property name="SetName" /> <Property name="SetName" />

Loading…
Cancel
Save