public class NanotecPD4N
extends org.lsst.ccs.drivers.ascii.Ascii
| Modifier and Type | Class and Description |
|---|---|
static class |
NanotecPD4N.CmndGeneral
Hardware commands for setting or reading general parameters.
|
static class |
NanotecPD4N.CmndMotion
Hardware commands to set/read parameters of a motion (run) record.
|
static class |
NanotecPD4N.MotorErrors
Meaning of error bits (in error memory)
|
org.lsst.ccs.drivers.ascii.Ascii.DataBits, org.lsst.ccs.drivers.ascii.Ascii.FlowCtrl, org.lsst.ccs.drivers.ascii.Ascii.Option, org.lsst.ccs.drivers.ascii.Ascii.Parity, org.lsst.ccs.drivers.ascii.Ascii.StopBits, org.lsst.ccs.drivers.ascii.Ascii.Terminator| Constructor and Description |
|---|
NanotecPD4N()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getErrorFlag()
Read error flag (assumed assigned to digital output 1)
|
String |
getErrorType()
Read error type.
|
int |
getLimitSwitches()
Read limit switches (assigned to digital inputs 1 and 2)
|
boolean |
isMotorReady()
Check if motor is in a ready state (for a new move command)
|
boolean |
isPositionError()
Check if motor status shows a position error
|
void |
loadRecord(int record)
Load movement record from EEPROM
|
void |
open(org.lsst.ccs.drivers.commons.DriverConstants.ConnType connType,
String ident,
int baudRate,
int commParm)
Override underlying open method of Ascii class.
|
void |
open(String serialName)
Open serial connection, default data characteristics and baud rate
|
void |
open(String serialName,
int baudRate)
Open serial connection with selected baud rate
|
boolean |
readChecksumUsage()
Read whether checksum is in use
|
String |
readGeneral(NanotecPD4N.CmndGeneral cmnd)
Read general datum from motor controller
|
String |
readMotion(NanotecPD4N.CmndMotion cmnd)
Read motion-record datum from motor controller
|
int |
readStatus()
Read status.
|
double |
readTemperature()
Read controller-temperature ADC and decode to degrees C
|
void |
resetError()
Reset error flag (and position-error flag)
Only the default (no-parameter) version is implemented here:
if error is in position-following, the motor's position value
is set to that of the encoder.
|
void |
saveRecord(int record)
Save current movement record to EEPROM
|
void |
setLimitSwitchBehavior(boolean value)
Set limit-switch behavior.
|
void |
startMotor()
Start motor (move according to parameters in current record)
|
void |
stopMotor(int ramp)
Stop motor (if currently moving)
|
void |
writeGeneral(NanotecPD4N.CmndGeneral cmnd,
int value)
Write general datum to motor controller
|
void |
writeMotion(NanotecPD4N.CmndMotion cmnd,
int value)
Write motion-record datum to motor controller
|
close, closeSilent, flush, getTimeout, isOpen, makeDataCharacteristics, open, open, openFtdi, openFtdi, openFtdi, openNet, openNet, openSerial, openSerial, openSerial, read, read, readBytes, readBytes, setCommandTerm, setDefaultParm, setMultidrop, setOptions, setResponseTerm, setTerminator, setTimeout, setTimeout, write, writeBytes, writeBytespublic void open(org.lsst.ccs.drivers.commons.DriverConstants.ConnType connType,
String ident,
int baudRate,
int commParm)
throws org.lsst.ccs.drivers.commons.DriverException
open in class org.lsst.ccs.drivers.ascii.AsciiconnType - The enumerated connection type: FTDI or SERIALident - The USB ID (FTDI) or port name (SERIAL)baudRate - The baud rate, or 0 for the default (115200)commParm - The communications parameters (ignored, 0 used)org.lsst.ccs.drivers.commons.DriverExceptionpublic void open(String serialName) throws org.lsst.ccs.drivers.commons.DriverException
serialName - Serial device nameorg.lsst.ccs.drivers.commons.DriverExceptionpublic void open(String serialName, int baudRate) throws org.lsst.ccs.drivers.commons.DriverException
serialName - Serial device namebaudRate - Baud rateorg.lsst.ccs.drivers.commons.DriverExceptionpublic void writeGeneral(NanotecPD4N.CmndGeneral cmnd, int value) throws org.lsst.ccs.drivers.commons.DriverException
cmnd - enumerated command identifierndata - integer data to writeorg.lsst.ccs.drivers.commons.DriverExceptionpublic void writeMotion(NanotecPD4N.CmndMotion cmnd, int value) throws org.lsst.ccs.drivers.commons.DriverException
cmnd - enumerated command identifierndata - integer data to writeorg.lsst.ccs.drivers.commons.DriverExceptionpublic String readGeneral(NanotecPD4N.CmndGeneral cmnd) throws org.lsst.ccs.drivers.commons.DriverException
cmnd - enumerated command identifierorg.lsst.ccs.drivers.commons.DriverExceptionpublic String readMotion(NanotecPD4N.CmndMotion cmnd) throws org.lsst.ccs.drivers.commons.DriverException
cmnd - enumerated command identifierorg.lsst.ccs.drivers.commons.DriverExceptionpublic int readStatus()
throws org.lsst.ccs.drivers.commons.DriverException
Drier - Exceptionorg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isMotorReady()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean isPositionError()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getLimitSwitches()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean getErrorFlag()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String getErrorType() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void resetError()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic double readTemperature()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setLimitSwitchBehavior(boolean value)
throws org.lsst.ccs.drivers.commons.DriverException
boolean - org.lsst.ccs.drivers.commons.DriverExceptionpublic void startMotor()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void stopMotor(int ramp)
throws org.lsst.ccs.drivers.commons.DriverException
int - ramp <0|1> for org.lsst.ccs.drivers.commons.DriverExceptionpublic void loadRecord(int record)
throws org.lsst.ccs.drivers.commons.DriverException
int - record record number (1 to 32)org.lsst.ccs.drivers.commons.DriverExceptionpublic void saveRecord(int record)
throws org.lsst.ccs.drivers.commons.DriverException
int - record record number (1 to 32)org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean readChecksumUsage()
Copyright © 2019 LSST. All rights reserved.