- (버그수정)Modbus 쓰기부분 상한/기준/하한값 변경범위 수정

master
CJY 2025-11-05 16:31:06 +09:00
parent 19673b9ead
commit cabbcf0fe4
3 changed files with 74 additions and 26 deletions

View File

@ -8375,18 +8375,15 @@ namespace INT69DC_7C.Forms
this.Current40000ModbusData._40018_UnderRange = this.Current40000ModbusData._40018_UnderRange =
int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", "")); int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", ""));
if (this.Current40000ModbusData._40018_UnderRange >= 0 && this.Current40000ModbusData._40018_UnderRange <= 99999) if (this.Current40000ModbusData._40018_UnderRange >= 0 && this.Current40000ModbusData._40018_UnderRange <= int.Parse(this.CurrentProductItem.PassRange))
{ {
try try
{ {
this.CurrentProductItem.UnderRange = this.Current40000ModbusData._40018_UnderRange.ToString(); string weight = Helper.StringToDecimalPlaces(this.Current40000ModbusData._40018_UnderRange.ToString(), this.SystemConfig.DecimalPlaces);
this.ChildFormMainDisplay.UpdateUnderRangeChange(weight);
this.SaveProductFile(this.CurrentProductItem, this.SystemConfig.ProductNumber - 1);
this.TransferProductParameter(this.SystemConfig.ProductNumber);
this.Update30000ModbusData(); this.Update30000ModbusData();
this.ModbusCommonDataSend(); this.ModbusCommonDataSend();
this.ChildFormMainDisplay.UpdateCurrentProductDisplay(this.EquipmentStatus, this.CurrentProductItem, this.CurrentJudgmentSetItem, this.CollectionWeightData);
// 초기값으로 설정해놓기 // 초기값으로 설정해놓기
this.Current40000ModbusData._40018_UnderRange = 0; this.Current40000ModbusData._40018_UnderRange = 0;
@ -8403,6 +8400,7 @@ namespace INT69DC_7C.Forms
else else
{ {
// 실패 // 실패
this.Current40000ModbusData._40018_UnderRange = 0;
this.Current40000ModbusData._40020_UnderRangeResult = 2; this.Current40000ModbusData._40020_UnderRangeResult = 2;
} }
#endregion #endregion
@ -8422,21 +8420,16 @@ namespace INT69DC_7C.Forms
this.Current40000ModbusData._40021_PassRange = this.Current40000ModbusData._40021_PassRange =
int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", "")); int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", ""));
if (this.Current40000ModbusData._40021_PassRange >= 0 && this.Current40000ModbusData._40021_PassRange <= 99999) if (this.Current40000ModbusData._40021_PassRange >= int.Parse(this.CurrentProductItem.UnderRange)
&& this.Current40000ModbusData._40021_PassRange <= int.Parse(this.CurrentProductItem.OverRange))
{ {
try try
{ {
string value = ""; string weight = Helper.StringToDecimalPlaces(this.Current40000ModbusData._40021_PassRange.ToString(), this.SystemConfig.DecimalPlaces);
int digit = 0, temp = 0; this.ChildFormMainDisplay.UpdatePassRangeChange(weight);
this.CurrentProductItem.PassRange = this.Current40000ModbusData._40021_PassRange.ToString();
this.SaveProductFile(this.CurrentProductItem, this.SystemConfig.ProductNumber - 1);
this.TransferProductParameter(this.SystemConfig.ProductNumber);
this.Update30000ModbusData(); this.Update30000ModbusData();
this.ModbusCommonDataSend(); this.ModbusCommonDataSend();
this.ChildFormMainDisplay.UpdateCurrentProductDisplay(this.EquipmentStatus, this.CurrentProductItem, this.CurrentJudgmentSetItem, this.CollectionWeightData);
// 초기값으로 설정해놓기 // 초기값으로 설정해놓기
this.Current40000ModbusData._40021_PassRange = 0; this.Current40000ModbusData._40021_PassRange = 0;
@ -8453,6 +8446,7 @@ namespace INT69DC_7C.Forms
else else
{ {
// 실패 // 실패
this.Current40000ModbusData._40021_PassRange = 0;
this.Current40000ModbusData._40023_PassRangeResult = 2; this.Current40000ModbusData._40023_PassRangeResult = 2;
} }
#endregion #endregion
@ -8472,18 +8466,16 @@ namespace INT69DC_7C.Forms
this.Current40000ModbusData._40024_OverRange = this.Current40000ModbusData._40024_OverRange =
int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", "")); int.Parse(Helper.DoubleToString((double)floatNum, this.SystemConfig.DecimalPlaces).Replace(".", ""));
if (this.Current40000ModbusData._40024_OverRange >= 0 && this.Current40000ModbusData._40024_OverRange <= 99999) if (this.Current40000ModbusData._40024_OverRange >= int.Parse(this.CurrentProductItem.PassRange)
&& this.Current40000ModbusData._40024_OverRange <= 99999)
{ {
try try
{ {
this.CurrentProductItem.OverRange = this.Current40000ModbusData._40024_OverRange.ToString(); string weight = Helper.StringToDecimalPlaces(this.Current40000ModbusData._40024_OverRange.ToString(), this.SystemConfig.DecimalPlaces);
this.ChildFormMainDisplay.UpdateOverRangeChange(weight);
this.SaveProductFile(this.CurrentProductItem, this.SystemConfig.ProductNumber - 1);
this.TransferProductParameter(this.SystemConfig.ProductNumber);
this.Update30000ModbusData(); this.Update30000ModbusData();
this.ModbusCommonDataSend(); this.ModbusCommonDataSend();
this.ChildFormMainDisplay.UpdateCurrentProductDisplay(this.EquipmentStatus, this.CurrentProductItem, this.CurrentJudgmentSetItem, this.CollectionWeightData);
// 초기값으로 설정해놓기 // 초기값으로 설정해놓기
this.Current40000ModbusData._40024_OverRange = 0; this.Current40000ModbusData._40024_OverRange = 0;
@ -8500,6 +8492,7 @@ namespace INT69DC_7C.Forms
else else
{ {
// 실패 // 실패
this.Current40000ModbusData._40024_OverRange = 0;
this.Current40000ModbusData._40026_OverRangeResult = 2; this.Current40000ModbusData._40026_OverRangeResult = 2;
} }
#endregion #endregion
@ -8523,14 +8516,11 @@ namespace INT69DC_7C.Forms
{ {
try try
{ {
this.CurrentProductItem.TareRange = this.Current40000ModbusData._40027_TareWeight.ToString(); string weight = Helper.StringToDecimalPlaces(this.Current40000ModbusData._40027_TareWeight.ToString(), this.SystemConfig.DecimalPlaces);
this.ChildFormMainDisplay.UpdateTareRangeChange(weight);
this.SaveProductFile(this.CurrentProductItem, this.SystemConfig.ProductNumber - 1);
this.TransferProductParameter(this.SystemConfig.ProductNumber);
this.Update30000ModbusData(); this.Update30000ModbusData();
this.ModbusCommonDataSend(); this.ModbusCommonDataSend();
this.ChildFormMainDisplay.UpdateCurrentProductDisplay(this.EquipmentStatus, this.CurrentProductItem, this.CurrentJudgmentSetItem, this.CollectionWeightData);
// 초기값으로 설정해놓기 // 초기값으로 설정해놓기
this.Current40000ModbusData._40027_TareWeight = 0; this.Current40000ModbusData._40027_TareWeight = 0;
@ -8547,6 +8537,7 @@ namespace INT69DC_7C.Forms
else else
{ {
// 실패 // 실패
this.Current40000ModbusData._40027_TareWeight = 0;
this.Current40000ModbusData._40029_TareWeightResult = 2; this.Current40000ModbusData._40029_TareWeightResult = 2;
} }
#endregion #endregion

View File

@ -2485,6 +2485,57 @@ namespace INT69DC_7C.Forms
// Alarm Total Pass Count // Alarm Total Pass Count
this.ClearAlarmTotalPassCount(); this.ClearAlarmTotalPassCount();
} }
public void UpdateUnderRangeChange(string weight)
{
string value = "";
this.buttonUnder.Text = weight;
this.ParentForm.CurrentProductItem.UnderRange = weight.Replace(".", "");
this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.UnderRange);
this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2002_UnderRange, value);
this.RescaleControl();
}
public void UpdatePassRangeChange(string weight)
{
string value = "";
this.buttonPass.Text = weight;
this.ParentForm.CurrentProductItem.PassRange = weight.Replace(".", "");
this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.PassRange);
this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2003_PassRange, value);
this.RescaleControl();
}
public void UpdateOverRangeChange(string weight)
{
string value = "";
this.buttonOver.Text = weight;
this.ParentForm.CurrentProductItem.OverRange = weight.Replace(".", "");
this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.OverRange);
this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2004_OverRange, value);
this.RescaleControl();
}
public void UpdateTareRangeChange(string weight)
{
string value = "";
this.buttonTare.Text = weight;
this.ParentForm.CurrentProductItem.TareRange = weight.Replace(".", "");
this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.TareRange);
this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2005_TareRange, value);
}
public void RescaleControl() public void RescaleControl()
{ {
switch (this.ParentForm.SystemConfig.EquipmentColumns) switch (this.ParentForm.SystemConfig.EquipmentColumns)

View File

@ -24,6 +24,12 @@
멀티형 8,10,12열 컨베어/스틱 계량기 멀티형 8,10,12열 컨베어/스틱 계량기
*/ */
@ Ver 12.4.1 by CJY
- 2025.11.05
- Ver 12.4.0 Modify
- Framework : SmartX Framework V3.2.4(update: 2021.01.20)
- (버그수정)Modbus 쓰기부분 상한/기준/하한값 변경범위 수정
@ Ver 12.4.0 by LSJ @ Ver 12.4.0 by LSJ
- 2025.09.05 - 2025.09.05
- Ver 12.3.1 Modify - Ver 12.3.1 Modify