diff --git a/INT_PT002/Controls/System/ControlMenuSystemEthernet.cs b/INT_PT002/Controls/System/ControlMenuSystemEthernet.cs index c2c3d02..0f66b8c 100644 --- a/INT_PT002/Controls/System/ControlMenuSystemEthernet.cs +++ b/INT_PT002/Controls/System/ControlMenuSystemEthernet.cs @@ -280,8 +280,6 @@ namespace INT_PT002.Controls { if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE == 1) { - this.ParentForm.ParentForm.ChildFormMainDisplay.InitialEthernetIcon(); - if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE == 1) { this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true); @@ -316,6 +314,8 @@ namespace INT_PT002.Controls this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false); this.groupBoxModbusSetting.Visible = false; } + + this.ParentForm.ParentForm.ChildFormMainDisplay.InitialEthernetIcon(); } public void DisplayRefresh() diff --git a/INT_PT002/Forms/FormMain.Designer.cs b/INT_PT002/Forms/FormMain.Designer.cs index cf97bca..1b02d73 100644 --- a/INT_PT002/Forms/FormMain.Designer.cs +++ b/INT_PT002/Forms/FormMain.Designer.cs @@ -115,6 +115,7 @@ // timerClientTryConnect // this.timerClientTryConnect.Interval = 2000; + this.timerClientTryConnect.Tick += new System.EventHandler(this.timerClientTryConnect_Tick); // // FormMain // diff --git a/INT_PT002/Forms/FormMain.cs b/INT_PT002/Forms/FormMain.cs index fa9842a..6c752ca 100644 --- a/INT_PT002/Forms/FormMain.cs +++ b/INT_PT002/Forms/FormMain.cs @@ -1539,6 +1539,13 @@ namespace INT_PT002.Forms } this.Update30000ModbusItem(); + + if (this.SystemConfig.MODBUS_TCP_SELECTFUNCTION == (int)Define.E_ModbusFunction._16_WriteMultipleRegister) + { + byte[] sendData = this.Modbus.MakeTCPSendAllData(this.Transfer_1_Modbus_Write(), this.SystemConfig.MODBUS_TCP_START_ADDRESS); + + this.EthernetWeightDataForModbus(sendData); + } } catch { @@ -4360,6 +4367,11 @@ namespace INT_PT002.Forms { this.timerUserList.Enabled = false; UserManager.UserManager_GetUserListName(); + } + private void timerClientTryConnect_Tick(object sender, EventArgs e) + { + this.DelegateTimerTryConnect(false); + this.EthernetClientConnect(); } #region UserManagerEvent @@ -4565,11 +4577,6 @@ namespace INT_PT002.Forms } } #endregion - - private void timerClientTryConnect_Tick(object sender, EventArgs e) - { - - } #endregion } } \ No newline at end of file diff --git a/INT_PT002/Forms/FormMainDisplay3.cs b/INT_PT002/Forms/FormMainDisplay3.cs index ec3925b..ce56c8d 100644 --- a/INT_PT002/Forms/FormMainDisplay3.cs +++ b/INT_PT002/Forms/FormMainDisplay3.cs @@ -1302,8 +1302,8 @@ namespace INT_PT002.Forms this.buttonRecipeNo.ButtonText = this.ParentForm.CurrentRecipe.NUMBER.ToString(); this.InitializeProcessStatus(); - if (this.ChildModbus.Visible == true) - this.ChildModbus.Visible = false; + + this.ChildModbus.Visible = false; this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus.CurrentUser); }