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 |
readActualPosition
position we want to reach
UNIT= mA given in decimal mode
|
int |
readCurrentValue
The value of current that has to be sent to the motor to make it move.
|
int |
sentCurrentValue |
int |
targetPosition
position we want to reach
UNIT= mA given in decimal mode
|
fcslog| Constructor and Description |
|---|
CanOpenEPOS(String aName,
int aTickMillis,
String nodeID,
String serialNB,
Map<String,Integer> paramsForCurrent,
Map<String,Integer> paramsForProfilePosition,
Map<String,Integer> paramsForHoming) |
| 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).
|
static int |
convertToInteger16(int unsigned16)
Change an int represented by an UNSIGNED16 to an INTEGER16.
|
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 |
getMotorParameterValue(String parameterName) |
Map<String,Integer> |
getParamsForCurrent() |
Map<String,Integer> |
getParamsForHoming() |
Map<String,Integer> |
getParamsForProfilePosition() |
int |
getReadCurrentValue() |
int |
getSentCurrentMaxValue() |
int |
getSentCurrentMinValue() |
int |
getSentCurrentValue() |
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()
Deprecated.
|
String |
on() |
String |
onOld()
Deprecated.
|
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 |
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 |
readSSIPosition() |
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 |
setOn(boolean on) |
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()
Deprecated.
|
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.
|
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 |
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, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getComponentByName, getComponentDictionariesTree, getComponentTree, getContext, getDictionary, getEnvironment, getMainDictionary, getModule, getName, getNObserverThreads, getObservables, getParent, getSubsystem, getTickMillis, init, injectResources, 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 sentCurrentValue
public int currentValue
public int readCurrentValue
public int targetPosition
public int readActualPosition
protected CanOpenEPOS.EposMode mode
protected volatile boolean enabling
public void setOn(boolean on)
setOn in interface EPOSControllerpublic int getReadCurrentValue()
getReadCurrentValue in interface Actuatorpublic int getSentCurrentValue()
getSentCurrentValue 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 - public String readMode() throws SDORequestException, ShortResponseToSDORequestException
readMode in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@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, ShortResponseToSDORequestException
modeInString - SDORequestExceptionShortResponseToSDORequestExceptionpublic String readParameters() throws SDORequestException, ShortResponseToSDORequestException
public 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, ShortResponseToSDORequestException
parameterName - SDORequestExceptionShortResponseToSDORequestExceptionpublic int readParameter(CanOpenEPOS.Parameter param) throws SDORequestException, ShortResponseToSDORequestException
param - SDORequestExceptionShortResponseToSDORequestExceptionpublic boolean isTargetPositionReached(int position)
throws SDORequestException,
ShortResponseToSDORequestException
isTargetPositionReached in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Deprecated public void updateReadValue() throws org.lsst.ccs.bus.BadCommandException, SDORequestException, ShortResponseToSDORequestException
org.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionShortResponseToSDORequestExceptionpublic 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, ShortResponseToSDORequestException
SDORequestExceptionShortResponseToSDORequestExceptionpublic String readStatusWord() throws SDORequestException, ShortResponseToSDORequestException
SDORequestExceptionShortResponseToSDORequestExceptionpublic void quickStop()
throws SDORequestException
SDORequestException@Deprecated public 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.ErrorInCommandExecutionException@Deprecated public 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 boolean checkMotorParameters()
throws EPOSConfigurationException,
SDORequestException,
ShortResponseToSDORequestException
checkMotorParameters in interface EPOSControllerEPOSConfigurationExceptionSDORequestExceptionShortResponseToSDORequestExceptionpublic String displayMotorParameters() throws SDORequestException, ShortResponseToSDORequestException
SDORequestExceptionShortResponseToSDORequestException@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,
ShortResponseToSDORequestException
readCurrent in interface EPOSControllerorg.lsst.ccs.bus.BadCommandExceptionSDORequestExceptionShortResponseToSDORequestExceptionpublic 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,
ShortResponseToSDORequestException
SDORequestExceptionShortResponseToSDORequestExceptionpublic int readSSIPosition()
throws SDORequestException,
ShortResponseToSDORequestException
public 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,
ShortResponseToSDORequestException
readPosition in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void activateCurrentMode()
throws SDORequestException
SDORequestExceptionpublic void activateHomingMode()
throws SDORequestException
SDORequestExceptionpublic void activateProfilePositionMode()
throws SDORequestException
SDORequestExceptionpublic static int convertToInteger16(int unsigned16)
unsigned16 - public static void main(String[] args)
args - the command line argumentsCopyright © 2014 LSST. All rights reserved.