using System; using System.Drawing; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace SHARP_CLAS_UI { public partial class Form_Scanner_View : Form { #region Field delegate void UI_Update_Delegate(); Form_Frame _Parent; Thread UI_Update_Th; bool update_check; bool scanner_Init; #endregion public Form_Scanner_View(Form_Frame _Parent) { InitializeComponent(); this._Parent = _Parent; UI_Update_Th = new Thread(UI_Update_Th_Set); UI_Update_Th.Start(); } #region Form_Function private void Form_Scanner_View_FormClosing(object sender, FormClosingEventArgs e) { if (!_Parent.IsDisposed) { e.Cancel = true; this.Hide(); } } #endregion #region Function private void UI_Update_Th_Set() { while (!_Parent.IsDisposed) { Thread.Sleep(100); if (!update_check) { update_check = true; UI_Update(); } } } private void UI_Update() { if (InvokeRequired) { BeginInvoke(new UI_Update_Delegate(UI_Update)); return; } else { try { DateTime dt = DateTime.Now; bool laser_on, busy; if (_Parent._equip.Cur_Main_Recipe == null || _Parent._equip.Cur_Main_Recipe.process_info == null) { tb_Process_Info_Name.Text = ""; lb_Busy.BackColor = Color.Green; btn_Scanner_Init.BackColor = Color.Green; btn_Laser_On.BackColor = Color.Green; btn_Laser_Off.BackColor = Color.Green; tb_Set_Jump_Speed.Text = ""; tb_Set_Mark_Speed.Text = ""; tb_Set_Laser_On_Delay.Text = ""; tb_Set_Laser_Off_Delay.Text = ""; tb_Set_Jump_Delay.Text = ""; tb_Set_Mark_Delay.Text = ""; tb_Work_Area_X.Text = ""; tb_Work_Area_Y.Text = ""; tb_Process_Area_X.Text = ""; tb_Process_Area_Y.Text = ""; tb_Distance.Text = ""; tb_Jump_Repeat.Text = ""; tb_Jump_Range.Text = ""; tb_Waveform_Style.Text = ""; } else { tb_Process_Info_Name.Text = _Parent._equip.Cur_Main_Recipe.process_info.Name; _Parent._equip.scanner.Get_Busy(out busy); _Parent._equip.scanner.Get_Laser_On(out laser_on); lb_Busy.BackColor = busy ? Color.Lime : Color.Green; btn_Scanner_Init.BackColor = scanner_Init ? Color.Lime : Color.Green; btn_Laser_On.BackColor = laser_on ? Color.Lime : Color.Green; btn_Laser_Off.BackColor = laser_on ? Color.Green : Color.Lime; tb_Set_Jump_Speed.Text = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Speed.ToString(); tb_Set_Mark_Speed.Text = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Speed.ToString(); tb_Set_Laser_On_Delay.Text = _Parent._equip.Cur_Main_Recipe.process_info.Laser_On_Delay.ToString(); tb_Set_Laser_Off_Delay.Text = _Parent._equip.Cur_Main_Recipe.process_info.Laser_Off_Delay.ToString(); tb_Set_Jump_Delay.Text = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Delay.ToString(); tb_Set_Mark_Delay.Text = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Delay.ToString(); tb_Work_Area_X.Text = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_X.ToString(); tb_Work_Area_Y.Text = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_Y.ToString(); tb_Distance.Text = _Parent._equip.Cur_Main_Recipe.process_info.Hatch_Distance.ToString(); tb_Jump_Repeat.Text = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Repeat.ToString(); tb_Jump_Range.Text = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Range.ToString(); tb_Waveform_Style.Text = ((Scanner_Recipe.Ablation_Style)_Parent._equip.Cur_Main_Recipe.process_info.Waveform).ToString(); } TimeSpan ts = DateTime.Now - dt; } catch (Exception ex) { } finally { update_check = false; } } } #endregion private void btn_Run_Click(object sender, EventArgs e) { if (_Parent._equip.Cur_Main_Recipe.process_info == null) return; _Parent._equip.scanner.Initialize(_Parent._equip.Cur_Main_Recipe.process_info.CTB_File_Path); double jump_speed = 0, mark_speed = 0; short laseron_delay = 0, laseroff_delay = 0; ushort jump_delay = 0, mark_delay = 0, polygon_delay = 0; jump_speed = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Speed; mark_speed = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Speed; laseron_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_On_Delay; laseroff_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_Off_Delay; jump_delay = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Delay; mark_delay = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Delay; polygon_delay = 0; if (!_Parent._equip.scanner.Set_Process_Datas(jump_speed, mark_speed, laseron_delay, laseroff_delay, jump_delay, mark_delay, polygon_delay)) return; int frequency = _Parent._equip.Cur_Main_Recipe.process_info.Frequency; double power = _Parent._equip.Cur_Main_Recipe.process_info.Power; if (!_Parent._equip.scanner.Set_Power(frequency, power)) return; float process_area_x, process_area_y, work_area_x, work_area_y, distance; int repeat, range, waveform; process_area_x = 0; process_area_y = 0; work_area_x = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_X; work_area_y = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_Y; distance = _Parent._equip.Cur_Main_Recipe.process_info.Hatch_Distance; repeat = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Repeat; range = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Range; waveform = _Parent._equip.Cur_Main_Recipe.process_info.Waveform; bool moving; do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); Scanner_Recipe rec = new Scanner_Recipe(work_area_x, work_area_y, process_area_x, process_area_y, distance, repeat, range, (Scanner_Recipe.Ablation_Style)waveform); //Scanner_Recipe rec = new Scanner_Recipe(work_area_x, work_area_y, process_area_x, process_area_y, distance, repeat, range,0,0,0,0,0,0,0, (Scanner_Recipe.Ablation_Style)waveform); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); } private void btn_Rectangle_Run_Click(object sender, EventArgs e) { if (_Parent._equip.Cur_Main_Recipe.process_info == null) return; _Parent._equip.scanner.Initialize(_Parent._equip.Cur_Main_Recipe.process_info.CTB_File_Path); double jump_speed = 0, mark_speed = 0; short laseron_delay = 0, laseroff_delay = 0; ushort jump_delay = 0, mark_delay = 0, polygon_delay = 0; jump_speed = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Speed; mark_speed = 300; laseron_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_On_Delay; laseroff_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_Off_Delay; jump_delay = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Delay; mark_delay = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Delay; polygon_delay = 0; if (!_Parent._equip.scanner.Set_Process_Datas(jump_speed, mark_speed, laseron_delay, laseroff_delay, jump_delay, mark_delay, polygon_delay)) return; int frequency = _Parent._equip.Cur_Main_Recipe.process_info.Frequency; double power = _Parent._equip.Cur_Main_Recipe.process_info.Power; if (!_Parent._equip.scanner.Set_Power(frequency, power)) return; _Parent._equip.scanner.Squire_Marking(); bool moving; do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); } private void btn_Scanner_Init_Click(object sender, EventArgs e) { if (_Parent._equip.Cur_Main_Recipe.process_info == null) return; if (_Parent._equip.scanner.Initialize(_Parent._equip.Cur_Main_Recipe.process_info.CTB_File_Path)) scanner_Init = true; else scanner_Init = false; } private void btn_Laser_On_Click(object sender, EventArgs e) { _Parent._equip.scanner.Set_Laser_On(); } private void btn_Laser_Off_Click(object sender, EventArgs e) { _Parent._equip.scanner.Set_Laser_Off(); } private void btn_Home_Click(object sender, EventArgs e) { _Parent._equip.scanner.Home(); } private void btn_Stop_Click(object sender, EventArgs e) { _Parent._equip.scanner.Set_Stop(); } #region Laser가공 Test private void btn_TestStart_Click(object sender, EventArgs e) { LaserRunwork(); } //레이저 가공 쓰레드 public async Task LaserRunwork() { await Task.Run(() => LaserStart()); } int Count = 0; public void LaserStart() { try { DateTime Time; Time = DateTime.Now; if (_Parent._equip.Cur_Main_Recipe.process_info == null) return; _Parent._equip.scanner.Initialize(_Parent._equip.Cur_Main_Recipe.process_info.CTB_File_Path); double jump_speed = 0, mark_speed = 0; short laseron_delay = 0, laseroff_delay = 0; ushort jump_delay = 0, mark_delay = 0, polygon_delay = 0; jump_speed = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Speed; mark_speed = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Speed; laseron_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_On_Delay; laseroff_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_Off_Delay; jump_delay = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Delay; mark_delay = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Delay; polygon_delay = 0; if (!_Parent._equip.scanner.Set_Process_Datas(jump_speed, mark_speed, laseron_delay, laseroff_delay, jump_delay, mark_delay, polygon_delay)) return; int frequency = _Parent._equip.Cur_Main_Recipe.process_info.Frequency; double power = _Parent._equip.Cur_Main_Recipe.process_info.Power; if (!_Parent._equip.scanner.Set_Power(frequency, power)) return; int startcount = 0; Count = 0; float start1_x, start1_y, width_1, height_1, distance_1, dis_end; float start2_x, start2_y, width_2, height_2, distance_2; float start3_x, start3_y, width_3, height_3, distance_3; float start4_x, start4_y, width_4, height_4, dis_start; int repeat, range, rep_start, rep_end, repeat_2, repeat_3; start1_x = float.Parse(tb_Start1_X.Text); start2_x = float.Parse(tb_Start2_X.Text); start3_x = float.Parse(tb_Start3_X.Text); start4_x = float.Parse(tb_Start4_X.Text); start1_y = float.Parse(tb_Start1_Y.Text); start2_y = float.Parse(tb_Start2_Y.Text); start3_y = float.Parse(tb_Start3_Y.Text); start4_y = float.Parse(tb_Start4_Y.Text); width_1 = float.Parse(tb_Process1_Width.Text); width_2 = float.Parse(tb_Process2_Width.Text); width_3 = float.Parse(tb_Process3_Width.Text); width_4 = float.Parse(tb_Process4_Width.Text); height_1 = float.Parse(tb_Process1_Height.Text); height_2 = float.Parse(tb_Process2_Height.Text); height_3 = float.Parse(tb_Process3_Height.Text); height_4 = float.Parse(tb_Process4_Height.Text); distance_1 = float.Parse(tb_Distance.Text); dis_start = float.Parse(tb_Distance_run.Text); dis_end = float.Parse(tb_Distance_end.Text); distance_2= float.Parse(tb_Distance_2.Text); distance_3 = float.Parse(tb_Distance_3.Text); repeat = int.Parse(tb_Jump_Repeat.Text); rep_start = int.Parse(tb_Repeat_Start.Text); rep_end = int.Parse(tb_Repeat_End.Text); repeat_2 = int.Parse(tb_Repeat_2.Text); repeat_3 = int.Parse(tb_Repeat_3.Text); range = int.Parse(tb_Jump_Range.Text); if (cb_box1.Checked == true) { Count += 1; } if (cb_box2.Checked == true) { Count += 1; } if (cb_box3.Checked == true) { Count += 1; } if (cb_box4.Checked == true) { Count += 1; } bool moving; while (startcount < Count) { do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); if (cb_box1.Checked == true) { Run_1(start1_x, start1_y, width_1, height_1, distance_1, repeat, range, dis_start, rep_start, 1); } else if (cb_box2.Checked == true) { Run3(start3_x, start3_y, width_3, height_3, distance_1, repeat, range, distance_2, repeat_2, 3); } else if (cb_box3.Checked == true) { Run2(start2_x, start2_y, width_2, height_2, distance_1, repeat, range, distance_3, repeat_3, 2); } else if (cb_box4.Checked == true) { Run4(start4_x, start4_y, width_4, height_4, distance_1, repeat, range, dis_end, rep_end, 4); } startcount++; } MessageBox.Show("가공 완료 {0}" + Convert.ToString(DateTime.Now - Time)); } catch { } } public void Run2(float st_x, float st_y, float widt, float heig, float distan, int repea, int ran, float dis_2, int rep_2, int count) { float start_x, start_y, width, height, distance, distance_2; int repeat, range, waveform, repeat_2; start_x = st_x; start_y = st_y; width = widt; height = heig; distance = distan; repeat = repea; range = ran; distance_2 = dis_2; repeat_2 = rep_2; waveform = _Parent._equip.Cur_Main_Recipe.process_info.Waveform; Scanner_Recipe rec = new Scanner_Recipe((float)252.2, (float)252.2, start_x, start_y, width, height, distance, repeat, range, distance_2, 0, repeat_2, 0, (Scanner_Recipe.Ablation_Style)waveform); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in /*Recipe_info*/rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); } public void Run3(float st_x, float st_y, float widt, float heig, float distan, int repea, int ran, float dis_3, int rep_3, int count) { float start_x, start_y, width, height, distance, distance_3; int repeat, range, waveform, repeat_3; start_x = st_x; start_y = st_y; width = widt; height = heig; distance = distan; repeat = repea; range = ran; distance_3 = dis_3; repeat_3 = rep_3; waveform = _Parent._equip.Cur_Main_Recipe.process_info.Waveform; Scanner_Recipe rec = new Scanner_Recipe((float)252.2, (float)252.2, start_x, start_y, width, height, distance, repeat, range, distance_3, 0, repeat_3, 0, (Scanner_Recipe.Ablation_Style)waveform); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in /*Recipe_info*/rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); } public void Run_1(float st_x, float st_y, float widt, float heig, float distan, int repea, int ran, float dis_start, int rep_start, int count) { float start_x, start_y, width, height, distance, Dis_start; int repeat, range, Rep_start, waveform; start_x = st_x; start_y = st_y; width = widt; height = heig; distance = distan; repeat = repea; range = ran; Dis_start = dis_start; Rep_start = rep_start; waveform = _Parent._equip.Cur_Main_Recipe.process_info.Waveform; //Scanner_Recipe rec = new Scanner_Recipe(250, 250, start_x, start_y, width, height, distance, repeat, range); Scanner_Recipe rec = new Scanner_Recipe((float)252.2, (float)252.2, start_x, start_y, width, height, distance, repeat, range, Dis_start, 0, Rep_start, 0, (Scanner_Recipe.Ablation_Style)waveform); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in /*Recipe_info*/rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); } public void Run4(float st_x, float st_y, float widt, float heig, float distan, int repea, int ran, float dis_end, int rep_end, int count) { float start_x, start_y, width, height, distance, Dis_end; int repeat, range, Rep_end, waveform; start_x = st_x; start_y = st_y; width = widt; height = heig; distance = distan; repeat = repea; range = ran; Dis_end = dis_end; Rep_end = rep_end; waveform = _Parent._equip.Cur_Main_Recipe.process_info.Waveform; //Scanner_Recipe rec = new Scanner_Recipe(250, 250, start_x, start_y, width, height, distance, repeat, range); Scanner_Recipe rec = new Scanner_Recipe((float)252.2, (float)252.2, start_x, start_y, width, height, distance, repeat, range, 0, Dis_end, 0, Rep_end, (Scanner_Recipe.Ablation_Style)waveform); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in /*Recipe_info*/rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); } #endregion private void button1_Click(object sender, EventArgs e) { double dgree = 0; if(!double.TryParse(tb_Run_Degree.Text, out dgree)) { Interlock_Manager.Add_Interlock_Msg("Scanner test faile.", "Please set degree right value"); return; } Thread Ablation_Run_Th; if (_Parent._equip.scanner.Initialize(_Parent._equip.Cur_Main_Recipe.process_info.CTB_File_Path)) { double jump_speed = 0, mark_speed = 0; short laseron_delay = 0, laseroff_delay = 0; ushort jump_delay = 0, mark_delay = 0, polygon_delay = 0; jump_speed = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Speed; mark_speed = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Speed; laseron_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_On_Delay; laseroff_delay = _Parent._equip.Cur_Main_Recipe.process_info.Laser_Off_Delay; jump_delay = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Delay; mark_delay = _Parent._equip.Cur_Main_Recipe.process_info.Mark_Delay; polygon_delay = 0; if (!_Parent._equip.scanner.Set_Process_Datas(jump_speed, mark_speed, laseron_delay, laseroff_delay, jump_delay, mark_delay, polygon_delay)) return; int frequency = _Parent._equip.Cur_Main_Recipe.process_info.Frequency; double power = _Parent._equip.Cur_Main_Recipe.process_info.Power; if (!_Parent._equip.scanner.Set_Power(frequency, power)) return; } Ablation_Run_Th = new Thread(() => Ablation_Run(dgree)); Ablation_Run_Th.Start(); while (true) { if (Ablation_Run_Th.ThreadState == ThreadState.Stopped) { MessageBox.Show("End"); break; } } } private void Ablation_Run(double degree) { bool moving; do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); Thread th; if (_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_1.Draw) { th = new Thread(() => Ablation_Run(_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_1, degree)); th.Start(); while (th.ThreadState != ThreadState.Stopped) { } } if (_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_2.Draw) { th = new Thread(() => Ablation_Run(_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_2, degree)); th.Start(); while (th.ThreadState != ThreadState.Stopped) { } } if (_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_3.Draw) { th = new Thread(() => Ablation_Run(_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_3, degree)); th.Start(); while (th.ThreadState != ThreadState.Stopped) { } } if (_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_4.Draw) { th = new Thread(() => Ablation_Run(_Parent._equip.Cur_Main_Recipe.process_info.Draw_Info_4, degree)); th.Start(); while (th.ThreadState != ThreadState.Stopped) { } } } private void Ablation_Run(Process_Draw_Info draw_info, double degree) { Scanner_Recipe rec; bool moving; float work_area_x, work_area_y; float start_x, end_x, start_y, end_y, distance, draw_distance; int repeat, range, draw_repeat; Scanner_Recipe.Ablation_Style waveform; work_area_x = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_X; work_area_y = _Parent._equip.Cur_Main_Recipe.process_info.Work_Area_Y; start_x = draw_info.Start_X; end_x = draw_info.End_X; start_y = draw_info.Start_Y; end_y = draw_info.End_Y; distance = _Parent._equip.Cur_Main_Recipe.process_info.Hatch_Distance; repeat = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Repeat; range = _Parent._equip.Cur_Main_Recipe.process_info.Jump_Range; draw_distance = draw_info.Distance; draw_repeat = draw_info.Repeat; waveform = (Scanner_Recipe.Ablation_Style)_Parent._equip.Cur_Main_Recipe.process_info.Waveform; if (draw_info.Reverse) { rec = new Scanner_Recipe(work_area_x, work_area_y, start_x, start_y, end_x, end_y, distance, repeat, range, 0, draw_distance, 0, draw_repeat, waveform, degree, draw_info.Reverse); } else { rec = new Scanner_Recipe(work_area_x, work_area_y, start_x, start_y, end_x, end_y, distance, repeat, range, draw_distance, 0, draw_repeat, 0, waveform, degree, draw_info.Reverse); } do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); _Parent._equip.scanner.Set_Start_List(1); foreach (Scanner_Position_Info info in rec.Recipe_Pos_Info) { if (info.mark) { System.Diagnostics.Debug.WriteLine($"MARK : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Mark_Abs(info.x, info.y); } else { System.Diagnostics.Debug.WriteLine($"JUMP : {info.x}, {info.y}"); _Parent._equip.scanner.Set_Jump_Abs(info.x, info.y); } } _Parent._equip.scanner.Set_End_Of_List(); _Parent._equip.scanner.Set_Excute_List(1); do { _Parent._equip.scanner.Get_Busy(out moving); } while (moving); } private void btn_Power_Set_Click(object sender, EventArgs e) { if (_Parent._equip.Cur_Main_Recipe.process_info != null) { int frequency = _Parent._equip.Cur_Main_Recipe.process_info.Frequency; double power = _Parent._equip.Cur_Main_Recipe.process_info.Power; _Parent._equip.scanner.Set_Power(frequency, power); } } } }