public class GcodeDriver extends AbstractReferenceDriver implements Named, java.lang.Runnable
Modifier and Type | Class and Description |
---|---|
static class |
GcodeDriver.Axis |
static interface |
GcodeDriver.AxisTransform |
static class |
GcodeDriver.CamTransform |
static class |
GcodeDriver.Command |
static class |
GcodeDriver.CommandType |
static class |
GcodeDriver.NegatingTransform
An AxisTransform for heads with dual linear Z axes powered by one motor.
|
static class |
GcodeDriver.OffsetTransform |
PropertySheetHolder.PropertySheet
Modifier and Type | Field and Description |
---|---|
javax.swing.Action |
addSubDriverAction |
protected java.util.List<GcodeDriver.Axis> |
axes |
protected double |
backlashFeedRateFactor |
protected double |
backlashOffsetX |
protected double |
backlashOffsetY |
java.util.ArrayList<GcodeDriver.Command> |
commands |
protected int |
connectWaitTimeMilliseconds |
javax.swing.Action |
deleteSubDriverAction |
protected Location |
homingFiducialLocation |
protected int |
maxFeedRate |
protected java.lang.String |
name |
protected double |
nonSquarenessFactor |
protected java.util.List<GcodeDriver> |
subDrivers |
protected int |
timeoutMilliseconds |
protected LengthUnit |
units |
protected boolean |
visualHomingEnabled |
baud, communicationsType, connectionKeepAlive, dataBits, flowControl, parity, portName, serial, setDtr, setRts, stopBits, tcp
propertyChangeSupport
Constructor and Description |
---|
GcodeDriver() |
Modifier and Type | Method and Description |
---|---|
void |
actuate(ReferenceActuator actuator,
boolean on)
Actuates a machine defined object with a boolean state.
|
void |
actuate(ReferenceActuator actuator,
double value)
Actuates a machine defined object with a double value.
|
java.lang.String |
actuatorRead(ReferenceActuator actuator)
Read a String value from the given Actuator.
|
void |
close() |
void |
commit() |
void |
connect() |
void |
createDefaults() |
void |
disconnect() |
void |
dispense(ReferencePasteDispenser dispenser,
Location startLocation,
Location endLocation,
long dispenseTimeMilliseconds) |
GcodeDriver.Axis |
getAxis(HeadMountable hm,
GcodeDriver.Axis.Type type) |
double |
getBacklashFeedRateFactor() |
double |
getBacklashOffsetX() |
double |
getBacklashOffsetY() |
PropertySheetHolder[] |
getChildPropertySheetHolders() |
java.lang.String |
getCommand(HeadMountable hm,
GcodeDriver.CommandType type) |
GcodeDriver.Command |
getCommand(HeadMountable hm,
GcodeDriver.CommandType type,
boolean checkDefaults) |
int |
getConnectWaitTimeMilliseconds() |
Location |
getLocation(ReferenceHeadMountable hm)
Returns a clone of the HeadMountable's current location.
|
int |
getMaxFeedRate() |
java.lang.String |
getName() |
double |
getNonSquarenessFactor() |
javax.swing.Action[] |
getPropertySheetHolderActions() |
java.lang.String |
getPropertySheetHolderTitle() |
PropertySheetHolder.PropertySheet[] |
getPropertySheets() |
int |
getTimeoutMilliseconds() |
LengthUnit |
getUnits() |
protected static boolean |
hasVariable(java.lang.String command,
java.lang.String name)
Find matches of variables in the format {Name:Format} and return true if present.
|
void |
home(ReferenceHead head)
Performing the hardware homing operation for the given Head.
|
boolean |
isVisualHomingEnabled() |
void |
moveTo(ReferenceHeadMountable hm,
Location location,
double speed)
Moves the specified HeadMountable to the given location at a speed defined by (maximum feed
rate * speed) where speed is greater than 0 and typically less than or equal to 1.
|
void |
pick(ReferenceNozzle nozzle)
Causes the nozzle to apply vacuum and any other operation that it uses for picking up a part
that it is resting on.
|
void |
place(ReferenceNozzle nozzle)
Causes the nozzle to release vacuum and any other operation that it uses for placing a part
that it is currently holding.
|
void |
run() |
java.util.List<java.lang.String> |
sendCommand(java.lang.String command) |
java.util.List<java.lang.String> |
sendCommand(java.lang.String command,
long timeout) |
protected java.util.List<java.lang.String> |
sendGcode(java.lang.String gCode) |
protected java.util.List<java.lang.String> |
sendGcode(java.lang.String gCode,
long timeout) |
void |
setBacklashFeedRateFactor(double BacklashFeedRateFactor) |
void |
setBacklashOffsetX(double BacklashOffsetX) |
void |
setBacklashOffsetY(double BacklashOffsetY) |
void |
setCommand(HeadMountable hm,
GcodeDriver.CommandType type,
java.lang.String text) |
void |
setConnectWaitTimeMilliseconds(int connectWaitTimeMilliseconds) |
void |
setEnabled(boolean enabled)
Attempts to enable the Driver, turning on all outputs.
|
void |
setMaxFeedRate(int maxFeedRate) |
void |
setName(java.lang.String name) |
void |
setNonSquarenessFactor(double NonSquarenessFactor) |
void |
setTimeoutMilliseconds(int timeoutMilliseconds) |
void |
setUnits(LengthUnit units) |
void |
setVisualHomingEnabled(boolean visualHomingEnabled) |
protected static java.lang.String |
substituteVariable(java.lang.String command,
java.lang.String name,
java.lang.Object value)
Find matches of variables in the format {Name:Format} and replace them with the specified
value formatted using String.format with the specified Format.
|
getBaud, getCommunications, getCommunicationsType, getConfigurationWizard, getConnectionKeepAlive, getDataBits, getFlowControl, getIpAddress, getParity, getPort, getPortName, getPropertySheetHolderIcon, getStopBits, isSetDtr, isSetRts, setBaud, setCommunicationsType, setConnectionKeepAlive, setDataBits, setFlowControl, setIpAddress, setParity, setPort, setPortName, setSetDtr, setSetRts, setStopBits
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
protected LengthUnit units
protected int maxFeedRate
protected double backlashOffsetX
protected double backlashOffsetY
protected double nonSquarenessFactor
protected double backlashFeedRateFactor
protected int timeoutMilliseconds
protected int connectWaitTimeMilliseconds
protected boolean visualHomingEnabled
protected Location homingFiducialLocation
public java.util.ArrayList<GcodeDriver.Command> commands
protected java.util.List<GcodeDriver> subDrivers
protected java.util.List<GcodeDriver.Axis> axes
protected java.lang.String name
public javax.swing.Action addSubDriverAction
public javax.swing.Action deleteSubDriverAction
public void commit()
commit
in class AbstractReferenceDriver
public void createDefaults()
createDefaults
in interface ReferenceDriver
public void connect() throws java.lang.Exception
java.lang.Exception
public void setEnabled(boolean enabled) throws java.lang.Exception
ReferenceDriver
setEnabled
in interface ReferenceDriver
java.lang.Exception
public void dispense(ReferencePasteDispenser dispenser, Location startLocation, Location endLocation, long dispenseTimeMilliseconds) throws java.lang.Exception
dispense
in interface ReferenceDriver
dispense
in class AbstractReferenceDriver
java.lang.Exception
public void home(ReferenceHead head) throws java.lang.Exception
ReferenceDriver
home
in interface ReferenceDriver
java.lang.Exception
public GcodeDriver.Axis getAxis(HeadMountable hm, GcodeDriver.Axis.Type type)
public GcodeDriver.Command getCommand(HeadMountable hm, GcodeDriver.CommandType type, boolean checkDefaults)
public java.lang.String getCommand(HeadMountable hm, GcodeDriver.CommandType type)
public void setCommand(HeadMountable hm, GcodeDriver.CommandType type, java.lang.String text)
public Location getLocation(ReferenceHeadMountable hm)
ReferenceDriver
getLocation
in interface ReferenceDriver
public void moveTo(ReferenceHeadMountable hm, Location location, double speed) throws java.lang.Exception
ReferenceDriver
moveTo
in interface ReferenceDriver
java.lang.Exception
public void pick(ReferenceNozzle nozzle) throws java.lang.Exception
ReferenceDriver
pick
in interface ReferenceDriver
java.lang.Exception
public void place(ReferenceNozzle nozzle) throws java.lang.Exception
ReferenceDriver
place
in interface ReferenceDriver
java.lang.Exception
public void actuate(ReferenceActuator actuator, boolean on) throws java.lang.Exception
ReferenceDriver
actuate
in interface ReferenceDriver
java.lang.Exception
public void actuate(ReferenceActuator actuator, double value) throws java.lang.Exception
ReferenceDriver
actuate
in interface ReferenceDriver
java.lang.Exception
public java.lang.String actuatorRead(ReferenceActuator actuator) throws java.lang.Exception
ReferenceDriver
actuatorRead
in interface ReferenceDriver
java.lang.Exception
public void disconnect()
disconnect
in class AbstractReferenceDriver
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class AbstractReferenceDriver
java.io.IOException
protected java.util.List<java.lang.String> sendGcode(java.lang.String gCode) throws java.lang.Exception
java.lang.Exception
protected java.util.List<java.lang.String> sendGcode(java.lang.String gCode, long timeout) throws java.lang.Exception
java.lang.Exception
public java.util.List<java.lang.String> sendCommand(java.lang.String command) throws java.lang.Exception
java.lang.Exception
public java.util.List<java.lang.String> sendCommand(java.lang.String command, long timeout) throws java.lang.Exception
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
protected static java.lang.String substituteVariable(java.lang.String command, java.lang.String name, java.lang.Object value)
protected static boolean hasVariable(java.lang.String command, java.lang.String name)
public java.lang.String getPropertySheetHolderTitle()
getPropertySheetHolderTitle
in interface PropertySheetHolder
getPropertySheetHolderTitle
in class AbstractReferenceDriver
public PropertySheetHolder[] getChildPropertySheetHolders()
getChildPropertySheetHolders
in interface PropertySheetHolder
getChildPropertySheetHolders
in class AbstractReferenceDriver
public PropertySheetHolder.PropertySheet[] getPropertySheets()
getPropertySheets
in interface PropertySheetHolder
getPropertySheets
in class AbstractReferenceDriver
public javax.swing.Action[] getPropertySheetHolderActions()
getPropertySheetHolderActions
in interface PropertySheetHolder
getPropertySheetHolderActions
in class AbstractReferenceDriver
public LengthUnit getUnits()
public void setUnits(LengthUnit units)
public double getBacklashOffsetX()
public void setBacklashOffsetX(double BacklashOffsetX)
public double getBacklashOffsetY()
public void setBacklashOffsetY(double BacklashOffsetY)
public double getBacklashFeedRateFactor()
public void setBacklashFeedRateFactor(double BacklashFeedRateFactor)
public void setNonSquarenessFactor(double NonSquarenessFactor)
public double getNonSquarenessFactor()
public int getMaxFeedRate()
public void setMaxFeedRate(int maxFeedRate)
public int getTimeoutMilliseconds()
public void setTimeoutMilliseconds(int timeoutMilliseconds)
public int getConnectWaitTimeMilliseconds()
public void setConnectWaitTimeMilliseconds(int connectWaitTimeMilliseconds)
public boolean isVisualHomingEnabled()
public void setVisualHomingEnabled(boolean visualHomingEnabled)