Commit 7f8ac6eb LN

报警信息类型修改

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