示例#1
0
        /// <summary>
        /// XY方向绝对位移
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="Control"></param>
        /// <param name="List_No"></param>
        public static void Abs_XY(decimal x, decimal y, UInt32 Control, UInt32 List_No)//距离、控制方式、list区域
        {
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //  执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(List_No);

            //生成数据
            if (Control == 4)//jump_rel
            {
                RTC5Wrap.jump_rel(-Convert.ToInt32(y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(x * Para_List.Parameter.Rtc_Pos_Reference));
            }
            else if (Control == 6)//mark_rel
            {
                RTC5Wrap.mark_rel(-Convert.ToInt32(y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(x * Para_List.Parameter.Rtc_Pos_Reference));
            }
            //设置List结束位置
            RTC5Wrap.set_end_of_list();

            //启动执行
            RTC5Wrap.execute_list(List_No);

            //Busy 运行等待结束
            uint Busy;

            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
        }
示例#2
0
        /// <summary>
        /// 关闭激光,移动激光聚焦点至加工起始位置
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public static void Rtc_Ready(decimal x, decimal y)
        {
            UInt32 List_No = 1u;

            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //  执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(List_No);
            //修正当前位置00
            RTC5Wrap.jump_abs(-Convert.ToInt32(y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(x * Para_List.Parameter.Rtc_Pos_Reference));
            //设置List结束位置
            RTC5Wrap.set_end_of_list();
            //启动执行
            RTC5Wrap.execute_list(List_No);
            //Busy 运行等待结束
            uint Busy;

            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
            //goto 指定点
            RTC5Wrap.goto_xy(-Convert.ToInt32(y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(x * Para_List.Parameter.Rtc_Pos_Reference));
        }
示例#3
0
        /// <summary>
        /// 执行 未经任何矫正的数据,包括坐标系匹配,用于原始振镜坐标系输出,进行桶形矫正
        /// </summary>
        /// <param name="Rtc_Datas"></param>
        /// <param name="List_No"></param>
        public static void Draw_Cal(List <Interpolation_Data> Rtc_Datas, UInt32 List_No)
        {
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //  执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            //RTC5Wrap.set_start_list(List_No);

            //初始Jump到启动点位
            RTC5Wrap.jump_abs(Convert.ToInt32(Rtc_Datas[0].Rtc_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Rtc_Datas[0].Rtc_y * Para_List.Parameter.Rtc_Pos_Reference));

            //生成数据
            foreach (var o in Rtc_Datas)
            {
                if (o.Type == 11)//arc_abs 绝对圆弧
                {
                    RTC5Wrap.arc_abs(Convert.ToInt32(o.Center_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.Center_y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToDouble(o.Angle));
                }
                else if (o.Type == 12)//arc_rel
                {
                    RTC5Wrap.arc_rel(Convert.ToInt32(o.Center_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.Center_y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToDouble(o.Angle));
                }
                else if (o.Type == 13)//jump_abs
                {
                    RTC5Wrap.jump_abs(Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_y * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 14)//jump_rel
                {
                    RTC5Wrap.jump_rel(Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_y * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 15)//mark_abs
                {
                    RTC5Wrap.mark_abs(Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_y * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 16)//mark_rel
                {
                    RTC5Wrap.mark_rel(Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_y * Para_List.Parameter.Rtc_Pos_Reference));
                }
            }
            //结束Jump到启动点位
            //RTC5Wrap.jump_abs(0,0);

            //设置List结束位置
            RTC5Wrap.set_end_of_list();

            //启动执行
            RTC5Wrap.execute_list(1u);

            //Busy 运行等待结束
            uint Busy;

            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
        }
示例#4
0
        /// <summary>
        /// jump跳刀
        /// </summary>
        /// <param name="Rtc_Datas"></param>
        /// <param name="List_No"></param>
        public static void Draw_Jump_Correct(List <Interpolation_Data> Rtc_Datas, UInt32 List_No)
        {
            //定义处理的变量
            Vector  Tmp_Point = new Vector();
            decimal Tmp_End_X = 0.0m;
            decimal Tmp_End_Y = 0.0m;

#if !DEBUG
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(List_No);
#endif


            //生成数据
            foreach (var o in Rtc_Datas)
            {
                //Tmp_Point = new Vector(Rtc_Cal_Data_Resolve.Correct_Rtc_Axes(o.End_x, o.End_y));
                Tmp_Point = new Vector(Rtc_Cal_Data_Resolve.Correct_Rtc_Axes_Angle(o.End_x, o.End_y));
                Tmp_End_X = Tmp_Point.X;
                Tmp_End_Y = Tmp_Point.Y;
#if !DEBUG
                if (o.Type == 13)//jump_abs
                {
                    RTC5Wrap.jump_abs(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 14)//jump_rel
                {
                    RTC5Wrap.jump_rel(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
#endif
            }
#if !DEBUG
            //结束Jump到启动点位
            //RTC5Wrap.jump_abs(0, 0);

            //设置List结束位置
            RTC5Wrap.set_end_of_list();

            //启动执行
            RTC5Wrap.execute_list(1u);

            //Busy 运行等待结束
            uint Busy;
            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
#endif
        }
示例#5
0
        /// <summary>
        /// jump跳刀
        /// </summary>
        /// <param name="Rtc_Datas"></param>
        /// <param name="List_No"></param>
        public static void Draw_Jump(List <Interpolation_Data> Rtc_Datas, UInt32 List_No)
        {
#if !DEBUG
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(List_No);
#endif


            //生成数据
            foreach (var o in Rtc_Datas)
            {
#if !DEBUG
                if (o.Type == 13)//jump_abs
                {
                    RTC5Wrap.jump_abs(Convert.ToInt32(-o.End_y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 14)//jump_rel
                {
                    RTC5Wrap.jump_rel(Convert.ToInt32(-o.End_y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(o.End_x * Para_List.Parameter.Rtc_Pos_Reference));
                }
#endif
            }
#if !DEBUG
            //结束Jump到启动点位
            //RTC5Wrap.jump_abs(0, 0);

            //设置List结束位置
            RTC5Wrap.set_end_of_list();

            //启动执行
            RTC5Wrap.execute_list(1u);

            //Busy 运行等待结束
            uint Busy;
            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
#endif
        }
示例#6
0
        /// <summary>
        /// 修改参数
        /// </summary>
        public static void Change_Para()
        {
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(1u, 0u) == 0);
            // Timing, delay and speed preset.
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(1u);
            // Wait for Para_List.Parameter.Warmup_Time seconds
            //RTC5Wrap.long_delay(Convert.ToUInt32(Para_List.Parameter.Warmup_Time / Para_List.Parameter.Scanner_Delay_Reference));
            RTC5Wrap.set_laser_pulses(
                Convert.ToUInt32(Para_List.Parameter.Laser_Half_Period * Para_List.Parameter.Rtc_Period_Reference),  // half of the laser signal period.
                Convert.ToUInt32(Para_List.Parameter.Laser_Pulse_Width * Para_List.Parameter.Rtc_Period_Reference)); // pulse widths of signal LASER1.
            RTC5Wrap.set_scanner_delays(
                Convert.ToUInt32(Para_List.Parameter.Jump_Delay / Para_List.Parameter.Scanner_Delay_Reference),      // jump delay, in 10 microseconds.
                Convert.ToUInt32(Para_List.Parameter.Mark_Delay / Para_List.Parameter.Scanner_Delay_Reference),      // mark delay, in 10 microseconds.
                Convert.ToUInt32(Para_List.Parameter.Polygon_Delay / Para_List.Parameter.Scanner_Delay_Reference));  // polygon delay, in 10 microseconds.
            RTC5Wrap.set_laser_delays(
                Convert.ToInt32(Para_List.Parameter.Laser_On_Delay * Para_List.Parameter.Laser_Delay_Reference),     // laser on delay, in microseconds.
                Convert.ToUInt32(Para_List.Parameter.Laser_Off_Delay * Para_List.Parameter.Laser_Delay_Reference));  // laser off delay, in microseconds.
            // jump speed in bits per milliseconds.
            RTC5Wrap.set_jump_speed(Para_List.Parameter.Jump_Speed);
            // marking speed in bits per milliseconds.
            RTC5Wrap.set_mark_speed(Para_List.Parameter.Mark_Speed);
            RTC5Wrap.set_end_of_list();
            RTC5Wrap.execute_list(1u);

            //Pump source warming up ,wait!!!
            uint Busy;

            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
        }
示例#7
0
        /// <summary>
        /// 执行 数据采样矫正后的数据 矩阵补偿
        /// </summary>
        /// <param name="Rtc_Datas"></param>
        /// <param name="List_No"></param>
        public static void Draw_Matrix_Correct(List <Interpolation_Data> Rtc_Datas, UInt32 List_No)
        {
            //定义处理的变量
            Vector  Tmp_Point    = new Vector();
            decimal Tmp_R0_X     = 0.0m;
            decimal Tmp_R0_Y     = 0.0m;
            decimal Tmp_End_X    = 0.0m;
            decimal Tmp_End_Y    = 0.0m;
            decimal Tmp_Center_X = 0.0m;
            decimal Tmp_Center_Y = 0.0m;

#if !DEBUG
            //  wait list List_No to be not busy
            //  load_list( List_No, 0) returns 1 if successful, otherwise 0
            //执行到POS 0
            do
            {
            }while (RTC5Wrap.load_list(List_No, 0u) == 0);
            // Transmit the following list commands to the list buffer.
            RTC5Wrap.set_start_list(List_No);
#endif
            if (Para_List.Parameter.Rtc_Affinity_Type == 2)
            {
                Tmp_Point = new Vector(Rtc_Cal_Data_Resolve.Get_Line_Fit_Coordinate(Rtc_Datas[0].Rtc_x, Rtc_Datas[0].Rtc_y, Fit_Matrices));
                Tmp_R0_X  = Tmp_Point.X;
                Tmp_R0_Y  = Tmp_Point.Y;
            }
            else
            {
                //获取数据落点
                Tmp_Point = new Vector(Rtc_Cal_Data_Resolve.Get_Affinity_Point(0, Rtc_Datas[0].Rtc_x, Rtc_Datas[0].Rtc_y, affinity_Matrices));
                Tmp_R0_X  = Tmp_Point.X;
                Tmp_R0_Y  = Tmp_Point.Y;
            }

#if !DEBUG
            //初始Jump到启动点位
            RTC5Wrap.jump_abs(Convert.ToInt32(-Tmp_R0_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_R0_X * Para_List.Parameter.Rtc_Pos_Reference));
#endif
            //生成数据
            foreach (var o in Rtc_Datas)
            {
                if (Para_List.Parameter.Rtc_Affinity_Type == 2)
                {
                    Tmp_Point    = new Vector(Rtc_Cal_Data_Resolve.Get_Line_Fit_Coordinate(o.End_x, o.End_y, Fit_Matrices));
                    Tmp_End_X    = Tmp_Point.X;
                    Tmp_End_Y    = Tmp_Point.Y;
                    Tmp_Point    = new Vector(Rtc_Cal_Data_Resolve.Get_Line_Fit_Coordinate(o.Center_x, o.Center_y, Fit_Matrices));
                    Tmp_Center_X = Tmp_Point.X;
                    Tmp_Center_Y = Tmp_Point.Y;
                }
                else
                {
                    Tmp_Point    = new Vector(Rtc_Cal_Data_Resolve.Get_Affinity_Point(0, o.End_x, o.End_y, affinity_Matrices));
                    Tmp_End_X    = Tmp_Point.X;
                    Tmp_End_Y    = Tmp_Point.Y;
                    Tmp_Point    = new Vector(Rtc_Cal_Data_Resolve.Get_Affinity_Point(0, o.Center_x, o.Center_y, affinity_Matrices));
                    Tmp_Center_X = Tmp_Point.X;
                    Tmp_Center_Y = Tmp_Point.Y;
                }
#if !DEBUG
                if (o.Type == 11)//arc_abs 绝对圆弧
                {
                    RTC5Wrap.arc_abs(Convert.ToInt32(-Tmp_Center_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_Center_X * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToDouble(o.Angle));
                }
                else if (o.Type == 12)//arc_rel
                {
                    RTC5Wrap.arc_rel(Convert.ToInt32(-Tmp_Center_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_Center_X * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToDouble(o.Angle));
                }
                else if (o.Type == 13)//jump_abs
                {
                    RTC5Wrap.jump_abs(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 14)//jump_rel
                {
                    RTC5Wrap.jump_rel(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 15)//mark_abs
                {
                    RTC5Wrap.mark_abs(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
                else if (o.Type == 16)//mark_rel
                {
                    RTC5Wrap.mark_rel(Convert.ToInt32(-Tmp_End_Y * Para_List.Parameter.Rtc_Pos_Reference), Convert.ToInt32(Tmp_End_X * Para_List.Parameter.Rtc_Pos_Reference));
                }
#endif
            }
#if !DEBUG
            //结束Jump到启动点位
            //RTC5Wrap.jump_abs(0, 0);

            //设置List结束位置
            RTC5Wrap.set_end_of_list();

            //启动执行
            RTC5Wrap.execute_list(1u);

            //Busy 运行等待结束
            uint Busy;
            do
            {
                RTC5Wrap.get_status(out Busy, out uint Position);
            } while (Busy != 0U);
#endif
        }