Merge branch 'main' of http://192.168.11.65:3000/SJ84/INT_PT002 into main
commit
1b43c25b62
|
@ -276,6 +276,48 @@ namespace INT_PT002.Controls
|
|||
this.Invoke(new ConnetedIPStatusCallback(this.ConnectedIPStatusOut), value);
|
||||
}
|
||||
|
||||
private void ModbusSetting()
|
||||
{
|
||||
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);
|
||||
this.groupBoxModbusSetting.Visible = true;
|
||||
|
||||
this.labelModbusRole.Text = "Slave";
|
||||
this.labelFunctions.Text = "04: Read input register";
|
||||
|
||||
this.labelTitleStartAddress.Visible = false;
|
||||
this.labelStartAddress.Visible = false;
|
||||
}
|
||||
else if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE == 2)
|
||||
{
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||
this.groupBoxModbusSetting.Visible = true;
|
||||
|
||||
this.labelModbusRole.Text = "Master";
|
||||
this.labelFunctions.Text = "16: Write multiple register";
|
||||
|
||||
this.labelTitleStartAddress.Visible = true;
|
||||
this.labelStartAddress.Visible = true;
|
||||
this.labelStartAddress.Text = this.ParentForm.ParentForm.SystemConfig.MODBUS_TCP_START_ADDRESS.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
||||
this.groupBoxModbusSetting.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
||||
this.groupBoxModbusSetting.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void DisplayRefresh()
|
||||
{
|
||||
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.Ethernet;
|
||||
|
@ -290,7 +332,7 @@ namespace INT_PT002.Controls
|
|||
this.comboBoxEthernetMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetMode_SelectedIndexChanged);
|
||||
this.comboBoxEthernetOpMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetOpMode_SelectedIndexChanged);
|
||||
|
||||
this.groupBoxModbusSetting.Visible = false;
|
||||
this.ModbusSetting();
|
||||
|
||||
if (this.comboBoxEthernetOpMode.SelectedIndex == 1)
|
||||
{
|
||||
|
@ -369,9 +411,6 @@ namespace INT_PT002.Controls
|
|||
this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE = 1;
|
||||
afterOpMode = "Server";
|
||||
|
||||
this.labelModbusRole.Text = "Slave";
|
||||
this.labelFunctions.Text = "04: Read input register";
|
||||
|
||||
this.buttonStartServer.Enabled = true;
|
||||
this.buttonStopServer.Enabled = true;
|
||||
this.buttonStartClient.Enabled = false;
|
||||
|
@ -387,9 +426,6 @@ namespace INT_PT002.Controls
|
|||
this.ParentForm.ParentForm.EthernetClientDisconnect();
|
||||
afterOpMode = "Client";
|
||||
|
||||
this.labelModbusRole.Text = "Master";
|
||||
this.labelFunctions.Text = "04: Read input register";
|
||||
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.TimerServer(false);
|
||||
|
||||
this.labelConnectedIP.Text = "-";
|
||||
|
@ -423,19 +459,8 @@ namespace INT_PT002.Controls
|
|||
this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE = mode;
|
||||
afterComMode = this.ReturnCommunicationModeName(mode);
|
||||
|
||||
if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE == (int)Define.E_CommMode.f1_Modbus)
|
||||
{
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||
this.groupBoxModbusSetting.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
||||
this.groupBoxModbusSetting.Visible = false;
|
||||
}
|
||||
|
||||
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
||||
this.ParentForm.ParentForm.ChildFormMainDisplay.InitialEthernetIcon();
|
||||
this.ModbusSetting();
|
||||
|
||||
this.buttonSaveMode.Visible = false;
|
||||
|
||||
|
|
|
@ -247,6 +247,41 @@ namespace INT_PT002.Forms
|
|||
if (Directory.Exists(this.PathDataBackupFolder) == false)
|
||||
Directory.CreateDirectory(this.PathDataBackupFolder);
|
||||
}
|
||||
private void DefaultSetting2()
|
||||
{
|
||||
// 이더넷
|
||||
if (this.SystemConfig.ETHERNET_OP_MODE == 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.Compare(this.smartConfigs.IPSettings.DeviceIP, "0.0.0.0") != 0)
|
||||
this.EthernetServerStart();
|
||||
|
||||
this.ChildFormMainDisplay.TimerServer(true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (this.SystemConfig.ETHERNET_OP_MODE == 2)
|
||||
{
|
||||
this.EthernetClientDisconnect();
|
||||
}
|
||||
|
||||
if (this.SystemConfig.ETHERNET_COMM_MODE != (int)Define.E_CommMode.f0_None)
|
||||
{
|
||||
switch (this.SystemConfig.ETHERNET_COMM_MODE)
|
||||
{
|
||||
case (int)Define.E_CommMode.f1_Modbus:
|
||||
this.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.ChildFormMainDisplay.InitialEthernetIcon();
|
||||
}
|
||||
private void InitializeUserManager()
|
||||
{
|
||||
UserManager.UserListNewDataEvent += this.UserManager_UserListNewDataEvent;
|
||||
|
@ -3727,7 +3762,7 @@ namespace INT_PT002.Forms
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Modbus
|
||||
#region Modbus - Servo Motor
|
||||
public void ModbusOpen()
|
||||
{
|
||||
if (this.smartModbus.IsOpen == true)
|
||||
|
@ -3854,6 +3889,9 @@ namespace INT_PT002.Forms
|
|||
// 초기 파라미터 전송
|
||||
this.TransferSystemParameter9039();
|
||||
|
||||
// 이더넷 설정
|
||||
this.DefaultSetting2();
|
||||
|
||||
// timer1 Get user List Name
|
||||
//UserManager.UserManager_GetUserListName();
|
||||
this.timerUserList.Enabled = true;
|
||||
|
|
|
@ -713,7 +713,7 @@
|
|||
this.labelExpireOfPassword.BackGroundColor = System.Drawing.Color.SkyBlue;
|
||||
this.labelExpireOfPassword.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(42)))), ((int)(((byte)(82)))));
|
||||
this.labelExpireOfPassword.BorderStyle = SmartX.SmartLabel.BorderStyles.None;
|
||||
this.labelExpireOfPassword.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.labelExpireOfPassword.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.labelExpireOfPassword.LineSpacing = 0F;
|
||||
this.labelExpireOfPassword.Location = new System.Drawing.Point(786, 126);
|
||||
this.labelExpireOfPassword.Name = "labelExpireOfPassword";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue