public class Aerotech extends Object
This class is immutable. Thread safety depends on the safety of the Ascii driver.
Aerotech.CommandFailureException| Modifier and Type | Class and Description |
|---|---|
static class |
Aerotech.CommandFailureException
Gets thrown when a command is received by the controller but fails for some reason such as
invalid command parameters, syntax error, execution fault, etc.
|
static class |
Aerotech.ErrorHandling
How the driver is supposed to handle command failure errors.
|
static class |
Aerotech.PositioningMode
The possible positioning modes
|
static class |
Aerotech.RampMode
How non-homing motion commands should ramp up to and down from the target speed of motion.
|
static class |
Aerotech.Reply
Information on the command issued and the reply from the controller.
|
static class |
Aerotech.Status
The result of examining the controller's reply to a command.
|
static class |
Aerotech.Target
Specifies an axis and a target coordinate on that axis.
|
static class |
Aerotech.WaitMode
The possible settings of the command wait mode for non-homing motion commands.
|
| Constructor and Description |
|---|
Aerotech(org.lsst.ccs.drivers.ascii.Ascii driver,
Aerotech.ErrorHandling errorMode)
Saves the Ascii driver instance and the error handling mode.
|
| Modifier and Type | Method and Description |
|---|---|
Aerotech.Reply |
abortAxes(String... axisNames)
Aborts motion on a set of axes using
ABORT axisName1 axisName2.... |
Aerotech.Reply |
clearAllFaults()
Attempts to clear all axis faults and task errors using
ACKNOWLEDGEALL. |
Aerotech.Reply |
clearAxisFaults(String... axisNames)
Attempts to clear existing faults on axes using
FAULTACK axisName. |
void |
close()
Attempts to close the driver.
|
Aerotech.Reply |
disableAxes(String... axisNames)
Disables a set of axes using
DISABLE axisName1 axisName2.... |
Aerotech.Reply |
enableAxes(String... axisNames)
Enables a set of axes using
ENABLE axisName1 axisName2.... |
Aerotech.Reply |
homeAxes(String... axisNames)
Homes a set of axes using
HOME axisName1 axisName2.... |
boolean |
isOpen()
Is the underlying ASCII driver open?
|
Aerotech.Reply |
moveLinear(double targetSpeed,
Aerotech.Target... targets)
Executes a linear coordinated move using {@code LINEAR axis1 pos1 axis2 pos2 ...
|
Aerotech.Reply |
readAnalogInput(String axisName,
int channel)
Reads an analog input channel using
AIN(axisName,channel). |
Aerotech.Reply |
readAxisFaults(String axisName)
Reads the fault bits of an axis using
AXISFAULT(axisName). |
Aerotech.Reply |
readAxisStatus(String axisName)
Reads the status bits of an axis using
AXISSTATUS(axisName). |
Aerotech.Reply |
readCalibratedPosition(String axisName)
Reads the calibrated position of an axis using
PFBKCAL(axisName). |
Aerotech.Reply |
readDglobal(int index)
Reads the value of a DGLOBAL array element using
DGLOBAL(index). |
Aerotech.Reply |
readDigitalInput(String axisName,
int port,
int bit)
Reads a digital input port using
DIN(axisName,port,bit). |
Aerotech.Reply |
readIglobal(int index)
Reads the value of an IGLOBAL array element using
IGLOBAL(index). |
Aerotech.Reply |
readPlaneStatus(int planeNum)
Reads the status bits of a plane using
PLANESTATUS(planeNum). |
Aerotech.Reply |
readProgramPosition(String axisName)
Reads the "program" position of an axis using
PFBKPROG(axisName). |
Aerotech.Reply |
readRawPosition(String axisName)
Reads the raw position of an axis using .
|
Aerotech.Reply |
readTaskState(int taskNum)
Reads the state of a task slot using
TASKSTATE(taskNum). |
Aerotech.Reply |
sendCommand(String cmd)
Sends a command to the controller, receives and examines its reply.
|
String |
sendCommandRaw(String cmd)
Sends a command to the device and returns the response string with no post-processing.
|
Aerotech.Reply |
setPlane(int planeNum)
Sets the plane that will be used for subsequent coordinated motion.
|
Aerotech.Reply |
setPositioningMode(Aerotech.PositioningMode mode)
Sets the positioning mode for coordinated moves using either
INC or ABS. |
Aerotech.Reply |
setRampDist(double dist)
Sets the distance for
DIST mode ramping using RAMP DIST dist. |
Aerotech.Reply |
setRampMode(Aerotech.RampMode mode)
Sets the ramp (acceleration) mode for non-homing motion commands using
RAMP MODE mode. |
Aerotech.Reply |
setRampRate(double accel)
Sets the acceleration for
RATE mode ramping using RAMP RATE accel. |
Aerotech.Reply |
setRampTime(double time)
Sets the time for
TIME mode ramping using RAMP TIME accel. |
void |
setReplyTimeout(int millis)
Sets the timeout for replies from the controller.
|
Aerotech.Reply |
setWaitMode(Aerotech.WaitMode mode)
Sets the waiting mode for motion commands,
except
homeAxes(java.lang.String...), using WAIT MODE mode. |
Aerotech.Reply |
startProgram(int taskNum,
String progName)
Starts an AeroBasic program in a given task slot using
PROGRAM RUN taskNum,"progName". |
Aerotech.Reply |
stopProgram(int taskNum)
Stops the AeroBasic program running in a given task slot using
PROGRAM STOP taskNum. |
Aerotech.Reply |
writeDglobal(int index,
double value)
Writes the value of a DGLOBAL array element using
DGLOBAL(index)=value. |
Aerotech.Reply |
writeDigitalOutput(String axisName,
int port,
int bit,
boolean state)
Sets the state of a digital output channel using
DOUT axisName,port,bit:state. |
Aerotech.Reply |
writeIglobal(int index,
int value)
Writes the value of an IGLOBAL array element using
IGLOBAL(index)=value. |
public Aerotech(org.lsst.ccs.drivers.ascii.Ascii driver,
Aerotech.ErrorHandling errorMode)
driver - The Ascii driver instance.errorMode - How to handle Aerotech command failures.public void close()
public boolean isOpen()
public String sendCommandRaw(String cmd) throws org.lsst.ccs.drivers.commons.DriverException
cmd - The command to send.org.lsst.ccs.drivers.commons.DriverExceptionpublic void setReplyTimeout(int millis)
throws org.lsst.ccs.drivers.commons.DriverException
millis - The timeout in milliseconds.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply sendCommand(String cmd) throws org.lsst.ccs.drivers.commons.DriverException
cmd - The command to send.org.lsst.ccs.drivers.commons.DriverException - something went wrong with command execution.public Aerotech.Reply readAnalogInput(String axisName, int channel) throws org.lsst.ccs.drivers.commons.DriverException
AIN(axisName,channel).axisName - The name of the axis which owns the channel.channel - The index of the channel.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readDigitalInput(String axisName, int port, int bit) throws org.lsst.ccs.drivers.commons.DriverException
DIN(axisName,port,bit).axisName - The name of the axis which owns the channel.port - The port index.bit - The bit index.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply writeDigitalOutput(String axisName, int port, int bit, boolean state) throws org.lsst.ccs.drivers.commons.DriverException
DOUT axisName,port,bit:state.axisName - The name of the axis owning the channel.port - The port index.bit - The bit number.state - The desired state; true for 1 and false for 0.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readCalibratedPosition(String axisName) throws org.lsst.ccs.drivers.commons.DriverException
PFBKCAL(axisName).axisName - The name of the axis.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readProgramPosition(String axisName) throws org.lsst.ccs.drivers.commons.DriverException
PFBKPROG(axisName).axisName - The name of the axis.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readRawPosition(String axisName) throws org.lsst.ccs.drivers.commons.DriverException
axisName - The name of the axis.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readAxisStatus(String axisName) throws org.lsst.ccs.drivers.commons.DriverException
AXISSTATUS(axisName).axisName - The name of the axis.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readAxisFaults(String axisName) throws org.lsst.ccs.drivers.commons.DriverException
AXISFAULT(axisName).axisName - The name of the axis.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply writeDglobal(int index, double value) throws org.lsst.ccs.drivers.commons.DriverException
DGLOBAL(index)=value.index - The element index.value - The new value.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readDglobal(int index) throws org.lsst.ccs.drivers.commons.DriverException
DGLOBAL(index).index - The element index.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply writeIglobal(int index, int value) throws org.lsst.ccs.drivers.commons.DriverException
IGLOBAL(index)=value.index - The element index.value - The new value.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readIglobal(int index) throws org.lsst.ccs.drivers.commons.DriverException
IGLOBAL(index).index - The element index.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply startProgram(int taskNum, String progName) throws org.lsst.ccs.drivers.commons.DriverException
PROGRAM RUN taskNum,"progName".taskNum - The task slot number.progName - The name of the compiled program file in the controller filesystem, e.g., foo.bcx.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply stopProgram(int taskNum) throws org.lsst.ccs.drivers.commons.DriverException
PROGRAM STOP taskNum.taskNum - The task slot number.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readTaskState(int taskNum) throws org.lsst.ccs.drivers.commons.DriverException
TASKSTATE(taskNum). The state
is a small integer: 0=inactive, 1=idle, 2=ready, 3=running, 4=paused, 5=complete, 6=task error,
10-running a task plugin.taskNum - The task number.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply clearAxisFaults(String... axisNames) throws org.lsst.ccs.drivers.commons.DriverException
FAULTACK axisName.axisNames - The array of axis names.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply homeAxes(String... axisNames) throws org.lsst.ccs.drivers.commons.DriverException
HOME axisName1 axisName2....axisNames - The array of axis names.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply enableAxes(String... axisNames) throws org.lsst.ccs.drivers.commons.DriverException
ENABLE axisName1 axisName2....axisNames - The array of axis names.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply disableAxes(String... axisNames) throws org.lsst.ccs.drivers.commons.DriverException
DISABLE axisName1 axisName2....axisNames - The array of axis names.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply abortAxes(String... axisNames) throws org.lsst.ccs.drivers.commons.DriverException
ABORT axisName1 axisName2....axisNames - The array of axis names.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply clearAllFaults() throws org.lsst.ccs.drivers.commons.DriverException
ACKNOWLEDGEALL.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply readPlaneStatus(int planeNum) throws org.lsst.ccs.drivers.commons.DriverException
PLANESTATUS(planeNum).planeNum - The plane number.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setPlane(int planeNum) throws org.lsst.ccs.drivers.commons.DriverException
planeNum - The plane number.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setWaitMode(Aerotech.WaitMode mode) throws org.lsst.ccs.drivers.commons.DriverException
homeAxes(java.lang.String...), using WAIT MODE mode.mode - The desired mode.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setRampMode(Aerotech.RampMode mode) throws org.lsst.ccs.drivers.commons.DriverException
RAMP MODE mode.mode - The desired mode.org.lsst.ccs.drivers.commons.DriverExceptionsetRampRate(double),
setRampDist(double),
setRampTime(double)public Aerotech.Reply setRampRate(double accel) throws org.lsst.ccs.drivers.commons.DriverException
RATE mode ramping using RAMP RATE accel.accel - The desired acceleration.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setRampDist(double dist) throws org.lsst.ccs.drivers.commons.DriverException
DIST mode ramping using RAMP DIST dist.dist - The distance over which to accelerate to the target speed.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setRampTime(double time) throws org.lsst.ccs.drivers.commons.DriverException
TIME mode ramping using RAMP TIME accel.time - The time in seconds to take to accelerate to the target speed.org.lsst.ccs.drivers.commons.DriverExceptionpublic Aerotech.Reply setPositioningMode(Aerotech.PositioningMode mode) throws org.lsst.ccs.drivers.commons.DriverException
INC or ABS.mode - The desired mode.org.lsst.ccs.drivers.commons.DriverException#moveLinear(double, org.lsst.ccs.subsystem.motorplatform.bot.Aerotech.Target...)public Aerotech.Reply moveLinear(double targetSpeed, Aerotech.Target... targets) throws org.lsst.ccs.drivers.commons.DriverException
LINEAR axis1 pos1 axis2 pos2 ... F speed.targetSpeed - The speed to which to ramp up.targets - The target positions for each axis.org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2021 LSST. All rights reserved.