public class CanOpenEPOS extends CanOpenDevice implements Actuator, EPOSController
| Modifier and Type | Class and Description |
|---|---|
static class |
CanOpenEPOS.EposMode
Here are all the modes that can be configurated for an EPOS controller.
|
static class |
CanOpenEPOS.Parameter
Here are the parameters that we can set in an Epos controller.
|
| Modifier and Type | Field and Description |
|---|---|
int |
currentValue
The value of current that has to be sent to the motor to make it move.
|
protected boolean |
enabling |
protected CanOpenEPOS.EposMode |
mode |
boolean |
on |
int |
readValue |
int |
sentValue |
int |
targetPosition
position we want to reach
UNIT= mA given in decimal mode
|
| Constructor and Description |
|---|
CanOpenEPOS(String aName,
int aTickMillis,
String nodeID,
String serialNB,
Map<String,Integer> paramsForCurrent,
Map<String,Integer> paramsForProfilePosition,
Map<String,Integer> paramsForHoming,
CanOpenEPOS.EposMode aMode,
int currentValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateCurrentMode() |
void |
activateHomingMode() |
void |
activateProfilePositionMode() |
String |
changeMode(CanOpenEPOS.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
String |
changeMode(String modeInString)
Changes the mode to the new mode given as a String argument.
|
boolean |
checkMotorParameters()
This methods read the parameters of the motor stored in the actuator
(hardware configuration)and compare with the configuration stored in the
Configuration Data Base (software configuration).
|
void |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given as an argument.
|
static String |
displayListParameters()
Displays the list of parameters.
|
static String |
displayListParameters(String modeInString)
Displays the list of parameters that we have to define for a given mode.
|
String |
displayMotorParameters()
Read the values of the motor parameters and displays them for the end user.
|
String |
enable()
This methods enable the actuator : i.e.
|
void |
faultReset() |
int |
getMotor_continuousCurrentLimit()
Deprecated.
|
int |
getMotor_maxSpeedInCurrentMode()
Deprecated.
|
int |
getMotor_outputCurrentLimit()
Deprecated.
|
int |
getMotor_polePairNumber()
Deprecated.
|
int |
getMotor_thermalTimeConstantWinding()
Deprecated.
|
int |
getMotor_type()
Deprecated.
|
int |
getMotorParameterValue(String parameterName) |
int |
getReadValue() |
int |
getSentCurrentMaxValue() |
int |
getSentCurrentMinValue() |
int |
getSentValue() |
String |
initializeHardware()
This methods has to be overridden if there is some initialization to do for the device.
|
void |
initModule() |
boolean |
isEnable() |
boolean |
isOff() |
boolean |
isOn() |
boolean |
isTargetPositionReached(int position) |
static void |
main(String[] args) |
String |
off() |
String |
offOld()
This method set to zero the current value and stops the motor motion.
|
String |
on() |
String |
onOld()
This methods enables the actuator and puts the motor on in sending the appropriate current value
to the actuator.
|
String |
printParameters(Map<String,Integer> paramMap) |
String |
printParameters(String modeInString)
Print the configured parameters for this EPOS for a mode name given in argument.
|
void |
quickStop() |
String |
readControlWord()
Read the control world (index=6040, subindex=0,size=2)
|
int |
readCurrent()
In Current Mode this methods returns the current actualy received by the motor.
|
String |
readMode()
Reads the EPOS mode in the CPU of the EPOS device, updates the field mode and returns
the mode as a String.
|
int |
readMotorData(String subindex)
Deprecated.
|
int |
readMotorType()
Deprecated.
|
int |
readParameter(CanOpenEPOS.Parameter param)
Reads in the EPOS CPU the value of the Parameter.
|
int |
readParameter(String parameterName)
Reads in the EPOS CPU the value of the Parameter which parameter name is given as argument.
|
String |
readParameters() |
String |
readParameters(String modeInString)
This methods reads in the CPU of the EPOS the values of the parameters for a given mode.
|
int |
readPosition() |
int |
readPositionActualValue()
To make end user's life more easy : reads in the CPU the value of the parameter PositionActualValue
and returns it in a decimal format.
|
int |
readPositionSensorType()
Deprecated.
|
String |
readStatusWord()
Read the status world (index=6041, subindex=0,size=2)
|
int |
readVelocity() |
Object |
restoreParameters() |
Object |
saveParameters()
This method save the parameters in the actuator memory.
|
String |
setHomePosition(int position)
Set the Home Position with the value given as argument in decimal format.
|
String |
setHomingMethodActual()
Writes value 35 in hexa to set the Homing method as Actual (See EPOS documentation)
|
void |
setVelocity() |
String |
shutdown() |
void |
startHoming()
Starts homing : (See EPOS documentation)
For engineering mode.
|
void |
stopCurrent()
In current mode this methods set to zero the value of the current sent to
the motor.
|
void |
stopVelocity()
Stop the motion in the mode VELOCITY.
|
void |
switchOnEnableOperation() |
void |
updateReadValue()
Reads the current value or the velocity value stored in the EPOS and updates the readValue field.
|
void |
writeControlWord(String value)
Write a value in hexa in the control world (index=6040, subindex=0,size=2)
|
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
void |
writeMaxSpeed(int value)
Deprecated.
|
protected void |
writeMotorData(String subindex,
String sizeInHexa,
int value)
Deprecated.
|
void |
writeMotorType(int value)
This command set the motor type on the actuator.
|
String |
writeParameter(CanOpenEPOS.Parameter param,
int value) |
String |
writeParameter(String parameterName,
int value)
This method writes a parameter in the CPU of the EPOS.
|
void |
writeParameters(CanOpenEPOS.EposMode mode)
This methods writes in the CPU of the EPOS devis the values of the parameters set for the mode.
|
void |
writeParameters(Map<String,Integer> paramMap)
Write to the CPU of the EPOS a map of parameters.
|
void |
writeParameters(String modeInString) |
void |
writePositionSensorType(int value)
Deprecated.
|
void |
writeTargetPosition(int aValue)
In PROFILE_POSITION mode this methods set the target position.
|
displayErrorHistory, displayErrorRegister, getNodeID, getSerialNB, isInitalized, isNodeIdBootedAndOK, readErrorHistory, readErrorRegister, readNumberOfErrors, readSDO, toString, writeSDOalias, change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getComponentByName, getComponentDictionariesTree, getComponentTree, getContext, getDictionary, getEnvironment, getMainDictionary, getModule, getName, getNObserverThreads, getObservables, getParent, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, percolateSignal, processUpdate, publish, publish, publish, publish, publish, publish, publishData, publishData, publishData, publishData, publishData, publishData, publishData, register, sendSignal, sendSignal, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, signal, start, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamepublic boolean on
public int readValue
public int sentValue
public int currentValue
public int targetPosition
protected CanOpenEPOS.EposMode mode
protected volatile boolean enabling
public int getReadValue()
getReadValue in interface Actuatorpublic int getSentValue()
getSentValue in interface Actuatorpublic int getSentCurrentMinValue()
getSentCurrentMinValue in interface Actuatorpublic int getSentCurrentMaxValue()
getSentCurrentMaxValue in interface Actuatorpublic int getMotorParameterValue(String parameterName) throws EPOSConfigurationException
EPOSConfigurationExceptionpublic String printParameters(String modeInString)
modeInString - @Deprecated public int getMotor_continuousCurrentLimit() throws SDORequestException
SDORequestException@Deprecated public int getMotor_maxSpeedInCurrentMode() throws SDORequestException
SDORequestException@Deprecated public int getMotor_outputCurrentLimit() throws SDORequestException
SDORequestException@Deprecated public int getMotor_polePairNumber() throws SDORequestException
SDORequestException@Deprecated public int getMotor_thermalTimeConstantWinding() throws SDORequestException
SDORequestException@Deprecated public int getMotor_type() throws SDORequestException
SDORequestExceptionpublic String readMode() throws SDORequestException
SDORequestException@Command(type=ACTION,
level=3,
description="Change EPOS mode .")
public String changeMode(String modeInString)
throws SDORequestException
modeInString - SDORequestExceptionpublic String changeMode(CanOpenEPOS.EposMode newMode) throws SDORequestException
changeMode in interface EPOSControllernewMode - SDORequestExceptionpublic static String displayListParameters(String modeInString)
modeInString - public static String displayListParameters()
public String readParameters(String modeInString) throws SDORequestException
modeInString - SDORequestExceptionpublic String readParameters() throws SDORequestException
SDORequestExceptionpublic void writeParameters(String modeInString) throws SDORequestException, org.lsst.ccs.bus.ErrorInCommandExecutionException
SDORequestExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic void writeParameters(CanOpenEPOS.EposMode mode) throws SDORequestException, org.lsst.ccs.bus.ErrorInCommandExecutionException
writeParameters in interface EPOSControllermode - SDORequestExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic void writeParameters(Map<String,Integer> paramMap) throws SDORequestException
writeParameters in interface EPOSControllerparamMap - SDORequestException@Command(type=ACTION,
level=3,
description="Set EPOS parameter with the value given as argument.")
public String writeParameter(String parameterName,
int value)
throws SDORequestException
parameterName - the name of the parametervalue - in decimalSDORequestExceptionpublic String writeParameter(CanOpenEPOS.Parameter param, int value) throws SDORequestException
SDORequestExceptionpublic int readParameter(String parameterName) throws SDORequestException
parameterName - SDORequestExceptionpublic int readParameter(CanOpenEPOS.Parameter param) throws SDORequestException
param - SDORequestExceptionpublic boolean isTargetPositionReached(int position)
throws SDORequestException
isTargetPositionReached in interface EPOSControllerSDORequestExceptionpublic void updateReadValue()
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic void initModule()
initModule in class CanOpenDevicepublic String initializeHardware() throws Exception
CanOpenDeviceinitializeHardware in interface PieceOfHardwareinitializeHardware in class CanOpenDeviceExceptionpublic boolean isEnable()
throws SDORequestException
SDORequestExceptionpublic void faultReset()
throws SDORequestException
SDORequestExceptionpublic String enable() throws SDORequestException
enable in interface EPOSControllerSDORequestExceptionpublic String shutdown() throws SDORequestException
SDORequestExceptionpublic void switchOnEnableOperation()
throws SDORequestException
SDORequestExceptionpublic Object saveParameters() throws SDORequestException
SDORequestExceptionpublic Object restoreParameters() throws SDORequestException
SDORequestExceptionpublic void writeControlWord(String value) throws SDORequestException
value - in hexaSDORequestExceptionpublic String readControlWord() throws SDORequestException
SDORequestExceptionpublic String readStatusWord() throws SDORequestException
SDORequestExceptionpublic void quickStop()
throws SDORequestException
SDORequestExceptionpublic String onOld() throws org.lsst.ccs.bus.BadCommandException, EPOSConfigurationException, org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandExceptionEPOSConfigurationExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic String on() throws SDORequestException, org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException
on in interface ActuatorSDORequestExceptionorg.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic String offOld() throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic String off() throws org.lsst.ccs.bus.BadCommandException, SDORequestException
off in interface Actuatororg.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic void writeMotorType(int value)
throws SDORequestException
SDORequestException@Deprecated public int readMotorType() throws SDORequestException
SDORequestException@Deprecated public int readPositionSensorType() throws SDORequestException
SDORequestException@Deprecated public void writePositionSensorType(int value) throws SDORequestException
SDORequestException@Deprecated public void writeMaxSpeed(int value) throws SDORequestException
SDORequestException@Deprecated protected void writeMotorData(String subindex, String sizeInHexa, int value) throws SDORequestException
subindex - sizeInHexa - size of the parameter in Can Openvalue - FORMAT=int the value of the parameter in decimal formatSDORequestException@Deprecated public int readMotorData(String subindex) throws SDORequestException
subindex - SDORequestExceptionpublic boolean checkMotorParameters()
throws EPOSConfigurationException,
SDORequestException
checkMotorParameters in interface EPOSControllerEPOSConfigurationExceptionSDORequestExceptionpublic String displayMotorParameters() throws SDORequestException
SDORequestException@Command(type=ACTION,
level=3,
description="Set the current value in the EPOS CPU.")
public void writeCurrent(int aValue)
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
writeCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be sent.org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic int readCurrent()
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic void stopCurrent()
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic void setVelocity()
throws org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandExceptionpublic int readVelocity()
throws org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandExceptionpublic void stopVelocity()
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic int readPositionActualValue()
throws SDORequestException
SDORequestExceptionpublic String setHomingMethodActual() throws SDORequestException, org.lsst.ccs.bus.BadCommandException
SDORequestExceptionorg.lsst.ccs.bus.BadCommandException - if the EPOS is not enable.public void startHoming()
throws SDORequestException,
org.lsst.ccs.bus.BadCommandException,
org.lsst.ccs.bus.ErrorInCommandExecutionException
SDORequestExceptionorg.lsst.ccs.bus.BadCommandException - if the EPOSorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic String setHomePosition(int position) throws SDORequestException, org.lsst.ccs.bus.BadCommandException
position - in decimal formatSDORequestExceptionorg.lsst.ccs.bus.BadCommandException@Command(type=ACTION,
level=3,
description="Define the actual position as position given as argument.")
public void defineAbsolutePosition(int position)
throws SDORequestException,
org.lsst.ccs.bus.ErrorInCommandExecutionException,
org.lsst.ccs.bus.BadCommandException
defineAbsolutePosition in interface EPOSControllerSDORequestExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionorg.lsst.ccs.bus.BadCommandExceptionpublic void writeTargetPosition(int aValue)
throws org.lsst.ccs.bus.BadCommandException,
SDORequestException
writeTargetPosition in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be sent.org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionpublic int readPosition()
throws SDORequestException
readPosition in interface EPOSControllerSDORequestExceptionpublic void activateCurrentMode()
throws SDORequestException
SDORequestExceptionpublic void activateHomingMode()
throws SDORequestException
SDORequestExceptionpublic void activateProfilePositionMode()
throws SDORequestException
SDORequestExceptionpublic static void main(String[] args)
args - the command line argumentsCopyright © 2014 LSST. All Rights Reserved.