org.reprap.devices
Class NullStepperMotor

java.lang.Object
  extended by org.reprap.Device
      extended by org.reprap.devices.GenericStepperMotor
          extended by org.reprap.devices.NullStepperMotor
All Implemented Interfaces:
AxisMotor

public class NullStepperMotor
extends GenericStepperMotor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.reprap.AxisMotor
AxisMotor.Range
 
Field Summary
 
Fields inherited from class org.reprap.devices.GenericStepperMotor
axis, haveCalibrated, haveInitialised, haveSetNotification, mid, printer
 
Constructor Summary
NullStepperMotor(int motorId)
           
 
Method Summary
 void dda(int speed, int x1, int deltaY)
           
 void dispose()
          Dispose of this object
 int getPosition()
           
 AxisMotor.Range getRange(int speed)
           
 void homeReset(int speed)
           
 boolean isAvailable()
          Is the comms working?
 boolean queuePoint(int endX, int endY, int movementSpeed, int control)
          Add an XY point to the firmware buffer for plotting Only works for recent firmware.
 void refreshPreferences()
          Reload the preferences
 void resetPosition()
           
 void seek(int speed, int position)
           
 void seekBlocking(int speed, int position)
           
 void setIdle()
           
 void setMaxTorque(int maxTorque)
           
 void setPosition(int position)
           
 void setSpeed(int speed)
          Set the motor speed (or turn it off)
 void setSync(byte syncType)
           
 void stepBackward()
           
 void stepForward()
           
 void waitTillNotBusy()
           
 boolean wasAvailable()
           
 
Methods inherited from class org.reprap.devices.GenericStepperMotor
getPrinter, setPrinter
 
Methods inherited from class org.reprap.Device
getAddress, getCommunicator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullStepperMotor

public NullStepperMotor(int motorId)
Parameters:
motorId -
Method Detail

isAvailable

public boolean isAvailable()
Is the comms working?

Returns:

wasAvailable

public boolean wasAvailable()

refreshPreferences

public void refreshPreferences()
Description copied from interface: AxisMotor
Reload the preferences


dispose

public void dispose()
Dispose of this object


waitTillNotBusy

public void waitTillNotBusy()
                     throws java.io.IOException
Throws:
java.io.IOException

queuePoint

public boolean queuePoint(int endX,
                          int endY,
                          int movementSpeed,
                          int control)
                   throws java.io.IOException
Add an XY point to the firmware buffer for plotting Only works for recent firmware.

Parameters:
endX -
endY -
movementSpeed -
Returns:
Throws:
java.io.IOException

setSpeed

public void setSpeed(int speed)
              throws java.io.IOException
Set the motor speed (or turn it off)

Parameters:
speed - A value between -255 and 255.
Throws:
ReprapException
java.io.IOException

setIdle

public void setIdle()
             throws java.io.IOException
Throws:
java.io.IOException

stepForward

public void stepForward()
                 throws java.io.IOException
Throws:
java.io.IOException

stepBackward

public void stepBackward()
                  throws java.io.IOException
Throws:
java.io.IOException

resetPosition

public void resetPosition()
                   throws java.io.IOException
Throws:
java.io.IOException

setPosition

public void setPosition(int position)
                 throws java.io.IOException
Parameters:
position -
Throws:
java.io.IOException

getPosition

public int getPosition()
                throws java.io.IOException
Returns:
current position of the motor
Throws:
java.io.IOException

seek

public void seek(int speed,
                 int position)
          throws java.io.IOException
Parameters:
speed -
position -
Throws:
java.io.IOException

seekBlocking

public void seekBlocking(int speed,
                         int position)
                  throws java.io.IOException
Parameters:
speed -
position -
Throws:
java.io.IOException

getRange

public AxisMotor.Range getRange(int speed)
                         throws java.io.IOException
Parameters:
speed -
Returns:
range of the motor
Throws:
java.io.IOException
InvalidPayloadException

homeReset

public void homeReset(int speed)
               throws java.io.IOException
Parameters:
speed -
Throws:
java.io.IOException
InvalidPayloadException

setSync

public void setSync(byte syncType)
             throws java.io.IOException
Parameters:
syncType -
Throws:
java.io.IOException

dda

public void dda(int speed,
                int x1,
                int deltaY)
         throws java.io.IOException
Parameters:
speed -
x1 -
deltaY -
Throws:
java.io.IOException

setMaxTorque

public void setMaxTorque(int maxTorque)
                  throws java.io.IOException
Parameters:
maxTorque - An integer value 0 to 100 representing the maximum torque percentage
Throws:
java.io.IOException