장비테스트, 메인화면(관리자모드) 정보 추가

PressureData, SystemStatus,  클래스 추가
main
Seonjae 2023-03-17 08:46:55 +09:00
parent 26a2aed149
commit 351a7c47f2
15 changed files with 5813 additions and 856 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,15 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using SmartX;
using INT_PT002.DataStore;
using INT_PT002.Forms;
namespace INT_PT002.Controls
@ -15,6 +18,14 @@ namespace INT_PT002.Controls
{
#region Field
private FormMenu m_ParentForm;
private Color ColorEnable;
private Color ColorDisable;
private Collection<SmartLabel> CollLabelDiff;
private Collection<SmartLabel> CollLabelDisp;
private Collection<SmartLabel> CollLabelVacu;
private Collection<SmartLabel> CollLabelInput;
#endregion
#region Constructor
@ -39,16 +50,353 @@ namespace INT_PT002.Controls
private void Initialize()
{
this.smartGroupBox1.Text = "Manual > IO Test";
this.ColorEnable = Color.Lime;
this.ColorDisable = Color.Gainsboro;
this.CollLabelDiff = new Collection<SmartLabel>();
this.CollLabelDiff.Add(this.labelDiff1);
this.CollLabelDiff.Add(this.labelDiff2);
this.CollLabelDiff.Add(this.labelDiff3);
this.CollLabelDiff.Add(this.labelDiff4);
this.CollLabelDiff.Add(this.labelDiff5);
this.CollLabelDiff.Add(this.labelDiff6);
this.CollLabelDiff.Add(this.labelDiff7);
this.CollLabelDiff.Add(this.labelDiff8);
this.CollLabelDiff.Add(this.labelDiff9);
this.CollLabelDiff.Add(this.labelDiff10);
this.CollLabelDisp = new Collection<SmartLabel>();
this.CollLabelDisp.Add(this.labelDisp1);
this.CollLabelDisp.Add(this.labelDisp2);
this.CollLabelDisp.Add(this.labelDisp3);
this.CollLabelDisp.Add(this.labelDisp4);
this.CollLabelDisp.Add(this.labelDisp5);
this.CollLabelDisp.Add(this.labelDisp6);
this.CollLabelDisp.Add(this.labelDisp7);
this.CollLabelDisp.Add(this.labelDisp8);
this.CollLabelDisp.Add(this.labelDisp9);
this.CollLabelDisp.Add(this.labelDisp10);
this.CollLabelVacu = new Collection<SmartLabel>();
this.CollLabelVacu.Add(this.labelVacuum1);
this.CollLabelVacu.Add(this.labelVacuum2);
this.CollLabelVacu.Add(this.labelVacuum3);
this.CollLabelVacu.Add(this.labelVacuum4);
this.CollLabelVacu.Add(this.labelVacuum5);
this.CollLabelVacu.Add(this.labelVacuum6);
this.CollLabelVacu.Add(this.labelVacuum7);
this.CollLabelVacu.Add(this.labelVacuum8);
this.CollLabelVacu.Add(this.labelVacuum9);
this.CollLabelVacu.Add(this.labelVacuum10);
this.CollLabelInput = new Collection<SmartLabel>();
this.CollLabelInput.Add(this.labelInput1);
this.CollLabelInput.Add(this.labelInput2);
this.CollLabelInput.Add(this.labelInput3);
this.CollLabelInput.Add(this.labelInput4);
this.CollLabelInput.Add(this.labelInput5);
for (int i = 0; i < this.ParentForm.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
{
this.CollLabelDiff[i].Text = "0.00";
this.CollLabelDisp[i].Text = "0.00";
this.CollLabelVacu[i].Text = "0.0";
}
for (int i = 0; i < this.CollLabelInput.Count; i++)
this.CollLabelInput[i].RoundRectFillColor = this.ColorDisable;
}
private void OutputCommand(string address, string data)
{
string command = "", id = "";
command = CommunicationCommand.IOTest;
id = CommunicationID.MainBoard;
this.ParentForm.ParentForm.TransferDataStream(command, id, address, data);
}
public void UpdateDisplayDispData(Collection<DispData> datas)
{
for (int i = 0; i < this.ParentForm.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
this.CollLabelDisp[i].Text = datas[i].RData;
}
public void UpdateDisplayDiffData(Collection<DiffData> datas)
{
for (int i = 0; i < this.ParentForm.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
this.CollLabelDiff[i].Text = datas[i].MAdc;
}
public void UpdateDisplayPresData(Collection<PressureData> datas)
{
for (int i = 0; i < this.ParentForm.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
this.CollLabelVacu[i].Text = datas[i].WorkingChamber;
}
public void UpdateDisplayInputData(Collection<string> datas)
{
Color value = this.ColorDisable;
for (int i = 0; i < datas.Count; i++)
{
if (datas[i] == "0")
value = this.ColorDisable;
else
value = this.ColorEnable;
this.CollLabelInput[i].RoundRectFillColor = value;
}
}
public void DisplayRefresh()
{
{
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplay = Define.E_DisplayStore.DisplayEquipmentTest;
}
#endregion
#region Event Handler
// Output 1~10
private void buttonOut1_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7701_Output1);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut2_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7702_Output2);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut3_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7703_Output3);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut4_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7704_Output4);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut5_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7705_Output5);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut6_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7706_Output6);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut7_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7707_Output7);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut8_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7708_Output8);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut9_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7709_Output9);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
private void buttonOut10_Click(object sender, EventArgs e)
{
string address = "", data = "";
SmartButton button = sender as SmartButton;
if (button == null)
return;
// adress
address = Helper.StringBlankFillDigits4(CommunicationAddress._7710_Output10);
// data
if (button.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
data = Helper.StringBlankFillDigits4("1");
else
data = Helper.StringBlankFillDigits4("0");
this.OutputCommand(address, data);
}
// Motor 1
private void buttonMotor1Origin_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorOrigin, CommunicationID.SubBoard1);
}
private void buttonMotor1AlarmClear_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorAlarmReset, CommunicationID.SubBoard1);
}
private void buttonMotor1Front_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorMove1, CommunicationID.SubBoard1);
}
private void buttonMotor1Back_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorMove2, CommunicationID.SubBoard1);
}
private void labelMotor1Origin_Click(object sender, EventArgs e)
{
}
private void labelMotor1Front_Click(object sender, EventArgs e)
{
}
private void labelMotor1Back_Click(object sender, EventArgs e)
{
}
// Motor 2
private void buttonMotor2Origin_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorOrigin, CommunicationID.SubBoard2);
}
private void buttonMotor2AlarmClear_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorAlarmReset, CommunicationID.SubBoard2);
}
private void buttonMotor2Turn_Click(object sender, EventArgs e)
{
this.ParentForm.ParentForm.TransferData(CommunicationCommand.MotorMove1, CommunicationID.SubBoard2);
}
private void labelMotor2Origin_Click(object sender, EventArgs e)
{
}
private void labelMotor2Turn_Click(object sender, EventArgs e)
{
}
#endregion
}
}

