diff --git a/INT69DB_2A/Controls/ControlEquipmentTest.cs b/INT69DB_2A/Controls/ControlEquipmentTest.cs index 7829235..849d86f 100644 --- a/INT69DB_2A/Controls/ControlEquipmentTest.cs +++ b/INT69DB_2A/Controls/ControlEquipmentTest.cs @@ -183,13 +183,13 @@ namespace INT69DB_2A.Controls { string value = ""; - if (item.Serial3BaudRate == 9600) + if (item.Serial3BaudRate == 0) this.labelCH3Baudrate.Text = "9600"; - else if (item.Serial3BaudRate == 19200) + else if (item.Serial3BaudRate == 1) this.labelCH3Baudrate.Text = "19200"; - else if (item.Serial3BaudRate == 38400) + else if (item.Serial3BaudRate == 2) this.labelCH3Baudrate.Text = "38400"; - else if (item.Serial3BaudRate == 115200) + else if (item.Serial3BaudRate == 3) this.labelCH3Baudrate.Text = "115200"; else this.labelCH3Baudrate.Text = "9600"; @@ -206,8 +206,6 @@ namespace INT69DB_2A.Controls this.labelCH3Mode.Text = "Printer"; else if (item.Serial3Mode == 5) this.labelCH3Mode.Text = "OPT4"; - else if (item.Serial3Mode == 6) - this.labelCH3Mode.Text = "OPT5"; else this.labelCH3Mode.Text = "None"; } diff --git a/INT69DB_2A/DataStore.cs b/INT69DB_2A/DataStore.cs index a55c6ae..e7f6a52 100644 --- a/INT69DB_2A/DataStore.cs +++ b/INT69DB_2A/DataStore.cs @@ -346,7 +346,6 @@ namespace INT69DB_2A f3_OPT3, f4_Printer, f5_OPT4, - f6_OPT5, } public enum EthernetMode @@ -357,7 +356,6 @@ namespace INT69DB_2A f3_OPT3, f4_Modbus, f5_OPT4, - f6_OPT5, } public enum UserGroup @@ -1552,7 +1550,7 @@ namespace INT69DB_2A this.ProductNumber = 1; this.UsbID = 1; this.ImpellerMotorBaudrate = 4; - this.Serial3BaudRate = 9600; + this.Serial3BaudRate = 0; this.Serial3Mode = 0; this.InputSensorSelect = 5; this.ImpellerMotorAnglePass = 3; diff --git a/INT69DB_2A/Forms/FormCommunication.cs b/INT69DB_2A/Forms/FormCommunication.cs index f0b1879..3f86e7c 100644 --- a/INT69DB_2A/Forms/FormCommunication.cs +++ b/INT69DB_2A/Forms/FormCommunication.cs @@ -302,13 +302,6 @@ namespace INT69DB_2A.Forms else if (this.ParentForm.SystemConfig.EquipmentMode == 2) data = this.ParentForm.Protocol_OPT4(1, this.ParentForm.CollectionWeightData[0]); } - else if (this.ParentForm.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5) - { - if (this.ParentForm.SystemConfig.EquipmentMode == 1) - data = this.ParentForm.Protocol_OPT5(this.ParentForm.CollectionWeightData); - else if (this.ParentForm.SystemConfig.EquipmentMode == 2) - data = this.ParentForm.Protocol_OPT5(1, this.ParentForm.CollectionWeightData[0]); - } switch (this.ParentForm.SystemConfig.EthernetOperationMode) { @@ -367,13 +360,6 @@ namespace INT69DB_2A.Forms else if (this.ParentForm.SystemConfig.EquipmentMode == 2) data = this.ParentForm.Protocol_OPT4(1, this.ParentForm.CollectionWeightData[0]); } - else if (this.ParentForm.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5) - { - if (this.ParentForm.SystemConfig.EquipmentMode == 1) - data = this.ParentForm.Protocol_OPT5(this.ParentForm.CollectionWeightData); - else if (this.ParentForm.SystemConfig.EquipmentMode == 2) - data = this.ParentForm.Protocol_OPT5(1, this.ParentForm.CollectionWeightData[0]); - } switch (this.ParentForm.SystemConfig.EthernetOperationMode) { @@ -566,19 +552,6 @@ namespace INT69DB_2A.Forms this.labelProtocolDescriptionEthernet_2.Text = "LANE[2],GRD[1],WEIGHT[6],ETX[1]]"; } } - else if (this.comboBoxMode.SelectedIndex == (int)DataStore.EthernetMode.f6_OPT5) - { - if (this.ParentForm.SystemConfig.EquipmentMode == 1 || this.ParentForm.SystemConfig.EquipmentMode == 3) - { - this.labelProtocolDescriptionEthernet_1.Text = "STX[1],ID[5],NO[4],Pass Count[7],NG Count[7],"; - this.labelProtocolDescriptionEthernet_2.Text = "Total Count[9],{GRD[1],WEIGHT[6]} * n,ETX[1]"; - } - else if (this.ParentForm.SystemConfig.EquipmentMode == 2) - { - this.labelProtocolDescriptionEthernet_1.Text = "STX[1],ID[5],NO[4],Pass Count[7],NG Count[7],"; - this.labelProtocolDescriptionEthernet_2.Text = "Total Count[9],LANE[2],GRD[1],WEIGHT[6],ETX[1]]"; - } - } else { if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese) @@ -1514,7 +1487,7 @@ namespace INT69DB_2A.Forms beforeMode = this.ReturnCommunicationModeName(comboBox, this.ParentForm.SystemConfig.Serial3Mode); beforeBaudrate = this.ParentForm.SystemConfig.Serial3BaudRate.ToString(); - this.ParentForm.SystemConfig.Serial3BaudRate = (int)this.comboBoxSerial3BaudRate.SelectedItem; + this.ParentForm.SystemConfig.Serial3BaudRate = this.comboBoxSerial3BaudRate.SelectedIndex; this.ParentForm.SystemConfig.Serial3Mode = this.comboBoxSerial3Mode.SelectedIndex; afterMode = this.ReturnCommunicationModeName(comboBox, this.ParentForm.SystemConfig.Serial3Mode); @@ -1590,13 +1563,6 @@ namespace INT69DB_2A.Forms else if (this.ParentForm.SystemConfig.EquipmentMode == 2) this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT4_NotStxEtx(1, this.ParentForm.CollectionWeightData[0])); } - else if (this.ParentForm.SystemConfig.Serial3Mode == (int)DataStore.SerialMode.f6_OPT5) - { - if (this.ParentForm.SystemConfig.EquipmentMode == 1 || this.ParentForm.SystemConfig.EquipmentMode == 3) - this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT5_NotStxEtx(this.ParentForm.CollectionWeightData)); - else if (this.ParentForm.SystemConfig.EquipmentMode == 2) - this.ParentForm.UartCom3Write(this.ParentForm.Protocol_OPT5_NotStxEtx(1, this.ParentForm.CollectionWeightData[0])); - } } private void comboBoxSerial3BaudRate_SelectedIndexChanged(object sender, EventArgs e) diff --git a/INT69DB_2A/Forms/FormMain.cs b/INT69DB_2A/Forms/FormMain.cs index c345d09..abe7a97 100644 --- a/INT69DB_2A/Forms/FormMain.cs +++ b/INT69DB_2A/Forms/FormMain.cs @@ -43,9 +43,6 @@ namespace INT69DB_2A.Forms public string ComPortMainToLCD; // DllSerial Port public bool FlagDllSerial; // DllSerial 사용여부 private string TransferNum; // 수신데이터 ID저장 (재전송 시 사용) - public int TotalAllCount; // 스틱1 전체 수량 - public int TotalPassCount; // 스틱1 전체 Pass 수량 - public int TotalNGCount; // 스틱1 전체 NG 수량 // Motor Download 통신용 변수 public int LineNum; @@ -443,9 +440,6 @@ namespace INT69DB_2A.Forms this.ColorLogOff = Color.Red; this.ColorLogOn = Color.Yellow; this.TransferNum = "-"; - this.TotalAllCount = 0; - this.TotalNGCount = 0; - this.TotalPassCount = 0; this.PathLaunchFolder = "SD Card\\"; this.PathSystemFileFolder1 = this.PathLaunchFolder + "SystemFile1\\"; @@ -1503,187 +1497,6 @@ namespace INT69DB_2A.Forms return sb.ToString(); } - public string Protocol_OPT5(Collection datas) - { - string value = ""; - StringBuilder sb = new StringBuilder(); - - sb.Append((char)0x02); - sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); - sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); - - value = this.TotalPassCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalNGCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalAllCount.ToString(); - sb.Append(value.PadLeft(9, ' ')); - - if (this.SystemConfig.IsWeightViewForward == true) - { - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else - sb.Append("E"); - - value = Helper.DoubleToString(datas[i].Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - } - } - else - { - for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++) - { - if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else - sb.Append("E"); - - value = Helper.DoubleToString(datas[datas.Count - i].Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - } - } - sb.Append((char)0x03); - - return sb.ToString(); - } - public string Protocol_OPT5(int lane, WeightData data) - { - string value = ""; - StringBuilder sb = new StringBuilder(); - - sb.Append((char)0x02); - sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); - sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); - - value = this.TotalPassCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalNGCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalAllCount.ToString(); - sb.Append(value.PadLeft(9, ' ')); - sb.Append(string.Format("{0:D2}", lane)); - - if (data.JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else - sb.Append("E"); - - value = Helper.DoubleToString(data.Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - sb.Append((char)0x03); - - return sb.ToString(); - } - public string Protocol_OPT5_NotStxEtx(Collection datas) - { - string value = ""; - StringBuilder sb = new StringBuilder(); - - sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); - sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); - - value = this.TotalPassCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalNGCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalAllCount.ToString(); - sb.Append(value.PadLeft(9, ' ')); - - if (this.SystemConfig.IsWeightViewForward == true) - { - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else - sb.Append("E"); - - value = Helper.DoubleToString(datas[i].Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - } - } - else - { - for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++) - { - if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else - sb.Append("E"); - - value = Helper.DoubleToString(datas[datas.Count - i].Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - } - } - - return sb.ToString(); - } - public string Protocol_OPT5_NotStxEtx(int lane, WeightData data) - { - string value = ""; - StringBuilder sb = new StringBuilder(); - - sb.Append(string.Format("IN{0:D3}", this.SystemConfig.EquipmentID)); - sb.Append(string.Format("{0:D4}", this.SystemConfig.ProductNumber)); - - value = this.TotalPassCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalNGCount.ToString(); - sb.Append(value.PadLeft(7, ' ')); - value = this.TotalAllCount.ToString(); - sb.Append(value.PadLeft(9, ' ')); - sb.Append(string.Format("{0:D2}", lane)); - - if (data.JudgmentStatus == DataStore.JudgmentStatus.Under) - sb.Append("U"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Over) - sb.Append("O"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Double) - sb.Append("D"); - else if (data.JudgmentStatus == DataStore.JudgmentStatus.Pass) - sb.Append("P"); - else - sb.Append("E"); - - value = Helper.DoubleToString(data.Weight, this.SystemConfig.DecimalPlaces); - sb.Append(value.PadLeft(6, ' ')); - - return sb.ToString(); - } - public byte[] Protocol_Modbus_Client_Write_Common_Data() { int index = 0; @@ -3155,9 +2968,6 @@ namespace INT69DB_2A.Forms case 5: this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(datas)); break; - case 6: - this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(datas)); - break; default: break; } @@ -3178,9 +2988,6 @@ namespace INT69DB_2A.Forms case 5: this.SendEthernetData(this.Protocol_OPT4_NotStxEtx(datas)); break; - case 6: - this.SendEthernetData(this.Protocol_OPT5_NotStxEtx(datas)); - break; default: break; } @@ -3316,8 +3123,6 @@ namespace INT69DB_2A.Forms } else if (this.SystemConfig.Serial3Mode == 5) // OPT4 this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(this.CollectionWeightData)); - else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(this.CollectionWeightData)); } private void TreatSerialCommunication(int lane, WeightData data) { @@ -3338,8 +3143,6 @@ namespace INT69DB_2A.Forms } else if (this.SystemConfig.Serial3Mode == 5) // OPT4 this.UartCom3Write(this.Protocol_OPT4_NotStxEtx(lane, data)); - else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(lane, data)); } #endregion #region Ethernet @@ -3382,11 +3185,6 @@ namespace INT69DB_2A.Forms sendData = this.Protocol_OPT4(this.CollectionWeightData); this.SendEthernetData(sendData); } - else if (this.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5) - { - sendData = this.Protocol_OPT5(this.CollectionWeightData); - this.SendEthernetData(sendData); - } } private void TreatEthernetCommunication(int lane, WeightData data) { @@ -3424,11 +3222,6 @@ namespace INT69DB_2A.Forms sendData = this.Protocol_OPT4(lane, data); this.SendEthernetData(sendData); } - else if (this.SystemConfig.EthernetMode == (int)DataStore.EthernetMode.f6_OPT5) - { - sendData = this.Protocol_OPT5(lane, data); - this.SendEthernetData(sendData); - } } private void SendEthernetData(string etherData) { diff --git a/INT69DB_2A/Forms/FormMainDisplay.cs b/INT69DB_2A/Forms/FormMainDisplay.cs index a413023..408588c 100644 --- a/INT69DB_2A/Forms/FormMainDisplay.cs +++ b/INT69DB_2A/Forms/FormMainDisplay.cs @@ -1353,14 +1353,14 @@ namespace INT69DB_2A.Forms public void SetTotalCount() { string totalCNT = "", ngCNT = ""; - int totalUnder = 0, totalOver = 0, totalExNG = 0; + int totalAll = 0, totalPass = 0, totalNG = 0, totalUnder = 0, totalOver = 0, totalExNG = 0; for (int i = 0; i < this.ParentForm.SystemConfig.EquipmentColumns; i++) { - this.ParentForm.TotalAllCount += this.ParentForm.CollectionWeightData[i].TotalCount; - this.ParentForm.TotalPassCount += this.ParentForm.CollectionWeightData[i].PassCount; + totalAll += this.ParentForm.CollectionWeightData[i].TotalCount; + totalPass += this.ParentForm.CollectionWeightData[i].PassCount; - this.ParentForm.TotalNGCount += this.ParentForm.CollectionWeightData[i].TotalNGCount; + totalNG += this.ParentForm.CollectionWeightData[i].TotalNGCount; totalUnder += this.ParentForm.CollectionWeightData[i].UnderCount; totalOver += this.ParentForm.CollectionWeightData[i].OverCount; totalExNG += this.ParentForm.CollectionWeightData[i].ExNGCount; @@ -1370,10 +1370,10 @@ namespace INT69DB_2A.Forms switch (this.Mode_TotalCnt) { case DataStore.E_TotalCnt.f0_Total: - totalCNT = this.ParentForm.TotalAllCount.ToString(); + totalCNT = totalAll.ToString(); break; case DataStore.E_TotalCnt.f1_Pass: - totalCNT = this.ParentForm.TotalPassCount.ToString(); + totalCNT = totalPass.ToString(); break; default: break; @@ -1386,7 +1386,7 @@ namespace INT69DB_2A.Forms switch (this.Mode_TotalCntNG) { case DataStore.E_TotalCntNG.f0_NG: - ngCNT = this.ParentForm.TotalNGCount.ToString(); + ngCNT = totalNG.ToString(); break; case DataStore.E_TotalCntNG.f1_Under: ngCNT = totalUnder.ToString(); diff --git a/INT69DB_2A/INT69DB_2A.csproj b/INT69DB_2A/INT69DB_2A.csproj index c32a62e..7339e59 100644 --- a/INT69DB_2A/INT69DB_2A.csproj +++ b/INT69DB_2A/INT69DB_2A.csproj @@ -57,11 +57,11 @@ False - C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_20210120\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartXCommon.dll + C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_V3대 마지막버전\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartXCommon.dll False - C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_20210120\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartX_IEC1000.dll + C:\Program Files (x86)\HNS\Embedded SmartX Component\V3.2.4_V3대 마지막버전\SmartX3.2.4_IEC1000_DOTNETCF3.5수동설치파일\SmartX_IEC1000.dll diff --git a/INT69DB_2A/Version.txt b/INT69DB_2A/Version.txt index 38e9b9b..b902ec3 100644 --- a/INT69DB_2A/Version.txt +++ b/INT69DB_2A/Version.txt @@ -20,6 +20,7 @@ - Ver 6.2.0 Modify - Framework : SmartX Framework V3.2.4(update: 2021.01.20) - OPT5 ߰ + - (׼) Ʈ SelectedIndex @ Ver 6.2.0 by CJY - 2025.01.08