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, tcppropertyChangeSupport| 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, setStopBitsaddPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListenerprotected 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 AbstractReferenceDriverpublic void createDefaults()
createDefaults in interface ReferenceDriverpublic void connect()
throws java.lang.Exception
java.lang.Exceptionpublic void setEnabled(boolean enabled)
throws java.lang.Exception
ReferenceDriversetEnabled in interface ReferenceDriverjava.lang.Exceptionpublic void dispense(ReferencePasteDispenser dispenser, Location startLocation, Location endLocation, long dispenseTimeMilliseconds) throws java.lang.Exception
dispense in interface ReferenceDriverdispense in class AbstractReferenceDriverjava.lang.Exceptionpublic void home(ReferenceHead head) throws java.lang.Exception
ReferenceDriverhome in interface ReferenceDriverjava.lang.Exceptionpublic 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)
ReferenceDrivergetLocation in interface ReferenceDriverpublic void moveTo(ReferenceHeadMountable hm, Location location, double speed) throws java.lang.Exception
ReferenceDrivermoveTo in interface ReferenceDriverjava.lang.Exceptionpublic void pick(ReferenceNozzle nozzle) throws java.lang.Exception
ReferenceDriverpick in interface ReferenceDriverjava.lang.Exceptionpublic void place(ReferenceNozzle nozzle) throws java.lang.Exception
ReferenceDriverplace in interface ReferenceDriverjava.lang.Exceptionpublic void actuate(ReferenceActuator actuator, boolean on) throws java.lang.Exception
ReferenceDriveractuate in interface ReferenceDriverjava.lang.Exceptionpublic void actuate(ReferenceActuator actuator, double value) throws java.lang.Exception
ReferenceDriveractuate in interface ReferenceDriverjava.lang.Exceptionpublic java.lang.String actuatorRead(ReferenceActuator actuator) throws java.lang.Exception
ReferenceDriveractuatorRead in interface ReferenceDriverjava.lang.Exceptionpublic void disconnect()
disconnect in class AbstractReferenceDriverpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AbstractReferenceDriverjava.io.IOExceptionprotected java.util.List<java.lang.String> sendGcode(java.lang.String gCode)
throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<java.lang.String> sendGcode(java.lang.String gCode,
long timeout)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List<java.lang.String> sendCommand(java.lang.String command)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List<java.lang.String> sendCommand(java.lang.String command,
long timeout)
throws java.lang.Exception
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnableprotected 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 PropertySheetHoldergetPropertySheetHolderTitle in class AbstractReferenceDriverpublic PropertySheetHolder[] getChildPropertySheetHolders()
getChildPropertySheetHolders in interface PropertySheetHoldergetChildPropertySheetHolders in class AbstractReferenceDriverpublic PropertySheetHolder.PropertySheet[] getPropertySheets()
getPropertySheets in interface PropertySheetHoldergetPropertySheets in class AbstractReferenceDriverpublic javax.swing.Action[] getPropertySheetHolderActions()
getPropertySheetHolderActions in interface PropertySheetHoldergetPropertySheetHolderActions in class AbstractReferenceDriverpublic 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)