예제 #1
0
        /// <summary>
        /// Sets the software travel limit for the desired axis. Note: The negative limit cannot be greater than the right limit, and the
        /// limits must contain the home position
        /// </summary>
        /// <param name="axisNum">the desired axis to target</param>
        /// <param name="limit">the desired limit</param>
        /// <param name="desiredDirection">an enum representing whether to act on the positive or the negative axis limit</param>
        public void setTravelLimit(int axisNum, double limit, travelOption desiredDirection)
        {
            switch (desiredDirection)
            {
            case travelOption.positive:
                writeSerialCommand(axisNum.ToString() + "SR" + limit.ToString());
                break;

            case travelOption.negative:
                writeSerialCommand(axisNum.ToString() + "SL" + limit.ToString());
                break;

            default:
                throw new Exception("Unnacounted for travel option");
            }
        }
예제 #2
0
        /// <summary>
        /// Move the desired axis indefinitely in the specified direction with the jerk, acceleration, and velocity that was defined earlier
        /// </summary>
        /// <param name="axisNum">the desired axis to target</param>
        /// <param name="desiredDirection">an enum representing whether to move towards the positive or the negative axis</param>
        public void moveIndefinitely(int axisNum, travelOption desiredDirection)
        {
            switch (desiredDirection)
            {
            case travelOption.positive:
                writeSerialCommand(axisNum.ToString() + "MV+");
                break;

            case travelOption.negative:
                writeSerialCommand(axisNum.ToString() + "MV-");
                break;

            default:
                throw new Exception("Unnacounted for travel option");
            }
        }