View File

@ -93,10 +93,32 @@ namespace INT_PT002.Controls
value = item.DIFF_HOLD_DELAY_MSEC.ToString();
if (this.labelDiffHoldDelay.Text != value)
this.labelDiffHoldDelay.Text = value;
// Pressure data
// Vacuum Relief
value = item.VACUUM_RELIEF.ToString();
if (this.labelVacuumRelief.Text != value)
this.labelVacuumRelief.Text = value;
// Vacuum Hold1
value = item.VACUUM_HOLD1.ToString();
if (this.labelVacuumHold1.Text != value)
this.labelVacuumHold1.Text = value;
// Vacuum Hold2
value = item.VACUUM_HOLD2.ToString();
if (this.labelVacuumHold2.Text != value)
this.labelVacuumHold2.Text = value;
// Vacuum Blowoff
value = item.VACUUM_BLOWOFF.ToString();
if (this.labelVacuumBlowoff.Text != value)
this.labelVacuumBlowoff.Text = value;
}
public void UpdateDisplayRecipeData(Recipe item)
public void UpdateDisplayRecipeData(int no)
{
Recipe item = new Recipe();
this.ParentForm.ParentForm.LoadRecipeFile(ref item, no - 1);
this.SelectedRecipe.NUMBER = item.NUMBER;
this.SelectedRecipe.NAME = item.NAME;
this.SelectedRecipe.LOT = item.LOT;
@ -122,7 +144,8 @@ namespace INT_PT002.Controls
public void DisplayRefresh()
{
this.UpdateDisplayRecipeData(this.ParentForm.ParentForm.CurrentRecipe);
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplay = Define.E_DisplayStore.DisplayRecipe;
this.UpdateDisplayRecipeData(this.ParentForm.ParentForm.SystemConfig.RECIPE_NUMBER);
}
#endregion
@ -133,7 +156,19 @@ namespace INT_PT002.Controls
}
private void labelPressureLevel_Click(object sender, EventArgs e)
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel15.Text, this.labelPressureLevel.Text, 5, 1, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
this.labelPressureLevel.Text = myKeypad.StringValue;
this.SelectedRecipe.VACUUM_GUAGE_LEVEL = myKeypad.StringValue;
this.ParentForm.ParentForm.SaveRecipeFile(this.SelectedRecipe, this.SelectedRecipe.NUMBER - 1);
value = Helper.StringBlankFillDigits6(myKeypad.StringValue);
this.ParentForm.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5517_VacuumGaugeStdLevel, value);
}
}
// 밸브
@ -207,7 +242,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel9.Text, this.labelDispStdLevel.Text, 6, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel9.Text, this.labelDispStdLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
@ -223,7 +258,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel7.Text, this.labelDispMinLevel.Text, 6, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel7.Text, this.labelDispMinLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
@ -239,7 +274,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel5.Text, this.labelDispEmptyLevel.Text, 6, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel5.Text, this.labelDispEmptyLevel.Text, 5, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
@ -273,7 +308,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel13.Text, this.labelDiffLrSecond.Text, 8, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel13.Text, this.labelDiffLrSecond.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
@ -289,7 +324,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel11.Text, this.labelDiffLrTotal.Text, 8, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel11.Text, this.labelDiffLrTotal.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{
@ -305,7 +340,7 @@ namespace INT_PT002.Controls
{
string value = "";
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel8.Text, this.labelDiffLrMean.Text, 8, 0, false);
DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad(this.smartLabel8.Text, this.labelDiffLrMean.Text, 7, 2, false);
if (myKeypad.ShowDialog() == DialogResult.OK)
{

View File

@ -26,15 +26,15 @@ namespace INT_PT002.DataStore
public static readonly string Zero = "Cbz00";
// 모터 원점
public static readonly string Origin = "Cmo00";
public static readonly string MotorOrigin = "Cmo00";
// 모터 Step
public static readonly string Step = "Cms00";
public static readonly string MotorStep = "Cms00";
// 모터 알람 리셋
public static readonly string AlarmReset = "Cma00";
public static readonly string MotorAlarmReset = "Cma00";
// 모터 동작 1
public static readonly string Move1 = "Cmc00";
public static readonly string MotorMove1 = "Cmc00";
// 모터 동작 2
public static readonly string Move2 = "Cmr00";
public static readonly string MotorMove2 = "Cmr00";
// 파라미터 쓰기
public static readonly string Write = "Pw000";
@ -102,6 +102,8 @@ namespace INT_PT002.DataStore
public static readonly string _5515_DiffLrMean = "5515";
// 차압센서 - delay
public static readonly string _5516_DiffHoldDelay = "5516";
// 압력게이지 기준압력
public static readonly string _5517_VacuumGaugeStdLevel = "5517";
// 통신,IO설정 - INPUT ALL
public static readonly string _7500_InputAll = "7500";

View File

@ -28,7 +28,6 @@ namespace INT_PT002.DataStore
Log,
System,
}
public enum E_MenuRecipeStore
{
_0_None,
@ -63,6 +62,15 @@ namespace INT_PT002.DataStore
_4_Update,
};
public enum E_DisplayStore
{
DisplayMain,
DisplayRecipe,
DisplayEquipmentTest,
DisplayUser,
DisplayUserEditor,
}
public enum E_ProcessStatus
{
_0_None = 0,

View File

@ -14,7 +14,7 @@ namespace INT_PT002.DataStore
private Collection<Define.E_JudgmentStatus> m_CollJudgment;
private Collection<DispData> m_CollDispData;
private Collection<DiffData> m_CollDiffData;
private Collection<PressureData> m_CollPresData;
#endregion
#region Constructor
@ -50,6 +50,14 @@ namespace INT_PT002.DataStore
get { return this.m_CollDiffData; }
set { this.m_CollDiffData = value; }
}
/// <summary>
/// 압력센서 데이터
/// </summary>
public Collection<PressureData> CollPresData
{
get { return this.m_CollPresData; }
set { this.m_CollPresData = value; }
}
#endregion
#region Method
@ -60,12 +68,14 @@ namespace INT_PT002.DataStore
this.CollJudgment = new Collection<Define.E_JudgmentStatus>();
this.CollDispData = new Collection<DispData>();
this.CollDiffData = new Collection<DiffData>();
this.CollPresData = new Collection<PressureData>();
for (int i = 0; i < column; i++)
{
this.CollJudgment.Add(Define.E_JudgmentStatus.None);
this.CollDispData.Add(new DispData());
this.CollDiffData.Add(new DiffData());
this.CollPresData.Add(new PressureData());
}
}
#endregion

