diff --git a/INT69DC_7C/DataStore.cs b/INT69DC_7C/DataStore.cs index a38a64f..74ee9d9 100644 --- a/INT69DC_7C/DataStore.cs +++ b/INT69DC_7C/DataStore.cs @@ -1612,10 +1612,7 @@ namespace INT69DC_7C private bool m_IsADCError; private bool m_IsBypassMode; - private bool m_IsUpdate_COM3; - private bool m_IsUpdate_Ethernet; - private bool m_IsUpdate1; - private bool m_IsUpdate_DataBackup; + private bool m_IsUpdate; private int m_ContinuousNG; private bool m_IsContinuousNG; @@ -1841,39 +1838,11 @@ namespace INT69DC_7C /// /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false - /// COM3 사용 /// - public bool IsUpdate_COM3 + public bool IsUpdate { - get { return this.m_IsUpdate_COM3; } - set { this.m_IsUpdate_COM3 = value; } - } - /// - /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false - /// Ethernet 사용 - /// - public bool IsUpdate_Ethernet - { - get { return this.m_IsUpdate_Ethernet; } - set { this.m_IsUpdate_Ethernet = value; } - } - /// - /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false - /// Alarm Total Pass Count 에서 사용 - /// - public bool IsUpdate_ATPC - { - get { return this.m_IsUpdate1; } - set { this.m_IsUpdate1 = value; } - } - /// - /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false - /// Databackup 사용 - /// - public bool IsUpdate_DataBackup - { - get { return this.m_IsUpdate_DataBackup; } - set { this.m_IsUpdate_DataBackup = value; } + get { return this.m_IsUpdate; } + set { this.m_IsUpdate = value; } } /// @@ -1920,10 +1889,7 @@ namespace INT69DC_7C this.WeightString = "0"; this.IsADCError = false; this.IsBypassMode = false; - this.IsUpdate_COM3 = false; - this.IsUpdate_Ethernet = false; - this.IsUpdate_ATPC = false; - this.IsUpdate_DataBackup = false; + this.IsUpdate = false; this.IsContinuousNG = false; this.ContinuousNG = 0; this.UpdateCount = 0; @@ -4142,7 +4108,7 @@ namespace INT69DC_7C for (int i = 0; i < datas.Count; i++) { - if (datas[i].IsUpdate_ATPC == true) + if (datas[i].IsUpdate == true) { if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Pass) this.CurrentTotalPass++; diff --git a/INT69DC_7C/Forms/FormMain.Designer.cs b/INT69DC_7C/Forms/FormMain.Designer.cs index 4588e47..002d045 100644 --- a/INT69DC_7C/Forms/FormMain.Designer.cs +++ b/INT69DC_7C/Forms/FormMain.Designer.cs @@ -47,11 +47,8 @@ this.timerTimeoutOPT4_OnlineCheck = new System.Windows.Forms.Timer(); this.smartSerialPortCom3 = new SmartX.SmartSerialPort(); this.smartTCPMultiServer = new SmartX.SmartTCPMultiServer(); - this.timerTimeOutCOM3 = new System.Windows.Forms.Timer(); - this.timerTimeOutEthernet = new System.Windows.Forms.Timer(); - this.timerTimeOutATPC = new System.Windows.Forms.Timer(); + this.timerTimeOutTransmission = new System.Windows.Forms.Timer(); this.timerUserList = new System.Windows.Forms.Timer(); - this.timerTimeOutDB = new System.Windows.Forms.Timer(); ((System.ComponentModel.ISupportInitialize)(this.smartForm)).BeginInit(); this.SuspendLayout(); // @@ -191,31 +188,16 @@ this.smartTCPMultiServer.ReceiveTimeout = 3000; this.smartTCPMultiServer.OnReceiveHandler += new SmartX.SmartTCPMultiServer.ReceiveHandler(this.smartTCPMultiServer_OnReceiveHandler); // - // timerTimeOutCOM3 + // timerTimeOutTransmission // - this.timerTimeOutCOM3.Interval = 300; - this.timerTimeOutCOM3.Tick += new System.EventHandler(this.timerTimeOutCOM3_Tick); - // - // timerTimeOutEthernet - // - this.timerTimeOutEthernet.Interval = 300; - this.timerTimeOutEthernet.Tick += new System.EventHandler(this.timerTimeOutEthernet_Tick); - // - // timerTimeOutATPC - // - this.timerTimeOutATPC.Interval = 300; - this.timerTimeOutATPC.Tick += new System.EventHandler(this.timerTimeOutATPC_Tick); + this.timerTimeOutTransmission.Interval = 300; + this.timerTimeOutTransmission.Tick += new System.EventHandler(this.timerTimeOutTransmission_Tick); // // timerUserList // this.timerUserList.Interval = 1000; this.timerUserList.Tick += new System.EventHandler(this.timerUserList_Tick); // - // timerTimeOutDB - // - this.timerTimeOutDB.Interval = 300; - this.timerTimeOutDB.Tick += new System.EventHandler(this.timerTimeOutDB_Tick); - // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -250,10 +232,7 @@ private System.Windows.Forms.Timer timerTimeoutOPT4_OnlineCheck; public SmartX.SmartSerialPort smartSerialPortCom3; public SmartX.SmartTCPMultiServer smartTCPMultiServer; - public System.Windows.Forms.Timer timerTimeOutCOM3; - public System.Windows.Forms.Timer timerTimeOutEthernet; - public System.Windows.Forms.Timer timerTimeOutATPC; + public System.Windows.Forms.Timer timerTimeOutTransmission; private System.Windows.Forms.Timer timerUserList; - public System.Windows.Forms.Timer timerTimeOutDB; } } \ No newline at end of file diff --git a/INT69DC_7C/Forms/FormMain.cs b/INT69DC_7C/Forms/FormMain.cs index e0332b9..10105c5 100644 --- a/INT69DC_7C/Forms/FormMain.cs +++ b/INT69DC_7C/Forms/FormMain.cs @@ -382,15 +382,6 @@ namespace INT69DC_7C.Forms this.timerAdcLog.Interval = 300000; this.timerAdcLog.Enabled = false; - this.timerTimeOutCOM3.Interval = 800; - this.timerTimeOutCOM3.Enabled = false; - - this.timerTimeOutEthernet.Interval = 800; - this.timerTimeOutEthernet.Enabled = false; - - this.timerTimeOutATPC.Interval = 800; - this.timerTimeOutATPC.Enabled = false; - this.ColorLogOff = Color.Red; this.ColorLogOn = Color.Green; @@ -474,6 +465,7 @@ namespace INT69DC_7C.Forms private void DefaultSetting2() { this.timerTimeoutOPT1.Interval = this.SystemConfig.ABFoodTimeoutInterval; + this.timerTimeOutTransmission.Interval = this.CurrentJudgmentSetItem.JudgmentDelayTime - 100; // 이더넷 if (this.SystemConfig.EthernetOperationMode == 1) @@ -669,44 +661,6 @@ namespace INT69DC_7C.Forms } } - private void ATPC_IntegratedCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_ATPC == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutCOM3.Enabled = false; - this.SerialCH3OPT2IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_ATPC = false; - } - } - private bool IntegratedCheck(Collection datas) - { - bool ret = false; - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_ATPC == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - ret = true; - else - ret = false; - - return ret; - } - #region Uart Communication private void OpenSmartUartLink() { @@ -1736,19 +1690,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[0].IsUpdate_COM3 = true; - this.CollectionWeightData[0].IsUpdate_ATPC = true; - this.CollectionWeightData[0].IsUpdate_Ethernet = true; - this.CollectionWeightData[0].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[0].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 1].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 1].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 1].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 1].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 1].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -1781,8 +1725,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -1844,17 +1786,7 @@ namespace INT69DC_7C.Forms if (this.SystemConfig.EthernetMode == 1) { #region OPT2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutEthernet.Enabled == false) - this.timerTimeOutEthernet.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.EthernetOPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개발 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -1870,17 +1802,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.EthernetMode == 2) { #region OPT3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutEthernet.Enabled == false) - this.timerTimeOutEthernet.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.EthernetOPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개발 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -1904,17 +1826,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.EthernetMode == 4) { #region OPT5 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutEthernet.Enabled == false) - this.timerTimeOutEthernet.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.EthernetOPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -1965,17 +1877,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개발 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -1989,17 +1891,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 (기준값 포함) { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개발 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2037,17 +1929,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2060,13 +1942,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; - } - #endregion + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion + } #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -2112,19 +1997,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[1].IsUpdate_COM3 = true; - this.CollectionWeightData[1].IsUpdate_ATPC = true; - this.CollectionWeightData[1].IsUpdate_Ethernet = true; - this.CollectionWeightData[1].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[1].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 2].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 2].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 2].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 2].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 2].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -2157,8 +2032,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -2284,17 +2157,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2308,17 +2171,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2356,17 +2209,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2379,13 +2222,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -2431,19 +2277,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[2].IsUpdate_COM3 = true; - this.CollectionWeightData[2].IsUpdate_ATPC = true; - this.CollectionWeightData[2].IsUpdate_Ethernet = true; - this.CollectionWeightData[2].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[2].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 3].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 3].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 3].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 3].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 3].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -2476,8 +2312,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -2603,17 +2437,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2627,17 +2451,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2675,17 +2489,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2698,13 +2502,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -2750,19 +2557,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[3].IsUpdate_COM3 = true; - this.CollectionWeightData[3].IsUpdate_ATPC = true; - this.CollectionWeightData[3].IsUpdate_Ethernet = true; - this.CollectionWeightData[3].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[3].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 4].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 4].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 4].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 4].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 4].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -2795,8 +2592,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -2922,17 +2717,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2946,17 +2731,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -2994,17 +2769,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3017,13 +2782,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -3069,19 +2837,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[4].IsUpdate_COM3 = true; - this.CollectionWeightData[4].IsUpdate_ATPC = true; - this.CollectionWeightData[4].IsUpdate_Ethernet = true; - this.CollectionWeightData[4].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[4].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 5].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 5].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 5].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 5].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 5].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -3114,8 +2872,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -3241,17 +2997,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3265,17 +3011,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3313,17 +3049,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3336,13 +3062,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -3388,19 +3117,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[5].IsUpdate_COM3 = true; - this.CollectionWeightData[5].IsUpdate_ATPC = true; - this.CollectionWeightData[5].IsUpdate_Ethernet = true; - this.CollectionWeightData[5].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[5].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 6].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 6].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 6].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 6].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 6].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -3433,8 +3152,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -3560,17 +3277,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3584,17 +3291,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3632,17 +3329,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3655,13 +3342,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -3707,19 +3397,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[6].IsUpdate_COM3 = true; - this.CollectionWeightData[6].IsUpdate_ATPC = true; - this.CollectionWeightData[6].IsUpdate_Ethernet = true; - this.CollectionWeightData[6].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[6].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 7].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 7].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 7].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 7].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 7].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -3752,8 +3432,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -3879,17 +3557,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3903,17 +3571,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3951,17 +3609,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -3974,13 +3622,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -4026,19 +3677,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[7].IsUpdate_COM3 = true; - this.CollectionWeightData[7].IsUpdate_ATPC = true; - this.CollectionWeightData[7].IsUpdate_Ethernet = true; - this.CollectionWeightData[7].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[7].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 8].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 8].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 8].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 8].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 8].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -4069,8 +3710,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -4196,17 +3835,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4220,17 +3849,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4268,17 +3887,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4291,13 +3900,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -4342,19 +3954,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[8].IsUpdate_COM3 = true; - this.CollectionWeightData[8].IsUpdate_ATPC = true; - this.CollectionWeightData[8].IsUpdate_Ethernet = true; - this.CollectionWeightData[8].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[8].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 9].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 9].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 9].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 9].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 9].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -4383,8 +3985,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -4510,17 +4110,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4534,17 +4124,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4582,17 +4162,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4605,13 +4175,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -4655,19 +4228,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[9].IsUpdate_COM3 = true; - this.CollectionWeightData[9].IsUpdate_ATPC = true; - this.CollectionWeightData[9].IsUpdate_Ethernet = true; - this.CollectionWeightData[9].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[9].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 10].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 10].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 10].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 10].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 10].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -4696,8 +4259,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -4823,17 +4384,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4847,17 +4398,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4895,17 +4436,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -4918,13 +4449,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -4968,19 +4502,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[10].IsUpdate_COM3 = true; - this.CollectionWeightData[10].IsUpdate_ATPC = true; - this.CollectionWeightData[10].IsUpdate_Ethernet = true; - this.CollectionWeightData[10].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[10].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 11].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 11].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 11].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 11].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 11].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -5007,8 +4531,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -5134,17 +4656,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5158,17 +4670,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5206,17 +4708,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 (중량설정값 포함) { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5229,13 +4721,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -5278,19 +4773,9 @@ namespace INT69DC_7C.Forms #region 통합 전송하기 위한 데이터 체크 // 중량 갱신이 되었는지 체크 if (this.SystemConfig.IsWeightViewForward == true) - { - this.CollectionWeightData[11].IsUpdate_COM3 = true; - this.CollectionWeightData[11].IsUpdate_ATPC = true; - this.CollectionWeightData[11].IsUpdate_Ethernet = true; - this.CollectionWeightData[11].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[11].IsUpdate = true; else - { - this.CollectionWeightData[this.CollectionWeightData.Count - 12].IsUpdate_COM3 = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 12].IsUpdate_ATPC = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 12].IsUpdate_Ethernet = true; - this.CollectionWeightData[this.CollectionWeightData.Count - 12].IsUpdate_DataBackup = true; - } + this.CollectionWeightData[this.CollectionWeightData.Count - 12].IsUpdate = true; #endregion #region 화면 갱신, 데이터 백업 @@ -5317,8 +4802,6 @@ namespace INT69DC_7C.Forms break; } } - - this.TrackingInspectionDataIntegratedCheck(this.CollectionWeightData); #endregion #region 이중진입 @@ -5444,17 +4927,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 2) // OPT2 - 중량 데이터 피드백 { #region Serial3 Mode2 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT2IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5468,17 +4941,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 3) // OPT3 - 중량 데이터 피드백 { #region Serial3 Mode3 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT3IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5516,17 +4979,7 @@ namespace INT69DC_7C.Forms else if (this.SystemConfig.Serial3Mode == 6) // OPT5 - 중량 데이터 피드백 { #region Serial3 Mode6 - if (this.SystemConfig.IsIntegratedTransmission == true) - { - #region 통합 전송 - if (this.timerTimeOutCOM3.Enabled == false) - this.timerTimeOutCOM3.Enabled = true; - - // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) - this.SerialCH3OPT5IntegratedTransmissionCheck(this.CollectionWeightData); - #endregion - } - else + if (this.SystemConfig.IsIntegratedTransmission == false) { #region 개별 전송 if (this.SystemConfig.IsWeightViewForward == true) @@ -5539,13 +4992,16 @@ namespace INT69DC_7C.Forms } #endregion - #region ATPC(Alarm Total Pass Count) - if (this.SystemConfig.IsAlarmTotalPassCntEnable == true) + if (this.SystemConfig.IsIntegratedTransmission == true) { - if (this.timerTimeOutATPC.Enabled == false) - this.timerTimeOutATPC.Enabled = true; + #region 통합 전송 + if (this.timerTimeOutTransmission.Enabled == false) + this.timerTimeOutTransmission.Enabled = true; + + // EquipmentColumns 수 만큼 중량이 들어왔는지 체크 후 데이터 전송하는 함수(EquipmentColumns 갯수가 다 들어아야 데이터 전송함) + this.IntegratedTransmissionCheck(this.CollectionWeightData); + #endregion } - #endregion #endregion } else if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormEquipmentTest) @@ -8363,7 +7819,7 @@ namespace INT69DC_7C.Forms { for (int i = 0; i < system.EquipmentColumns; i++) { - if (datas[i].IsUpdate_COM3 == true) + if (datas[i].IsUpdate == true) { if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -8386,7 +7842,7 @@ namespace INT69DC_7C.Forms { for (int i = 1; i <= system.EquipmentColumns; i++) { - if (datas[datas.Count - i].IsUpdate_COM3 == true) + if (datas[datas.Count - i].IsUpdate == true) { if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -8513,7 +7969,7 @@ namespace INT69DC_7C.Forms { for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) { - if (datas[i].IsUpdate_COM3 == true) + if (datas[i].IsUpdate == true) { if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -8536,7 +7992,7 @@ namespace INT69DC_7C.Forms { for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++) { - if (datas[datas.Count - i].IsUpdate_COM3 == true) + if (datas[datas.Count - i].IsUpdate == true) { if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -8671,7 +8127,7 @@ namespace INT69DC_7C.Forms { for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) { - if (datas[i].IsUpdate_COM3 == true) + if (datas[i].IsUpdate == true) { if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -8694,7 +8150,7 @@ namespace INT69DC_7C.Forms { for (int i = 1; i <= this.SystemConfig.EquipmentColumns; i++) { - if (datas[datas.Count - i].IsUpdate_COM3 == true) + if (datas[datas.Count - i].IsUpdate == true) { if (datas[datas.Count - i].JudgmentStatus == DataStore.JudgmentStatus.Under) sb.Append("U"); @@ -10212,8 +9668,79 @@ namespace INT69DC_7C.Forms return madeData; } - #endregion + #endregion + #region Integrated Transmission + public void IntegratedTransmission(Collection datas) + { + #region ATPC + bool result = this.CurrentAlarmTotalPassCnt.SetCountStic2(this.CollectionWeightData); + if (result == true) + this.TransferData(CommunicationCommand.AlarmPulseNG, CommunicationID.MainBoard); + + this.ChildFormMainDisplay.UpdateAlarmTotalPassCountDisplay(this.CurrentAlarmTotalPassCnt); + #endregion + + #region COM3 + switch (this.SystemConfig.Serial3Mode) + { + case 2: + this.UartCom3Write(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, datas)); + break; + case 3: + this.UartCom3Write(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); + break; + case 6: + this.UartCom3Write(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); + break; + default: + break; + } + #endregion + + #region Ethernet + switch (this.SystemConfig.EthernetMode) + { + case 1: + this.SendEthernetData(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, datas)); + break; + case 2: + this.SendEthernetData(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); + break; + case 4: + this.SendEthernetData(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); + break; + default: + break; + } + #endregion + + // DataBackup + this.TrackingInspectionData(this.CollectionWeightData); + + this.SendEthernetData(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, datas)); + } + public void IntegratedTransmissionCheck(Collection datas) + { + int value = 0; + + for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) + { + if (datas[i].IsUpdate == true || datas[i].IsBypassMode == true) + value++; + } + + if (value == this.SystemConfig.EquipmentColumns) + { + this.timerTimeOutTransmission.Enabled = false; + this.IntegratedTransmission(datas); + + foreach (WeightData data in this.CollectionWeightData) + data.IsUpdate = false; + } + } + + #endregion #region Uart Com3 public void UartCom3Open() { @@ -10341,7 +9868,7 @@ namespace INT69DC_7C.Forms { if (this.SystemConfig.EquipmentMode == 2) { - if (this.CollectionWeightData[i].IsUpdate_COM3 == true) + if (this.CollectionWeightData[i].IsUpdate == true) { if (this.CollectionWeightData[i].IsADCError == true) { @@ -10435,7 +9962,7 @@ namespace INT69DC_7C.Forms } foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; + data.IsUpdate = false; #endregion } else @@ -10571,7 +10098,7 @@ namespace INT69DC_7C.Forms } foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; + data.IsUpdate = false; if (this.EquipmentStatus == DataStore.EquipmentStatus.Stop) { @@ -10763,7 +10290,7 @@ namespace INT69DC_7C.Forms for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) { - if (datas[i].IsUpdate_COM3 == true || datas[i].IsBypassMode == true) + if (datas[i].IsUpdate == true || datas[i].IsBypassMode == true) value++; } @@ -10785,29 +10312,6 @@ namespace INT69DC_7C.Forms { this.UartCom3Write(this.Protocol_OPT2_NotStxEtx(this.SystemConfig, datas)); } - public void SerialCH3OPT2IntegratedTransmission(Collection datas) - { - this.UartCom3Write(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, datas)); - } - public void SerialCH3OPT2IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_COM3 == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutCOM3.Enabled = false; - this.SerialCH3OPT2IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; - } - } #endregion #region OPT3 - 중량 데이터 피드백 (기준설정값 포함) @@ -10819,29 +10323,6 @@ namespace INT69DC_7C.Forms { this.UartCom3Write(this.Protocol_OPT3_NotStxEtx(this.SystemConfig, datas, this.CurrentProductItem)); } - public void SerialCH3OPT3IntegratedTransmission(Collection datas) - { - this.UartCom3Write(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); - } - public void SerialCH3OPT3IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_COM3 == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutCOM3.Enabled = false; - this.SerialCH3OPT3IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; - } - } #endregion #region OPT4 - 피드백 시스템 (보드 사용) @@ -11206,35 +10687,10 @@ namespace INT69DC_7C.Forms { this.UartCom3Write(this.Protocol_OPT5_NotStxEtx(this.SystemConfig, datas, this.CurrentProductItem)); } - public void SerialCH3OPT5IntegratedTransmission(Collection datas) - { - this.UartCom3Write(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); - } - public void SerialCH3OPT5IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_COM3 == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutCOM3.Enabled = false; - this.SerialCH3OPT5IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; - } - } #endregion #endregion - #region Ethernet - private void SendEthernetData(string etherData) { if (this.SystemConfig.EthernetOperationMode == 1) @@ -11249,84 +10705,6 @@ namespace INT69DC_7C.Forms this.EthernetWeightData(etherData); } - #region OPT2 - 중량 데이터 피드백 - public void EthernetOPT2IntegratedTransmission(Collection datas) - { - this.SendEthernetData(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, datas)); - } - public void EthernetOPT2IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_Ethernet == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutEthernet.Enabled = false; - this.EthernetOPT2IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_Ethernet = false; - } - } - #endregion - - #region OPT3 - 중량 데이터 피드백 (기준설정값 포함) - public void EthernetOPT3IntegratedTransmission(Collection datas) - { - this.SendEthernetData(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); - } - public void EthernetOPT3IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_Ethernet == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutEthernet.Enabled = false; - this.EthernetOPT3IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_Ethernet = false; - } - } - #endregion - - #region OPT5 - 중량 데이터 피드백 (중량설정값 포함) - public void EthernetOPT5IntegratedTransmission(Collection datas) - { - this.SendEthernetData(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, datas, this.CurrentProductItem)); - } - public void EthernetOPT5IntegratedTransmissionCheck(Collection datas) - { - int value = 0; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_Ethernet == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutEthernet.Enabled = false; - this.EthernetOPT5IntegratedTransmission(datas); - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_Ethernet = false; - } - } - #endregion - #region Server public void EthernetServerStart() { @@ -11679,7 +11057,7 @@ namespace INT69DC_7C.Forms for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) { - if (items[i].IsUpdate_DataBackup == true) + if (items[i].IsUpdate == true) { sw.Write(","); sw.Write(Helper.DoubleToString(items[i].Weight, this.SystemConfig.DecimalPlaces)); @@ -11698,28 +11076,6 @@ namespace INT69DC_7C.Forms sw.Close(); } } - private void TrackingInspectionDataIntegratedCheck(Collection datas) - { - int value = 0; - - if (this.timerTimeOutDB.Enabled == false) - this.timerTimeOutDB.Enabled = true; - - for (int i = 0; i < this.SystemConfig.EquipmentColumns; i++) - { - if (datas[i].IsUpdate_DataBackup == true || datas[i].IsBypassMode == true) - value++; - } - - if (value == this.SystemConfig.EquipmentColumns) - { - this.timerTimeOutDB.Enabled = false; - this.TrackingInspectionData(datas); - - foreach (WeightData data in datas) - data.IsUpdate_DataBackup = false; - } - } private void RemoveInspectionDataFile() { bool directoryCheck = false; @@ -11898,7 +11254,6 @@ namespace INT69DC_7C.Forms } } #endregion - #endregion #region Override Member @@ -12019,12 +11374,7 @@ namespace INT69DC_7C.Forms this.timerTimeoutOPT1.Enabled = false; if (this.EquipmentStatus == DataStore.EquipmentStatus.Start) - { - //this.UartCom3TransferDataABFood(DataStore.ABFoodDataCommand.Normal, (int)DataStore.ABFoodDataStatus.Normal); - - if (this.EquipmentStatus == DataStore.EquipmentStatus.Start) - this.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard); - } + this.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard); } private void timerOPT1_Tick(object sender, EventArgs e) { @@ -12268,72 +11618,58 @@ namespace INT69DC_7C.Forms this.timerUserList.Enabled = true; } - private void timerTimeOutCOM3_Tick(object sender, EventArgs e) + private void timerTimeOutTransmission_Tick(object sender, EventArgs e) { - this.timerTimeOutCOM3.Enabled = false; - - switch (this.SystemConfig.Serial3Mode) - { - case 2: - this.SerialCH3OPT2IntegratedTransmission(this.CollectionWeightData); - break; - case 3: - this.SerialCH3OPT3IntegratedTransmission(this.CollectionWeightData); - break; - case 6: - this.SerialCH3OPT5IntegratedTransmission(this.CollectionWeightData); - break; - default: - break; - } - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_COM3 = false; - } - private void timerTimeOutEthernet_Tick(object sender, EventArgs e) - { - this.timerTimeOutEthernet.Enabled = false; - - switch (this.SystemConfig.EthernetMode) - { - case 1: - this.SerialCH3OPT2IntegratedTransmission(this.CollectionWeightData); - break; - case 2: - this.SerialCH3OPT3IntegratedTransmission(this.CollectionWeightData); - break; - case 4: - this.SerialCH3OPT5IntegratedTransmission(this.CollectionWeightData); - break; - default: - break; - } - - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_Ethernet = false; - } - private void timerTimeOutATPC_Tick(object sender, EventArgs e) - { - this.timerTimeOutATPC.Enabled = false; + this.timerTimeOutTransmission.Enabled = false; + #region ATPC bool result = this.CurrentAlarmTotalPassCnt.SetCountStic2(this.CollectionWeightData); if (result == true) this.TransferData(CommunicationCommand.AlarmPulseNG, CommunicationID.MainBoard); this.ChildFormMainDisplay.UpdateAlarmTotalPassCountDisplay(this.CurrentAlarmTotalPassCnt); + #endregion - foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_ATPC = false; - } - private void timerTimeOutDB_Tick(object sender, EventArgs e) - { - this.timerTimeOutDB.Enabled = false; + #region COM3 + switch (this.SystemConfig.Serial3Mode) + { + case 2: + this.UartCom3Write(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData)); + break; + case 3: + this.UartCom3Write(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData, this.CurrentProductItem)); + break; + case 6: + this.UartCom3Write(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData, this.CurrentProductItem)); + break; + default: + break; + } + #endregion + #region Ethernet + switch (this.SystemConfig.EthernetMode) + { + case 1: + this.SendEthernetData(this.Protocol_OPT2_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData)); + break; + case 2: + this.SendEthernetData(this.Protocol_OPT3_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData, this.CurrentProductItem)); + break; + case 4: + this.SendEthernetData(this.Protocol_OPT5_NotStxEtx_1(this.SystemConfig, this.CollectionWeightData, this.CurrentProductItem)); + break; + default: + break; + } + #endregion + + // DataBackup this.TrackingInspectionData(this.CollectionWeightData); foreach (WeightData data in this.CollectionWeightData) - data.IsUpdate_DataBackup = false; + data.IsUpdate = false; } private void timerUserList_Tick(object sender, EventArgs e) { diff --git a/INT69DC_7C/Forms/FormMain.resx b/INT69DC_7C/Forms/FormMain.resx index f2fdec0..c401185 100644 --- a/INT69DC_7C/Forms/FormMain.resx +++ b/INT69DC_7C/Forms/FormMain.resx @@ -168,21 +168,12 @@ 1063, 54 - + 141, 93 - - 293, 93 - - - 1231, 54 - 17, 93 - - 469, 93 - WEBPAD diff --git a/INT69DC_7C/Forms/FormMainDisplay.cs b/INT69DC_7C/Forms/FormMainDisplay.cs index a773462..a9b226d 100644 --- a/INT69DC_7C/Forms/FormMainDisplay.cs +++ b/INT69DC_7C/Forms/FormMainDisplay.cs @@ -1283,10 +1283,8 @@ namespace INT69DC_7C.Forms this.timerTimeout.Enabled = false; this.labelTimeroutCount.Visible = false; - this.ParentForm.timerTimeOutCOM3.Enabled = false; - this.ParentForm.timerTimeOutCOM3.Interval = jItem.JudgmentDelayTime - 100; - this.ParentForm.timerTimeOutEthernet.Enabled = false; - this.ParentForm.timerTimeOutEthernet.Interval = jItem.JudgmentDelayTime - 100; + this.ParentForm.timerTimeOutTransmission.Enabled = false; + this.ParentForm.timerTimeOutTransmission.Interval = jItem.JudgmentDelayTime - 100; value = pItem.Number.ToString(); if (this.buttonProductNo.Text != value)