MovingAverage 항목 추가

master
CHOJAEYOUNG 2020-09-03 16:45:21 +09:00
parent 3942c02b2d
commit 21fb5baed7
9 changed files with 40 additions and 26 deletions

View File

@ -692,17 +692,15 @@ namespace ITC81DB_0H.Controls
{ {
string value = "", message = ""; string value = "", message = "";
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelMovingAverage.Text, 7, 6, false, this.ParentForm.ParentForm.SystemConfig1.Language); DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelMovingAverage.Text, 4, 0, false, this.ParentForm.ParentForm.SystemConfig1.Language);
if (myKeyPad.ShowDialog() == DialogResult.OK) if (myKeyPad.ShowDialog() == DialogResult.OK)
{ {
this.labelMovingAverage.Text = myKeyPad.StringValue; this.labelMovingAverage.Text = myKeyPad.StringValue;
this.ParentForm.ParentForm.CurrentJudgmentSetItem.DynamicCorrection = myKeyPad.doubleValue;
value = string.Format("{0:f6}", this.labelMovingAverage.Text); value = Helper.StringZeroFillDigits4(myKeyPad.StringValue);
value = value.Remove(1, 1); this.ParentForm.ParentForm.CurrentJudgmentSetItem.MovingAverage = myKeyPad.IntValue;
value = Helper.StringZeroFillDigits7(value); this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress.MovingAverage, value);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress.DynamicCorrection, value);
this.ParentForm.ParentForm.SaveJudgmentSetFile(this.ParentForm.ParentForm.CurrentJudgmentSetItem, this.ParentForm.ParentForm.SystemConfig1.ProductNumber - 1); this.ParentForm.ParentForm.SaveJudgmentSetFile(this.ParentForm.ParentForm.CurrentJudgmentSetItem, this.ParentForm.ParentForm.SystemConfig1.ProductNumber - 1);
} }
@ -951,9 +949,9 @@ namespace ITC81DB_0H.Controls
structItem.DescendDelayTime = this.CaptureJudgmentSetItem.DescendDelayTime; structItem.DescendDelayTime = this.CaptureJudgmentSetItem.DescendDelayTime;
structItem.AscendDelayTime = this.CaptureJudgmentSetItem.AscendDelayTime; structItem.AscendDelayTime = this.CaptureJudgmentSetItem.AscendDelayTime;
structItem.MovingAverage = 0;
structItem.DummyInt1 = 0; structItem.DummyInt1 = 0;
structItem.DummyInt2 = 0; structItem.DummyInt2 = 0;
structItem.DummyInt3 = 0;
structItem.DummyString1 = "0"; structItem.DummyString1 = "0";
structItem.DummyString2 = "0"; structItem.DummyString2 = "0";
structItem.DummyString3 = "0"; structItem.DummyString3 = "0";

View File

