Commit 245b0043 authored by liu's avatar liu

修改hl-3000的通讯,添加单位换算界面,修改外部校标

parent 1085a985
......@@ -42,7 +42,7 @@ namespace GcDevicePc
this.fid1ver.Text = this.FID1version;
this.fid2ver.Text = this.FID2version;
this.tcdver.Text = this.TCD1version;
this.PCver.Text = this.Hmiversion + "/1.5.5";
this.PCver.Text = this.Hmiversion + "/1.5.6";
}
}
}
......@@ -24,7 +24,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationRevision>4</ApplicationRevision>
<ApplicationVersion>1.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
......
......@@ -71,6 +71,8 @@
this.AdjustStat = new System.Windows.Forms.ToolStripStatusLabel();
this.workProgress = new System.Windows.Forms.ToolStripProgressBar();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.单位换算ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.自动校准ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout();
this.SuspendLayout();
......@@ -121,7 +123,8 @@
this.SystemStartMenu,
this.SystemStopMenu,
this.AuxToolMenu,
this.ParameterSettingMenu});
this.ParameterSettingMenu,
this.自动校准ToolStripMenuItem});
this.SystemMainMenu.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.SystemMainMenu.Name = "SystemMainMenu";
this.SystemMainMenu.Size = new System.Drawing.Size(54, 25);
......@@ -130,28 +133,28 @@
// SystemStartMenu
//
this.SystemStartMenu.Name = "SystemStartMenu";
this.SystemStartMenu.Size = new System.Drawing.Size(144, 26);
this.SystemStartMenu.Size = new System.Drawing.Size(180, 26);
this.SystemStartMenu.Text = "系统开启";
this.SystemStartMenu.Click += new System.EventHandler(this.SystemStartMenu_Click);
//
// SystemStopMenu
//
this.SystemStopMenu.Name = "SystemStopMenu";
this.SystemStopMenu.Size = new System.Drawing.Size(144, 26);
this.SystemStopMenu.Size = new System.Drawing.Size(180, 26);
this.SystemStopMenu.Text = "系统关闭";
this.SystemStopMenu.Click += new System.EventHandler(this.SystemStopMenu_Click);
//
// AuxToolMenu
//
this.AuxToolMenu.Name = "AuxToolMenu";
this.AuxToolMenu.Size = new System.Drawing.Size(144, 26);
this.AuxToolMenu.Size = new System.Drawing.Size(180, 26);
this.AuxToolMenu.Text = "辅助工具";
this.AuxToolMenu.Click += new System.EventHandler(this.AuxToolMenu_Click);
//
// ParameterSettingMenu
//
this.ParameterSettingMenu.Name = "ParameterSettingMenu";
this.ParameterSettingMenu.Size = new System.Drawing.Size(144, 26);
this.ParameterSettingMenu.Size = new System.Drawing.Size(180, 26);
this.ParameterSettingMenu.Text = "参数设置";
this.ParameterSettingMenu.Click += new System.EventHandler(this.ParameterSettingMenu_Click);
//
......@@ -173,47 +176,47 @@
// NetWorkMenu
//
this.NetWorkMenu.Name = "NetWorkMenu";
this.NetWorkMenu.Size = new System.Drawing.Size(176, 26);
this.NetWorkMenu.Size = new System.Drawing.Size(180, 26);
this.NetWorkMenu.Text = "通讯设置";
this.NetWorkMenu.Click += new System.EventHandler(this.NetWorkMenu_Click);
//
// MethodBatMenu
//
this.MethodBatMenu.Name = "MethodBatMenu";
this.MethodBatMenu.Size = new System.Drawing.Size(176, 26);
this.MethodBatMenu.Size = new System.Drawing.Size(180, 26);
this.MethodBatMenu.Text = "方法批处理";
this.MethodBatMenu.Click += new System.EventHandler(this.MethodBatMenu_Click);
//
// NewMethodMenu
//
this.NewMethodMenu.Name = "NewMethodMenu";
this.NewMethodMenu.Size = new System.Drawing.Size(176, 26);
this.NewMethodMenu.Size = new System.Drawing.Size(180, 26);
this.NewMethodMenu.Text = "新建方法";
this.NewMethodMenu.Click += new System.EventHandler(this.NewMethodMenu_Click);
//
// OpenMethodMenu
//
this.OpenMethodMenu.Name = "OpenMethodMenu";
this.OpenMethodMenu.Size = new System.Drawing.Size(176, 26);
this.OpenMethodMenu.Size = new System.Drawing.Size(180, 26);
this.OpenMethodMenu.Text = "打开方法文件";
this.OpenMethodMenu.Click += new System.EventHandler(this.OpenMethodMenu_Click);
//
// MethodBrowseMenuItem
//
this.MethodBrowseMenuItem.Name = "MethodBrowseMenuItem";
this.MethodBrowseMenuItem.Size = new System.Drawing.Size(176, 26);
this.MethodBrowseMenuItem.Size = new System.Drawing.Size(180, 26);
this.MethodBrowseMenuItem.Text = "方法查阅";
this.MethodBrowseMenuItem.Click += new System.EventHandler(this.MethodBrowseMenuItem_Click);
//
// SettingSeparator
//
this.SettingSeparator.Name = "SettingSeparator";
this.SettingSeparator.Size = new System.Drawing.Size(173, 6);
this.SettingSeparator.Size = new System.Drawing.Size(177, 6);
//
// GCConfigMenuItem
//
this.GCConfigMenuItem.Name = "GCConfigMenuItem";
this.GCConfigMenuItem.Size = new System.Drawing.Size(176, 26);
this.GCConfigMenuItem.Size = new System.Drawing.Size(180, 26);
this.GCConfigMenuItem.Text = "仪器配置";
this.GCConfigMenuItem.Click += new System.EventHandler(this.ConfigCreateSubMenuItem_Click);
//
......@@ -265,7 +268,7 @@
this.SingleStop,
this.SingleCancel});
this.SingleControlMenu.Name = "SingleControlMenu";
this.SingleControlMenu.Size = new System.Drawing.Size(176, 26);
this.SingleControlMenu.Size = new System.Drawing.Size(180, 26);
this.SingleControlMenu.Text = "单次流程控制";
//
// SingleStart
......@@ -293,7 +296,8 @@
//
this.HelpMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AboutMenu,
this.changeVsi});
this.changeVsi,
this.单位换算ToolStripMenuItem});
this.HelpMainMenu.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.HelpMainMenu.Name = "HelpMainMenu";
this.HelpMainMenu.Size = new System.Drawing.Size(54, 25);
......@@ -302,14 +306,14 @@
// AboutMenu
//
this.AboutMenu.Name = "AboutMenu";
this.AboutMenu.Size = new System.Drawing.Size(144, 26);
this.AboutMenu.Size = new System.Drawing.Size(180, 26);
this.AboutMenu.Text = "关于";
this.AboutMenu.Click += new System.EventHandler(this.AboutMenu_Click);
//
// changeVsi
//
this.changeVsi.Name = "changeVsi";
this.changeVsi.Size = new System.Drawing.Size(144, 26);
this.changeVsi.Size = new System.Drawing.Size(180, 26);
this.changeVsi.Text = "切换版本";
this.changeVsi.Click += new System.EventHandler(this.changeVsi_Click);
//
......@@ -408,6 +412,20 @@
this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
//
// 单位换算ToolStripMenuItem
//
this.单位换算ToolStripMenuItem.Name = "单位换算ToolStripMenuItem";
this.单位换算ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.单位换算ToolStripMenuItem.Text = "单位换算";
this.单位换算ToolStripMenuItem.Click += new System.EventHandler(this.单位换算ToolStripMenuItem_Click);
//
// 自动校准ToolStripMenuItem
//
this.自动校准ToolStripMenuItem.Name = "自动校准ToolStripMenuItem";
this.自动校准ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.自动校准ToolStripMenuItem.Text = "自动校准";
this.自动校准ToolStripMenuItem.Click += new System.EventHandler(this.自动校准ToolStripMenuItem_Click);
//
// MDIBase
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -475,6 +493,8 @@
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.ToolStripMenuItem changeVsi;
private System.Windows.Forms.ToolStripStatusLabel AdjustStat;
private System.Windows.Forms.ToolStripMenuItem 单位换算ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 自动校准ToolStripMenuItem;
}
}
......
......@@ -773,7 +773,7 @@ namespace GcDevicePc
/// 1.0.2.3 添加了周期完成后,重新绘图功能
private void timer1_Tick(object sender, EventArgs e)
{
this.Text = String.Format("Tetchrom色谱工作站-1.5.5 {0}", Formstr);
this.Text = String.Format("Tetchrom色谱工作站-1.5.6 {0}", Formstr);
//if (LandIn.Island)
//{
// HmiStatus.Text = String.Format("状态:{0}", statestr);
......@@ -3246,6 +3246,46 @@ namespace GcDevicePc
Process.GetCurrentProcess().Kill();
}
}
CKVocAnalyzer.FormulaTips ft;
private void 单位换算ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (ft == null)
{
ft = new CKVocAnalyzer.FormulaTips();
ft.Show();
}
else if (ft.IsDisposed)
{
ft = null;
ft = new CKVocAnalyzer.FormulaTips();
ft.Show();
}
else
{
ft.Activate();
}
}
CKVocAnalyzer.AutoAdjust auto;
private void 自动校准ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (auto == null)
{
auto = new CKVocAnalyzer.AutoAdjust();
auto.Show();
}
else if (auto.IsDisposed)
{
auto = null;
auto = new CKVocAnalyzer.AutoAdjust();
auto.Show();
}
else
{
auto.Activate();
}
}
//private void debugSubMenu_Click(object sender, EventArgs e)
//{
......
......@@ -9,10 +9,11 @@ using System.Threading.Tasks;
namespace GcDevicePc.ProThread
{
class SendDataToZB
public class SendDataToZB
{
[DllImport(@"SendData.dll")]
public static extern void GcSendDataToZb(Int32 data1, Int32 data2, Int32 data3);
[DllImport(@"SendData.dll",EntryPoint = "GcSendDataToZb", CallingConvention = CallingConvention.Cdecl)]
public static extern void GcSendDataToZb(int data1, int data2, int data3);
#region 私有变量
ManualResetEvent datamre = new ManualResetEvent(false);
......@@ -21,16 +22,23 @@ namespace GcDevicePc.ProThread
#endregion
#region
private void StartSendDataToZB()
public void StartSendDataToZB()
{
GcSendDataToZb(1, 0, 1);
GcSendDataToZb(0, 1, 1);
//GcSendDataToZb(1, 1, 1);
}
private void StopSendDataToZB()
{
GcSendDataToZb(1, 0, 2);
GcSendDataToZb(0, 1, 2);
//GcSendDataToZb(1, 1, 2);
}
private void SendDataToZB_A(Int32 data)
......@@ -47,7 +55,10 @@ namespace GcDevicePc.ProThread
private void SendDataToZB_AB(Int32 dataA, Int32 dataB)
{
GcSendDataToZb(dataA, dataB, 0);
//GcSendDataToZb(1, 1, 1);
//GcSendDataToZb(dataA, dataB, 0);
GcSendDataToZb(10, 20, 0);
}
#endregion
......@@ -187,7 +198,7 @@ namespace GcDevicePc.ProThread
}
private void EndSendToHWData(ushort lastA, int offsetA, ushort lastB, int offsetB)
private void EndSendToZBData(ushort lastA, int offsetA, ushort lastB, int offsetB)
{
int mydataA = 0;
int mydataB = 0;
......@@ -284,6 +295,7 @@ namespace GcDevicePc.ProThread
ushort SendNumB = 0;
//int i = 0;
bool runflag = false;
while (true)
{
if ((globaldata.m_hmibuffer.gcinfo.methodstatus == 4 || globaldata.m_hmibuffer.gcinfo.methodstatus == 5) && methodconfig != null && run_stop != true)
......
......@@ -365,12 +365,12 @@ namespace GcDevicePc.ProThread
ackoneA = false;
}
if (onea > saveA)
{
mydataA = mydataA - (onea - saveA);
//if (onea > saveA)
//{
// mydataA = mydataA - (onea - saveA);
}
else if (onea < saveA)
//}
//else if (onea < saveA)
{
mydataA = mydataA + (saveA - onea);
......@@ -396,12 +396,12 @@ namespace GcDevicePc.ProThread
ackoneA = false;
}
if (onea > saveA)
{
mydataA = mydataA - (onea - saveA);
//if (onea > saveA)
//{
// mydataA = mydataA - (onea - saveA);
}
else if (onea < saveA)
//}
//else if (onea < saveA)
{
mydataA = mydataA + (saveA - onea);
......@@ -426,12 +426,12 @@ namespace GcDevicePc.ProThread
ackoneA = false;
}
if (onea > saveA)
{
mydataA = mydataA - (onea - saveA);
//if (onea > saveA)
//{
// mydataA = mydataA - (onea - saveA);
}
else if (onea < saveA)
//}
//else if (onea < saveA)
{
mydataA = mydataA + (saveA - onea);
......@@ -496,11 +496,11 @@ namespace GcDevicePc.ProThread
ackoneB = false;
}
if (oneb > saveB)
{
mydataB = mydataB - (oneb - saveB);
}
else if (oneb < saveB)
//if (oneb > saveB)
//{
// mydataB = mydataB - (oneb - saveB);
//}
//else if (oneb < saveB)
{
mydataB = mydataB + (saveB - oneb);
}
......@@ -525,11 +525,11 @@ namespace GcDevicePc.ProThread
ackoneB = false;
}
if (oneb > saveB)
{
mydataB = mydataB - (oneb - saveB);
}
else if (oneb < saveB)
//if (oneb > saveB)
//{
// mydataB = mydataB - (oneb - saveB);
//}
//else if (oneb < saveB)
{
mydataB = mydataB + (saveB - oneb);
}
......@@ -555,11 +555,11 @@ namespace GcDevicePc.ProThread
ackoneB = false;
}
if (oneb > saveB)
{
mydataB = mydataB - (oneb - saveB);
}
else if (oneb < saveB)
//if (oneb > saveB)
//{
// mydataB = mydataB - (oneb - saveB);
//}
//else if (oneb < saveB)
{
mydataB = mydataB + (saveB - oneb);
}
......
......@@ -12,7 +12,7 @@ namespace GcDevicePc
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool createNew;
//Application.Run(new ConfigMethod.FID());
//Application.Run(new TestForm());
{
using (System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out createNew))
{
......
......@@ -38,6 +38,7 @@
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
......@@ -119,11 +120,22 @@
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.Button7_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(389, 314);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(75, 23);
this.button8.TabIndex = 5;
this.button8.Text = "zbtest";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.Button8_Click);
//
// TestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 583);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
......@@ -149,5 +161,6 @@
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
}
}
\ No newline at end of file
using GcDevicePc.Common;
using GcDevicePc.ConfigMethod;
using GcDevicePc.Controls;
using GcDevicePc.ProThread;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -133,5 +134,12 @@ namespace GcDevicePc
{
}
SendDataToZB dataToZB = new SendDataToZB();
private void Button8_Click(object sender, EventArgs e)
{
//dataToZB.InitsendData();
dataToZB.StartSendDataToZB();
}
}
}
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