- Modbus 데이터 변환 시 품목명에 변환 불가능한 특수문자 있을 경우 '품번_Name'으로 전송하도록 수정

master V3.3.3
DESKTOP-999R8N3\CJY 2024-08-07 10:16:53 +09:00
parent b3d6e14374
commit 9f3b2fad32
4 changed files with 22 additions and 5 deletions

View File

@ -25,8 +25,8 @@ namespace ITC81DB_2H.Forms
public partial class FormMain : Form public partial class FormMain : Form
{ {
#region Field #region Field
public static string DisplayVersion = "3.3.2"; public static string DisplayVersion = "3.3.3";
public static string ReleaseDate = "2024.03.06"; public static string ReleaseDate = "2024.08.06";
private SmartSplash SmartSplashProgramLoad; private SmartSplash SmartSplashProgramLoad;
public bool IsCommunicationLogOpen; public bool IsCommunicationLogOpen;
@ -7110,6 +7110,8 @@ namespace ITC81DB_2H.Forms
if (this.IsOPCModbusUsing == false) if (this.IsOPCModbusUsing == false)
return; return;
byte[] productName;
if (this.UpdateValue > 999999999) if (this.UpdateValue > 999999999)
this.UpdateValue = 0; this.UpdateValue = 0;
else else
@ -7181,9 +7183,19 @@ namespace ITC81DB_2H.Forms
this.Current30000ModbusData.Speed = this.CurrentWeightData.ProductionSpeed; this.Current30000ModbusData.Speed = this.CurrentWeightData.ProductionSpeed;
this.Current30000ModbusData.MetalDetectionCount = (UInt32)this.CurrentWeightData.MetalDetectionCount; this.Current30000ModbusData.MetalDetectionCount = (UInt32)this.CurrentWeightData.MetalDetectionCount;
this.Current30000ModbusData.DoubleEntryCount = (UInt32)this.CurrentWeightData.DoubleEntryCount; this.Current30000ModbusData.DoubleEntryCount = (UInt32)this.CurrentWeightData.DoubleEntryCount;
byte[] productName = new UTF8Encoding().GetBytes(this.CurrentProductItem.Name);
for (int i = 0; i < productName.Length; i++) try
this.Current30000ModbusData.ProductName[i] = productName[i]; {
productName = new UTF8Encoding().GetBytes(this.CurrentProductItem.Name);
for (int i = 0; i < productName.Length; i++)
this.Current30000ModbusData.ProductName[i] = productName[i];
}
catch
{
productName = new UTF8Encoding().GetBytes(this.SystemConfig1.ProductNumber.ToString() + "_Name");
for (int i = 0; i < productName.Length; i++)
this.Current30000ModbusData.ProductName[i] = productName[i];
}
this.ChildFormMainDisplay.MainModbus.UpdateData(this.Current30000ModbusData); this.ChildFormMainDisplay.MainModbus.UpdateData(this.Current30000ModbusData);
} }

View File

@ -13,6 +13,11 @@
기본형 컨베어 고정밀센서 계량기 기본형 컨베어 고정밀센서 계량기
*/ */
@ Ver 3.3.3 by CJY
- 2024.08.07
- Ver 3.3.2 Modify
- Modbus 데이터 변환 시 품목명에 변환 불가능한 특수문자 있을 경우 '품번_Name'으로 전송하도록 수정
@ Ver 3.3.2 by CJY @ Ver 3.3.2 by CJY
- 2024.02.22 - 2024.02.22
- Ver 3.3.1 Modify - Ver 3.3.1 Modify