From 8e6dfbce7bb93a3d39df59298760eb67713b94b0 Mon Sep 17 00:00:00 2001 From: Seonjae Date: Tue, 9 Apr 2024 17:02:30 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=ED=84=B0=EC=85=8B=ED=8C=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ControlMenuManualIoTest.Designer.cs | 8 + .../Manual/ControlMenuManualIoTest.cs | 232 +++++++++++++++++- .../Recipe/ControlMenuRecipeSetting.cs | 8 +- INT_PT002/DataStore/Define.cs | 16 +- INT_PT002/DataStore/ServoMotor.cs | 6 + INT_PT002/Forms/FormMain.cs | 114 +++++++-- 6 files changed, 342 insertions(+), 42 deletions(-) diff --git a/INT_PT002/Controls/Manual/ControlMenuManualIoTest.Designer.cs b/INT_PT002/Controls/Manual/ControlMenuManualIoTest.Designer.cs index 68d00a2..918f964 100644 --- a/INT_PT002/Controls/Manual/ControlMenuManualIoTest.Designer.cs +++ b/INT_PT002/Controls/Manual/ControlMenuManualIoTest.Designer.cs @@ -226,6 +226,7 @@ this.labelMotorChamber10.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber10.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber10.Wordwrap = false; + this.labelMotorChamber10.Click += new System.EventHandler(this.labelMotorChamber10_Click); // // buttonMotorChamber10 // @@ -284,6 +285,7 @@ this.labelMotorChamber9.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber9.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber9.Wordwrap = false; + this.labelMotorChamber9.Click += new System.EventHandler(this.labelMotorChamber9_Click); // // labelMotorChamber8 // @@ -307,6 +309,7 @@ this.labelMotorChamber8.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber8.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber8.Wordwrap = false; + this.labelMotorChamber8.Click += new System.EventHandler(this.labelMotorChamber8_Click); // // buttonMotorChamber9 // @@ -400,6 +403,7 @@ this.labelMotorChamber7.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber7.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber7.Wordwrap = false; + this.labelMotorChamber7.Click += new System.EventHandler(this.labelMotorChamber7_Click); // // labelMotorChamber6 // @@ -423,6 +427,7 @@ this.labelMotorChamber6.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber6.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber6.Wordwrap = false; + this.labelMotorChamber6.Click += new System.EventHandler(this.labelMotorChamber6_Click); // // buttonMotorChamber7 // @@ -516,6 +521,7 @@ this.labelMotorChamber5.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber5.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber5.Wordwrap = false; + this.labelMotorChamber5.Click += new System.EventHandler(this.labelMotorChamber5_Click); // // buttonMotorChamber5 // @@ -574,6 +580,7 @@ this.labelMotorChamber4.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber4.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber4.Wordwrap = false; + this.labelMotorChamber4.Click += new System.EventHandler(this.labelMotorChamber4_Click); // // labelMotorChamber3 // @@ -597,6 +604,7 @@ this.labelMotorChamber3.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; this.labelMotorChamber3.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; this.labelMotorChamber3.Wordwrap = false; + this.labelMotorChamber3.Click += new System.EventHandler(this.labelMotorChamber3_Click); // // buttonMotorChamber4 // diff --git a/INT_PT002/Controls/Manual/ControlMenuManualIoTest.cs b/INT_PT002/Controls/Manual/ControlMenuManualIoTest.cs index c43345a..7ec7442 100644 --- a/INT_PT002/Controls/Manual/ControlMenuManualIoTest.cs +++ b/INT_PT002/Controls/Manual/ControlMenuManualIoTest.cs @@ -589,7 +589,7 @@ namespace INT_PT002.Controls this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD2, myKeyPad.IntValue); before = myKeyPad.StringValue; - this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Origin, "", before, after); + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Origin, "", before, after); this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); } @@ -597,8 +597,9 @@ namespace INT_PT002.Controls } private void labelMotorChamber1_Click(object sender, EventArgs e) { - string caption = "Motor1 Front1", before = "", after = ""; + string caption = "", before = "", after = ""; + caption = string.Format("{0} Location", this.buttonMotorChamber1.Text); before = this.labelMotorChamber1.Text; DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber1.Text, 7, 0, false); @@ -612,10 +613,10 @@ namespace INT_PT002.Controls } else { - this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD16, myKeyPad.IntValue, this.labelMotorChamber1); + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD1, myKeyPad.IntValue, this.labelMotorChamber1); after = myKeyPad.StringValue; - this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Front1, "", before, after); + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber1, "", before, after); this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); } @@ -623,8 +624,9 @@ namespace INT_PT002.Controls } private void labelMotorChamber2_Click(object sender, EventArgs e) { - string caption = "Motor1 Front2", before = "", after = ""; + string caption = "", before = "", after = ""; + caption = string.Format("{0} Location", this.buttonMotorChamber2.Text); before = this.labelMotorChamber2.Text; DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber2.Text, 7, 0, false); @@ -638,10 +640,226 @@ namespace INT_PT002.Controls } else { - this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD17, myKeyPad.IntValue, this.labelMotorChamber2); + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD2, myKeyPad.IntValue, this.labelMotorChamber2); after = myKeyPad.StringValue; - this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M1_Front2, "", before, after); + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber2, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber3_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber3.Text); + before = this.labelMotorChamber3.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber3.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD3, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber3, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber4_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber4.Text); + before = this.labelMotorChamber4.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber4.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD4, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber4, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber5_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber5.Text); + before = this.labelMotorChamber5.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber5.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD5, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber5, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber6_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber6.Text); + before = this.labelMotorChamber6.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber6.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD6, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber6, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber7_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber7.Text); + before = this.labelMotorChamber7.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber7.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD7, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber7, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber8_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber8.Text); + before = this.labelMotorChamber8.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber8.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD8, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber8, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber9_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber9.Text); + before = this.labelMotorChamber9.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber9.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD9, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber9, "", before, after); + + this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); + } + } + } + private void labelMotorChamber10_Click(object sender, EventArgs e) + { + string caption = "", before = "", after = ""; + + caption = string.Format("{0} Location", this.buttonMotorChamber10.Text); + before = this.labelMotorChamber10.Text; + DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(caption, this.labelMotorChamber10.Text, 7, 0, false); + + if (myKeyPad.ShowDialog() == DialogResult.OK) + { + if (myKeyPad.doubleValue == 0) + { + // 입력범위를 확인하세요 + DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.ParentForm.SystemConfig.LANGUAGE); + myMsg.ShowDialog(); + } + else + { + this.ParentForm.ParentForm.ServoMotorWrite2(1, ServoMotorAddress.CMD10, myKeyPad.IntValue, this.labelMotorChamber2); + after = myKeyPad.StringValue; + + this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.M_Chamber10, "", before, after); this.ParentForm.ParentForm.ServoMotorWrite1(1, ServoMotorAddress.SaveAllParameters, ServoMotorAddress.EEPROM); } diff --git a/INT_PT002/Controls/Recipe/ControlMenuRecipeSetting.cs b/INT_PT002/Controls/Recipe/ControlMenuRecipeSetting.cs index 2fbe2f8..5bf5964 100644 --- a/INT_PT002/Controls/Recipe/ControlMenuRecipeSetting.cs +++ b/INT_PT002/Controls/Recipe/ControlMenuRecipeSetting.cs @@ -452,7 +452,7 @@ namespace INT_PT002.Controls after = myKeypad.StringValue; value = Helper.StringBlankFillDigits6(myKeypad.StringValue); - this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5510_DispMinLevel, value); + this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard1, CommunicationAddress._5510_DispMinLevel, value); this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_Min1, "", before, after); } @@ -480,7 +480,7 @@ namespace INT_PT002.Controls after = myKeypad.StringValue; value = Helper.StringBlankFillDigits6(myKeypad.StringValue); - this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5510_DispMinLevel, value); + this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard2, CommunicationAddress._5510_DispMinLevel, value); this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_Min2, "", before, after); } @@ -508,7 +508,7 @@ namespace INT_PT002.Controls after = myKeypad.StringValue; value = Helper.StringBlankFillDigits6(myKeypad.StringValue); - this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5511_DispEmptyLevel, value); + this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard1, CommunicationAddress._5511_DispEmptyLevel, value); this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_IPH1, "", before, after); } @@ -536,7 +536,7 @@ namespace INT_PT002.Controls after = myKeypad.StringValue; value = Helper.StringBlankFillDigits6(myKeypad.StringValue); - this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5511_DispEmptyLevel, value); + this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard2, CommunicationAddress._5511_DispEmptyLevel, value); this.ParentForm.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.Disp_IPH2, "", before, after); } diff --git a/INT_PT002/DataStore/Define.cs b/INT_PT002/DataStore/Define.cs index 869010e..874b3c2 100644 --- a/INT_PT002/DataStore/Define.cs +++ b/INT_PT002/DataStore/Define.cs @@ -208,11 +208,17 @@ namespace INT_PT002.DataStore Etc_EquipmentLane, Etc_CheckLane, - M1_Origin, - M1_Front1, - M1_Front2, - M2_Origin, - M2_Turn, + M_Origin, + M_Chamber1, + M_Chamber2, + M_Chamber3, + M_Chamber4, + M_Chamber5, + M_Chamber6, + M_Chamber7, + M_Chamber8, + M_Chamber9, + M_Chamber10, TCPOpMode, TCPComMode, diff --git a/INT_PT002/DataStore/ServoMotor.cs b/INT_PT002/DataStore/ServoMotor.cs index 4035d04..cb0c69e 100644 --- a/INT_PT002/DataStore/ServoMotor.cs +++ b/INT_PT002/DataStore/ServoMotor.cs @@ -25,6 +25,10 @@ namespace INT_PT002.DataStore public static readonly int CMD1 = 18438; // CMD 2 - 0x480A public static readonly int CMD2 = 18442; + // CMD 3 - 0x480E + public static readonly int CMD3 = 18446; + // CMD 4 - 0x4812 + public static readonly int CMD4 = 18450; // CMD 5 - 0x4816 public static readonly int CMD5 = 18454; // CMD 6 - 0x481A @@ -33,6 +37,8 @@ namespace INT_PT002.DataStore public static readonly int CMD7 = 18462; // CMD 8 - 0x4822 public static readonly int CMD8 = 18466; + // CMD 9 - 0x4826 + public static readonly int CMD9 = 18470; // CMD 10 - 0x482A public static readonly int CMD10 = 18474; // CMD 11 - 0x482E diff --git a/INT_PT002/Forms/FormMain.cs b/INT_PT002/Forms/FormMain.cs index 2b67b3b..1ecb1a6 100644 --- a/INT_PT002/Forms/FormMain.cs +++ b/INT_PT002/Forms/FormMain.cs @@ -26,11 +26,11 @@ namespace INT_PT002.Forms public bool IsCommunicationLogOpen; private int CommunicationCheckCount; public int FlagAutomaticLogoutWarningTime; + private bool ChangeModeRecipe; // 로그온 색상 public Color ColorLogOff; public Color ColorLogOn; - private Color ColorButtonEnabled; private Color ColorButtonDisabled; @@ -44,7 +44,6 @@ namespace INT_PT002.Forms private string m_PathDataHistoryFolder; private string m_PathDataInspectionFolder; private string m_PathDataAlarmFolder; - private static string m_PathBinFolder; // UserGroup public UserGroup CurrentUserGroup; @@ -52,31 +51,25 @@ namespace INT_PT002.Forms public UpdateForMainBoard UpdateForMain; // 현재 장비 상태 public SystemStatus CurrentSystemStatus; - // SystemConfiguration public SystemConfiguration SystemConfig; - // Current Recipe public Recipe CurrentRecipe; - // Leak Data private LeakData CurrentLeakData; private Collection CurrentLeakDatas; - // Dll User_Name List public List ListDllUserName; - // IO Test - input data private Collection CollectionIOTest_InputData; - // 장비 구동 상태 private Define.E_EquipmentStatus m_EquipmentStatus; - // 알람 private AlarmList CurrentAlarmList; - // Modbus public Modbus Modbus; + // Loading Recipe + private Recipe LoadingRecipe; // Ethernet private bool IsEthernetThreadStop; @@ -197,6 +190,7 @@ namespace INT_PT002.Forms this.IsSmartFileIOOpen = false; this.IsCommunicationLogOpen = false; this.CommunicationCheckCount = 0; + this.ChangeModeRecipe = false; this.CurrentUserGroup = new UserGroup(); this.EquipmentStatus = Define.E_EquipmentStatus.Stop; @@ -225,6 +219,7 @@ namespace INT_PT002.Forms this.CurrentSystemStatus = new SystemStatus(); this.SystemConfig = new SystemConfiguration(); this.CurrentRecipe = new Recipe(); + this.LoadingRecipe = new Recipe(); this.UpdateForMain = new UpdateForMainBoard(); this.ListDllUserName = new List(); @@ -337,30 +332,60 @@ namespace INT_PT002.Forms public void TransferRecipeParameter9043(int number) { StringBuilder sb = new StringBuilder(); - Recipe item = new Recipe(); + this.LoadingRecipe = new Recipe(); - this.LoadRecipeFile(ref item, number - 1); + this.ChangeModeRecipe = true; + this.LoadRecipeFile(ref this.LoadingRecipe, number - 1); - sb.Append(Helper.StringBlankFillDigits4(item.NUMBER.ToString())); - sb.Append(Helper.StringBlankFillDigits4(item.VACUUM_RELIEF.ToString())); - sb.Append(Helper.StringBlankFillDigits4(item.VACUUM_HOLD1.ToString())); - sb.Append(Helper.StringBlankFillDigits4(item.VACUUM_HOLD2.ToString())); - sb.Append(Helper.StringBlankFillDigits4(item.VACUUM_BLOWOFF.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.NUMBER.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.VACUUM_RELIEF.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.VACUUM_HOLD1.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.VACUUM_HOLD2.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.VACUUM_BLOWOFF.ToString())); - sb.Append(Helper.StringBlankFillDigits6(item.DISP_JUDG_STD_LEVEL)); - sb.Append(Helper.StringBlankFillDigits6(item.DISP_JUDG_MIN_LEVEL1)); - sb.Append(Helper.StringBlankFillDigits6(item.DISP_JUDG_EMPTY_LEVEL1)); - sb.Append(Helper.StringBlankFillDigits4(item.DISP_HOLD_DELAY_MSEC.ToString())); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DISP_HOLD_DELAY_MSEC.ToString())); - sb.Append(Helper.StringBlankFillDigits8(item.DIFF_LR_SECOND)); - sb.Append(Helper.StringBlankFillDigits8(item.DIFF_LR_TOTAL)); - sb.Append(Helper.StringBlankFillDigits8(item.DIFF_LR_MEAN)); - sb.Append(Helper.StringBlankFillDigits4(item.DIFF_HOLD_DELAY_MSEC.ToString())); + sb.Append(Helper.StringBlankFillDigits8(this.LoadingRecipe.DIFF_LR_SECOND)); + sb.Append(Helper.StringBlankFillDigits8(this.LoadingRecipe.DIFF_LR_TOTAL)); + sb.Append(Helper.StringBlankFillDigits8(this.LoadingRecipe.DIFF_LR_MEAN)); + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DIFF_HOLD_DELAY_MSEC.ToString())); - sb.Append(Helper.StringBlankFillDigits6(item.VACUUM_GUAGE_LEVEL)); + sb.Append(Helper.StringBlankFillDigits6(this.LoadingRecipe.VACUUM_GUAGE_LEVEL)); this.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._9043_RecipeParameter, sb.ToString()); } + public void TransferRecipeParameter5510_A() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DISP_JUDG_MIN_LEVEL1.ToString())); + + this.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard1, CommunicationAddress._5510_DispMinLevel, sb.ToString()); + } + public void TransferRecipeParameter5510_B() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DISP_JUDG_MIN_LEVEL2.ToString())); + + this.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard2, CommunicationAddress._5510_DispMinLevel, sb.ToString()); + } + public void TransferRecipeParameter5511_A() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DISP_JUDG_EMPTY_LEVEL1.ToString())); + + this.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard1, CommunicationAddress._5511_DispEmptyLevel, sb.ToString()); + } + public void TransferRecipeParameter5511_B() + { + StringBuilder sb = new StringBuilder(); + + sb.Append(Helper.StringBlankFillDigits4(this.LoadingRecipe.DISP_JUDG_EMPTY_LEVEL2.ToString())); + + this.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoard2, CommunicationAddress._5511_DispEmptyLevel, sb.ToString()); + } public void FormChange(int index) { @@ -1308,6 +1333,7 @@ namespace INT_PT002.Forms return ret = -1; this.SystemConfig.RECIPE_NUMBER = iValue; + this.ChangeModeRecipe = false; #endregion this.LoadRecipeFile(ref this.CurrentRecipe, this.SystemConfig.RECIPE_NUMBER - 1); @@ -1351,6 +1377,42 @@ namespace INT_PT002.Forms if (response == Define.E_ResponseData.ACK) this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._2001_ProductNumber, ""); break; + case "5510": + if (this.ChangeModeRecipe == true) + { + switch (lane) + { + case "A": + if (response == Define.E_ResponseData.ACK) + this.TransferRecipeParameter5510_B(); + break; + case "B": + if (response == Define.E_ResponseData.ACK) + this.TransferRecipeParameter5511_A(); + break; + default: + break; + } + } + break; + case "5511": + if (this.ChangeModeRecipe == true) + { + switch (lane) + { + case "A": + if (response == Define.E_ResponseData.ACK) + this.TransferRecipeParameter5511_B(); + break; + case "B": + if (response == Define.E_ResponseData.ACK) + this.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._2001_ProductNumber, ""); + break; + default: + break; + } + } + break; default: break; }