Commit 4cffdb11 authored by 周磊's avatar 周磊

从1.9.1重新编辑,当前版本视为初始

parent 771e403f
......@@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.29409.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GcDevicePc", "GcDevicePc\GcDevicePc.csproj", "{BBCD58CB-247D-4108-A135-F36F8ABA3289}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedSpace", "SharedSpace\SharedSpace.csproj", "{5498F944-5721-461B-B07F-3105EF0BF643}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "vocdll", "vocdll", "{17288597-04A1-40BD-8E6C-1E83CBD1A523}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKVocAlgorithm", "gcdevicepc_nmoc8-16\CKVocAlgorithm\CKVocAlgorithm.csproj", "{EEF7E2F6-A048-4577-B925-A145A4E48384}"
......@@ -47,15 +45,6 @@ Global
{BBCD58CB-247D-4108-A135-F36F8ABA3289}.Release|Mixed Platforms.Build.0 = Release|x86
{BBCD58CB-247D-4108-A135-F36F8ABA3289}.Release|x86.ActiveCfg = Release|x86
{BBCD58CB-247D-4108-A135-F36F8ABA3289}.Release|x86.Build.0 = Release|x86
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|x86.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Any CPU.Build.0 = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|x86.ActiveCfg = Release|Any CPU
{EEF7E2F6-A048-4577-B925-A145A4E48384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEF7E2F6-A048-4577-B925-A145A4E48384}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEF7E2F6-A048-4577-B925-A145A4E48384}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
......
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
namespace GcDevicePc
{
class AESfile
{
private string filename = "default.tw";
private string default_password = "Tet-chrom";
private string default_iv = "2016201620162016";
// private FileStream aesfs;
public AESfile(string file)
{
filename = file;
}
private string ByteToString(byte[] InBytes)
{
string StringOut = "";
foreach (byte InByte in InBytes)
{
StringOut = StringOut + String.Format("{0:X2} ", InByte);
}
return StringOut;
}
// 把十六进制字符串转换成字节型
private byte[] strToToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");
if ((hexString.Length % 2) != 0)
hexString += " ";
byte[] returnBytes = new byte[hexString.Length / 2];
for (int i = 0; i < returnBytes.Length; i++)
returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
return returnBytes;
}
private string AESEncrypt(string text, string password, string iv)
{
RijndaelManaged rijndaelCipher = new RijndaelManaged();
rijndaelCipher.Mode = CipherMode.CBC;
rijndaelCipher.Padding = PaddingMode.PKCS7;
rijndaelCipher.KeySize = 128;
rijndaelCipher.BlockSize = 128;
byte[] pwdBytes = System.Text.Encoding.UTF8.GetBytes(password);
byte[] keyBytes = new byte[16];
int len = pwdBytes.Length;
if (len > keyBytes.Length) len = keyBytes.Length;
System.Array.Copy(pwdBytes, keyBytes, len);
rijndaelCipher.Key = keyBytes;
byte[] ivBytes = System.Text.Encoding.UTF8.GetBytes(iv);
rijndaelCipher.IV = ivBytes;
ICryptoTransform transform = rijndaelCipher.CreateEncryptor();
byte[] plainText = Encoding.UTF8.GetBytes(text);
byte[] cipherBytes = transform.TransformFinalBlock(plainText, 0, plainText.Length);
return ByteToString(cipherBytes);
}
private string AESDecrypt(string text, string password, string iv)
{
RijndaelManaged rijndaelCipher = new RijndaelManaged();
rijndaelCipher.Mode = CipherMode.CBC;
rijndaelCipher.Padding = PaddingMode.PKCS7;
rijndaelCipher.KeySize = 128;
rijndaelCipher.BlockSize = 128;
byte[] encryptedData = strToToHexByte(text);
byte[] pwdBytes = System.Text.Encoding.UTF8.GetBytes(password);
byte[] keyBytes = new byte[16];
int len = pwdBytes.Length;
if (len > keyBytes.Length) len = keyBytes.Length;
System.Array.Copy(pwdBytes, keyBytes, len);
rijndaelCipher.Key = keyBytes;
byte[] ivBytes = System.Text.Encoding.UTF8.GetBytes(iv);
rijndaelCipher.IV = ivBytes;
ICryptoTransform transform = rijndaelCipher.CreateDecryptor();
byte[] plainText = transform.TransformFinalBlock(encryptedData, 0, encryptedData.Length);
return Encoding.UTF8.GetString(plainText);
}
public bool Create_filetw()
{
if (File.Exists(this.filename) == true)
{
return false;
}
else
{
FileStream aesfs = new FileStream(this.filename, FileMode.Create);
aesfs.Close();
return true;
}
}
public bool Write_filetw(float Time, float Voltage)
{
string line;
StreamWriter fswriter = new StreamWriter(filename, true);
line = AESEncrypt(Time.ToString("0.000000"), this.default_password, this.default_iv);
fswriter.WriteLine(line);
line = AESEncrypt(Voltage.ToString("0.000"), this.default_password, this.default_iv);
fswriter.WriteLine(line);
fswriter.Close();
return true;
}
public bool Read_filetw(ref double[] Time, ref double[] Voltage)
{
string line;
int i = 0;
StreamReader fsread = new StreamReader(filename);
while(fsread.Peek() >= 0)
{
line = fsread.ReadLine();
Time[i] = double.Parse(AESDecrypt(line, this.default_password, this.default_iv));
line = fsread.ReadLine();
Voltage[i] = double.Parse(AESDecrypt(line, this.default_password, this.default_iv));
i++;
}
fsread.Close();
return true;
}
}
}
......@@ -36,7 +36,7 @@
</logger>
<logger name="TempDebugInfo">
<level value="INFO"/>
<appender-ref ref="TempDebugRollingLog"/>
<appender-ref ref="WorkErrRollingLog"/>
</logger>
......@@ -105,8 +105,8 @@
</filter>
</appender>
<appender name="TempDebugRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\TempDebug_"/>
<appender name="WorkErrRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\WorkErrInfo_"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
......
......@@ -114,123 +114,6 @@ namespace GcDevicePc
}
public void InitFileCompleteness()
{
try
{
#if Use_English_Folder
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\Startup\\startup.ini");
#else
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\startup.ini");
#endif
if (File.Exists(file))
{
IniFile ini = new IniFile(file);
int opensys = ini.ReadInteger("StartUp", "打开系统");
int runtype = ini.ReadInteger("StartUp", "运行类型");
globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.DataFolder = ini.ReadString("DataFolder", "历史数据");
globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.FileClassification = ini.ReadString("DataFolder", "分级文件夹");
int Version = ini.ReadInteger("Version", "VersionType");
string uname = ini.ReadString("User", "Name");
string upwd = ini.ReadString("User", "Password");
int dsf = ini.ReadInteger("SendData", "Thirdparty");
string strSendType=ini.ReadString("SendData","SendType");
int dw = ini.ReadInteger("SendData", "Foreign");
int sdzb = ini.ReadInteger("SaveData", "ZBSaveData");
string apname = ini.ReadString("Version", "AppName");
int fi = ini.ReadInteger("StartUp", "Forceintegral");
string unit = ini.ReadString("StartUp", "Unit");
globaldata.UserName = uname;
globaldata.UserPwd = upwd;
globaldata.CurrentVersion = Version;
globaldata.Foreign = dw;
globaldata.ZbDataSave = sdzb == 0 ? false : true;
globaldata.AppName = apname;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmimac = ini.ReadString("NetWorkConfig", "MAC地址");
CKVocAnalyzer.GlobalCKV.vocAlgorithm.Forceintegral = fi == 1 ? true : false;
if (opensys == 1)
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType = (ushort)runtype;
}
else
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType = 0;
}
if (dsf == 0)
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtohw = true;
}
else if (dsf == 1)
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoZb = true;
}
else if (dsf == 2)
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoSP = true;
}
else
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtohw = false;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoZb = false;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoSP = false;
}
if (strSendType=="Routine")
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendType="Routine";
}
else if (strSendType=="KeepSending")
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendType="KeepSending";
}
string info_log = ini.ReadString("Logs", "InfoLog");
string err_log = ini.ReadString("Logs", "ErrLog");
string hmi_log = ini.ReadString("Logs", "HmiLog");
string gc485 = ini.ReadString("GC485", "COM");
if (!String.IsNullOrEmpty(gc485))
{
globaldata.m_pcbuffer.gcpcinfo.outputinfo.port = Convert.ToByte(gc485);
}
if (!String.IsNullOrEmpty(info_log))
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log = info_log.Equals("1") ? true : false;
}
if (!String.IsNullOrEmpty(err_log))
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.error_log = err_log.Equals("1") ? true : false;
}
if (!String.IsNullOrEmpty(hmi_log))
{
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log = hmi_log.Equals("1") ? true : false;
}
}
else
{
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType = 0;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtohw = false;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoZb = false;
//globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtoSP = false;
//globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.DataFolder = null;
}
}
catch (Exception e)
{
Log.Error(e.Message);
}
}
/// <summary>
/// 创建本地必要目录带设备名称
/// </summary>
......@@ -633,15 +516,7 @@ namespace GcDevicePc
}
}
public void StartDataThread()
{
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
MoudbusOperation.GetInstance().SetModbusIP(globaldata.connection_ip);
//ThreadMonitor.GetInstance().StartALLCommunication();
ThreadMonitor.GetInstance().MonitorThStart();
}
}
// int hmicount = 0;
// private bool bSearchBool = false;
// private System.Timers.Timer timer = new System.Timers.Timer();
......
......@@ -32,7 +32,8 @@
//
// CurveDisPlay
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.WhiteSmoke;
this.ClientSize = new System.Drawing.Size(719, 516);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace GcDevicePc.CK_UI
{
public partial class UserCtlAuto : UserControl
{
public UserCtlAuto()
{
InitializeComponent();
}
private void UserCtlAuto_Load(object sender, EventArgs e)
{
}
}
}
版本:1.4.7 日期:20170915
Changlog:
1.添加程序启动保证HMI通讯成功功能
2.添加数据后处理阶段重传功能(测试中)
版本:1.4.6 日期:2017098
Changlog:
1.添加氢空阀测试
2.添加三路通道数据采集
3.添加方法开始时间和结束时间
4.添加senddata功能,通过ini控制
5.修复一些细小bug(开机网卡延迟,双击变浮动窗口)
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram />
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Runtime.InteropServices;
namespace GcDevicePc.Common
{
class GCModbus
{
[DllImport(@"LibModbus.dll", EntryPoint = "fnLibModbus", CharSet = CharSet.Unicode)]
public static extern uint fnLibModbus();
[DllImport(@"LibModbus.dll", EntryPoint = "fnReadCoilStatus")]
public static extern int fnReadCoilStatus(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.Byte[] dest, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnReadInputStatus")]
public static extern int fnReadInputStatus(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.Char[] dest, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnReadHoldingReg")]
public static extern int fnReadHoldingReg(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.UInt16[] dest, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnReadInputReg")]
public static extern int fnReadInputReg(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.UInt16[] dest, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnWriteSingleCoil")]
public static extern int fnWriteSingleCoil(uint handle, ushort address, ushort state, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnWriteHoldingReg")]
public static extern int fnWriteHoldingReg(uint handle, ushort address, ushort state, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnWriteMultipleCoils")]
public static extern int fnWriteMultipleCoils(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.Char[] src, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnWriteMultipleRegs")]
public static extern int fnWriteMultipleRegs(uint handle, ushort address, ushort num, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.UInt16[] src, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnReportSlaveID")]
public static extern int fnReportSlaveID(uint handle, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.Char[] src, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnMaskWriteReg")]
public static extern int fnMaskWriteReg(uint handle, ushort address, ushort amask, ushort omask, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnReadWriteMultipleRegs")]
public static extern int fnReadWriteMultipleRegs(uint handle, ushort waddress, ushort wnum, ushort raddress, ushort rnum, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] System.UInt16[] dest, byte[] Ip, ushort wTcpPort);
[DllImport(@"LibModbus.dll", EntryPoint = "fnLibModbusClose")]
public static extern void fnLibModbusClose(uint handle);
private uint hModbusHandle;
private System.UInt16[] dest = new System.UInt16[10] { 0, 0, 3, 4, 5, 6, 7, 8, 9, 0 };
public GCModbus()
{
this.hModbusHandle = fnLibModbus();
}
~GCModbus()
{
fnLibModbusClose(hModbusHandle);
}
public int ReadCoilStatus(ushort addr, ushort num, String ip, ushort wport, ref byte[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadCoilStatus(hModbusHandle, (ushort)(addr - 1), num, buf, bIp, wport);
return ret;
}
public int ReadInputStatus(ushort addr, ushort num, String ip, ushort wport, ref char[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadInputStatus(hModbusHandle, addr, 1, buf, bIp, 502);
return ret;
}
public int ReadHoldingReg(ushort addr, ushort num, String ip, ushort wport, ref UInt16[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadHoldingReg(hModbusHandle, (ushort)(addr - 1), num, buf, bIp, wport);
return ret;
}
public int ReadInputReg(ushort addr, ushort num, String ip, ushort wport, ref UInt16[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadInputReg(hModbusHandle, addr, 1, dest, bIp, 502);
buf[0] = dest[0];
return ret;
}
public int WriteSingleCoil(ushort addr, ushort state, String ip, ushort wport)
{
int ret = 0;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnWriteSingleCoil(hModbusHandle, (ushort)(addr - 1), state, bIp, wport);
return ret;
}
public int WriteHoldingReg(ushort addr, ushort state, String ip, ushort wport)
{
int ret = 0;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnWriteHoldingReg(hModbusHandle, (ushort)(addr - 1), state, bIp, wport);
return ret;
}
//public int ReadHoldingReg(ushort addr, ushort num, String ip, ushort wport, ref char[] buf)
//{
// int ret;
// byte[] bIp = Encoding.Unicode.GetBytes(ip);
// ret = fnWriteMultipleCoils(hModbusHandle, addr, 1, buf, bIp, 502);
// return ret;
//}
public int WriteMultipleRegs(ushort addr, ushort num, String ip, ushort wport, ref ushort[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnWriteMultipleRegs(hModbusHandle, (ushort)(addr - 1), num, buf, bIp, wport);
return ret;
}
public int ReportSlaveID(ushort addr, ushort num, String ip, ushort wport, ref char[] buf)
{
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReportSlaveID(hModbusHandle, buf, bIp, 502);
return ret;
}
public int MaskWriteReg(ushort addr, ushort amask, ushort omask, String ip, ushort wport)
{
int ret = 0;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnMaskWriteReg(hModbusHandle, addr, amask, omask, bIp, 502);
return ret;
}
public int ReadWriteMultipleRegs(ushort waddr, ushort wnum, ushort raddr, ushort rnum, String ip, ushort wport,ref UInt16[] buf)
{
int ret = 0;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadWriteMultipleRegs(hModbusHandle, waddr, wnum, raddr, rnum, buf, bIp, 502);
return ret;
}
}
}
......@@ -111,6 +111,11 @@ namespace GcDevicePc.Common
public int ReadHoldingReg(ushort addr, ushort num, String ip, ushort wport, ref UInt16[] buf)
{
if (MDIBase.bUpdateHMI)
{
Thread.Sleep(1);
return -1;
}
int ret;
byte[] bIp = Encoding.Unicode.GetBytes(ip);
ret = fnReadHoldingReg(hModbusHandle,1, (ushort)(addr - 1), num, buf, bIp, wport);
......
This diff is collapsed.
......@@ -10,7 +10,7 @@ namespace GcDevicePc.Common
private static readonly ILog hmiInfo = LogManager.GetLogger("HmiInfo");
private static readonly ILog logErr = LogManager.GetLogger("Err");
private static readonly ILog debugInfo = LogManager.GetLogger("DebugInfo");
private static readonly ILog tempdebugInfo = LogManager.GetLogger("TempDebugInfo");
private static readonly ILog workErrInfo = LogManager.GetLogger("WorkErrInfo");
private static readonly ILog antiControlLog = LogManager.GetLogger("AntiControlLog");
/// <summary>
......@@ -19,7 +19,7 @@ namespace GcDevicePc.Common
/// <param name="msg">消息内容</param>
public static void Info(string msg)
{
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
logInfo.Info(msg);
}
......@@ -28,16 +28,16 @@ namespace GcDevicePc.Common
/// </summary>
public static void DebugInfo(string msg)
{
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
debugInfo.Info(msg);
}
/// <summary>
/// 记录温控debug信息(全局记录)
/// 记录运行中错误信息(XA,B,C,D,H,I)
/// </summary>
public static void TempDebugInfo(string msg)
public static void WorkErrInfo(string msg)
{
tempdebugInfo.Info(msg);
workErrInfo.Info(msg);
}
/// <summary>
/// 记录反控信息(全局记录)
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace GcDevicePc.Common
{
class LogHelper
{
private enum ErrorType
{
W = 0, //警告信息
E = 1, //错误信息
I = 2, //普通信息
}
private static string filePath = System.Windows.Forms.Application.StartupPath;
private static string LogOutputFile = filePath + "\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".log";
private static ErrorType errType = LogHelper.ErrorType.I;
private static bool WriteLogToFile(string module, string strlog)
{
try
{
if (File.Exists(LogHelper.LogOutputFile) == false)
{
FileStream fsm = File.Create(LogHelper.LogOutputFile);
if (fsm != null)
fsm.Close();
}
DateTime dt = File.GetCreationTime(LogHelper.LogOutputFile);
dt = dt.AddDays(3);
//删除三天前log信息
if (dt.CompareTo(DateTime.Now) < 0)
{
File.Delete(LogHelper.LogOutputFile);
//File.Create(Log.LogOutputFile);
}
//时间
string inputstr = DateTime.Now.ToString();
inputstr += " ";
//错误类型
inputstr += errType.ToString();
inputstr += " ";
//模块名,只保留20个字符,文本统一
string modulename = "";
if (module.Length >= 20)
modulename = module.Substring(0, 20);
else
{
modulename = module;
do
{
modulename = modulename.Insert(modulename.Length, "-");
}
while (modulename.Length < 20);
}
//modulename = module;
inputstr += modulename;
inputstr += " ";
//log信息
inputstr += strlog;
//FileStream ot = File.OpenWrite(LogOutputFile);
//ot.w
StreamWriter output = File.AppendText(LogHelper.LogOutputFile);
output.WriteLine(inputstr);
//output.
output.Close();
}
catch (Exception)
{
return false;
}
return true;
}
public static bool I(string module, string strlog)
{
LogHelper.errType = ErrorType.I;
return WriteLogToFile(module, strlog);
}
public static bool W(string module, string strlog)
{
LogHelper.errType = ErrorType.W;
return WriteLogToFile(module, strlog);
}
public static bool E(string module, string strlog)
{
LogHelper.errType = ErrorType.E;
return WriteLogToFile(module, strlog);
}
public static void Clear()
{
if (File.Exists(LogHelper.LogOutputFile) == true)
File.Delete(LogHelper.LogOutputFile);
}
}
}
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace GcDevicePc.Common
{
class SendDataToHW
{
[DllImport(@"HWSendData.dll", EntryPoint = "SendDataToHW")]
public static extern void GCSendDataToHW(Int32 data1, Int32 data2, Int32 data3);
public SendDataToHW()
{
}
~SendDataToHW()
{
}
public void StartSendDataToHW()
{
GCSendDataToHW(1, 0, 1);
GCSendDataToHW(0, 1, 1);
}
public void StopSendDataToHW()
{
GCSendDataToHW(1, 0, 2);
GCSendDataToHW(0, 1, 2);
}
public void SendDataToHW_A(Int32 data)
{
GCSendDataToHW(data, 0, 3);
GCSendDataToHW(0, 0, 4);
}
public void SendDataToHW_B(Int32 data)
{
GCSendDataToHW(0, data, 4);
GCSendDataToHW(0, 0, 3);
}
public void SendDataToHW_AB(Int32 dataA, Int32 dataB)
{
GCSendDataToHW(dataA, dataB, 0);
}
}
}
......@@ -43,6 +43,7 @@
this.datalist.Scrollable = false;
this.datalist.UseCompatibleStateImageBehavior = false;
this.datalist.View = System.Windows.Forms.View.Details;
this.datalist.Click += new System.EventHandler(this.datalist_Click);
//
// DataState
//
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,1
ECCD0_Orig0=0,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,0,,0,,1
ECCD1_Orig0=0,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,0,,0,,1
ECCD2_Orig0=0,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,0,,0,,1
ECCD3_Orig0=0,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,47343.28,,1
ECCD0_Orig0=47343.28,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,800,,188311.4,,1
ECCD1_Orig0=188311.4,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,2016,,478659.9,,1
ECCD2_Orig0=478659.9,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,3204,,774391.9,,1
ECCD3_Orig0=774391.9,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,147851.3,,1
ECCD0_Orig0=147851.3,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,200,,617721.8,,1
ECCD1_Orig0=617721.8,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,504,,1608550,,1
ECCD2_Orig0=1608550,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,801,,2573538,,1
ECCD3_Orig0=2573538,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,1
ECCD0_Orig0=0,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,0,,0,,1
ECCD1_Orig0=0,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,0,,0,,1
ECCD2_Orig0=0,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,0,,0,,1
ECCD3_Orig0=0,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,47343.28,,1
ECCD0_Orig0=47343.28,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,800,,188311.4,,1
ECCD1_Orig0=188311.4,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,2016,,478659.9,,1
ECCD2_Orig0=478659.9,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,3204,,774391.9,,1
ECCD3_Orig0=774391.9,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,147851.3,,1
ECCD0_Orig0=147851.3,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,200,,617721.8,,1
ECCD1_Orig0=617721.8,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,504,,1608550,,1
ECCD2_Orig0=1608550,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,801,,2573538,,1
ECCD3_Orig0=2573538,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,1
ECCD0_Orig0=0,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,0,,0,,1
ECCD1_Orig0=0,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,0,,0,,1
ECCD2_Orig0=0,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,0,,0,,1
ECCD3_Orig0=0,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,47343.28,,1
ECCD0_Orig0=47343.28,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,800,,188311.4,,1
ECCD1_Orig0=188311.4,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,2016,,478659.9,,1
ECCD2_Orig0=478659.9,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,3204,,774391.9,,1
ECCD3_Orig0=774391.9,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,147851.3,,1
ECCD0_Orig0=147851.3,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD1=1,浓度2,200,,617721.8,,1
ECCD1_Orig0=617721.8,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,504,,1608550,,1
ECCD2_Orig0=1608550,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,801,,2573538,,1
ECCD3_Orig0=2573538,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,4
ECCD0_Orig0=0,uV*sec,03100912,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100912.raw
ECCD0_Orig0_Orig1=0,,03100914,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100914.raw
ECCD0_Orig0_Orig1_Orig2=0,,03100919,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100919.raw
ECCD0_Orig0_Orig1_Orig2_Orig3=0,,03100921,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100921.raw
ECCD1=1,浓度2,0,,0,,4
ECCD1_Orig0=0,uV*sec,03100941,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100941.raw
ECCD1_Orig0_Orig1=0,,03100939,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100939.raw
ECCD1_Orig0_Orig1_Orig2=0,,03100935,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100935.raw
ECCD1_Orig0_Orig1_Orig2_Orig3=0,,03100933,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100933.raw
ECCD2=1,浓度3,0,,0,,4
ECCD2_Orig0=0,uV*sec,03101000,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101000.raw
ECCD2_Orig0_Orig1=0,,03101002,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101002.raw
ECCD2_Orig0_Orig1_Orig2=0,,03101004,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101004.raw
ECCD2_Orig0_Orig1_Orig2_Orig3=0,,03101006,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101006.raw
ECCD3=1,浓度4,0,,0,,4
ECCD3_Orig0=0,uV*sec,03101039,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101039.raw
ECCD3_Orig0_Orig1=0,,03101042,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101042.raw
ECCD3_Orig0_Orig1_Orig2=0,,03101044,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101044.raw
ECCD3_Orig0_Orig1_Orig2_Orig3=0,,03101048,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101048.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,45667.52,,4
ECCD0_Orig0=45440.38,uV*sec,03100912,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100912.raw
ECCD0_Orig0_Orig1=46623.32,,03100914,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100914.raw
ECCD0_Orig0_Orig1_Orig2=46529.88,,03100919,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100919.raw
ECCD0_Orig0_Orig1_Orig2_Orig3=44076.48,,03100921,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100921.raw
ECCD1=1,浓度2,800,,179486.3,,4
ECCD1_Orig0=182459,uV*sec,03100941,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100941.raw
ECCD1_Orig0_Orig1=178131.5,,03100939,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100939.raw
ECCD1_Orig0_Orig1_Orig2=180159.4,,03100935,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100935.raw
ECCD1_Orig0_Orig1_Orig2_Orig3=177195.2,,03100933,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100933.raw
ECCD2=1,浓度3,2004,,476949.6,,4
ECCD2_Orig0=487498.3,uV*sec,03101000,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101000.raw
ECCD2_Orig0_Orig1=463501.3,,03101002,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101002.raw
ECCD2_Orig0_Orig1_Orig2=470798.7,,03101004,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101004.raw
ECCD2_Orig0_Orig1_Orig2_Orig3=486000.3,,03101006,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101006.raw
ECCD3=1,浓度4,3200,,763239.6,,4
ECCD3_Orig0=734724.4,uV*sec,03101039,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101039.raw
ECCD3_Orig0_Orig1=777362.8,,03101042,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101042.raw
ECCD3_Orig0_Orig1_Orig2=772691.5,,03101044,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101044.raw
ECCD3_Orig0_Orig1_Orig2_Orig3=768179.6,,03101048,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101048.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,146780.4,,4
ECCD0_Orig0=146399.5,uV*sec,03100912,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100912.raw
ECCD0_Orig0_Orig1=145990.8,,03100914,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100914.raw
ECCD0_Orig0_Orig1_Orig2=149145.3,,03100919,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100919.raw
ECCD0_Orig0_Orig1_Orig2_Orig3=145586.1,,03100921,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100921.raw
ECCD1=1,浓度2,200,,593191.1,,4
ECCD1_Orig0=594257.6,uV*sec,03100941,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100941.raw
ECCD1_Orig0_Orig1=591262.8,,03100939,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100939.raw
ECCD1_Orig0_Orig1_Orig2=581841.9,,03100935,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100935.raw
ECCD1_Orig0_Orig1_Orig2_Orig3=605402.3,,03100933,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03100933.raw
ECCD2=1,浓度3,501,,1560436,,4
ECCD2_Orig0=1587066,uV*sec,03101000,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101000.raw
ECCD2_Orig0_Orig1=1567609,,03101002,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101002.raw
ECCD2_Orig0_Orig1_Orig2=1520456,,03101004,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101004.raw
ECCD2_Orig0_Orig1_Orig2_Orig3=1566613,,03101006,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101006.raw
ECCD3=1,浓度4,800,,2498467,,4
ECCD3_Orig0=2550550,uV*sec,03101039,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101039.raw
ECCD3_Orig0_Orig1=2517532,,03101042,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101042.raw
ECCD3_Orig0_Orig1_Orig2=2390662,,03101044,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101044.raw
ECCD3_Orig0_Orig1_Orig2_Orig3=2535124,,03101048,G:\调试数据\0310\Debug\RowData\2017年\03月\10日\03101048.raw
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,3
ECCD0_Orig0=0,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=0,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=0,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,0,,0,,1
ECCD1_Orig0=0,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,0,,0,,1
ECCD2_Orig0=0,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,0,,0,,1
ECCD3_Orig0=0,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,16361.06,,3
ECCD0_Orig0=47343.28,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=694.44,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=1045.45,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,800,,188311.4,,1
ECCD1_Orig0=188311.4,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,2016,,478659.9,,1
ECCD2_Orig0=478659.9,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,3204,,774391.9,,1
ECCD3_Orig0=774391.9,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,53625.51,,3
ECCD0_Orig0=147851.3,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=6265.88,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=6759.36,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,200,,617721.8,,1
ECCD1_Orig0=617721.8,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,504,,1608550,,1
ECCD2_Orig0=1608550,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,801,,2573538,,1
ECCD3_Orig0=2573538,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[SYSINFO]
ECOUNT=3
[ENTITY0]
ECC=NMTHC,0,3,0,0,0,1,0,0,非数字,4,mV,1000,uV,ppm
ECCD0=1,浓度1,0,,0,,3
ECCD0_Orig0=0,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=0,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=0,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,0,,0,,1
ECCD1_Orig0=0,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,0,,0,,1
ECCD2_Orig0=0,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,0,,0,,1
ECCD3_Orig0=0,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY1]
ECC=THC,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,200,,16361.06,,3
ECCD0_Orig0=47343.28,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=694.44,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=1045.45,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,800,,188311.4,,1
ECCD1_Orig0=188311.4,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,2016,,478659.9,,1
ECCD2_Orig0=478659.9,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,3204,,774391.9,,1
ECCD3_Orig0=774391.9,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
[ENTITY2]
ECC=CH4,0,3,0,0,0,0,0,0,1,4,mV,1000,uV,ppm
ECCD0=1,浓度1,50,,53625.51,,3
ECCD0_Orig0=147851.3,uV*sec,50ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\50ppm.raw
ECCD0_Orig1=6265.88,,02090912,G:\调试数据\1.15\2017年\02月\09日\02090912.raw
ECCD0_Orig2=6759.36,,01150006,G:\调试数据\1.15\2017年\01月\15日\01150006.raw
ECCD1=1,浓度2,200,,617721.8,,1
ECCD1_Orig0=617721.8,uV*sec,200ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\200ppm.raw
ECCD2=1,浓度3,504,,1608550,,1
ECCD2_Orig0=1608550,uV*sec,504ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\504ppm.raw
ECCD3=1,浓度4,801,,2573538,,1
ECCD3_Orig0=2573538,uV*sec,801ppm,G:\调试数据\0224\800-200-500-50\Debug\RowData\801ppm.raw
This diff is collapsed.
【2017-02-27 10:39:51.5939】,系统初始化成功
【2017-03-09 14:58:31.1156】,系统初始化成功
【2017-03-09 15:06:21.1755】,系统初始化成功
【2017-03-09 16:00:36.5557】,系统初始化成功
【2017-03-09 16:05:49.6836】,系统初始化成功
【2017-03-10 10:50:13.2249】,系统初始化成功
【2017-03-10 10:51:08.0940】,系统初始化成功
【2017-03-10 11:00:58.5338】,系统初始化成功
【2017-03-10 11:02:15.7452】,系统初始化成功
【2017-03-10 11:04:27.5167】,系统初始化成功
【2017-03-10 11:07:08.9040】,系统初始化成功
【2017-03-10 11:07:23.2528】,系统初始化成功
【2017-03-10 11:09:52.7763】,系统初始化成功
【2017-03-13 09:58:23.9069】,系统初始化成功
【2017-03-13 10:00:17.6294】,系统初始化成功
【2017-03-13 10:32:22.3275】,系统初始化成功

namespace GcDevicePc
{
partial class ErrorLogForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.listView2 = new System.Windows.Forms.ListView();
this.listView1 = new System.Windows.Forms.ListView();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listView2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.textBox1);
this.splitContainer1.Panel2.Controls.Add(this.listView1);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 226;
this.splitContainer1.TabIndex = 1;
//
// listView2
//
this.listView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView2.HideSelection = false;
this.listView2.Location = new System.Drawing.Point(0, 0);
this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(226, 450);
this.listView2.TabIndex = 0;
this.listView2.UseCompatibleStateImageBehavior = false;
this.listView2.SelectedIndexChanged += new System.EventHandler(this.listView2_SelectedIndexChanged);
//
// listView1
//
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(570, 450);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(401, 271);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 21);
this.textBox1.TabIndex = 1;
//
// ErrorLogForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Name = "ErrorLogForm";
this.Text = "ErrorLogForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.TextBox textBox1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TTControl;
namespace GcDevicePc
{
public partial class ErrorLogForm : Form
{
private static string path = Path.Combine(IOOperations.GetParentFolder(Application.StartupPath), "GC_User\\Logs");
public ErrorLogForm()
{
InitializeComponent();
listView1.View = View.Details;
listView1.FullRowSelect = true;
UpdateUI(-1);
IOOperations.DocumentMonitoring(path, "*.txt", this,OnChanged,OnRenamed);
}
/// <summary>
/// 上次索引
/// </summary>
int oldindex = 0;
/// <summary>
/// 更新UI
/// </summary>
/// <param name="pos"></param>
private void UpdateUI(int pos)
{
//获取所有日志文件
Dictionary<string, string> allfile = new Dictionary<string, string>();
DirectoryInfo root = new DirectoryInfo(path);
FileInfo[] files = root.GetFiles();
foreach (var item in files)
{
if (item.Name.Contains("WorkErrInfo_"))
{
allfile.Add(item.Name, item.FullName);
}
}
this.SuspendLayout();
//更新左侧列表
listView2.Items.Clear();
foreach (var item in allfile)
{
ListViewItem listViewItem = new ListViewItem(item.Key);
listViewItem.Tag = item.Value;
listView2.Items.Add(listViewItem);
}
//读取选中日志文件
string[] data = default;
if (listView2.Items.Count > pos&&pos>-1)
{
listView2.Items[pos].Selected = true;
data = File.ReadAllLines(listView2.Items[pos].Tag.ToString());
}
else
{
if (listView2.Items.Count != 0)
{
listView2.Items[0].Selected = true;
data = File.ReadAllLines(listView2.Items[0].Tag.ToString());
}
}
//更新右侧列表
listView1.Items.Clear();
if (listView1.Columns.Count == 0)
{
//错误标题%错误内容%错误发生时仪器状态%错误发生后仪器处理"
listView1.Columns.AddRange(new ColumnHeader[] {
new ColumnHeader { Text = "错误标题", Width = listView1.Width/5-5,TextAlign= HorizontalAlignment.Center },
new ColumnHeader { Text ="错误内容", Width = listView1.Width/5-4,TextAlign= HorizontalAlignment.Center },
new ColumnHeader { Text ="错误发生时仪器状态", Width = listView1.Width/5-3,TextAlign= HorizontalAlignment.Center },
new ColumnHeader { Text = "错误发生后仪器处理", Width = listView1.Width/5-2,TextAlign= HorizontalAlignment.Center }, });
}
if (data != null)
{
foreach (var item in data)
{
//0=错误标题%1=错误内容%2=错误发生时仪器状态%3=错误发生后仪器处理"
string[]curdata=item.Split('%');
if (curdata.Length!=4)
{
continue ;
}
ListViewItem listViewItem = new ListViewItem();
listView1.Items.Add(listViewItem);
listViewItem.Text =curdata[0];
listViewItem.SubItems.Add(curdata[1]);
Button button = new Button();
button.Text = "当时状态";
button.Enabled = true;
button.AutoSize = true;
button.Click+=new EventHandler((object sender, EventArgs e)=> { PreviewAllStatuses(curdata[2]);});
Tool.ListViewAddControl(listView1, listView1.Items.Count - 1, 2, button);
listViewItem.SubItems.Add(curdata[4]);
}
}
this.ResumeLayout();
}
/// <summary>
/// 扩展显示
/// </summary>
/// <param name="value"></param>
private void PreviewAllStatuses(string value)
{
TextBox textBox=new TextBox();
textBox.Multiline=true;
textBox.Text=value;
Tool.ListViewPopUp(listView1,textBox);
}
/// <summary>
/// 监控更改,创建,删除触发事件
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
private void OnChanged(object source, FileSystemEventArgs e)
{
UpdateUI(oldindex);
}
/// <summary>
/// 监控重命名触发事件
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
private void OnRenamed(object source, RenamedEventArgs e)
{
UpdateUI(oldindex);
}
/// <summary>
/// 记录上次索引
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void listView2_SelectedIndexChanged(object sender, EventArgs e)
{
oldindex = listView2.SelectedIndices[0];
//日志还未写完
}
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WindowsFormsControlLibrary_PopUp;
namespace GcDevicePc.ExpansionMethod
{
public static class SelfAdaption
{
public static Point NewSize(this UserControl_PopUp UserControl_PopUp1, Size oldSize, Size newSize, Point oldtextPoint)
{
double scale = 0;
Point location = new Point();
scale = (double)((double)newSize.Height / (double)oldSize.Height);
location.Y = (int)(oldtextPoint.Y * scale)+newSize.Height*2/3;
scale = (double)((double)newSize.Width / (double)oldSize.Width);
location.X = (int)(oldtextPoint.X * scale);
return location;
}
}
}
namespace GcDevicePc
{
partial class Form5
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form5";
}
#endregion
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace GcDevicePc
{
public partial class Form5 : GcDevicePc.Form4
{
public Form5()
{
InitializeComponent();
}
}
}
......@@ -28,9 +28,13 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormUser));
this.buttonFID = new System.Windows.Forms.Button();
this.buttonauto = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.infoBarUser1 = new GcDevicePc.CK_UI.InfoBarUser();
this.userCtl1 = new GcDevicePc.CK_UI.UserCtl();
this.SuspendLayout();
......@@ -49,6 +53,22 @@
this.buttonauto.UseVisualStyleBackColor = true;
this.buttonauto.Click += new System.EventHandler(this.buttonauto_Click);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// infoBarUser1
//
resources.ApplyResources(this.infoBarUser1, "infoBarUser1");
......@@ -64,6 +84,8 @@
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.infoBarUser1);
this.Controls.Add(this.buttonauto);
this.Controls.Add(this.buttonFID);
......@@ -74,6 +96,7 @@
this.Deactivate += new System.EventHandler(this.FormUser_Deactivate);
this.Load += new System.EventHandler(this.FormUser_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
......@@ -84,5 +107,8 @@
private System.Windows.Forms.Button buttonFID;
private System.Windows.Forms.Button buttonauto;
private CK_UI.InfoBarUser infoBarUser1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Timer timer1;
}
}
\ No newline at end of file
......@@ -24,7 +24,12 @@ namespace GcDevicePc
private void FormUser_Load(object sender, EventArgs e)
{
// userCtl1.Systemtype = CKVocAnalyzer.GlobalCKV.Systemtype;
if (!MDIBase.bEnableTempHumi)
{
//不显示温湿度
label1.Enabled=false;
label2.Enabled=false;
}
}
private void FormUser_Activated(object sender, EventArgs e) //激活
......@@ -128,5 +133,11 @@ namespace GcDevicePc
{
Radjust(t);
}
private void timer1_Tick(object sender, EventArgs e)
{
label1.Text=$"环境温度:{globaldata.m_dpbuffer.ShowList.showtemp.AmbientTemp.ToString("#0.0")}";
label2.Text=$"环境湿度:{globaldata.m_dpbuffer.ShowList.showtemp.AmbientHumidity.ToString("#0.0")}";
}
}
}
This diff is collapsed.
......@@ -12,6 +12,7 @@ using GcDevicePc.Common;
using GcDevicePc.IniParam;
using System.Threading;
using System.Globalization;
using CKVocAnalyzer;
namespace GcDevicePc
{
......@@ -23,7 +24,22 @@ namespace GcDevicePc
CurveDisPlay curdisplay = new CurveDisPlay();
CurveDisPlay2 curdisplay2 = new CurveDisPlay2();
CurveDisPlay3 curdisplay3 = new CurveDisPlay3();
/// <summary>
/// 为兼容对数带来的新单位,开放组分单位修改,.往下更新
/// </summary>
/// <param name="unit1"></param>
/// <param name="unit2"></param>
/// <param name="unit3"></param>
public void ChangeParameterUnit(string unit, int index)
{
switch (index)
{
case 0: CurveDisPlay.curdisp.ChangeParameterUnit(unit); break;
case 1: CurveDisPlay2.curdisp2.ChangeParameterUnit(unit); break;
case 2: CurveDisPlay3.curdisp3.ChangeParameterUnit(unit); break;
default:break;
}
}
DataState dataleft = new DataState();//右侧状态显示窗口
private bool bEnglishLanguage = (Thread.CurrentThread.CurrentUICulture == CultureInfo.GetCultureInfo("en")) ? true : false;
public Formdebug()
......
......@@ -15,32 +15,80 @@ namespace GcDevicePc.GCBuffer
public struct TempInfo
{
//前进样口
/// <summary>
/// 前进样口当前温度
/// </summary>
public float FPActualTemp;
/// <summary>
/// 前进样口设定温度
/// </summary>
public float FPSetTemp;
//后进样口
/// <summary>
/// 后进样口当前温度
/// </summary>
public float BPActualTemp;
/// <summary>
/// 后进样口设定温度
/// </summary>
public float BPSetTemp;
//柱箱
/// <summary>
/// 柱箱当前温度
/// </summary>
public float ColActualTemp;
/// <summary>
/// 柱箱设定温度
/// </summary>
public float ColSetTemp;
//前检测器
/// <summary>
/// 前检测器当前温度
/// </summary>
public float fDetActualTemp;
/// <summary>
/// 前检测器设定温度
/// </summary>
public float fDetSetTemp;
//中检测器
/// <summary>
/// 中检测器当前温度
/// </summary>
public float iDetActualTemp;
/// <summary>
/// 中检测器设定温度
/// </summary>
public float iDetSetTemp;
//后检测器
/// <summary>
/// 后检测器当前温度
/// </summary>
public float bDetActualTemp;
/// <summary>
/// 后检测器设定温度
/// </summary>
public float bDetSetTemp;
//辅助Aux1
/// <summary>
/// 辅助Aux1当前温度
/// </summary>
public float AuxActualTemp1;
/// <summary>
/// 辅助Aux1设定温度
/// </summary>
public float AuxSetTemp1;
//辅助Aux2
/// <summary>
/// 辅助Aux2当前温度
/// </summary>
public float AuxActualTemp2;
/// <summary>
/// 辅助Aux2设定温度
/// </summary>
public float AuxSetTemp2;
/// <summary>
/// 环境温度
/// </summary>
public float AmbientTemp;
/// <summary>
/// 环境湿度
/// </summary>
public float AmbientHumidity;
}
public struct valvetime
......@@ -65,10 +113,40 @@ namespace GcDevicePc.GCBuffer
public valvetime ValveThreeTime;//时间
public bool u16ValveFour; //阀开关状态
public valvetime ValveFourTime; //时间
/// <summary>
/// 虚拟阀5
/// </summary>
public bool u16ValveFive; //阀开关状态
public valvetime ValveFiveTime; //时间
/// <summary>
/// 虚拟阀6
/// </summary>
public bool u16ValveSix; //阀开关状态
public valvetime ValveSixTime; //时间
/// <summary>
/// 氢气1
/// </summary>
public bool u16ValveH1;
/// <summary>
/// 空气1
/// </summary>
public bool u16ValveAir1;
/// <summary>
/// 氢气2
/// </summary>
public bool u16ValveH2;
/// <summary>
/// 空气2
/// </summary>
public bool u16ValveAir2;
/// <summary>
/// rl11
/// </summary>
public bool u16ValveRL11;
/// <summary>
/// rl12
/// </summary>
public bool u16ValveRL12;
}
public struct ISportInfo
......@@ -85,50 +163,7 @@ namespace GcDevicePc.GCBuffer
}
public struct EPCInfo
{
////前进样
//public ushort FSChannel1_Cur;
//public ushort FSChannel2_Cur;
//public ushort FSChannel3_Cur;
//public ushort FSChannel1_Set;
//public ushort FSChannel2_Set;
//public ushort FSChannel3_Set;
////前检测
//public ushort FDChannel1_Cur;
//public ushort FDChannel2_Cur;
//public ushort FDChannel3_Cur;
//public ushort FDChannel1_Set;
//public ushort FDChannel2_Set;
//public ushort FDChannel3_Set;
////中进样
//public ushort ISChannel1_Cur;
//public ushort ISChannel2_Cur;
//public ushort ISChannel3_Cur;
//public ushort ISChannel1_Set;
//public ushort ISChannel2_Set;
//public ushort ISChannel3_Set;
////中检测
//public ushort IDChannel1_Cur;
//public ushort IDChannel2_Cur;
//public ushort IDChannel3_Cur;
//public ushort IDChannel1_Set;
//public ushort IDChannel2_Set;
//public ushort IDChannel3_Set;
////后进样
//public ushort BSChannel1_Cur;
//public ushort BSChannel2_Cur;
//public ushort BSChannel3_Cur;
//public ushort BSChannel1_Set;
//public ushort BSChannel2_Set;
//public ushort BSChannel3_Set;
////后检测
//public ushort BDChannel1_Cur;
//public ushort BDChannel2_Cur;
//public ushort BDChannel3_Cur;
//public ushort BDChannel1_Set;
//public ushort BDChannel2_Set;
//public ushort BDChannel3_Set;
//EPC-进样1
......@@ -186,16 +221,25 @@ namespace GcDevicePc.GCBuffer
{
public ushort fDetStatue;
public bool fDetSwitch; //点火状态
public float fDetValue; //信号值
/// <summary>
/// 前检测信号值,单位mv
/// </summary>
public float fDetValue;
public ushort fDetPol; //档位
public ushort iDetStatue;
public bool iDetSwitch;
/// <summary>
/// 中检测信号值,单位mv
/// </summary>
public float iDetValue;
public ushort iDetPol;
public ushort bDetStatue;
public bool bDetSwitch;
/// <summary>
/// 后检测信号值,单位mv
/// </summary>
public float bDetValue;
public ushort bDetPol;
}
......@@ -249,7 +293,8 @@ namespace GcDevicePc.GCBuffer
this.ShowList.showtemp.AuxSetTemp1 = 0.0f;
this.ShowList.showtemp.AuxActualTemp2 = 0.0f;
this.ShowList.showtemp.AuxSetTemp2 = 0.0f;
this.ShowList.showtemp.AmbientTemp=0.0f;
this.ShowList.showtemp.AmbientHumidity=0.0f;
this.ShowList.showValve.u16ValveOne = false;
this.ShowList.showValve.ValveOneTime.start1 = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -227,6 +227,15 @@ namespace GcDevicePc.GCBuffer
int fi = ini.ReadInteger("StartUp", "Forceintegral");
//string unit = ini.ReadString("StartUp", "Unit");
string zbname = ini.ReadString("StartUp", "TdName");
if (ini.ReadString("StartUp", "信号获取方式")=="")
{
globaldata.SignalAcquisition="Modbus";
}
else
{
globaldata.SignalAcquisition=ini.ReadString("StartUp", "信号获取方式");
}
globaldata.ZbName = zbname;
globaldata.UserName = uname;
globaldata.UserPwd = upwd;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
test
0;test;2016/9/10 13:15:05
自动查找全谱图范围上的所有 峰点和谷点!
对峰和谷的范围能进行限制,
如高于多少值才认为是峰,峰和谷的差值(峰跃)高于多少才认为是峰,
不高于多少值的谷点才认为是谷点,高于多少值的谷点能进行分离回到基线,
低于多少值的谷点不认为是谷点,而是负峰,另外可进行翻转,
基线是所有合格谷点的连线。
峰面积的切割有前谷点平切, 后谷点平切, 以及前后谷点斜切。
峰分离有,分离到最近前谷点,分离到前谷点均值,分离到固定值。
校准算法有 分段查表拟合, 二元方程拟合。
浓度的计算可以 峰高,峰面积和峰半宽 混合参与运算!
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Vocs_opt @ a108d43a
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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