- 소수점 프로토콜 추가(P3016) 및 수정(P9033)

master
CJY 2020-09-16 14:06:11 +09:00
parent 01fcba0f55
commit 0d682112ca
5 changed files with 16 additions and 3 deletions

View File

@ -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();
}

View File

@ -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";
// 중량조정 - 파라미터 읽기

View File

@ -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());