Exemplo n.º 1
0
 public ConMotion(Main_UI _Main_ui, Hardware _Hardware, Vector _Vector, MotionProfile Motion)
 {
     hardware      = _Hardware;
     vector        = _Vector;
     motionProfile = Motion;
     Main_ui       = _Main_ui;
 }
 public Layer(MotionProfile profile, double width, double height)
 {
     this.Profile      = profile;
     MainCanvas        = new Canvas();
     MainCanvas.Width  = App.FieldCanvasWidth;
     MainCanvas.Height = App.FieldCanvasHeight;
     CompileCanvas();
 }
    /// <summary>
    /// Returns strings containing the segments used to make the profile and the profile for the robot
    /// </summary>
    public static String[] GetSaveFile(MotionProfile motionProfile)
    {
        double[][][] segments       = motionProfile.Path.ToArray();
        double[][]   profile        = motionProfile.ToArray();
        String[]     output         = new String[profile.Length + segments.Length];
        String       timeDifference = (motionProfile.Robot.TimeIncrementInSec * 1000).ToString();

        //Writes the file header
        //Runs in only a couple milliseconds
        for (int i = 0; i < segments.Length; i++)
        {
            output[i] = (SegmentToLine(segments[i]));
        }

        for (int i = 0; i < profile.Length; i++)
        {
            output[segments.Length + i] = (PointToString(profile[i]) + timeDifference);
        }

        return(output);
    }
Exemplo n.º 4
0
 public static extern int HIMC_CircAbs(int nCtrlID, int nGroupID, CenterPosition center_pos, NormalVector normal_vector, int turns, CoordPosition target_pos, MotionProfile motion_profile, CoordSystem coord_sys, MotionBufferMode buf_mode, MotionTransitionMode trans_mode, double dTransPar);
Exemplo n.º 5
0
 public static extern int HIMC_LinRel(int nCtrlID, int nGroupID, CoordPosition relative_dist, MotionProfile motion_profile, CoordSystem coord_sys, MotionBufferMode buf_mode, MotionTransitionMode trans_mode, double dTransPar);
Exemplo n.º 6
0
 public static extern int HIMC_LinAbs(int nCtrlID, int nGroupID, CoordPosition target_pos, MotionProfile motion_profile, CoordSystem coord_sys, MotionBufferMode buf_mode, MotionTransitionMode trans_mode, double dTransPar);