public abstract class SimuEPOSControllerModule extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected EPOSEnumerations.EposMode |
mode |
protected int |
position |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
protected boolean |
turnedOff |
booted, bridge, initialized, nodeID, serialNB, tcpProxy| Constructor and Description |
|---|
SimuEPOSControllerModule(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 |
activateBrake() |
String |
changeMode(EPOSEnumerations.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.
|
void |
checkFault() |
void |
checkParameters(EPOSEnumerations.EposMode aMode) |
void |
checkParameters(String modeInString)
For every parameter to be defined for this mode this method compares the
values in configuration with the value stored in controller CPU and
throws a HardwareException if these values are not equal.
|
boolean |
checkTargetReached() |
void |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given
as an argument.
|
void |
disable() |
String |
displayErrorHistory() |
String |
enable() |
void |
faultReset() |
String[] |
getErrorHistory() |
String |
getErrorRegister() |
int |
getMaxCurrent() |
int |
getMaxPosition() |
int |
getMaxSpeed() |
int |
getMinCurrent() |
int |
getMinPosition() |
String |
getModeInString() |
Map<String,Integer> |
getParamsForCurrent() |
Map<String,Integer> |
getParamsForHoming() |
Map<String,Integer> |
getParamsForProfilePosition() |
StatusDataPublishedByEPOSController |
getStatusData() |
String |
initializeAndCheckHardware()
This methods is called during INITIALIZATION phase.
|
boolean |
isEnabled() |
boolean |
isEnabledToPublish() |
boolean |
isInError() |
boolean |
isParametersOK()
We assum that simulated hardware's controller has always correct parameters.
|
boolean |
isTargetPositionReached(int targetPosition) |
boolean |
isTurnedOff() |
String |
off() |
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStop() |
int |
readCurrent() |
EPOSEnumerations.EposMode |
readMode() |
int |
readNumberOfErrors()
Extract from the Maxon Motor firmware specification : Contains the number
of actual errors that are recorded in the array starting at subindex 1.
|
String |
readParameters(EPOSEnumerations.EposMode mode) |
int |
readPosition() |
int |
readProfileVelocity() |
int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
void |
releaseBrake() |
void |
setActualCurrent(int actualCurrent) |
void |
setPosition(int actualPosition) |
String |
shutdown() |
void |
switchOnEnableOperation() |
void |
writeControlWord(String f) |
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
String |
writeParameterInHexa(EPOSEnumerations.Parameter parameter,
String string) |
void |
writeParameters(EPOSEnumerations.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 |
writeTargetPosition(int position)
In PROFILE_POSITION mode this methods set the target position.
|
displayErrorRegister, getErrorHistoryNames, getNodeID, getSerialNB, initModule, isBooted, isInitialized, readErrorHistory, readErrorRegister, readSDO, saveParameters, setBooted, toString, writeSDOgetComponentTree, getEnvironment, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, postStart, processUpdate, sendSignal, sendSignalWithTimeLimit, setEnvironment, setName, setNObserverThreads, setObservables, setTickMillis, shutdownNow, signal, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getNodeID, getSerialNB, isBooted, isInitialized, setBootedchange, getCheckedValueFromConfiguration, getChildren, getComponentByName, getFullPath, getParent, getParentObject, injectResources, listChildren, notifyChange, notifyChangeWithoutPreliminaryChecks, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected boolean turnedOff
protected EPOSEnumerations.EposMode mode
protected int targetPosition
protected int position
protected int ssiPosition
protected int targetCurrent
protected int actualCurrent
@Command(type=ACTION,
level=1,
description="For simulator only : Update position with a position given as argument.")
public void setPosition(int actualPosition)
public void setActualCurrent(int actualCurrent)
public boolean isEnabledToPublish()
isEnabledToPublish in interface EPOSControllerpublic boolean isTurnedOff()
isTurnedOff in interface EPOSControllerpublic Map<String,Integer> getParamsForHoming()
getParamsForHoming in interface EPOSControllerpublic Map<String,Integer> getParamsForProfilePosition()
getParamsForProfilePosition in interface EPOSControllerpublic Map<String,Integer> getParamsForCurrent()
getParamsForCurrent in interface EPOSControllerpublic boolean isInError()
isInError in interface EPOSControllerpublic String getErrorRegister()
getErrorRegister in interface EPOSControllerpublic String[] getErrorHistory()
getErrorHistory in interface EPOSControllerpublic String getModeInString()
getModeInString in interface EPOSControllerpublic boolean isParametersOK()
isParametersOK in interface EPOSControllerpublic String initializeAndCheckHardware() throws FcsHardwareException
initializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDeviceFcsHardwareExceptionpublic String changeMode(String modeInString) throws SDORequestException
modeInString - SDORequestExceptionpublic String changeMode(EPOSEnumerations.EposMode newMode) throws SDORequestException
EPOSControllerchangeMode in interface EPOSControllerSDORequestExceptionpublic void defineAbsolutePosition(int position)
throws SDORequestException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
org.lsst.ccs.messaging.BadCommandException
EPOSControllerdefineAbsolutePosition in interface EPOSControllerSDORequestExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionorg.lsst.ccs.messaging.BadCommandExceptionpublic void disable()
throws SDORequestException,
ShortResponseToSDORequestException
disable in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void writeParameters(EPOSEnumerations.EposMode mode) throws SDORequestException, org.lsst.ccs.messaging.ErrorInCommandExecutionException
EPOSControllerwriteParameters in interface EPOSControllerSDORequestExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionpublic String writeParameterInHexa(EPOSEnumerations.Parameter parameter, String string) throws SDORequestException
writeParameterInHexa in interface EPOSControllerSDORequestExceptionpublic void writeTargetPosition(int position)
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
FcsHardwareException
EPOSControllerwriteTargetPosition in interface EPOSControllerposition - UNIT=mA / FORMAT=decimal the value of the current to be
sent.org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionFcsHardwareExceptionpublic void writeParameters(Map<String,Integer> paramMap) throws SDORequestException
EPOSControllerwriteParameters in interface EPOSControllerSDORequestExceptionpublic void writeCurrent(int aValue)
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
FcsHardwareException
EPOSControllerwriteCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be
sent.org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionEPOSConfigurationExceptionFcsHardwareExceptionpublic String off() throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
off in interface EPOSControllerorg.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic boolean isTargetPositionReached(int targetPosition)
isTargetPositionReached in interface EPOSControllerpublic int readPosition()
throws SDORequestException
readPosition in interface EPOSControllerSDORequestExceptionpublic int readSSIPosition()
throws SDORequestException,
ShortResponseToSDORequestException
readSSIPosition in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic String enable() throws SDORequestException
enable in interface EPOSControllerSDORequestExceptionpublic int readCurrent()
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException
readCurrent in interface EPOSControllerorg.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionpublic EPOSEnumerations.EposMode readMode() throws SDORequestException
readMode in interface EPOSControllerSDORequestExceptionpublic int getMaxCurrent()
getMaxCurrent in interface EPOSControllerpublic int getMinCurrent()
getMinCurrent in interface EPOSControllerpublic int getMaxSpeed()
getMaxSpeed in interface EPOSControllerpublic int getMaxPosition()
getMaxPosition in interface EPOSControllerpublic int getMinPosition()
getMinPosition in interface EPOSControllerpublic void quickStop()
throws SDORequestException
quickStop in interface EPOSControllerSDORequestExceptionpublic int readNumberOfErrors()
throws SDORequestException,
ShortResponseToSDORequestException
CanOpenDevicereadNumberOfErrors in interface EPOSControllerreadNumberOfErrors in class CanOpenDeviceSDORequestExceptionShortResponseToSDORequestExceptionpublic String displayErrorHistory() throws SDORequestException, ShortResponseToSDORequestException
displayErrorHistory in interface EPOSControllerdisplayErrorHistory in class CanOpenDeviceSDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="Check if the Controller is in fault.")
public void checkFault()
throws SDORequestException,
ShortResponseToSDORequestException,
FcsHardwareException
checkFault in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Clear faults on the controller.")
public void faultReset()
throws SDORequestException
SDORequestExceptionpublic int readProfileVelocity()
throws SDORequestException,
ShortResponseToSDORequestException
readProfileVelocity in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic String readParameters(EPOSEnumerations.EposMode mode) throws SDORequestException, ShortResponseToSDORequestException
readParameters in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void checkParameters(String modeInString) throws org.lsst.ccs.HardwareException, SDORequestException, ShortResponseToSDORequestException
EPOSControllercheckParameters in interface EPOSControllerorg.lsst.ccs.HardwareExceptionSDORequestExceptionShortResponseToSDORequestExceptionpublic void checkParameters(EPOSEnumerations.EposMode aMode) throws org.lsst.ccs.HardwareException, SDORequestException, ShortResponseToSDORequestException
checkParameters in interface EPOSControllerorg.lsst.ccs.HardwareExceptionSDORequestExceptionShortResponseToSDORequestExceptionpublic void writeControlWord(String f) throws SDORequestException
writeControlWord in interface EPOSControllerSDORequestExceptionpublic String shutdown() throws SDORequestException
shutdown in interface EPOSControllerSDORequestExceptionpublic boolean isEnabled()
throws SDORequestException
isEnabled in interface EPOSControllerSDORequestExceptionpublic boolean checkTargetReached()
throws SDORequestException,
ShortResponseToSDORequestException
checkTargetReached in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void releaseBrake()
throws SDORequestException,
ShortResponseToSDORequestException
releaseBrake in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void switchOnEnableOperation()
throws SDORequestException
switchOnEnableOperation in interface EPOSControllerSDORequestExceptionpublic void activateBrake()
throws SDORequestException,
ShortResponseToSDORequestException
activateBrake in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic StatusDataPublishedByEPOSController getStatusData()
@Command(type=QUERY,
level=1,
alias="refreshGUI",
description="Publish data for the controller on the status bus.")
public void publishData()
Copyright © 2016 LSST. All rights reserved.