You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
615 lines
28 KiB
615 lines
28 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using QMFrameWork.WebUI.Attribute;
|
|
using QMAPP.Common.Web.Controllers;
|
|
using QMAPP.FJC.Web.Models.ParameterQuery;
|
|
using QMAPP.FJC.Entity.Basic;
|
|
using QMAPP.ServicesAgent;
|
|
using QMAPP.Entity;
|
|
using QMFrameWork.Data;
|
|
using QMFrameWork.WebUI.DataSource;
|
|
using QMFrameWork.Common.Serialization;
|
|
using System.Data;
|
|
using Globale_Variablen.AnzeigeDaten;
|
|
using System.Text;
|
|
|
|
namespace QMAPP.FJC.Web.Controllers
|
|
{
|
|
public class ParameterQueryController : QController
|
|
{
|
|
//
|
|
// GET: /ParameterQuery/
|
|
[HandleException]
|
|
public ActionResult Index()
|
|
{
|
|
ParameterQueryModel seachModel = new ParameterQueryModel();
|
|
seachModel.CREATEDATEEND = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
|
|
seachModel.CREATEDATESTART = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
|
|
|
|
|
|
return View(seachModel);
|
|
}
|
|
[HttpPost]
|
|
[HandleException]
|
|
public ActionResult Index(ParameterQueryModel model)
|
|
{
|
|
if (string.IsNullOrEmpty(model.MachineCode))
|
|
{
|
|
SetMessage("请选择设备!");
|
|
}
|
|
ServiceAgent wcfAgent = this.GetServiceAgent();
|
|
DataResult<List<ProcessParameter>> result = wcfAgent.InvokeServiceFunction<DataResult<List<ProcessParameter>>>(QMAPP.ServicesAgent.B9BasicService.ProcessParameterBLL_GetAllList.ToString(), new ProcessParameter { MACHINECODDE = model.MachineCode });
|
|
if (result.Result != null && result.Result.Count>0)
|
|
{
|
|
model.ParamColumns=result.Result;
|
|
model.Tables = string.Join(",", model.ParamColumns.GroupBy(p => p.PARATABLENAME).Select(p => p.Key).ToArray());
|
|
model.Fileds = string.Join(",", model.ParamColumns.Select(p => p.PARANAME).ToArray());
|
|
model.GridViewName = model.ParamColumns[0].MEMO;
|
|
model.ColumnsLoaded = true;
|
|
}
|
|
else
|
|
{
|
|
SetMessage("加载参数列失败!");
|
|
}
|
|
|
|
return View(model);
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandleException]
|
|
public ActionResult GetParamList(ParameterQueryModel model)
|
|
{
|
|
DataResult<DataPage> pageResult = new DataResult<DataPage>();
|
|
DataPage page = null;
|
|
ServiceAgent wcfAgent = this.GetServiceAgent();
|
|
ProcessParameter condition = null;
|
|
try
|
|
{
|
|
//获取前台分页设置信息
|
|
page = this.GetDataPage(model);
|
|
condition = new ProcessParameter
|
|
{
|
|
PARATABLENAME = model.Tables,
|
|
Fileds=model.Fileds,
|
|
MACHINECODDE = model.MachineCode,
|
|
MouldCode = model.MouldCode,
|
|
ProductCode=model.ProductCode,
|
|
CREATEDATEEND = model.CREATEDATEEND,
|
|
CREATEDATESTART = model.CREATEDATESTART,
|
|
};
|
|
#region wcf服务统一接口
|
|
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("ProcessParameterBLL_GetParamList", condition, page);
|
|
if(pageResult.IsSuccess)
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
return Content(JsonConvertHelper.GetSerializes(new {total=pageResult.Result.RecordCount,rows=pageResult.Result.Result}));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandleException]
|
|
public ActionResult Export(ParameterQueryModel model)
|
|
{
|
|
try
|
|
{
|
|
|
|
if (string.IsNullOrEmpty(model.MachineCode))
|
|
{
|
|
SetMessage("请选择设备!");
|
|
return null;
|
|
}
|
|
ServiceAgent wcfAgent = this.GetServiceAgent();
|
|
DataResult<List<ProcessParameter>> result = wcfAgent.InvokeServiceFunction<DataResult<List<ProcessParameter>>>(QMAPP.ServicesAgent.B9BasicService.ProcessParameterBLL_GetAllList.ToString(), new ProcessParameter { MACHINECODDE = model.MachineCode });
|
|
if (result.Result != null && result.Result.Count > 0)
|
|
{
|
|
model.ParamColumns = result.Result;
|
|
model.Tables = string.Join(",", model.ParamColumns.GroupBy(p => p.PARATABLENAME).Select(p => p.Key).ToArray());
|
|
model.Fileds = string.Join(",", model.ParamColumns.Select(p => p.PARANAME).ToArray());
|
|
model.GridViewName = model.ParamColumns[0].MEMO;
|
|
//model.ColumnsLoaded = true;
|
|
}
|
|
else
|
|
{
|
|
SetMessage("加载参数列失败!");
|
|
return null;
|
|
}
|
|
var condition = new ProcessParameter
|
|
{
|
|
PARATABLENAME = model.Tables,
|
|
Fileds = model.Fileds,
|
|
MACHINECODDE = model.MachineCode,
|
|
MouldCode = model.MouldCode,
|
|
ProductCode = model.ProductCode,
|
|
CREATEDATEEND = model.CREATEDATEEND,
|
|
CREATEDATESTART = model.CREATEDATESTART,
|
|
};
|
|
|
|
var dtresult = wcfAgent.InvokeServiceFunction<DataResult<DataTable>>("ProcessParameterBLL_GetParamExport", condition);
|
|
|
|
|
|
DataTable exportDt = dtresult.Result;
|
|
|
|
|
|
|
|
//导出
|
|
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
|
|
|
|
exportDt.TableName = model.ParamColumns[0].PARATABLENAME+"Exp";
|
|
return efTool.GetExcelFileResult(model.ParamColumns[0].PARATABLENAME + "Exp", "设备加工参数.xlsx", exportDt);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
|
|
[HandleException]
|
|
public ActionResult LaserFileReader()
|
|
{
|
|
string path = Request["path"] + "";
|
|
path = Server.UrlDecode(path);
|
|
string name = Request["name"] + ".txt";
|
|
if (System.IO.File.Exists(path))
|
|
{
|
|
if (path.ToUpper().EndsWith("ANZ"))
|
|
{
|
|
return File(System.Text.Encoding.UTF8.GetBytes(ReadANZFile(path)), "text/plan",name);
|
|
}
|
|
else
|
|
{
|
|
return File(path,"text/plan",name);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return Content("File not found !");
|
|
}
|
|
}
|
|
|
|
public string ReadANZFile(string path)
|
|
{
|
|
object obj = null;
|
|
Globale_Variablen.Global.ReadWrite.DatenLesen(path, ref obj);
|
|
|
|
var DA = obj as Globale_Variablen.AnzeigeDaten.tDatenAnzeige;
|
|
|
|
|
|
|
|
StringBuilder streamWriter = new StringBuilder();
|
|
string text4 = string.Empty;
|
|
if (DA.Mode != 'C')
|
|
{
|
|
streamWriter.AppendLine(DA.Titel);
|
|
streamWriter.AppendLine(ZeigeText("Barcode") + ": " + DA.Barcode);
|
|
text4 = ZeigeText("Teilenummer") + ": " + DA.TeileNummer.ToString();
|
|
if (DA.IOVermerk)
|
|
{
|
|
text4 = text4 + " " + ZeigeText("i.O.");
|
|
}
|
|
else
|
|
{
|
|
text4 = text4 + " " + ZeigeText("n.i.O.");
|
|
}
|
|
text4 = string.Concat(new string[]
|
|
{
|
|
text4,
|
|
" ",
|
|
DA.Zeit.Substring(0, 2),
|
|
":",
|
|
DA.Zeit.Substring(2, 2),
|
|
":",
|
|
DA.Zeit.Substring(4, 2),
|
|
" ",
|
|
DA.Datum.Substring(0, 4),
|
|
"\\",
|
|
DA.Datum.Substring(4, 2),
|
|
"\\",
|
|
DA.Datum.Substring(6, 2)
|
|
});
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Bearbeiter") + " : " + DA.Bearbeiter;
|
|
streamWriter.AppendLine(text4);
|
|
streamWriter.AppendLine("");
|
|
text4 = ZeigeText("Einstellungen Justage");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = string.Concat(new string[]
|
|
{
|
|
ZeigeText("Verstaerkung AS").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.VerstaerkungArbeitssensor.ToString().PadRight(10, ' '),
|
|
ZeigeText("Verstaerkung RS").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.VerstaerkungReferenzsensor.ToString().PadRight(10, ' '),
|
|
ZeigeText("Impulse").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.Impulse.ToString().PadRight(10, ' ')
|
|
});
|
|
streamWriter.AppendLine(text4);
|
|
text4 = string.Concat(new string[]
|
|
{
|
|
ZeigeText("Leistung").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.Leistung.ToString().PadRight(10, ' '),
|
|
ZeigeText("Frequenz").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.Frequenz.ToString().PadRight(10, ' '),
|
|
ZeigeText("Tastverhaeltnis").PadRight(10, ' '),
|
|
": ",
|
|
DA.EinstellungenJustage.Tastverhaeltnis.ToString().PadRight(10, ' ')
|
|
});
|
|
streamWriter.AppendLine(text4);
|
|
//LB_Daten_NEW.Items.Add("");
|
|
text4 = ZeigeText("Messwerte Justage").PadRight(15, ' ') + ZeigeText("Ist").PadRight(15, ' ') + ZeigeText("Soll").PadRight(15, ' ') + ZeigeText("Toleranz");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Summe").PadRight(15, ' ') + DA.MesswerteJustage.SummeAS.Ist.ToString("0.00").PadRight(15, ' ') + DA.MesswerteJustage.SummeAS.Soll.ToString("0.00").PadRight(15, ' ') + DA.MesswerteJustage.SummeAS.Toleranz.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Quadrant 1").PadRight(15, ' ') + " : " + DA.MesswerteJustage.Quadrant_1.Ist.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Quadrant 2").PadRight(15, ' ') + " : " + DA.MesswerteJustage.Quadrant_2.Ist.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Quadrant 3").PadRight(15, ' ') + " : " + DA.MesswerteJustage.Quadrant_3.Ist.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Quadrant 4").PadRight(15, ' ') + " : " + DA.MesswerteJustage.Quadrant_4.Ist.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("AS zu RS").PadRight(15, ' ') + " : " + DA.MesswerteJustage.ASzuRS.Ist.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("Mittelwert P1").PadRight(15, ' ') + " : " + DA.MesswerteJustage.Mittelwert_P1.ToString("0.00");
|
|
streamWriter.AppendLine(text4);
|
|
text4 = ZeigeText("MW Spg. RL").PadRight(15, ' ') + " : " + DA.Mittelwert_Spannung_Referenzloecher;
|
|
streamWriter.AppendLine(text4);
|
|
streamWriter.AppendLine("");
|
|
text4 = string.Concat(new string[]
|
|
{
|
|
ZeigeText("Gesamtlochanzahl").PadRight(15, ' '),
|
|
": ",
|
|
DA.Gesamtlochanzahl.ToString().PadRight(10, ' '),
|
|
ZeigeText("AnzahlueberP1max").PadRight(15, ' '),
|
|
": ",
|
|
DA.AnzahlueberP1max.ToString().PadRight(10, ' ')
|
|
});
|
|
streamWriter.AppendLine(text4);
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("Lochstatus");
|
|
short[] array = new short[25];
|
|
for (int i = 0; i < (int)DA.Gesamtlochanzahl; i++)
|
|
{
|
|
for (int j = 0; j <= 24; j++)
|
|
{
|
|
if (DA.MesswerteLoecher[i].StatusLoch == (int)((short)(j + 1)))
|
|
{
|
|
short[] array2;
|
|
IntPtr intPtr;
|
|
(array2 = array)[(int)(intPtr = (IntPtr)j)] = (short)(array2[(int)intPtr] + 1);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
for (int k = 0; k <= 24; k++)
|
|
{
|
|
if (array[k] > 0)
|
|
{
|
|
text4 = "(" + (k + 1).ToString() + ")" + ZeigeText("Lochstatus_" + (k + 1).ToString());
|
|
streamWriter.AppendLine(text4.PadRight(10, ' ') + ":" + array[k].ToString());
|
|
}
|
|
}
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
for (int l = 0; l < DA.Warnungen.Count; l++)
|
|
{
|
|
streamWriter.AppendLine(DA.Warnungen[l].ToString());
|
|
}
|
|
string text5 = string.Empty;
|
|
text5 = string.Concat(new string[]
|
|
{
|
|
ZeigeText("Nr").PadRight(10, ' '),
|
|
ZeigeText("ID").PadRight(10, ' '),
|
|
ZeigeText("S1").PadRight(10, ' '),
|
|
ZeigeText("I1").PadRight(10, ' '),
|
|
ZeigeText("S2").PadRight(10, ' '),
|
|
ZeigeText("I2").PadRight(10, ' '),
|
|
ZeigeText("Sta").PadRight(10, ' '),
|
|
ZeigeText("Umin").PadRight(10, ' '),
|
|
ZeigeText("Umax").PadRight(10, ' '),
|
|
ZeigeText("Rausch").PadRight(10, ' '),
|
|
ZeigeText("RS Int").PadRight(10, ' ')
|
|
});
|
|
if (DA.Mode == 'R')
|
|
{
|
|
text5 = string.Concat(new string[]
|
|
{
|
|
text5,
|
|
ZeigeText("rwtInt S1").PadRight(10, ' '),
|
|
ZeigeText("rwtInt I1").PadRight(10, ' '),
|
|
ZeigeText("rwtInt S2").PadRight(10, ' '),
|
|
ZeigeText("rwtInt I2").PadRight(10, ' ')
|
|
});
|
|
}
|
|
if (DA.Sackloch)
|
|
{
|
|
text5 = text5 + ZeigeText("SL Puls").PadRight(10, ' ') + ZeigeText("SL Umax").PadRight(10, ' ') + ZeigeText("SL Int").PadRight(10, ' ');
|
|
}
|
|
if (DA.Zwischenpulse)
|
|
{
|
|
text5 = string.Concat(new string[]
|
|
{
|
|
text5,
|
|
ZeigeText("ZP Pulse").PadRight(10, ' '),
|
|
ZeigeText("ZP Umax").PadRight(10, ' '),
|
|
ZeigeText("ZP Int").PadRight(10, ' '),
|
|
ZeigeText("ZP Umax AS").PadRight(10, ' ')
|
|
});
|
|
}
|
|
//LVLoecher.Columns.Add(ZeigeText("Fehlercode"), 10, HorizontalAlignment.Right);
|
|
text5 += ZeigeText("FC").PadRight(10, ' ');
|
|
text5 += ZeigeText("Abstand").PadRight(10, ' ');
|
|
streamWriter.AppendLine(text5);
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
for (int m = 0; m < (int)DA.Gesamtlochanzahl; m++)
|
|
{
|
|
tMesswerteLoecher tMesswerteLoecher = DA.MesswerteLoecher[m];
|
|
string text6 = string.Empty;
|
|
text6 = ((int)(tMesswerteLoecher.LochNummer + 1)).ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.ID.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Pulsanzahl_1_Soll.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Pulsanzahl_1_Ist.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Pulsanzahl_2_Soll.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Pulsanzahl_2_Ist.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.StatusLoch.ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.AS_U_min / 1000f).ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.AS_U_max / 1000f).ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.AS_U_rauschen / 1000f).ToString().PadRight(10, ' ');
|
|
long num = (long)Math.Pow(2.0, 0.0);
|
|
bool flag = ((long)tMesswerteLoecher.Kompletter_Fehlerstatus & num) == num;
|
|
if (flag || tMesswerteLoecher.StatusLoch == 3)
|
|
{
|
|
text6 += tMesswerteLoecher.SL_Integral_ist.ToString().PadRight(10, ' ');
|
|
}
|
|
else
|
|
{
|
|
text6 += "--".PadRight(10, ' ');
|
|
}
|
|
if (DA.Mode == 'R')
|
|
{
|
|
text6 += tMesswerteLoecher.Algebra_1_Soll.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Algebra_1_Ist.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Algebra_2_Soll.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.Algebra_2_Ist.ToString().PadRight(10, ' ');
|
|
}
|
|
if (DA.Sackloch)
|
|
{
|
|
if (tMesswerteLoecher.StatusLoch == 2 || tMesswerteLoecher.StatusLoch == 5 || tMesswerteLoecher.StatusLoch == 10 || tMesswerteLoecher.StatusLoch == 11)
|
|
{
|
|
text6 += tMesswerteLoecher.SL_Pulse_ist.ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.SL_U_max_ist / 1000f).ToString("0.00").PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.SL_Integral_ist.ToString().PadRight(10, ' ');
|
|
}
|
|
else
|
|
{
|
|
text6 += "--".PadRight(10, ' ');
|
|
text6 += "--".PadRight(10, ' ');
|
|
text6 += "--".PadRight(10, ' ');
|
|
}
|
|
}
|
|
if (DA.Zwischenpulse)
|
|
{
|
|
text6 += tMesswerteLoecher.ZP_Pulse_ist.ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.ZP_U_max_ist / 1000f).ToString("0.00").PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.ZP_Integral_ist.ToString().PadRight(10, ' ');
|
|
text6 += (tMesswerteLoecher.ZP_Umax_AS / 1000f).ToString().PadRight(10, ' ');
|
|
}
|
|
text6 += tMesswerteLoecher.Kompletter_Fehlerstatus.ToString().PadRight(10, ' ');
|
|
text6 += tMesswerteLoecher.res1_float.ToString("0.00").PadRight(10, ' ');
|
|
streamWriter.AppendLine(text6);
|
|
}
|
|
}
|
|
else if (DA.Mode == 'C')
|
|
{
|
|
string text7 = string.Empty;
|
|
streamWriter.AppendLine(DA.Titel);
|
|
streamWriter.AppendLine(ZeigeText("Barcode") + ": " + DA.Barcode);
|
|
text7 = ZeigeText("Teilenummer") + ": " + DA.TeileNummer.ToString();
|
|
if (DA.IOVermerk)
|
|
{
|
|
text7 = text7 + " " + ZeigeText("i.O.");
|
|
}
|
|
else
|
|
{
|
|
text7 = text7 + " " + ZeigeText("n.i.O.");
|
|
}
|
|
text7 = string.Concat(new string[]
|
|
{
|
|
text7,
|
|
" ",
|
|
DA.Zeit.Substring(0, 2),
|
|
":",
|
|
DA.Zeit.Substring(2, 2),
|
|
":",
|
|
DA.Zeit.Substring(4, 2),
|
|
" ",
|
|
DA.Datum.Substring(0, 4),
|
|
"\\",
|
|
DA.Datum.Substring(4, 2),
|
|
"\\",
|
|
DA.Datum.Substring(6, 2)
|
|
});
|
|
streamWriter.AppendLine(text7);
|
|
streamWriter.AppendLine("");
|
|
streamWriter.AppendLine("");
|
|
text4 = ZeigeText("Anzahl der Abschnitte").PadRight(15, ' ') + ": " + DA.Gesamtlochanzahl.ToString().PadRight(6, ' ');
|
|
streamWriter.AppendLine(text4);
|
|
streamWriter.AppendLine("");
|
|
for (int n = 0; n < DA.Warnungen.Count; n++)
|
|
{
|
|
streamWriter.AppendLine(DA.Warnungen[n].ToString());
|
|
}
|
|
text7 = string.Concat(new string[]
|
|
{
|
|
"Abschnitt 1".PadRight(10, ' '),
|
|
"ID".PadRight(10, ' '),
|
|
"Int Soll".PadRight(10, ' '),
|
|
"Int Ist".PadRight(10, ' '),
|
|
"Spg ist".PadRight(10, ' '),
|
|
"Anz o. Sig".PadRight(10, ' '),
|
|
"State".PadRight(10, ' ')
|
|
});
|
|
streamWriter.AppendLine(text7);
|
|
for (int num2 = 0; num2 < (int)DA.Gesamtlochanzahl; num2++)
|
|
{
|
|
tMesswerteLoecher tMesswerteLoecher2 = DA.MesswerteLoecher[num2];
|
|
//ListViewItem listViewItem = new ListViewItem((num2 + 1).ToString());
|
|
//listViewItem.SubItems.Add(tMesswerteLoecher2.ID.ToString());
|
|
//listViewItem.SubItems.Add(tMesswerteLoecher2.CW_Integral_Soll.ToString());
|
|
//listViewItem.SubItems.Add(tMesswerteLoecher2.CW_Integral_Ist.ToString());
|
|
string text8 = string.Format("{0:F3}", tMesswerteLoecher2.CW_Spannung_Ist);
|
|
//listViewItem.SubItems.Add(text8);
|
|
//listViewItem.SubItems.Add(tMesswerteLoecher2.CW_Abstastungen_ohne_Signal.ToString());
|
|
//listViewItem.SubItems.Add(tMesswerteLoecher2.CW_Lochstate.ToString());
|
|
//LVLoecher.Items.Add(listViewItem);
|
|
text7 = string.Concat(new string[]
|
|
{
|
|
(num2 + 1).ToString().PadRight(10, ' '),
|
|
tMesswerteLoecher2.ID.ToString().PadRight(10, ' '),
|
|
tMesswerteLoecher2.CW_Integral_Soll.ToString().PadRight(10, ' '),
|
|
tMesswerteLoecher2.CW_Integral_Ist.ToString().PadRight(10, ' '),
|
|
tMesswerteLoecher2.CW_Spannung_Ist.ToString("0.000").PadRight(10, ' '),
|
|
tMesswerteLoecher2.CW_Abstastungen_ohne_Signal.ToString().PadRight(10, ' '),
|
|
tMesswerteLoecher2.CW_Lochstate.ToString().PadRight(10, ' ')
|
|
});
|
|
streamWriter.AppendLine(text7);
|
|
}
|
|
}
|
|
var txt = streamWriter.ToString();
|
|
return txt;
|
|
}
|
|
static Dictionary<string, string> language;
|
|
static string ZeigeText(string key)
|
|
{
|
|
if (language == null)
|
|
{
|
|
language = new Dictionary<string, string>();
|
|
language.Add("Barcode", "Barcode");
|
|
language.Add("Teilenummer", "Part number");
|
|
language.Add("Bearbeiter", "Operator");
|
|
language.Add("Technologieart", "Technology");
|
|
language.Add("Datensatznummer", "Number of Data Record");
|
|
language.Add("Einstellungen Justage", "parameter of sensor adjustment");
|
|
language.Add("Verstaerkung AS", "Amplification WS");
|
|
language.Add("Verstaerkung RS", "Amplification RS");
|
|
language.Add("Impulse", "Number of pulses");
|
|
language.Add("Leistung", "Power");
|
|
language.Add("Frequenz", "Frequency");
|
|
language.Add("Tastverhaeltnis", "Duty Cycle");
|
|
language.Add("Messwerte Justage", "Measures adjustment");
|
|
language.Add("Ist", "a. values");
|
|
language.Add("Soll", "n. values");
|
|
language.Add("Toleranz", "tolerance");
|
|
language.Add("Summe", "sum");
|
|
language.Add("Quadrant 1", "square 1");
|
|
language.Add("Quadrant 2", "square 2");
|
|
language.Add("Quadrant 3", "square 3");
|
|
language.Add("Quadrant 4", "square 4");
|
|
language.Add("AS zu RS", "WS to RS");
|
|
language.Add("AS zu RS_CPP", "WS");
|
|
language.Add("Mittelwert P1", "average value P1");
|
|
language.Add("Gesamtlochanzahl", "number of holes");
|
|
language.Add("AnzahlueberP1max", "number of holes over P1max");
|
|
language.Add("Lochstatus", "Hole State");
|
|
language.Add("Lochstatus_1", "RH OK");
|
|
language.Add("Lochstatus_2", "SH OK");
|
|
language.Add("Lochstatus_3", "BRIDGE OK");
|
|
language.Add("Lochstatus_4", "RH NOK");
|
|
language.Add("Lochstatus_5", "SH NOK");
|
|
language.Add("Lochstatus_6", "EVENT SENSOR PROTECTION");
|
|
language.Add("Lochstatus_7", "UNKNOW STATE - PLEASE CALL JOAT-SERVICE AND CALL ERROR CODE");
|
|
language.Add("Lochstatus_8", "RH \"DEPTH TO LOW\"");
|
|
language.Add("Lochstatus_9", "RH \"SIGNAL BEFORE HOLE\"");
|
|
language.Add("Lochstatus_10", "SH \"DEPTH TO LOW\"");
|
|
language.Add("Lochstatus_11", "SH \"SIGNAL BEFORE HOLE\"");
|
|
language.Add("OP_Choose_0", "ID");
|
|
language.Add("OP_Choose_1", "pulse N1");
|
|
language.Add("OP_Choose_2", "pulse A1");
|
|
language.Add("OP_Choose_3", "pulse N2");
|
|
language.Add("OP_Choose_4", "pulse A2");
|
|
language.Add("OP_Choose_5", "pulse Status");
|
|
language.Add("OP_Choose_6", "Umin");
|
|
language.Add("OP_Choose_7", "Umax");
|
|
language.Add("OP_Choose_8", "Noise");
|
|
language.Add("OP_Choose_9", "RS Integral");
|
|
language.Add("OP_Choose_10", "RWT Int N1");
|
|
language.Add("OP_Choose_11", "RWT Int A1");
|
|
language.Add("OP_Choose_12", "RWT Int N2");
|
|
language.Add("OP_Choose_13", "RWT Int A2");
|
|
language.Add("OP_Choose_14", "BH pulse");
|
|
language.Add("OP_Choose_15", "BH Umax");
|
|
language.Add("OP_Choose_16", "BH Int");
|
|
language.Add("OP_Choose_17", "BBH pulse");
|
|
language.Add("OP_Choose_18", "BBH Umax RS");
|
|
language.Add("OP_Choose_19", "BBH Int");
|
|
language.Add("OP_Choose_20", "BBH Umax WS");
|
|
language.Add("OP_Choose_21", "error code");
|
|
language.Add("OP_Choose_22", "Distance");
|
|
language.Add("OP_Choose_23", "amplification");
|
|
language.Add("OP_Choose_24", "P0 pulses target");
|
|
language.Add("OP_Choose_25", "P0 pulses actual");
|
|
language.Add("ID", "ID");
|
|
language.Add("S1", "N1");
|
|
language.Add("I1", "A1");
|
|
language.Add("S2", "N2");
|
|
language.Add("I2", "A2");
|
|
language.Add("Sta", "State");
|
|
language.Add("Umin", "Umin");
|
|
language.Add("Umax", "Umax");
|
|
language.Add("Rausch", "noise");
|
|
language.Add("RS_Int", "RS Int");
|
|
language.Add("rwtInt_S1", "Int N1");
|
|
language.Add("rwtInt_I1", "Int A1");
|
|
language.Add("rwtInt_S2", "Int N2");
|
|
language.Add("rwtInt_I2", "Int A2");
|
|
language.Add("SL_Puls", "BH pulse");
|
|
language.Add("SL_Umax", "BH Umax");
|
|
language.Add("SL_Int", "BH int");
|
|
language.Add("ZP_Puls", "BBH pulse");
|
|
language.Add("ZP_Umax", "BBH Umax RS");
|
|
language.Add("ZP_Int", "BBH Int");
|
|
language.Add("ZP_Umax_AS", "BBH Umax WS");
|
|
language.Add("Fehlercode", "error code");
|
|
language.Add("i.O.", "PART OK");
|
|
language.Add("n.i.O.", "PART NOK");
|
|
language.Add("Abstand", "Distance");
|
|
language.Add("DS_Offset", "Offset");
|
|
language.Add("DS_Titel", "Data Record");
|
|
language.Add("DS_FarbOffset", "Color Offset");
|
|
language.Add("DS_VC", "FC");
|
|
language.Add("DS_MAN_AUSWAHL", "activate manual selected data record");
|
|
language.Add("DS_OK", "OK");
|
|
language.Add("ZS_ANZ_ABSCHNITTE", "Count Sections");
|
|
language.Add("Gesamt", "Sum");
|
|
language.Add("TeileNummer", "Part number");
|
|
}
|
|
|
|
if (language.ContainsKey(key))
|
|
{
|
|
return language[key];
|
|
}
|
|
else
|
|
{
|
|
return key;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|