提交 fe106ea5 authored 作者: yangbinjay's avatar yangbinjay

...

上级 5a143667
......@@ -12,9 +12,9 @@ DEBUG;TRACE
E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P.CommTool\App.xaml
1219584333
51579654133
61324576772
13-1749376338
MainWindow.xaml;
False
True
using GKHTRBC16P.Toolbox;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GKHTRBC16P.Protocol.Boven
{
public class EspecEhs
{
private static readonly EspecEhs instance = new EspecEhs();
private readonly int MaxWatingTime = 300;
//private SuLock mLock = new SuLock();
private EspecEhs() { }
public static EspecEhs Instance
{
get
{
return instance;
}
}
public ushort ReadOven(Form from, int Com, int addr)
{
Monitor.Enter(SerialCom.ComWriteLock3[Com]);
ushort result = 1;
try
{
SerialCom.Oven_IsRreceiving = true;
uPublic.WriteOLog("ReadOven:Begin");
ushort cnum = 3;
while (result > 0 && cnum > 0)
{
result = ReadOvener(from, Com, addr);
if (result == 0)
{
uPublic.WriteOLog("ReadOven:End");
return result;
}
cnum--;
}
uPublic.WriteOLog("ReadOven:End No Data");
return result;
}
catch (Exception ex)
{
uPublic.WriteOLog(ex.Message);
return 6;
}
finally
{
SerialCom.Oven_IsRreceiving = false;
Monitor.Exit(SerialCom.ComWriteLock3[Com]);
}
}
/// <summary>
/// 读取试验箱温度的专用程序
/// </summary>z
/// <param name="addr"></param>
/// <returns></returns>
public ushort ReadOvener(Form from, int Com, int addr)
{
try
{
SerialCom.OpenSerial_HighTem1_Parm(Com, 19200, "无", 8, "1");
uPublic.WriteOLog("-->" + addr + ",MON?" + Environment.NewLine);
SerialCom.SerialPort_HighTem1[Com].Write(addr + ",MON?" + Environment.NewLine);
int Count = 10;
string schar = "";
string schar1 = "";
DateTime dt = DateTime.Now;
while (SerialCom.SerialPort_HighTem1[Com].BytesToRead < Count)
{
Thread.Sleep(100);
if (DateTime.Now.Subtract(dt).TotalMilliseconds > MaxWatingTime) //如果2秒后仍然无数据返回,则视为超时
{
uPublic.WriteOLog("Read,设备未响应" + SerialCom.SerialPort_HighTem1[Com].PortName);
//SerialCom.OpenSerial_HighTem1_Close(Com, false);//关闭
return 5;
}
}
char[] echar = new char[SerialCom.SerialPort_HighTem1[Com].BytesToRead];
SerialCom.SerialPort_HighTem1[Com].Read(echar, 0, SerialCom.SerialPort_HighTem1[Com].BytesToRead);
schar = (new String(echar)).Trim();
uPublic.WriteOLog("<--" + schar);
if (schar == "")
{
uPublic.WriteOLog("Read,设备数据异常" + SerialCom.SerialPort_HighTem1[Com].PortName);
return 4;
}
else if (!ConvertDataOpear.IsDecimal(schar.Substring(1, 1)) || !ConvertDataOpear.IsDecimal(schar.Substring(0, 1)))
{
uPublic.WriteOLog("Read,设备数据异常1" + SerialCom.SerialPort_HighTem1[Com].PortName);
return 3;
}
uPublic.WriteOLog("-->1");
int n = schar.IndexOf(",") + 1;
if (n >= 2)
{
uPublic.WriteOLog("-->2");
schar1 = schar.Substring(0, n - 1);
CalculationAo.OvenRead[0] = ConvertDataOpear.StrToFloat(schar1);
schar = schar.Substring(n);
n = schar.IndexOf(",") + 1;
if (n >= 2)
{
uPublic.WriteOLog("-->3");
schar1 = schar.Substring(0, n - 1);
if ((schar1 == "OFF") || (schar1 == "ON"))
{
uPublic.WriteOLog("Read,设备数据异常2" + SerialCom.SerialPort_HighTem1[Com].PortName);
return 2;
}
else
{
uPublic.WriteOLog("-->4");
CalculationAo.OvenRead[1] = CalculationAo.OvenRead[0];
CalculationAo.HumiRead[0] = ConvertDataOpear.StrToFloat(schar1);
schar = schar.Substring(n);
n = schar.IndexOf(",") + 1;
if (n >= 2)
{
schar1 = schar.Substring(0, n - 1);
CalculationAo.OvenRead[2] = ConvertDataOpear.StrToFloat(schar1);
schar = schar.Substring(n);
CalculationAo.OvenRead[3] = ConvertDataOpear.StrToFloat(schar);
}
}
}
}
return 0;
}
catch (IOException ex)
{
uPublic.WriteOLog("串口 I/O 异常:" + ex.Message + ", " + ex.StackTrace);
return 1;
}
catch (TimeoutException ex)
{
uPublic.WriteOLog($"超时异常,Com: {Com}, 异常信息: {ex.Message}");
return 2;
}
catch (Exception ex)
{
uPublic.WriteOLog(ex.Message);
return 1;
}
}
public int ComTemperature(Form from, int Com, string Cmd)
{
Monitor.Enter(SerialCom.ComWriteLock3[Com]);
try
{
SerialCom.Oven_IsRreceiving = true;
int Count = 2;
SerialCom.OpenSerial_HighTem1_Parm(Com, 19200, "无", 8, "1");
uPublic.WriteOLog("-->" + Cmd + Environment.NewLine);
SerialCom.SerialPort_HighTem1[Com].Write(Cmd + Environment.NewLine);
DateTime dt = DateTime.Now;
while (SerialCom.SerialPort_HighTem1[Com].BytesToRead < Count)
{
Thread.Sleep(100);
if (DateTime.Now.Subtract(dt).TotalMilliseconds > MaxWatingTime)
{
uPublic.WriteOLog("ComTemperature,设备未响应" + SerialCom.SerialPort_HighTem1[Com].PortName);
return 4;
}
}
char[] echar = new char[SerialCom.SerialPort_HighTem1[Com].BytesToRead];
SerialCom.SerialPort_HighTem1[Com].Read(echar, 0, SerialCom.SerialPort_HighTem1[Com].BytesToRead);
string schar = (new String(echar)).Trim();
uPublic.WriteOLog("<--" + schar);
if (schar.Substring(0, 2) != "OK")
{
uPublic.WriteOLog("ComTemperature,设备数据异常1" + SerialCom.SerialPort_HighTem1[Com].PortName + schar);
return 4;
}
return 0;
}
catch (IOException ex)
{
uPublic.WriteOLog("串口 I/O 异常:" + ex.Message + ", " + ex.StackTrace);
return 1;
}
catch (TimeoutException ex)
{
uPublic.WriteOLog($"超时异常,Com: {Com}, 异常信息: {ex.Message}");
return 2;
}
catch (Exception ex)
{
uPublic.WriteOLog(ex.Message);
return 1;
}
finally
{
SerialCom.Oven_IsRreceiving = false;
Monitor.Exit(SerialCom.ComWriteLock3[Com]);
}
}
//读取版本号
//[10:05:33.557] 发→◇1, ROM?
//[10:05:33.579] 收←◆EHS-222 Ver.198. 12
//读取设置温度和湿度
//[10:20:05.565] 发→◇1, SET?
//[10:20:05.596] 收←◆105.0 , 100 , 0.0
//读取当前温度和湿度
//[10:22:43.381] 发→◇1, MON?
//[10:22:43.419] 收←◆ 52.0, 31, CONSTANT, 0
//开始
//[14:56:43.692] 发→◇1, START
//[14:56:43.730]收←◆OK:1,START
//停止
//[14:57:58.167]发→◇1,QUICKFINISH
//[14:57:58.192] 收←◆OK:1,QUICKFINISH
//设置
//[15:56:17.418]发→◇1,SET,107.0,98.0
//[15:56:17.456] 收←◆OK:1,SET,107.0,98.0
}
}
......@@ -141,7 +141,7 @@ namespace GKHTRBC16P.Protocol.Boven
{
uPublic.WriteOLog("Read,设备数据异常2" + SerialCom.SerialPort_HighTem1[Com].PortName);
//from.ShowErrorTip("设备数据异常2" + SerialCom.Communication_HighTem1.ComName);
//SerialCom.OpenSerial_HighTem1_Close(Com, false);//关闭
SerialCom.OpenSerial_HighTem1_Close(Com, false);//关闭
return 0;//return 2;
}
else
......@@ -161,7 +161,7 @@ namespace GKHTRBC16P.Protocol.Boven
}
}
//SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
return 0;
}
catch (IOException ex)
......@@ -264,7 +264,7 @@ namespace GKHTRBC16P.Protocol.Boven
CalculationAo.HumiRead[0] = ConvertDataOpear.StrToFloat(schar1);
}
}
//SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
return 0;
}
catch (IOException ex)
......@@ -317,7 +317,7 @@ namespace GKHTRBC16P.Protocol.Boven
//SerialCom.OpenSerial_HighTem1_Close(Com, false);//关闭
return 4;
}
//SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
SerialCom.OpenSerial_HighTem1_Close(Com, true);//关闭
return 0;
}
catch (IOException ex)
......
......@@ -52,6 +52,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Boven\EspecEhs.cs" />
<Compile Include="Boven\Ewgzks.cs" />
<Compile Include="Boven\Gws.cs" />
<Compile Include="Boven\Hirayama.cs" />
......
4e05ba76df49819a359639f6c0643802e761b5c3d385b1e602c92ed5e0d57624
f5651d80a149cb43c5f5969c7d3457d028f3cec465e26b4fbe16d068f992e0c7
......@@ -23,7 +23,7 @@ namespace GKHTRBC16P.Toolbox
/// <summary>
/// //用来存储检测的电压值和电流值,分别是[0-电压检测值、1-电流检测值,2-过压设置值,3-过流设置值,4-过流标志,5-电源类型、6-电源额定电压、7-电源额定电流,8-电压设置值,9-电流设置值,10-过压设置值,11-过流设置值]
/// </summary>
public static double[,] HTRBPWR = new double[32, 15];
public static double[,] HTRBPWR = new double[36, 15];
public static int[] ComRxdData = new int[256];
public static int[] ComRxdDataA = new int[511];
public static double LYPowerResult { get; set; } =0;
......@@ -35,13 +35,13 @@ namespace GKHTRBC16P.Toolbox
/// 0:温度 1:设定值;2:温度上限;3:温度下限
public static double[] HumiRead = new double[4];
/// 器件的其它参数,分别是[试验类型-0、老化时间-1、器件IR超限工位数-2、老化板识别码-3、器件Tj超限工位数-4、工位检测循环模式(标记位,起始位,终止位)-5、Tj检测间隔时间-6、NC、输出电流容限-8、温度检测开关-9、采样间隔时长-10、试验时长-11、运行状态-12(0:停止运行;11:正在运行;01:暂停运行;10;继续运行)]
public static int[,] HTRBOT = new int[32, 15];
public static int[,] HTRBOT = new int[36, 15];
/// 进入保险丝通断检测,插板检测,失效工位检测页面的设备标志位
public static int DevClickFlagSel = 0;
///插板检测时检测板的状态,分别是[驱动板-0(如果连接不上,则显示0,正常为1)、插板状态-1、是否运行-2、继电器开通关断-3、是否有报警-4、报警号-5、输入电压*10-6、NC、IR超限工位数-8、Tj超限工位数-9]
public static int[,] HTRBCheck = new int[32, 10];
public static int[,] HTRBCheck = new int[36, 10];
////电源设置及读取的数组。0 读取的电压、1 读取的电流
public static double[,] PowerSetRead = new double[32, 10];
public static double[,] PowerSetRead = new double[36, 10];
public static Dictionary<int, int[]> BridageData = new Dictionary<int, int[]>();
public static Dictionary<int, int[]> ComdData = new Dictionary<int, int[]>();
public static Dictionary<int, int[]> VgsData = new Dictionary<int, int[]>();
......@@ -53,7 +53,7 @@ namespace GKHTRBC16P.Toolbox
public static List<Test_Power> TpowerList { get; set; }
public static int BoardSS { get; set; } = 0;//显示当前界面的板号
public static int RunLEDState = 0;
public static int[] OnOffFre = new int[32];//通断次数
public static int[] OnOffFre = new int[36];//通断次数
public static Dictionary<int, int> TitTimeBoard { get; set; }
public static Dictionary<int, DateTime> DateTimeBoard { get; set; }
public static Dictionary<int, DateTime> PowerTime { get; set; }
......@@ -62,7 +62,7 @@ namespace GKHTRBC16P.Toolbox
public static bool TemperGetBool { get; set; } = true;//是否启动烘箱检测
public static bool TricolorGetBool { get; set; } = true;
public static bool DreoubGetBool { get; set; } = true;
public static int[] ZFConfig = new int[32]; //每块驱动板的检测正负电流信号
public static int[] ZFConfig = new int[36]; //每块驱动板的检测正负电流信号
public static Dictionary<int, Dic_StationSp> DicBoardInfo = new Dictionary<int, Dic_StationSp>();
//public static Dic_StationSp Dic_Station { get; set; }//数据列
//public static Dic_StationSp Dic_BrStation { get; set; }//数据列
......
......@@ -919,6 +919,11 @@ namespace GKHTRBC16P
{
result = Ewgzks.Instance.FboarddataSet(this, TemperaSign - 1, ten.Temp);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
Oven_Data oven_Data = ConvertDataOpear.GetOven(ten.OvenId, CalculationAo.OvenList);
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + string.Format(",SET,{0},{1},96", ten.Temp, oven_Data.HumidityA));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -952,6 +957,10 @@ namespace GKHTRBC16P
{
result = Ewgzks.Instance.FboarddataHimiSet(this, TemperaSign - 1, Convert.ToDouble(ten.Hum));
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + string.Format(",SET,{0},{1},96", ten.Temp, ten.Hum));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -972,6 +981,10 @@ namespace GKHTRBC16P
{
result = Ewgzks.Instance.FboarddataStatus(this, TemperaSign - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + ",START");
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......
......@@ -463,7 +463,7 @@ namespace GKHTRBC16P.FunMov
if (!ConvertDataOpear.IsDecimal(EditVSet.Text.Trim()))
{
FrmMain.mainForm.Prompt("potion");
uPublic.WriteLog((sender as UIButton).Text + "," + powernum + "," + "电压超过设置的反偏电压值");
uPublic.WriteLog((sender as UIButton).Text + "," + powernum + "," + "请输入电压值");
return;
}
Dev_Correspondence corr = CalculationAo.CorrPowerDic.Values.FirstOrDefault(x => x.PowerId.Contains("PS" + powernum));
......
......@@ -1012,9 +1012,9 @@ namespace GKHTRBC16P.FunMov
this.tabPage2.CausesValidation = false;
this.tabPage2.Controls.Add(this.plotView1);
this.tabPage2.Controls.Add(this.uiPanel5);
this.tabPage2.Location = new System.Drawing.Point(0, 40);
this.tabPage2.Location = new System.Drawing.Point(0, 30);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(200, 60);
this.tabPage2.Size = new System.Drawing.Size(839, 768);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "历史曲线";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -1025,7 +1025,7 @@ namespace GKHTRBC16P.FunMov
this.plotView1.Location = new System.Drawing.Point(0, 41);
this.plotView1.Name = "plotView1";
this.plotView1.PanCursor = System.Windows.Forms.Cursors.Hand;
this.plotView1.Size = new System.Drawing.Size(200, 19);
this.plotView1.Size = new System.Drawing.Size(839, 727);
this.plotView1.TabIndex = 1;
this.plotView1.Text = "plotView1";
this.plotView1.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE;
......@@ -1047,7 +1047,7 @@ namespace GKHTRBC16P.FunMov
this.uiPanel5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiPanel5.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel5.Name = "uiPanel5";
this.uiPanel5.Size = new System.Drawing.Size(200, 41);
this.uiPanel5.Size = new System.Drawing.Size(839, 41);
this.uiPanel5.TabIndex = 0;
this.uiPanel5.Text = null;
this.uiPanel5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
......
......@@ -1139,7 +1139,7 @@ namespace GKHTRBC16P.FunMov
// uiLineChart1.SetOption(iolineoption);
//}));
chartAtion.AllLineData(plotView1,strArr, param);
uPublic.WriteLog((sender as UIButton).Text + ",单工位查询:" + param.Id+","+ StationPost.Text);
uPublic.WriteLog("单工位查询:" + param.Id+","+ StationPost.Text);
}
}
catch (Exception ex)
......
......@@ -84,7 +84,7 @@ namespace GKHTRBC16P.FunMov
//uiDataGridView1.Rows.Clear();
if (index < 0)
{
if (list.Count <= 0)
if (list.Count < CalculationAo.ThisDevConfig.Passageway)
{
list = new List<Dev_Thorou>();
for (int i = 1; i <= CalculationAo.ThisDevConfig.Passageway; i++)
......
......@@ -216,11 +216,11 @@ namespace GKHTRBC16P.Jurisdiction
stageCompressionbll.Update(model);
}
}
uPublic.WriteLog((sender as UISymbolButton).Text + "," + JsonConvert.SerializeObject(stagelist));
uPublic.WriteLog(JsonConvert.SerializeObject(stagelist));
}
catch (Exception ex)
{
uPublic.WriteLog((sender as UISymbolButton).Text + "," + ex.StackTrace);
uPublic.WriteLog(ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......
......@@ -206,7 +206,7 @@ namespace GKHTRBC16P.Jurisdiction
}
catch (Exception ex)
{
uPublic.WriteLog((sender as UISymbolButton).Text + ":" + ex.StackTrace);
uPublic.WriteLog(ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......
......@@ -738,6 +738,11 @@ namespace GKHTRBC16P.RunLibrary
{
result = Ewgzks.Instance.FboarddataSet(uIForm, No-1, Convert.ToDouble(Temp));
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
Oven_Data oven_Data = ConvertDataOpear.GetOven(No+"#", CalculationAo.OvenList);
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + string.Format(",SET,{0},{1},96", Temp, oven_Data.HumidityA));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -756,6 +761,11 @@ namespace GKHTRBC16P.RunLibrary
{
result = Gws.Instance.ComTemperature(uIForm, 0, No + ",TEMP,S" + Temp.ToString("000.0"));
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
Oven_Data oven_Data = ConvertDataOpear.GetOven(No + "#", CalculationAo.OvenList);
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + string.Format(",SET,{0},{1},96", Temp, oven_Data.HumidityA));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -778,6 +788,10 @@ namespace GKHTRBC16P.RunLibrary
{
result = Ewgzks.Instance.FboarddataStatus(uIForm, No - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + ",START");
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -796,6 +810,10 @@ namespace GKHTRBC16P.RunLibrary
{
result = Ewgzks.Instance.FboarddataStatus(uIForm, No - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + ",START");
}
else
{
......@@ -824,6 +842,11 @@ namespace GKHTRBC16P.RunLibrary
{
result = Ewgzks.Instance.FboarddataHimiSet(uIForm, No - 1, Convert.ToDouble(himi));
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
Oven_Data oven_Data = ConvertDataOpear.GetOven(No + "#", CalculationAo.OvenList);
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + string.Format(",SET,{0},{1},96", oven_Data.TemA, Convert.ToDouble(himi)));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -842,6 +865,11 @@ namespace GKHTRBC16P.RunLibrary
{
result = Ewgzks.Instance.FboarddataStatus(uIForm, No - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
Oven_Data oven_Data = ConvertDataOpear.GetOven(No + "#", CalculationAo.OvenList);
result = EspecEhs.Instance.ComTemperature(uIForm, No - 1, No + string.Format(",SET,{0},{1},96", oven_Data.TemA, Convert.ToDouble(himi)));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......
......@@ -348,9 +348,10 @@ namespace GKHTRBC16P.RunLibrary
{
if (CalculationAo.DateTimeBoard[tes.Id].AddMinutes(CalculationAo.ThisDevConfig.TimeInterVal) <= DateTime.Now && TduStatus(tes))
{
double IrDunit = ConvertDataOpear.Unitmultiplier(WayId + 1, "nA");
for (int m = 0; m < CalculationAo.Thorous[WayId + 1].Snum; m++)
{
SI = (double)Convert.ToUInt32(ComRxdData[m * 4 + 43].ToString("X2") + ComRxdData[m * 4 + 42].ToString("X2") + ComRxdData[m * 4 + 41].ToString("X2") + ComRxdData[m * 4 + 40].ToString("X2"), 16) / 100000;//协议是ua除以100,改成uA,为了和器件库统一
SI = (double)Convert.ToUInt32(ComRxdData[m * 4 + 43].ToString("X2") + ComRxdData[m * 4 + 42].ToString("X2") + ComRxdData[m * 4 + 41].ToString("X2") + ComRxdData[m * 4 + 40].ToString("X2"), 16) / 100* IrDunit;//协议是ua除以100,改成uA,为了和器件库统一
SaveStation[m] = Math.Round(SI, CalculationAo.ThisDevConfig.DataLength.Length - 2);
}
CalculationAo.DateTimeBoard[tes.Id] = DateTime.Now;
......@@ -579,9 +580,10 @@ namespace GKHTRBC16P.RunLibrary
{
if (CalculationAo.DateTimeBoard[tes.Id].AddMinutes(CalculationAo.ThisDevConfig.TimeInterVal) <= DateTime.Now && TduStatus(tes))
{
double IrDunit = ConvertDataOpear.Unitmultiplier(WayId + 1, "nA");
for (int m = 0; m < CalculationAo.Thorous[WayId + 1].Snum; m++)
{
SI = (double)Convert.ToUInt32(ComRxdData[m * 4 + 18].ToString("X2") + ComRxdData[m * 4 + 17].ToString("X2") + ComRxdData[m * 4 + 16].ToString("X2") + ComRxdData[m * 4 + 15].ToString("X2"), 16) / 1000;
SI = (double)Convert.ToUInt32(ComRxdData[m * 4 + 18].ToString("X2") + ComRxdData[m * 4 + 17].ToString("X2") + ComRxdData[m * 4 + 16].ToString("X2") + ComRxdData[m * 4 + 15].ToString("X2"), 16) * IrDunit;
SaveStation[m] = Math.Round(SI, CalculationAo.ThisDevConfig.DataLength.Length - 2);
}
CalculationAo.DateTimeBoard[tes.Id] = DateTime.Now;
......
......@@ -118,6 +118,24 @@ namespace GKHTRBC16P.RunLibrary
CalculationAo.TemData[2] = 0;
}
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
for (int i = 0; i < CalculationAo.ThisDevConfig.BoxNum; i++)
{
if (EspecEhs.Instance.ReadOven(FrmMain.mainForm, i, i + 1) == 0)
{
CalculationAo.TemData[i * 2 + 1] = Math.Round(CalculationAo.OvenRead[0] * 10, 1);
CalculationAo.RunLEDState = 0; //每次设置完成后,LED只进入读取状态
CalculationAo.TemData[i * 2 + 2] = Math.Round(CalculationAo.HumiRead[0] * 10, 1);
OisovenCutoff[0] = DateTime.Now;
}
else
{
CalculationAo.TemData[i * 2 + 1] = 0;
CalculationAo.TemData[i * 2 + 2] = 0;
}
}
}
else
{
if (Gws.Instance.ReadOven(FrmMain.mainForm, 0, CalculationAo.ThisDevConfig.TestBoxNo) == 0)
......
......@@ -172,6 +172,21 @@ namespace GKHTRBC16P.ToolLibrary
CalculationAo.TemData[2] = 0;
}
}
if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
if (EspecEhs.Instance.ReadOven(FrmMain.mainForm, TemperaSign-1, TemperaSign) == 0)
{
CalculationAo.TemData[(TemperaSign - 1) * 2 +1] = Math.Round(CalculationAo.OvenRead[0] * 10, 1);
CalculationAo.RunLEDState = 0; //每次设置完成后,LED只进入读取状态
CalculationAo.TemData[(TemperaSign - 1) * 2 +2] = Math.Round(CalculationAo.HumiRead[0] * 10, 1);
ShowHuiControl(true);
}
else
{
CalculationAo.TemData[(TemperaSign - 1) * 2 +1] = 0;
CalculationAo.TemData[(TemperaSign - 1) * 2 +2] = 0;
}
}
else
{
if (Gws.Instance.ReadOven(this, TemperaSign - 1, CalculationAo.ThisDevConfig.TestBoxNo) == 0)
......@@ -414,6 +429,21 @@ namespace GKHTRBC16P.ToolLibrary
CalculationAo.TemData[2] = 0;
}
}
if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
if (EspecEhs.Instance.ReadOven(FrmMain.mainForm, TemperaSign - 1, TemperaSign) == 0)
{
CalculationAo.TemData[(TemperaSign - 1) * 2 + 1] = Math.Round(CalculationAo.OvenRead[0] * 10, 1);
CalculationAo.RunLEDState = 0; //每次设置完成后,LED只进入读取状态
CalculationAo.TemData[(TemperaSign - 1) * 2 + 2] = Math.Round(CalculationAo.HumiRead[0] * 10, 1);
ShowHuiControl(true);
}
else
{
CalculationAo.TemData[(TemperaSign - 1) * 2 + 1] = 0;
CalculationAo.TemData[(TemperaSign - 1) * 2 + 2] = 0;
}
}
else
{
if (Gws.Instance.ReadOven(this, TemperaSign - 1, CalculationAo.ThisDevConfig.TestBoxNo) == 0)
......@@ -534,6 +564,11 @@ namespace GKHTRBC16P.ToolLibrary
{
result = Ewgzks.Instance.FboarddataSet(this, TemperaSign - 1, Settemp);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
double SetHimi = SEdtHui.DoubleValue;
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign+string.Format(",SET,{0},{1},96", Settemp,SetHimi));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -587,6 +622,10 @@ namespace GKHTRBC16P.ToolLibrary
{
result = Ewgzks.Instance.FboarddataStatus(this, TemperaSign - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + ",START");
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -610,7 +649,6 @@ namespace GKHTRBC16P.ToolLibrary
result = Gws.Instance.ComTemperature(this, TemperaSign - 1, CalculationAo.ThisDevConfig.TestBoxNo + ",MODE,CONSTANT");
}
}
if (result == 0)
{
ShowSuccessTip("定值运行设置成功");
......@@ -641,6 +679,10 @@ namespace GKHTRBC16P.ToolLibrary
{
result = Ewgzks.Instance.FboarddataStatus(this, TemperaSign - 1, 0x40);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + ",QUICKFINISH");
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -697,6 +739,11 @@ namespace GKHTRBC16P.ToolLibrary
{
result = Ewgzks.Instance.FboarddataSet(this, TemperaSign - 1, Settemp);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
double SetHimi = SEdtHui.DoubleValue;
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + string.Format(",SET,{0},{1},96", Settemp, SetHimi));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......@@ -784,6 +831,11 @@ namespace GKHTRBC16P.ToolLibrary
{
result = Ewgzks.Instance.FboarddataHimiSet(this, TemperaSign - 1, Settemp);
}
else if (CalculationAo.ThisDevConfig.TestBoxId == 7)
{
double SetHimi = SESetOven.DoubleValue;
result = EspecEhs.Instance.ComTemperature(this, TemperaSign - 1, TemperaSign + string.Format(",SET,{0},{1},96", SetHimi, Settemp));
}
else
{
if (CalculationAo.ThisDevConfig.BoxNum >= 4)
......
......@@ -808,6 +808,10 @@ namespace GKHTRBC16P.ToolLibrary
}
else if (tparm.Ishtrb == 4)
{
if (Txt_SrefSingeRefresh.Value > 0 && Txt_SrefSingeRefresh.Value <= CalculationAo.Thorous[iChangeId + 1].Snum)
Htgb80.Instance.FboarddataTestParm(this, thor.ComId - 1, iChangeId + 1, 0x03, 0xA5, Txt_SrefSingeRefresh.Value - 1, tparm.SupplyRGPW, 39);//Txt_SupplyRGPW.SelectedIndex + 1
else
Htgb80.Instance.FboarddataTestParm(this, thor.ComId - 1, iChangeId + 1, 0x03, 0xA5, thor.Snum - 1, tparm.SupplyRGPW, 39);
result = Htgb80.Instance.FboarddataTestStatus(this, thor.ComId - 1, iChangeId + 1, 0x04, 0xA5, 0x02, 20);
}
else if (tparm.Ishtrb == 5)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论