diff --git a/ITC81DB_0H/Controls/CenterSystem/ControlCenterSystemCalibration.cs b/ITC81DB_0H/Controls/CenterSystem/ControlCenterSystemCalibration.cs index 1cd9b8c..b482ba1 100644 --- a/ITC81DB_0H/Controls/CenterSystem/ControlCenterSystemCalibration.cs +++ b/ITC81DB_0H/Controls/CenterSystem/ControlCenterSystemCalibration.cs @@ -196,6 +196,9 @@ namespace ITC81DB_0H.Controls this.CalibrationButtonEnable(true, false); this.CalibrationPictureBoxVisible(true, false, false); + this.radioButtonDecimalPlaces1.Click -= new EventHandler(this.radioButtonDecimalPlaces_Click); + this.radioButtonDecimalPlaces2.Click -= new EventHandler(this.radioButtonDecimalPlaces_Click); + if (this.ParentForm.ParentForm.SystemConfig1.DecimalPlaces == 1) { if (this.radioButtonDecimalPlaces1.Checked != true) @@ -207,8 +210,11 @@ namespace ITC81DB_0H.Controls this.radioButtonDecimalPlaces2.Checked = true; } - if (this.labelWeightUnit.Text != this.ParentForm.ParentForm.SystemConfig1.Unit) - this.labelWeightUnit.Text = this.ParentForm.ParentForm.SystemConfig1.Unit; + this.radioButtonDecimalPlaces1.Click += new EventHandler(this.radioButtonDecimalPlaces_Click); + this.radioButtonDecimalPlaces2.Click += new EventHandler(this.radioButtonDecimalPlaces_Click); + + //if (this.labelWeightUnit.Text != this.ParentForm.ParentForm.SystemConfig1.Unit) + // this.labelWeightUnit.Text = this.ParentForm.ParentForm.SystemConfig1.Unit; } public void UpdateWeightDisplay(DataStore.EquipmentStatus status, WeightData data) { @@ -425,6 +431,8 @@ namespace ITC81DB_0H.Controls private void radioButtonDecimalPlaces_Click(object sender, EventArgs e) { + string value = ""; + //this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress.ParameterRead3901, ""); this.ParentForm.ParentForm.OpenSmartFileIO(); @@ -481,6 +489,9 @@ namespace ITC81DB_0H.Controls } this.ParentForm.ParentForm.CloseSmartFileIO(); + value = Helper.StringZeroFillDigits4(this.ParentForm.ParentForm.SystemConfig1.DecimalPlaces.ToString()); + this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress.DecimalPlaces, value); + this.ParentForm.ParentForm.ReLoadProductFile(); this.ParentForm.ParentForm.TransferRandomMode(); } diff --git a/ITC81DB_0H/DataStore.cs b/ITC81DB_0H/DataStore.cs index 76e1dd3..d990ae7 100644 --- a/ITC81DB_0H/DataStore.cs +++ b/ITC81DB_0H/DataStore.cs @@ -509,6 +509,8 @@ namespace ITC81DB_0H public static readonly string BalanceWeight = "3002"; // 중량조정 - 한눈의 값 public static readonly string Digit = "3003"; + // 중량조정 - 소수점 + public static readonly string DecimalPlaces = "3016"; // 중량조정 - 상수값 읽기 public static readonly string ReadConstant = "3601"; // 중량조정 - 파라미터 읽기 diff --git a/ITC81DB_0H/Forms/FormMain.cs b/ITC81DB_0H/Forms/FormMain.cs index d294b3f..068f477 100644 --- a/ITC81DB_0H/Forms/FormMain.cs +++ b/ITC81DB_0H/Forms/FormMain.cs @@ -6762,7 +6762,7 @@ namespace ITC81DB_0H.Forms sb.Append("0000000"); // Dummy2(7) sb.Append("0000"); // Dummy3(4) sb.Append("0000"); // Dummy4(4) - sb.Append("0000"); // Dummy5(4) + sb.Append(Helper.StringZeroFillDigits4(this.SystemConfig1.DecimalPlaces.ToString())); // 소수점(4) sb.Append(Helper.StringZeroFillDigits4(productNumber.ToString())); // 품번 this.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress.SystemParameterWriteAll, sb.ToString()); diff --git a/ITC81DB_0H/bin/Release/ITC81DB_0H.exe b/ITC81DB_0H/bin/Release/ITC81DB_0H.exe index f7a13a3..6d17441 100644 Binary files a/ITC81DB_0H/bin/Release/ITC81DB_0H.exe and b/ITC81DB_0H/bin/Release/ITC81DB_0H.exe differ diff --git a/ITC81DB_0H/obj/Release/ITC81DB_0H.exe b/ITC81DB_0H/obj/Release/ITC81DB_0H.exe index f7a13a3..6d17441 100644 Binary files a/ITC81DB_0H/obj/Release/ITC81DB_0H.exe and b/ITC81DB_0H/obj/Release/ITC81DB_0H.exe differ