@ -556,6 +556,8 @@ namespace ITC81DB_0H
public static readonly string DischargeConveyorDelayTime = "5009"; public static readonly string DischargeConveyorDelayTime = "5009";
// 판정설정 - 배출 컨베어 동작시간 // 판정설정 - 배출 컨베어 동작시간
public static readonly string DischargeConveyorRunTime = "5010"; public static readonly string DischargeConveyorRunTime = "5010";
// 판정설정 - 이동평균
public static readonly string MovingAverage = "5031";
// 판정설정 - 자동판정 - 센서 검출 시간 읽기 // 판정설정 - 자동판정 - 센서 검출 시간 읽기
public static readonly string ReadSensingTime = "5057"; public static readonly string ReadSensingTime = "5057";
// 판정설정 - 자동판정 - 필터갭 // 판정설정 - 자동판정 - 필터갭
@ -734,8 +736,8 @@ namespace ITC81DB_0H
public static readonly string RandomModeWrite = "9023"; public static readonly string RandomModeWrite = "9023";
// 중량설정값 쓰기 // 중량설정값 쓰기
public static readonly string ParameterWeightSetting = "9024"; public static readonly string ParameterWeightSetting = "9024";
// 전체파라미터 쓰기(Ver5 이전 : 9014, Ver5부터 : 9025) // 전체파라미터 쓰기
public static readonly string SystemParameterWriteAll = "9025"; public static readonly string SystemParameterWriteAll = "9033";
// 전체 카운트 읽기/쓰기 // 전체 카운트 읽기/쓰기
public static readonly string ParameterCount = "9031"; public static readonly string ParameterCount = "9031";
//// 시스템파라미터 읽기1 //// 시스템파라미터 읽기1
@ -2494,6 +2496,7 @@ namespace ITC81DB_0H
private int m_FeedSpeed2; private int m_FeedSpeed2;
private int m_FeedSpeed3; private int m_FeedSpeed3;
private double m_DynamicCorrection; private double m_DynamicCorrection;
public int m_MovingAverage;
private int m_Sorter1Mode; private int m_Sorter1Mode;
private int m_Sorter1DelayTime; private int m_Sorter1DelayTime;
@ -2559,6 +2562,12 @@ namespace ITC81DB_0H
get { return this.m_DynamicCorrection; } get { return this.m_DynamicCorrection; }
set { this.m_DynamicCorrection = value; } set { this.m_DynamicCorrection = value; }
} }
public int MovingAverage
{
get { return this.m_MovingAverage; }
set { this.m_MovingAverage = value; }
}
public int DescendDelayTime public int DescendDelayTime
{ {
get { return this.m_DescendDelayTime; } get { return this.m_DescendDelayTime; }
@ -2634,6 +2643,7 @@ namespace ITC81DB_0H
this.FeedSpeed2 = 60; this.FeedSpeed2 = 60;
this.FeedSpeed3 = 60; this.FeedSpeed3 = 60;
this.DynamicCorrection = 1.000000; this.DynamicCorrection = 1.000000;
this.MovingAverage = 1;
this.AscendDelayTime = 1000; this.AscendDelayTime = 1000;
this.DescendDelayTime = 1000; this.DescendDelayTime = 1000;
@ -2679,9 +2689,9 @@ namespace ITC81DB_0H
public int DescendDelayTime; public int DescendDelayTime;
public int AscendDelayTime; public int AscendDelayTime;
public int MovingAverage;
public int DummyInt1; public int DummyInt1;
public int DummyInt2; public int DummyInt2;
public int DummyInt3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
public string DummyString1; public string DummyString1;

View File

@ -2211,7 +2211,7 @@ namespace ITC81DB_0H.Forms
this.TransferProductParameter(this.SystemConfig1.ProductNumber); this.TransferProductParameter(this.SystemConfig1.ProductNumber);
} }
break; break;
case "9025": case "9033":
if (response == DataStore.ResponseData.ACK) if (response == DataStore.ResponseData.ACK)
this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress.ProductNumber, ""); this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress.ProductNumber, "");
break; break;
@ -6757,9 +6757,7 @@ namespace ITC81DB_0H.Forms
sb.Append(Helper.StringZeroFillDigits7(pItem.PassRange)); // 기준값(7) sb.Append(Helper.StringZeroFillDigits7(pItem.PassRange)); // 기준값(7)
sb.Append(Helper.StringZeroFillDigits7(pItem.OverRange)); // 상한값(7) sb.Append(Helper.StringZeroFillDigits7(pItem.OverRange)); // 상한값(7)
sb.Append(Helper.StringZeroFillDigits7(pItem.TareRange)); // 용기(7) sb.Append(Helper.StringZeroFillDigits7(pItem.TareRange)); // 용기(7)
value = Helper.DoubleToString(jItem.DynamicCorrection, 6); sb.Append(Helper.StringZeroFillDigits7(jItem.MovingAverage.ToString())); // 이동평균(7)
value = value.Replace(".", "");
sb.Append(Helper.StringZeroFillDigits7(value)); // 동보정(7)
sb.Append(Helper.StringZeroFillDigits4(jItem.Filter.ToString())); // 필터(4) sb.Append(Helper.StringZeroFillDigits4(jItem.Filter.ToString())); // 필터(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.JudgmentDelayTime.ToString())); // 판정지연(4) sb.Append(Helper.StringZeroFillDigits4(jItem.JudgmentDelayTime.ToString())); // 판정지연(4)
sb.Append(Helper.StringZeroFillDigits4(jItem.DoubleDelayTime.ToString())); // 이중지연(4) sb.Append(Helper.StringZeroFillDigits4(jItem.DoubleDelayTime.ToString())); // 이중지연(4)
@ -7667,9 +7665,9 @@ namespace ITC81DB_0H.Forms
structItem.AutoJudgment2 = this.CurrentJudgmentSetItem.AutoJudgment2; structItem.AutoJudgment2 = this.CurrentJudgmentSetItem.AutoJudgment2;
structItem.AutoJudgment3 = this.CurrentJudgmentSetItem.AutoJudgment3; structItem.AutoJudgment3 = this.CurrentJudgmentSetItem.AutoJudgment3;
structItem.MovingAverage = this.CurrentJudgmentSetItem.MovingAverage;
structItem.DummyInt1 = 0; structItem.DummyInt1 = 0;
structItem.DummyInt2 = 0; structItem.DummyInt2 = 0;
structItem.DummyInt3 = 0;
structItem.DummyString1 = "0"; structItem.DummyString1 = "0";
structItem.DummyString2 = "0"; structItem.DummyString2 = "0";
@ -7724,9 +7722,9 @@ namespace ITC81DB_0H.Forms
structItem.AscendDelayTime = item.AscendDelayTime; structItem.AscendDelayTime = item.AscendDelayTime;
structItem.DescendDelayTime = item.DescendDelayTime; structItem.DescendDelayTime = item.DescendDelayTime;
structItem.MovingAverage = item.MovingAverage;
structItem.DummyInt1 = 0; structItem.DummyInt1 = 0;
structItem.DummyInt2 = 0; structItem.DummyInt2 = 0;
structItem.DummyInt3 = 0;
structItem.DummyString1 = "0"; structItem.DummyString1 = "0";
structItem.DummyString2 = "0"; structItem.DummyString2 = "0";
@ -7784,9 +7782,9 @@ namespace ITC81DB_0H.Forms
structItem.AscendDelayTime = items[i].AscendDelayTime; structItem.AscendDelayTime = items[i].AscendDelayTime;
structItem.DescendDelayTime = items[i].DescendDelayTime; structItem.DescendDelayTime = items[i].DescendDelayTime;
structItem.MovingAverage = items[i].MovingAverage;
structItem.DummyInt1 = 0; structItem.DummyInt1 = 0;
structItem.DummyInt2 = 0; structItem.DummyInt2 = 0;
structItem.DummyInt3 = 0;
structItem.DummyString1 = "0"; structItem.DummyString1 = "0";
structItem.DummyString2 = "0"; structItem.DummyString2 = "0";
@ -7831,6 +7829,7 @@ namespace ITC81DB_0H.Forms
item.FeedSpeed2 = structItem.FeedSpeed2; item.FeedSpeed2 = structItem.FeedSpeed2;
item.FeedSpeed3 = structItem.FeedSpeed3; item.FeedSpeed3 = structItem.FeedSpeed3;
item.DynamicCorrection = structItem.DynamicCorrection; item.DynamicCorrection = structItem.DynamicCorrection;
item.MovingAverage = structItem.MovingAverage;
item.Sorter1Mode = structItem.Sorter1Mode; item.Sorter1Mode = structItem.Sorter1Mode;
item.Sorter1DelayTime = structItem.Sorter1DelayTime; item.Sorter1DelayTime = structItem.Sorter1DelayTime;
@ -7892,6 +7891,7 @@ namespace ITC81DB_0H.Forms
items[i].FeedSpeed2 = structJudgment.FeedSpeed2; items[i].FeedSpeed2 = structJudgment.FeedSpeed2;
items[i].FeedSpeed3 = structJudgment.FeedSpeed3; items[i].FeedSpeed3 = structJudgment.FeedSpeed3;
items[i].DynamicCorrection = structJudgment.DynamicCorrection; items[i].DynamicCorrection = structJudgment.DynamicCorrection;
items[i].MovingAverage = structJudgment.MovingAverage;
items[i].Sorter1Mode = structJudgment.Sorter1Mode; items[i].Sorter1Mode = structJudgment.Sorter1Mode;
items[i].Sorter1DelayTime = structJudgment.Sorter1DelayTime; items[i].Sorter1DelayTime = structJudgment.Sorter1DelayTime;