View File

@ -0,0 +1,43 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace INT_PT002.DataStore
{
public class PressureData
{
#region Field
private string m_MasterChamber;
private string m_WorkingChamber;
#endregion
#region Constructor
public PressureData()
{
this.Initialize();
}
#endregion
#region Property
public string MasterChamber
{
get { return this.m_MasterChamber; }
set { this.m_MasterChamber = value; }
}
public string WorkingChamber
{
get { return this.m_WorkingChamber; }
set { this.m_WorkingChamber = value; }
}
#endregion
#region Method
private void Initialize()
{
this.MasterChamber = "0.0";
this.WorkingChamber = "0.0";
}
#endregion
}
}

View File

@ -132,7 +132,7 @@ namespace INT_PT002.DataStore
this.DISP_JUDG_STD_LEVEL = "0.30";
this.DISP_JUDG_MIN_LEVEL = "1.00";
this.DISP_JUDG_EMPTY_LEVEL = "7.50";
this.DISP_JUDG_EMPTY_LEVEL = "75.00";
this.DISP_HOLD_DELAY_MSEC = 100;
this.DIFF_LR_SECOND = "500.00";

View File

@ -0,0 +1,53 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace INT_PT002.DataStore
{
public class SystemStatus
{
#region Field
private int m_EquipmentColumn;
private Define.E_EquipmentStatus m_EquipmentStatus;
private Define.E_DisplayStore m_CurrentDisplay;
#endregion
#region Constructor
public SystemStatus()
{
this.Initialize();
}
#endregion
#region Property
public int EquipmentColumn
{
get { return this.m_EquipmentColumn; }
set { this.m_EquipmentColumn = value; }
}
public Define.E_EquipmentStatus EquipmentStatus
{
get { return this.m_EquipmentStatus; }
set { this.m_EquipmentStatus = value; }
}
public Define.E_DisplayStore CurrentDisplay
{
get { return this.m_CurrentDisplay; }
set { this.m_CurrentDisplay = value; }
}
#endregion
#region Method
private void Initialize()
{
this.EquipmentColumn = 10;
this.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.CurrentDisplay = Define.E_DisplayStore.DisplayMain;
}
#endregion
}
}

