Interface Driver

    • Method Detail

      • getUnits

        LengthUnit getUnits()
        Returns:
        The LengthUnit used by the controller that is driven by this driver.
      • home

        void home​(Machine machine)
           throws java.lang.Exception
        Perform the hardware homing operation. When this completes the axes should be at their homing location. The call might return before this physically happens, so a waitForCompletion() is needed if you need to be sure.
        Parameters:
        machine -
        Throws:
        java.lang.Exception
      • setGlobalOffsets

        void setGlobalOffsets​(Machine machine,
                              AxesLocation axesLocation)
                       throws java.lang.Exception
        Set the current physical axis positions to be reinterpreted as the specified coordinates. Used after visual homing and to reset a rotation angle after it has wrapped around. In G-Code parlance this is setting a global offset:
        Parameters:
        machine -
        axesLocation -
        Throws:
        java.lang.Exception
      • moveTo

        void moveTo​(HeadMountable hm,
                    Motion.MoveToCommand moveToCommand)
             throws java.lang.Exception
        Executes the given Motion.
        Parameters:
        hm - The HeadMountable having triggered the move. This is mostly for proprietary machine driver support and might only be a stand-in in some motion blending scenarios.
        moveToCommand - The moveTo Motion to execute, including target location and limits for feedrate, acceleration etc. as shaped by the MotionPlanner
        Throws:
        java.lang.Exception
      • getReportedLocation

        AxesLocation getReportedLocation​(long timeout)
                                  throws java.lang.Exception
        Get the momentary real-time location from the controller. This might be in mid-motion.
        Parameters:
        timeout - TODO
        Returns:
        Throws:
        java.lang.Exception
      • isSyncInitialLocation

        boolean isSyncInitialLocation()
        Returns:
        true if the driver should synchronize its initial position after enabling.
      • isAllowUnhomedMotion

        default boolean isAllowUnhomedMotion()
        Returns:
        true if the driver allows motion on an unhomed machine.
      • isMotionPending

        boolean isMotionPending()
        Returns:
        true if a motion is still assumed to be pending, i.e. waitForCompletion() has not yet been called.
      • waitForCompletion

        void waitForCompletion​(HeadMountable hm,
                               MotionPlanner.CompletionType completionType)
                        throws java.lang.Exception
        Perform a coordinated wait for completion. This must be issued before capturing camera frames etc.
        Parameters:
        hm - The HeadMountable to wait for. If null, wait for all the axes on the driver. Most drivers/controllers will probably not be able to wait for just a sub-set of axes, so the'll wait for all the axes anyway.
        completionType - The kind of completion wanted.
        Throws:
        java.lang.Exception
      • actuate

        void actuate​(Actuator actuator,
                     boolean on)
              throws java.lang.Exception
        Actuates a machine defined object with a boolean state.
        Parameters:
        actuator -
        on -
        Throws:
        java.lang.Exception
      • actuate

        void actuate​(Actuator actuator,
                     double value)
              throws java.lang.Exception
        Actuates a machine defined object with a double value.
        Parameters:
        actuator -
        value -
        Throws:
        java.lang.Exception
      • actuate

        default void actuate​(Actuator actuator,
                             java.lang.String value)
                      throws java.lang.Exception
        Actuates a machine defined object with a String value.
        Parameters:
        actuator -
        value -
        Throws:
        java.lang.Exception
      • actuatorRead

        default java.lang.String actuatorRead​(Actuator actuator)
                                       throws java.lang.Exception
        Read a String value from the given Actuator.
        Parameters:
        actuator -
        Returns:
        Throws:
        java.lang.Exception
      • actuatorRead

        default java.lang.String actuatorRead​(Actuator actuator,
                                              java.lang.Object parameter)
                                       throws java.lang.Exception
        Read a given String value from the given Actuator.
        Parameters:
        actuator -
        parameter -
        Returns:
        Throws:
        java.lang.Exception
      • setEnabled

        void setEnabled​(boolean enabled)
                 throws java.lang.Exception
        Attempts to enable the Driver, turning on all outputs.
        Parameters:
        enabled -
        Throws:
        java.lang.Exception
      • isSupportingPreMove

        boolean isSupportingPreMove()
      • isUsingLetterVariables

        boolean isUsingLetterVariables()
      • getMotionControlType

        Driver.MotionControlType getMotionControlType()
        Returns:
        The MotionControlType that determines how the OpenPnP MotionPlanner will do its planning and how it will talk to the controller.
      • getFeedRatePerSecond

        Length getFeedRatePerSecond()
        Returns:
        A driver specific feed-rate limit, applied in addition to axis feed-rate limits and according to NIST RS274NGC Interpreter - Version 3, Section 2.1.2.5 (p. 7). Given per second (will be converted to the standard per minute rate when using Gcode F values).
      • getInterpolationMaxSteps

        default java.lang.Integer getInterpolationMaxSteps()
        Returns:
        The maximum number of interpolation steps that should be applied to simulate more advanced motion control. Usually depends on the depth of the look-ahead motion planner queue inside the controller.
      • getInterpolationJerkSteps

        default java.lang.Integer getInterpolationJerkSteps()
        Returns:
        The maximum number of interpolation steps that should be applied to simulate jerk control per acceleration/deceleration ramp. Should be much less than getInterpolationMaxSteps().
      • getInterpolationTimeStep

        default java.lang.Double getInterpolationTimeStep()
        Returns:
        The minimal time step that should be used to simulate more advanced motion control.
      • getInterpolationMinStep

        default java.lang.Integer getInterpolationMinStep()
        Returns:
        The minimal interpolation step distance, given in resolution ticks (i.e. usually micro-steps) of the axes.
      • getJunctionDeviation

        default Length getJunctionDeviation()
      • getMinimumRate

        Length getMinimumRate​(int order)
        Parameters:
        order - Derivative order, velocity (1), acceleration (2), jerk (3)
        Returns:
        The minimum velocity, acceleration, jerk the driver supports. Used to prevent "rounded to zero" errors in decimal formatting and interpolation.