View File

@ -51,11 +51,11 @@
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="SmartXCommon, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SmartXCommon, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.1.1_20190321\SmartX3.1.0_IEC1000_DOTNETCF3.5수동설치파일\SmartXCommon.dll</HintPath> <HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\Embedded SmartX Component\V3.1.1_20190321\SmartX3.1.0_IEC1000_DOTNETCF3.5수동설치파일\SmartXCommon.dll</HintPath>
</Reference> </Reference>
<Reference Include="SmartX_IEC1000, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SmartX_IEC1000, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.1.1_20190321\SmartX3.1.0_IEC1000_DOTNETCF3.5수동설치파일\SmartX_IEC1000.dll</HintPath> <HintPath>C:\Program Files (x86)\HNS\Embedded SmartX Component\Embedded SmartX Component\V3.1.1_20190321\SmartX3.1.0_IEC1000_DOTNETCF3.5수동설치파일\SmartX_IEC1000.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

View File

@ -1,18 +1,24 @@
/* /*
ITC81DB ITC81DB_0H
INTECH AutoWeighingChecker Control Program INTECH AutoWeighingChecker Control Program
Standard Model Standard Model(Digicell)
H/W : IEC1000-104 H/W : IEC1000-104
O/S : WinCE 6.0 O/S : WinCE 6.0
Framework : SmartX Framework V3.0.3(update: 2018.05.10) Framework : SmartX Framework V3.1.1(update: 2019.03.21)
Program by LeeSeonJae Modify ITC81DB
2018.06.19 기본형 컨베어 고정밀센서 계량기
기본형 컨베어 계량기
*/ */
@ Ver 0.1.0 by CJY
- 2020.09.03
- ITC81DB Ver 6.9.0 Modify
- 프로젝트 생성
=============================================================
@ Ver 6.9.0 by CJY @ Ver 6.9.0 by CJY
- 2020.08.14 - 2020.08.14
- Ver 6.8.0 Modify - Ver 6.8.0 Modify

Binary file not shown.

Binary file not shown.