View File

@ -162,27 +162,27 @@ namespace INT_PT002.Forms
private void buttonOrigin_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Origin, CommunicationID.SubBoardAll);
this.ParentForm.TransferData(CommunicationCommand.MotorOrigin, CommunicationID.SubBoardAll);
}
private void buttonAlarmReset_1W_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.AlarmReset, CommunicationID.SubBoard2);
this.ParentForm.TransferData(CommunicationCommand.MotorAlarmReset, CommunicationID.SubBoard2);
}
private void buttonMove1_1W_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Step, CommunicationID.SubBoard2);
this.ParentForm.TransferData(CommunicationCommand.MotorStep, CommunicationID.SubBoard2);
}
private void buttonAlarmReset_4W_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.AlarmReset, CommunicationID.SubBoard1);
this.ParentForm.TransferData(CommunicationCommand.MotorAlarmReset, CommunicationID.SubBoard1);
}
private void buttonMove1_4W_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Move1, CommunicationID.SubBoard1);
this.ParentForm.TransferData(CommunicationCommand.MotorMove1, CommunicationID.SubBoard1);
}
private void buttonMove2_4W_Click(object sender, EventArgs e)
{
this.ParentForm.TransferData(CommunicationCommand.Move2, CommunicationID.SubBoard1);
this.ParentForm.TransferData(CommunicationCommand.MotorMove2, CommunicationID.SubBoard1);
}
#endregion
}

View File

