Commit 14a202a3 authored by liu's avatar liu

辅助工具添加中fid点火,和点火限制,右侧显示栏显示,主界面部分小修改

parent 521df5d2
......@@ -1480,8 +1480,9 @@ namespace GcDevicePc
if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
{
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0 &&
CProfileDevice.m_DevParam.tcd[0].u16HeaterSel > 0) //TCD
//if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0 &&
// CProfileDevice.m_DevParam.tcd[0].u16HeaterSel > 0) //TCD
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0) //TCD
{
tempshow = new ListViewItem();
tempshow.Text = "TCD1";
......@@ -1515,9 +1516,12 @@ namespace GcDevicePc
tempshow.SubItems.Add(globaldata.m_dpbuffer.ShowList.showDet.fDetStatue.ToString());
this.datalist.Items.Add(tempshow);
}
else if ((CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1 ||
CProfileDevice.m_DevParam.syspara.u16DetFrontType == 3) &&
CProfileDevice.m_DevParam.fid[0].u16KeyHeater > 0)
else if
//((CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1 ||
// CProfileDevice.m_DevParam.syspara.u16DetFrontType == 3) &&
// CProfileDevice.m_DevParam.fid[0].u16KeyHeater > 0)
((CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1 ||
CProfileDevice.m_DevParam.syspara.u16DetFrontType == 3))
{
tempshow = new ListViewItem();
......@@ -1619,8 +1623,9 @@ namespace GcDevicePc
{
if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
{
if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0 &&
CProfileDevice.m_DevParam.tcd[1].u16HeaterSel > 0) //TCD
//if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0 &&
// CProfileDevice.m_DevParam.tcd[1].u16HeaterSel > 0) //TCD
if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0) //TCD
{
tempshow = new ListViewItem();
tempshow.Text = "TCD2(mV)";
......@@ -1656,9 +1661,11 @@ namespace GcDevicePc
tempshow.SubItems.Add(globaldata.m_dpbuffer.ShowList.showDet.iDetStatue.ToString());
this.datalist.Items.Add(tempshow);
}
//else if ((CProfileDevice.m_DevParam.syspara.u16DetInterType == 1 ||
// CProfileDevice.m_DevParam.syspara.u16DetInterType == 3) &&
// CProfileDevice.m_DevParam.fid[1].u16KeyHeater > 0)
else if ((CProfileDevice.m_DevParam.syspara.u16DetInterType == 1 ||
CProfileDevice.m_DevParam.syspara.u16DetInterType == 3) &&
CProfileDevice.m_DevParam.fid[1].u16KeyHeater > 0)
CProfileDevice.m_DevParam.syspara.u16DetInterType == 3))
{
tempshow = new ListViewItem();
......@@ -1737,8 +1744,9 @@ namespace GcDevicePc
{
if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
{
if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 0 &&
CProfileDevice.m_DevParam.tcd[2].u16HeaterSel > 0) //TCD
//if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 0 &&
// CProfileDevice.m_DevParam.tcd[2].u16HeaterSel > 0) //TCD
if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 00) //TCD
{
tempshow = new ListViewItem();
tempshow.Text = "TCD3";
......@@ -1777,9 +1785,11 @@ namespace GcDevicePc
tempshow.SubItems.Add(globaldata.m_dpbuffer.ShowList.showDet.bDetStatue.ToString());
this.datalist.Items.Add(tempshow);
}
//else if ((CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1 ||
// CProfileDevice.m_DevParam.syspara.u16DetBehindType == 3) &&
// CProfileDevice.m_DevParam.fid[2].u16KeyHeater > 0)
else if ((CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1 ||
CProfileDevice.m_DevParam.syspara.u16DetBehindType == 3) &&
CProfileDevice.m_DevParam.fid[2].u16KeyHeater > 0)
CProfileDevice.m_DevParam.syspara.u16DetBehindType == 3))
{
tempshow = new ListViewItem();
if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1)
......
......@@ -106,14 +106,14 @@
// UserLoginMenu
//
this.UserLoginMenu.Name = "UserLoginMenu";
this.UserLoginMenu.Size = new System.Drawing.Size(180, 26);
this.UserLoginMenu.Size = new System.Drawing.Size(144, 26);
this.UserLoginMenu.Text = "用户登录";
this.UserLoginMenu.Click += new System.EventHandler(this.UserLoginMenu_Click);
//
// UserLogoutMenu
//
this.UserLogoutMenu.Name = "UserLogoutMenu";
this.UserLogoutMenu.Size = new System.Drawing.Size(180, 26);
this.UserLogoutMenu.Size = new System.Drawing.Size(144, 26);
this.UserLogoutMenu.Text = "用户注销";
this.UserLogoutMenu.Click += new System.EventHandler(this.UserLogoutMenu_Click);
//
......
......@@ -380,11 +380,13 @@ namespace GcDevicePc
epcs = false;
timer2.Start();
if (globaldata.CurrentVersion == "1")
{
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 1;
else
(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysbtnstatus = 0;
}
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
//{
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
......@@ -474,9 +476,11 @@ namespace GcDevicePc
{
OSflag = !OSflag;
hmiopt.WriteStopVal();
//SetTitleStatueName("系统准备中...", true);
WaitHMIFree();
//SetTitleStatueName("系统准备中...", true);
//if (globaldata.CurrentVersion == "1")
{
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
{
hmiopt.WriteBatVal();
......@@ -491,7 +495,7 @@ namespace GcDevicePc
{
hmiopt.WriteSingleVal();
}
}
WaitHMIWork();
Thread.Sleep(500);
......@@ -649,10 +653,10 @@ namespace GcDevicePc
open();
}
if (globaldata.m_hmibuffer.gcinfo.methodstatus != 0)
{
hmistatus_opensys();
}
//if (globaldata.m_hmibuffer.gcinfo.methodstatus != 0)
//{
// hmistatus_opensys();
//}
}
catch(Exception ex)
{
......@@ -664,6 +668,8 @@ namespace GcDevicePc
private void hmistatus_opensys()
{
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
if (globaldata.CurrentVersion == "1")
{
if (!OSflag)
{
......@@ -672,6 +678,7 @@ namespace GcDevicePc
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
{
// hmiopt.WriteBatVal();
;
}
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
......@@ -689,7 +696,7 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = true;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
}
}
else
{
......@@ -825,6 +832,8 @@ namespace GcDevicePc
}
public void SendPCCMD(bool flag)
{
//if (globaldata.CurrentVersion == "1")
{
if (flag) //打开运行
{
......@@ -839,8 +848,8 @@ namespace GcDevicePc
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 1)
hmiopt.WriteSingleVal();
WaitHMIWork();
}
WaitHMIWork();
}
else //批处理
{
......@@ -859,6 +868,7 @@ namespace GcDevicePc
}
}
}
}
public void SendSTDCMD()
{
......@@ -998,6 +1008,8 @@ namespace GcDevicePc
}else{
if (i % 20 == 0 && i != 0)
{
if (globaldata.CurrentVersion == "1")
{
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
ret = hmiopt.WriteOpenVal();
......@@ -1008,10 +1020,11 @@ namespace GcDevicePc
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
{
ret = hmiopt.WriteBatVal();
if(ret == 0)
if (ret == 0)
ret = hmiopt.WriteStartVal();
}
}
}
Thread.Sleep(100);
if (i <= 99)
......@@ -1128,11 +1141,12 @@ namespace GcDevicePc
{
globaldata.m_profileMethod.SetStatusFullName(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_StatusName);
globaldata.m_profileMethod.GetDevState();
tmpname = globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2?
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName:
if (globaldata.CurrentVersion == "1")
{
tmpname = globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2 ?
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName :
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName;
}
if (!String.IsNullOrEmpty(tmpname))
{
globaldata.show_MethodName = tmpname;
......@@ -1326,7 +1340,6 @@ namespace GcDevicePc
if ((dest[5] == 4 || dest[5] == 5) && dest[7] == 4 && globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue != 1)
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType = 0;
}
......@@ -1589,7 +1602,7 @@ namespace GcDevicePc
color_flag = false;
break;
case 10:
if (globaldata.m_hwconfig.hwconfiginfo.u16StartType == 0)
if (globaldata.m_hwconfig.hwconfiginfo.u16StartType == 2)
{
status_text = "设备等待";
}
......@@ -1886,6 +1899,9 @@ namespace GcDevicePc
}
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
if (globaldata.CurrentVersion == "1")
{
if (!OSflag)
{
......@@ -1894,7 +1910,7 @@ namespace GcDevicePc
statestr = "系统准备中...";
WaitHMIFree();
{
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
{
hmiopt.WriteBatVal();
......@@ -1909,6 +1925,7 @@ namespace GcDevicePc
{
hmiopt.WriteSingleVal();
}
}
//Console.WriteLine("WaitHMIWork ");
WaitHMIWork();
//Console.WriteLine("WaitHMIWork End");
......@@ -1949,8 +1966,9 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
}
}
Console.WriteLine(""+ OSflag);
}
catch(Exception ex)
{
......@@ -2080,6 +2098,7 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = false;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
Console.WriteLine(""+ OSflag);
}
/// <summary>
......
......@@ -28,8 +28,10 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(auxtool));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.fireupbtnI = new System.Windows.Forms.Button();
this.firstfiredelay = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.fireupbtn = new System.Windows.Forms.Button();
......@@ -78,6 +80,7 @@
this.tcd1_sw = new System.Windows.Forms.Button();
this.tcdset1 = new System.Windows.Forms.Button();
this.tcddac1 = new System.Windows.Forms.TextBox();
this.fidfire = new System.Windows.Forms.Timer(this.components);
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -89,6 +92,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.fireupbtnI);
this.groupBox1.Controls.Add(this.firstfiredelay);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.fireupbtn);
......@@ -103,6 +107,16 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "点火设置";
//
// fireupbtnI
//
this.fireupbtnI.Location = new System.Drawing.Point(134, 108);
this.fireupbtnI.Name = "fireupbtnI";
this.fireupbtnI.Size = new System.Drawing.Size(75, 23);
this.fireupbtnI.TabIndex = 11;
this.fireupbtnI.Text = "点火(中)";
this.fireupbtnI.UseVisualStyleBackColor = true;
this.fireupbtnI.Click += new System.EventHandler(this.fireupbtnI_Click);
//
// firstfiredelay
//
this.firstfiredelay.Location = new System.Drawing.Point(139, 81);
......@@ -121,11 +135,11 @@
//
// fireupbtn
//
this.fireupbtn.Location = new System.Drawing.Point(82, 108);
this.fireupbtn.Location = new System.Drawing.Point(59, 108);
this.fireupbtn.Name = "fireupbtn";
this.fireupbtn.Size = new System.Drawing.Size(68, 23);
this.fireupbtn.TabIndex = 4;
this.fireupbtn.Text = "点火";
this.fireupbtn.Text = "点火(前)";
this.fireupbtn.UseVisualStyleBackColor = true;
this.fireupbtn.Click += new System.EventHandler(this.fireupbtn_Click);
//
......@@ -570,6 +584,11 @@
this.tcddac1.Size = new System.Drawing.Size(87, 21);
this.tcddac1.TabIndex = 0;
//
// fidfire
//
this.fidfire.Interval = 1000;
this.fidfire.Tick += new System.EventHandler(this.fidfire_Tick);
//
// auxtool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -588,6 +607,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "辅助工具";
this.TopMost = true;
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.auxtool_FormClosed);
this.Load += new System.EventHandler(this.auxtool_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
......@@ -655,5 +675,7 @@
private System.Windows.Forms.Button tcd1_sw;
private System.Windows.Forms.Button tcdset1;
private System.Windows.Forms.TextBox tcddac1;
private System.Windows.Forms.Button fireupbtnI;
private System.Windows.Forms.Timer fidfire;
}
}
\ No newline at end of file
......@@ -32,6 +32,7 @@ namespace GcDevicePc
public auxtool()
{
InitializeComponent();
fidfire.Start();
}
public auxtool(ushort time1, ushort time2, ushort time3)
......@@ -41,6 +42,7 @@ namespace GcDevicePc
this.fireuptime.Text = time1.ToString();
this.hvalvetime.Text = time2.ToString();
this.firstfiredelay.Text = (Convert.ToDouble(time3) / 60).ToString();
fidfire.Start();
}
......@@ -127,6 +129,8 @@ namespace GcDevicePc
if (time1 >= time2)
{
auxtoolforfireup(0, time1, time2, time3);
this.fireupbtnI.Enabled = false;
}
else
{
......@@ -617,5 +621,92 @@ namespace GcDevicePc
gctcd_sw(2);
}
private void fireupbtnI_Click(object sender, EventArgs e)
{
//if (min >= 30)
{
if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
{
MessageBox.Show("点火时间 和 氢气阀时间不能为空!!!");
}
else
{
ushort time1 = ushort.Parse(fireuptime.Text);
ushort time2 = ushort.Parse(hvalvetime.Text);
ushort time3 = Convert.ToUInt16(Convert.ToInt32(firstfiredelay.Text) * 60);
if (time1 >= time2)
{
auxtoolforfireup(1, time1, time2, time3);
this.fireupbtn.Enabled = false;
}
else
{
MessageBox.Show("点火时间需大于等于氢气阀时间!!!");
}
}
}
//else
//{
// MessageBox.Show("请在三十分钟后在点火!");
//}
}
private void fidfire_Tick(object sender, EventArgs e)
{
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
{
if (globaldata.m_dpbuffer.ShowList.showDet.iDetStatue == 1)
{
this.fireupbtn.Enabled = false;
}
else
{
this.fireupbtn.Enabled = true;
}
}
if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
{
if (globaldata.m_dpbuffer.ShowList.showDet.fDetStatue == 1)
{
this.fireupbtnI.Enabled = false;
}
else
{
this.fireupbtnI.Enabled = true;
}
}
}
private void auxtool_FormClosed(object sender, FormClosedEventArgs e)
{
fidfire.Stop();
}
//private void fireupbtnb_Click(object sender, EventArgs e)
//{
// if (String.IsNullOrEmpty(fireuptime.Text) || String.IsNullOrEmpty(hvalvetime.Text))
// {
// MessageBox.Show("点火时间 和 氢气阀时间不能为空!!!");
// }
// else
// {
// ushort time1 = ushort.Parse(fireuptime.Text);
// ushort time2 = ushort.Parse(hvalvetime.Text);
// ushort time3 = ushort.Parse(firstfiredelay.Text);
// if (time1 >= time2)
// {
// auxtoolforfireup(2, time1, time2, time3);
// }
// else
// {
// MessageBox.Show("点火时间需大于等于氢气阀时间!!!");
// }
// }
//}
}
}
......@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="fidfire.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment