Commit 7f8ac6eb LN

报警信息类型修改

1 个父辈 cf87f6b3
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
<Compile Include="store\InOutParam.cs"> <Compile Include="store\InOutParam.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
......
...@@ -213,10 +213,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -213,10 +213,10 @@ namespace OnlineStore.DeviceLibrary
Config.Middle_Axis.Axis_Run_DO = IO_Type.Run_Signal; Config.Middle_Axis.Axis_Run_DO = IO_Type.Run_Signal;
moveAxisList.Add(Config.Middle_Axis); moveAxisList.Add(Config.Middle_Axis);
this.AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>(); this.AxisACodeMap = new Dictionary<string, int>();
foreach (ConfigMoveAxis axis in moveAxisList) foreach (ConfigMoveAxis axis in moveAxisList)
{ {
this.AxisAlarmCodeMap.Add(axis.GetNameStr(), new AxisAlarmInfo()); this.AxisACodeMap.Add(axis.GetNameStr(), 0);
} }
} }
...@@ -481,39 +481,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -481,39 +481,30 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
} }
else else if (span.TotalSeconds < 3)
{
if (span.TotalSeconds < 3)
{ {
return false; return false;
} }
}
checkAlarmTime = DateTime.Now; checkAlarmTime = DateTime.Now;
bool isInAlarm = false; bool isInAlarm = false;
foreach (ConfigMoveAxis axisInfo in moveAxisList) foreach (ConfigMoveAxis axisInfo in moveAxisList)
{ {
short axis = axisInfo.GetAxisValue(); string deviceName = axisInfo.DeviceName;
string deviceName = axisInfo.GetNameStr(); int alarmIo = ACServerManager.GetAlarmStatus(axisInfo.DeviceName, axisInfo.GetAxisValue());
AxisAlarmInfo info = AxisAlarmCodeMap[deviceName];
int alarmIo = ACServerManager.GetAlarmStatus(deviceName, axis);
if (alarmIo == 1) if (alarmIo.Equals(1))
{ {
WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警"; WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.AxisAlarm, axisInfo.ProName, WarnMsg, MoveType.None); Alarm(StoreAlarmType.AxisAlarm, axisInfo.ProName, WarnMsg, MoveType.None);
isInAlarm = true; isInAlarm = true;
} }
else else if (!AxisACodeMap[deviceName].Equals(alarmIo))
{
if (!info.AlarmIoValue.Equals(alarmIo))
{ {
LogUtil.error(Name + " 运动轴 " + axisInfo.Explain + ",报警已解除!"); LogUtil.error(Name + " 运动轴 " + axisInfo.Explain + ",报警已解除!");
info.AlarmIoValue = alarmIo;
} }
}
AxisAlarmCodeMap[deviceName] = info; AxisACodeMap[deviceName] = alarmIo;
} }
return isInAlarm; return isInAlarm;
} }
......
...@@ -27,7 +27,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,7 +27,7 @@ namespace OnlineStore.DeviceLibrary
public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline; public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline;
public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>(); public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>();
protected Dictionary<string, AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>(); protected Dictionary<string, int > AxisACodeMap = new Dictionary<string, int >();
public bool isInSuddenDown = false; public bool isInSuddenDown = false;
protected int NeedCheckSafetyLight = 0; protected int NeedCheckSafetyLight = 0;
public StoreAlarmType alarmType = StoreAlarmType.None; public StoreAlarmType alarmType = StoreAlarmType.None;
......
...@@ -721,7 +721,7 @@ ...@@ -721,7 +721,7 @@
this.btnMP1.Cursor = System.Windows.Forms.Cursors.Default; this.btnMP1.Cursor = System.Windows.Forms.Cursors.Default;
this.btnMP1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMP1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMP1.ForeColor = System.Drawing.Color.Blue; this.btnMP1.ForeColor = System.Drawing.Color.Red;
this.btnMP1.Location = new System.Drawing.Point(18, 126); this.btnMP1.Location = new System.Drawing.Point(18, 126);
this.btnMP1.Name = "btnMP1"; this.btnMP1.Name = "btnMP1";
this.btnMP1.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnMP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
...@@ -739,7 +739,7 @@ ...@@ -739,7 +739,7 @@
this.btnMiddleP2.Cursor = System.Windows.Forms.Cursors.Default; this.btnMiddleP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnMiddleP2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMiddleP2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMiddleP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleP2.ForeColor = System.Drawing.Color.Blue; this.btnMiddleP2.ForeColor = System.Drawing.Color.Red;
this.btnMiddleP2.Location = new System.Drawing.Point(18, 164); this.btnMiddleP2.Location = new System.Drawing.Point(18, 164);
this.btnMiddleP2.Name = "btnMiddleP2"; this.btnMiddleP2.Name = "btnMiddleP2";
this.btnMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnMiddleP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
......
...@@ -23,9 +23,7 @@ namespace OnlineStore.TinPasteStore ...@@ -23,9 +23,7 @@ namespace OnlineStore.TinPasteStore
{ {
public partial class FrmStoreBox : FrmBase public partial class FrmStoreBox : FrmBase
{ {
private VerticalStoreBean store; private VerticalStoreBean store;
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmStoreBox() public FrmStoreBox()
{ {
Control.CheckForIllegalCrossThreadCalls = false; Control.CheckForIllegalCrossThreadCalls = false;
...@@ -548,6 +546,7 @@ namespace OnlineStore.TinPasteStore ...@@ -548,6 +546,7 @@ namespace OnlineStore.TinPasteStore
Light.defaultR = (byte)trackBar1.Value; Light.defaultR = (byte)trackBar1.Value;
} }
lblR.Text = Light.defaultR.ToString(); lblR.Text = Light.defaultR.ToString();
// trackBar1.BackColor= System.Drawing.Color.FromArgb(((int)(((byte)(trackBar1.Value)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
} }
private void trackBar2_ValueChanged(object sender, EventArgs e) private void trackBar2_ValueChanged(object sender, EventArgs e)
...@@ -558,6 +557,7 @@ namespace OnlineStore.TinPasteStore ...@@ -558,6 +557,7 @@ namespace OnlineStore.TinPasteStore
} }
lblG.Text = Light.defaultG.ToString(); lblG.Text = Light.defaultG.ToString();
// trackBar2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(trackBar2.Value)))), ((int)(((byte)(0)))));
} }
private void trackBar3_ValueChanged(object sender, EventArgs e) private void trackBar3_ValueChanged(object sender, EventArgs e)
...@@ -568,6 +568,7 @@ namespace OnlineStore.TinPasteStore ...@@ -568,6 +568,7 @@ namespace OnlineStore.TinPasteStore
} }
lblB.Text = Light.defaultB.ToString(); lblB.Text = Light.defaultB.ToString();
// trackBar3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(trackBar3.Value)))));
} }
private void btnCloseLed_Click(object sender, EventArgs e) private void btnCloseLed_Click(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!