@ -18,18 +18,15 @@ namespace INT_PT002.Forms
{
#region Field
public bool IsCommunicationLogOpen;
public int DecimalPlaces3;
public int DecimalPlaces4;
private int CommunicationCheckCount;
public int EquipmentColumn;
// 파일 위치
private string m_PathLaunchFolder;
private string m_PathSystemFileFolder;
private string m_PathDataBackupFolder;
// 장비 구동 상태
private Define.E_EquipmentStatus m_EquipmentStatus;
// 현재 장비 상태
public SystemStatus CurrentSystemStatus;
// SystemConfiguration
public SystemConfiguration SystemConfig;
@ -40,6 +37,10 @@ namespace INT_PT002.Forms
// Leak Data
private LeakData CurrentLeakData;
// IO Test - input data
private Collection<string> CollectionIOTest_InputData;
// Form
public FormMainDisplay1 ChildFormMainDisplay;
public FormMenu ChildFormMenu;
#endregion
@ -67,33 +68,27 @@ namespace INT_PT002.Forms
get { return this.m_PathDataBackupFolder; }
set { this.m_PathDataBackupFolder = value; }
}
public Define.E_EquipmentStatus EquipmentStatus
{
get { return this.m_EquipmentStatus; }
private set { this.m_EquipmentStatus = value; }
}
#endregion
#region Method
private void DefaultSetting()
{
this.IsCommunicationLogOpen = false;
this.DecimalPlaces3 = 3;
this.DecimalPlaces4 = 4;
this.CommunicationCheckCount = 0;
this.EquipmentColumn = 10;
this.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.PathLaunchFolder = "SD Card\\";
this.PathSystemFileFolder = this.PathLaunchFolder + "SystemFile\\";
this.PathDataBackupFolder = this.PathLaunchFolder + "DataBackup\\";
this.CurrentSystemStatus = new SystemStatus();
this.SystemConfig = new SystemConfiguration();
this.CurrentRecipe = new Recipe();
this.CurrentLeakData = new LeakData(this.EquipmentColumn);
this.CurrentLeakData = new LeakData(this.CurrentSystemStatus.EquipmentColumn);
this.CollectionIOTest_InputData = new Collection<string>();
for (int i = 0; i < 5; i++)
this.CollectionIOTest_InputData.Add("0");
// SystemFile 폴더 생성
if (Directory.Exists(this.PathSystemFileFolder) == false)
@ -708,20 +703,20 @@ namespace INT_PT002.Forms
switch (cmd)
{
case "CI0":
this.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.EquipmentStatus);
this.CurrentSystemStatus.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.CurrentSystemStatus.EquipmentStatus);
this.TransferSystemParameter9039();
break;
case "CBS":
this.EquipmentStatus = DataStore.Define.E_EquipmentStatus.Start;
this.CurrentSystemStatus.EquipmentStatus = DataStore.Define.E_EquipmentStatus.Start;
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.EquipmentStatus);
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.CurrentSystemStatus.EquipmentStatus);
break;
case "CBT":
this.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.CurrentSystemStatus.EquipmentStatus = Define.E_EquipmentStatus.Stop;
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.EquipmentStatus);
this.ChildFormMainDisplay.UpdateEquipmentStatusDisplay(this.CurrentSystemStatus.EquipmentStatus);
break;
default:
break;
@ -863,7 +858,7 @@ namespace INT_PT002.Forms
this.LoadRecipeFile(ref this.CurrentRecipe, this.SystemConfig.RECIPE_NUMBER - 1);
this.ChildFormMenu.UpdateDisplayRecipeData(this.CurrentRecipe);
this.ChildFormMenu.UpdateDisplayRecipeData(this.SystemConfig.RECIPE_NUMBER);
break;
default:
break;
@ -917,10 +912,11 @@ namespace INT_PT002.Forms
{
case "Z":
#region Value Assign
for (int i = 0; i < this.EquipmentColumn; i++)
for (int i = 0; i < this.CurrentSystemStatus.EquipmentColumn; i++)
this.CurrentLeakData.CollJudgment[i] = Helper.StringToJudgmentStatus(receiveData.Substring(i * 1, 1));
#endregion
this.ChildFormMainDisplay.UpdateDisplayJudgmentData(this.CurrentLeakData);
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayMain)
this.ChildFormMainDisplay.UpdateDisplayJudgmentData(this.CurrentLeakData);
break;
default:
break;
@ -946,7 +942,8 @@ namespace INT_PT002.Forms
#region Value Assign
this.CurrentLeakData.ProcessStatus = Helper.StringToProcessStatus(receiveData.Substring(0, 1));
#endregion
this.ChildFormMainDisplay.UpdateProcessStatusDisplay(this.CurrentLeakData.ProcessStatus);
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayMain)
this.ChildFormMainDisplay.UpdateProcessStatusDisplay(this.CurrentLeakData.ProcessStatus);
break;
default:
break;
@ -970,7 +967,7 @@ namespace INT_PT002.Forms
{
case "Z":
#region Value Assign
for (int i = 0; i < this.EquipmentColumn; i++)
for (int i = 0; i < this.CurrentSystemStatus.EquipmentColumn; i++)
{
this.CurrentLeakData.CollDiffData[i].MAdc = receiveData.Substring(i * 32, 8).Trim();
this.CurrentLeakData.CollDiffData[i].SecBufDiff = receiveData.Substring((i * 32) + 8, 8).Trim();
@ -978,7 +975,10 @@ namespace INT_PT002.Forms
this.CurrentLeakData.CollDiffData[i].DiffMean = receiveData.Substring((i * 32) + 24, 8).Trim();
}
#endregion
this.ChildFormMainDisplay.UpdateDisplayDiffData(this.CurrentLeakData.CollDiffData);
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayMain)
this.ChildFormMainDisplay.UpdateDisplayDiffData(this.CurrentLeakData.CollDiffData);
else if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayEquipmentTest)
this.ChildFormMenu.UpdateDisplayEquipmentTestDiffData(this.CurrentLeakData.CollDiffData);
break;
default:
break;
@ -1002,7 +1002,7 @@ namespace INT_PT002.Forms
{
case "Z":
#region Value Assign
for (int i = 0; i < this.EquipmentColumn; i++)
for (int i = 0; i < this.CurrentSystemStatus.EquipmentColumn; i++)
{
this.CurrentLeakData.CollDispData[i].RData = receiveData.Substring(i * 24, 6).Trim();
this.CurrentLeakData.CollDispData[i].MData = receiveData.Substring((i * 24) + 6, 6).Trim();
@ -1010,7 +1010,10 @@ namespace INT_PT002.Forms
this.CurrentLeakData.CollDispData[i].STD = receiveData.Substring((i * 24) + 18, 6).Trim();
}
#endregion
this.ChildFormMainDisplay.UpdateDisplayDispData(this.CurrentLeakData.CollDispData);
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayMain)
this.ChildFormMainDisplay.UpdateDisplayDispData(this.CurrentLeakData.CollDispData);
else if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayEquipmentTest)
this.ChildFormMenu.UpdateDisplayEquipmentTestDispData(this.CurrentLeakData.CollDispData);
break;
default:
break;
@ -1027,6 +1030,35 @@ namespace INT_PT002.Forms
private int ReceiveCommandSLE(string lane, string receiveData)
{
int ret = 0;
try
{
switch (lane)
{
case "Z":
#region Value Assign
for (int i = 0; i < this.CurrentSystemStatus.EquipmentColumn; i++)
{
this.CurrentLeakData.CollPresData[i].WorkingChamber =
string.Format("{0}{1}", receiveData.Substring(i * 6, 1), receiveData.Substring((i * 6) + 1, 5).Trim());
this.CurrentLeakData.CollPresData[i].MasterChamber =
string.Format("{0}{1}", receiveData.Substring((i * 6) + 60, 1), receiveData.Substring((i * 6) + 61, 5).Trim());
}
#endregion
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayMain)
this.ChildFormMainDisplay.UpdateDisplayPresData(this.CurrentLeakData.CollPresData);
else if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayEquipmentTest)
this.ChildFormMenu.UpdateDisplayEquipmentTestPresData(this.CurrentLeakData.CollPresData);
break;
default:
break;
}
}
catch
{
ret = -1;
}
return ret;
}
// IO테스트-IN
@ -1038,11 +1070,11 @@ namespace INT_PT002.Forms
{
case "0":
#region Value Assign
//for (int i = 0; i < 15; i++)
// this.CollectionIOTest_InputData[i] = receiveData.Substring(i, 1);
for (int i = 0; i < 5; i++)
this.CollectionIOTest_InputData[i] = receiveData.Substring(i, 1);
#endregion
//if (this.SystemConfig.CurrentForm == DataStore.FormStore.FormIOTest)
// this.ChildFormIOTest.UpdateInputRead(this.CollectionIOTest_InputData);
if (this.CurrentSystemStatus.CurrentDisplay == Define.E_DisplayStore.DisplayEquipmentTest)
this.ChildFormMenu.UpdateDisplayEquipmentTestInputData(this.CollectionIOTest_InputData);
break;
default:
break;

File diff suppressed because it is too large Load Diff

View File

@ -28,10 +28,17 @@ namespace INT_PT002.Forms
private FormMain m_ParentForm;
private Collection<SmartLabel> CollectionResult;
private Collection<SmartLabel> CollectionDispRData;
private Collection<SmartLabel> CollectionDispMData;
private Collection<SmartLabel> CollectionDispMDataDiff;
private Collection<SmartLabel> CollectionDispSTD;
private Collection<SmartLabel> CollectionDiffMadc;
private Collection<SmartLabel> CollectionDiffSecDiff;
private Collection<SmartLabel> CollectionDiffSecSum;
private Collection<SmartLabel> CollectionDiffMean;
private Collection<SmartLabel> CollectionPressureWork;
private Collection<SmartLabel> CollectionPressureMaster;
@ -105,6 +112,30 @@ namespace INT_PT002.Forms
this.CollectionDispMData.Add(this.labelDispMData9);
this.CollectionDispMData.Add(this.labelDispMData10);
this.CollectionDispMDataDiff = new Collection<SmartLabel>();
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff1);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff2);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff3);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff4);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff5);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff6);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff7);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff8);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff9);
this.CollectionDispMDataDiff.Add(this.labelDispMDataDiff10);
this.CollectionDispSTD = new Collection<SmartLabel>();
this.CollectionDispSTD.Add(this.labelDispSTD1);
this.CollectionDispSTD.Add(this.labelDispSTD2);
this.CollectionDispSTD.Add(this.labelDispSTD3);
this.CollectionDispSTD.Add(this.labelDispSTD4);
this.CollectionDispSTD.Add(this.labelDispSTD5);
this.CollectionDispSTD.Add(this.labelDispSTD6);
this.CollectionDispSTD.Add(this.labelDispSTD7);
this.CollectionDispSTD.Add(this.labelDispSTD8);
this.CollectionDispSTD.Add(this.labelDispSTD9);
this.CollectionDispSTD.Add(this.labelDispSTD10);
this.CollectionDiffMadc = new Collection<SmartLabel>();
this.CollectionDiffMadc.Add(this.labelDiffMadc1);
this.CollectionDiffMadc.Add(this.labelDiffMadc2);
@ -129,6 +160,30 @@ namespace INT_PT002.Forms
this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff9);
this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff10);
this.CollectionDiffSecSum = new Collection<SmartLabel>();
this.CollectionDiffSecSum.Add(this.labelDiffSecSum1);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum2);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum3);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum4);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum5);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum6);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum7);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum8);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum9);
this.CollectionDiffSecSum.Add(this.labelDiffSecSum10);
this.CollectionDiffMean = new Collection<SmartLabel>();
this.CollectionDiffMean.Add(this.labelDiffMean1);
this.CollectionDiffMean.Add(this.labelDiffMean2);
this.CollectionDiffMean.Add(this.labelDiffMean3);
this.CollectionDiffMean.Add(this.labelDiffMean4);
this.CollectionDiffMean.Add(this.labelDiffMean5);
this.CollectionDiffMean.Add(this.labelDiffMean6);
this.CollectionDiffMean.Add(this.labelDiffMean7);
this.CollectionDiffMean.Add(this.labelDiffMean8);
this.CollectionDiffMean.Add(this.labelDiffMean9);
this.CollectionDiffMean.Add(this.labelDiffMean10);
this.CollectionPressureWork = new Collection<SmartLabel>();
this.CollectionPressureWork.Add(this.labelPressureWork1);
this.CollectionPressureWork.Add(this.labelPressureWork2);
@ -165,11 +220,15 @@ namespace INT_PT002.Forms
{
this.CollectionResult[i].Text = "-";
this.CollectionResult[i].TextColor = this.ColorResultNone;
this.CollectionResult[i].Font = new Font("New Gulim", 48, FontStyle.Bold);
this.CollectionResult[i].Font = new Font("New Gulim", 20, FontStyle.Bold);
this.CollectionDispRData[i].Text = "0.00";
this.CollectionDispMData[i].Text = "0.00";
this.CollectionDispMDataDiff[i].Text = "0.00";
this.CollectionDispSTD[i].Text = "0.00";
this.CollectionDiffMadc[i].Text = "0.00";
this.CollectionDiffSecDiff[i].Text = "0.00";
this.CollectionDiffSecSum[i].Text = "0.00";
this.CollectionDiffMean[i].Text = "0.00";
this.CollectionPressureWork[i].Text = "0.0";
this.CollectionPressureMaster[i].Text = "0.0";
}
@ -184,17 +243,17 @@ namespace INT_PT002.Forms
case Define.E_JudgmentStatus.None:
value = "-";
label2.TextColor = this.ColorResultNone;
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
break;
case Define.E_JudgmentStatus.Pass:
value = "정상";
label2.TextColor = this.ColorResultPass;
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
break;
case Define.E_JudgmentStatus.Ng:
value = "리크";
label2.TextColor = this.ColorResultNG;
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
break;
case Define.E_JudgmentStatus.Error:
value = "제품 없음";
@ -232,6 +291,20 @@ namespace INT_PT002.Forms
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
this.labelProgress8.BackGroundColor = this.ColorProgressOff;
this.timerOn.Enabled = false;
this.timerOff.Enabled = false;
if (this.CollectionResult[0].Text == "검사 중..")
{
for (int i = 0; i < 10; i++)
{
this.CollectionResult[i].Visible = true;
this.CollectionResult[i].Text = "-";
this.CollectionResult[i].TextColor = this.ColorResultNone;
this.CollectionResult[i].Font = new Font("New Gulim", 48, FontStyle.Bold);
}
}
break;
case Define.E_ProcessStatus._2_ProductEntry:
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
@ -383,7 +456,7 @@ namespace INT_PT002.Forms
else
this.FlagIgnoreCNT++;
for (int i = 0; i < this.ParentForm.EquipmentColumn; i++)
for (int i = 0; i < this.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
{
value = datas[i].MAdc;
if (this.CollectionDiffMadc[i].Text != value)
@ -392,6 +465,14 @@ namespace INT_PT002.Forms
value = datas[i].SecBufDiff;
if (this.CollectionDiffSecDiff[i].Text != value)
this.CollectionDiffSecDiff[i].Text = value;
value = datas[i].SecBufSum;
if (this.CollectionDiffSecSum[i].Text != value)
this.CollectionDiffSecSum[i].Text = value;
value = datas[i].DiffMean;
if (this.CollectionDiffMean[i].Text != value)
this.CollectionDiffMean[i].Text = value;
}
}
public void UpdateDisplayDispData(Collection<DispData> datas)
@ -407,7 +488,7 @@ namespace INT_PT002.Forms
else
this.FlagIgnoreCNT++;
for (int i = 0; i < this.ParentForm.EquipmentColumn; i++)
for (int i = 0; i < this.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
{
value = datas[i].RData;
if (this.CollectionDispRData[i].Text != value)
@ -416,6 +497,29 @@ namespace INT_PT002.Forms
value = datas[i].MData;
if (this.CollectionDispMData[i].Text != value)
this.CollectionDispMData[i].Text = value;
value = datas[i].MDataDiff;
if (this.CollectionDispMDataDiff[i].Text != value)
this.CollectionDispMDataDiff[i].Text = value;
value = datas[i].STD;
if (this.CollectionDispSTD[i].Text != value)
this.CollectionDispSTD[i].Text = value;
}
}
public void UpdateDisplayPresData(Collection<PressureData> datas)
{
string value = "";
for (int i = 0; i < this.ParentForm.CurrentSystemStatus.EquipmentColumn; i++)
{
value = datas[i].WorkingChamber;
if (this.CollectionPressureWork[i].Text != value)
this.CollectionPressureWork[i].Text = value;
value = datas[i].MasterChamber;
if (this.CollectionPressureMaster[i].Text != value)
this.CollectionPressureMaster[i].Text = value;
}
}
@ -486,8 +590,8 @@ namespace INT_PT002.Forms
}
public void DisplayRefresh()
{
{
this.ParentForm.CurrentSystemStatus.CurrentDisplay = Define.E_DisplayStore.DisplayMain;
}
#endregion

View File

@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data;
using System.Drawing;
@ -383,9 +384,28 @@ namespace INT_PT002.Forms
}
}
public void UpdateDisplayRecipeData(Recipe item)
// Menu Recipe
public void UpdateDisplayRecipeData(int no)
{
this.Child_Recipe_Setting.UpdateDisplayRecipeData(item);
this.Child_Recipe_Setting.UpdateDisplayRecipeData(no);
}
// Menu Equipment
public void UpdateDisplayEquipmentTestInputData(Collection<string> datas)
{
this.Child_Manual_IoTest.UpdateDisplayInputData(datas);
}
public void UpdateDisplayEquipmentTestDispData(Collection<DispData> datas)
{
this.Child_Manual_IoTest.UpdateDisplayDispData(datas);
}
public void UpdateDisplayEquipmentTestDiffData(Collection<DiffData> datas)
{
this.Child_Manual_IoTest.UpdateDisplayDiffData(datas);
}
public void UpdateDisplayEquipmentTestPresData(Collection<PressureData> datas)
{
this.Child_Manual_IoTest.UpdateDisplayPresData(datas);
}
public void DisplayRefresh()

View File

@ -178,6 +178,8 @@
<Compile Include="DataStore\LeakData.cs" />
<Compile Include="DataStore\Recipe.cs" />
<Compile Include="DataStore\SystemConfiguration.cs" />
<Compile Include="DataStore\PressureData.cs" />
<Compile Include="DataStore\SystemStatus.cs" />
<Compile Include="DialogForms\DialogFormNumKeyPad.cs">
<SubType>Form</SubType>
</Compile>