
public interface EPOSController extends PieceOfHardware, org.lsst.ccs.framework.HasLifecycle
alertSeparator| Modifier and Type | Method and Description |
|---|---|
void |
changeMode(EPOSEnumerations.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
default void |
changeProfileVelocity(int newVelocity)
change ProfileVelocity to a new value.
|
default void |
checkEposMode(EPOSEnumerations.EposMode aMode) |
void |
checkFault()
Check if the controller is in fault.
|
default void |
checkHomingDone() |
void |
checkParameters(EPOSEnumerations.EposMode aMode)
Check parameters for a given EPOS mode : compare the values stored in the
Configuration System and the values stored in controller CPU.
|
default void |
checkState(EPOSEnumerations.EposState state) |
default void |
checkTargetReached(long timeout)
check if target is reached in HOMING or PROFILE_POSITION commands and throws
an Exception if not.
|
static long |
convertEPOSValue(EPOSEnumerations.Parameter param,
long value,
String myName)
values transmitted by EPOSController can be : UNSIGNED32, UNSIGNED16,
UNSIGNED8 for UNSIGNED parameter INTEGER32, INTEGER16, INTEGER8 for SIGNED
parameter This method convert a value sent by device to the value to be used
in fcs.
|
default StatusDataPublishedByEPOSController |
createStatusDataPublishedByEPOSController()
Creates an object to be published on the STATUS bus by an EPOSController.
|
default void |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given as
an argument.
|
default void |
defineHomingCurrentThresholdNegativeSpeed(int currentThreshold)
Homing for loader clamp : this command opens clamps until a dead end.
|
default void |
definePositionFromNegativeLimitSwitch() |
default void |
disableOperation()
Disable operation.
|
default void |
disableVoltage()
cf doc EPOS2_Firmware_Specification § 3.2 Device Control lower byte of
control word: 0xxx xx0x
|
String |
displayErrorHistory()
Return a printed list of errors that occured on this controller.
|
default void |
enable()
This methods enables the controller : i.e.
|
default void |
enableAndWriteAbsolutePosition(int pos)
Enable controller and go to absolute position.
|
default void |
enableAndWriteCurrent(int aValue)
Enable, set mode CURRENT and write current.
|
default void |
enableAndWriteRelativePosition(int pos)
Enable controller and go to relative position.
|
void |
faultReset() |
int |
getCurrent() |
EPOSEnumerations.EposState |
getEposState() |
int |
getErrorHistoryNB()
Return the number of errors that occured on this controller.
|
String |
getErrorRegister() |
int |
getLastErrorCode() |
String |
getLastErrorName() |
EPOSEnumerations.EposMode |
getMode()
Return the EPOS mode stored in field mode.
|
int |
getPosition() |
int |
getStatusWord() |
int |
getVelocity() |
default void |
goToOperationEnable() |
default void |
goToSwitchOnDisabled() |
default boolean |
isEnabled()
Read statusWord, update eposState and returns true if the controller is in
state OPERATION_ENABLE.
|
static boolean |
isFault(int statusWord) |
boolean |
isInError()
Return true if controller is in fault.
|
default boolean |
isInMode(EPOSEnumerations.EposMode aMode)
return true if this controller is in the mode given as argument.
|
default boolean |
isInState(EPOSEnumerations.EposState state) |
static boolean |
isOperationEnabled(int statusWord) |
boolean |
isParametersOK()
This methods returns true if the values of parameters stored in CPU are the
same than those stored in the configuration system.
|
static boolean |
isQuickstop(int statusWord)
QUICKSTOP is state where bits 5 and 6 are == 0
|
static boolean |
isReadyToSwitchOn(int statusWord) |
static boolean |
isSwitchedOn(int statusWord) |
static boolean |
isSwitchOnDisabled(int statusWord) |
default boolean |
isTargetReached()
In HOMING mode and PROFILE_POSITION mode this indicates that the position is
reached.
|
default String |
printStatusWordInBinary()
print status word bit by bit for end user and tests
|
default void |
quickStop()
Send a quickStop command to the controller.
|
default int |
readControllerStructure() |
short |
readControlWord() |
int |
readCurrent()
Read actual current on the controller CPU.
|
int |
readCurrentAverageValue()
Read Average current on controller CPU.
|
int |
readFollowingError()
read Following Error on controller CPU.
|
default byte |
readHomingMethod() |
EPOSEnumerations.EposMode |
readMode()
read the EPOS mode on the controller CPU.
|
long |
readParameter(EPOSEnumerations.Parameter parameter)
Reads in the EPOS CPU the value of the Parameter.
|
default long |
readParameter(String parameterName)
Reads in the EPOS CPU the value of the Parameter which parameter name is
given as argument.
|
default String |
readParameters()
Read the parameters for the actual mode.
|
default String |
readParameters(EPOSEnumerations.EposMode aMode)
Read all the value of parameters for a given EPOS mode and return a printed
list of this values.
|
default String |
readParameters(String modeInString)
This methods reads in the CPU of the EPOS the values of the parameters for a
given mode.
|
default int |
readPosition()
Reads in the CPU the value of the parameter PositionActualValue and returns
it in a decimal format.
|
default int |
readPositionSensorType()
Read parameter PositionSensorType in CPU of controller and return read value.
|
default long |
readProfileVelocity()
In PROFILE_POSITION returns the value of the parameter ProfileVelocity.
|
default int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
int |
readStatusWord()
Read StatusWord on controller CPU.
|
int |
readVelocity()
read velocity on the controller CPU.
|
void |
setCurrent(int cur) |
void |
setEposState(EPOSEnumerations.EposState state) |
void |
setPosition(int pos) |
void |
setVelocity(int vel) |
default void |
shutdownController()
shutdowns controller cf doc EPOS2_Firmware_Specification § 3.2 Device Control
lower byte of control word: 0xxx x110.
|
default void |
stopAction()
Stop action and shutdownController(shutdown) controller.
|
default void |
stopPosition()
Stop motion when in mode PROFILE_POSITION.
|
default void |
stopVelocity()
Stop motion when in mode PROFILE_VELOCITY.
|
default void |
switchOnEnableOperation()
Switch on and enable controller.
|
default void |
updateEposState()
read statusWord by PDO, then compute and set eposState from statusWord.
|
default void |
updateEposState(int statusWord)
Compute and set eposState from statusWord given as argument.
|
default void |
updatePositionFromSDO() |
void |
updateStatusWord() |
void |
writeControlWord(int w)
Write controlWord to the controller.
|
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
void |
writeParameter(EPOSEnumerations.Parameter parameter,
int val)
Write on the CPU of the controller a value given in hexadecimal format for a
parameter.
|
default void |
writeParameters()
Write in the CPU of the EPOS device the values of the parameters set for the
mode in configuration system.
|
void |
writeParameters(EPOSEnumerations.EposMode mode)
This methods writes in the CPU of the EPOS devis the values of the parameters
set for the mode.
|
default void |
writeParameters(Map<String,Integer> paramMap)
Write to the CPU of the EPOS a map of parameters.
|
void |
writeTargetPosition(int aValue)
In PROFILE_POSITION mode this methods set the target position.
|
checkBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getSerialNB, initializeAndCheckHardware, initializePDOs, isBooted, isInitialized, printState, publishData, raiseAlarmIfMissing, raiseWarningIfMissing, readDeviceType, setBooted, updateDeviceInfo, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewint getStatusWord()
int readStatusWord()
void updateStatusWord()
short readControlWord()
void setEposState(EPOSEnumerations.EposState state)
EPOSEnumerations.EposState getEposState()
void writeControlWord(int w)
w - FcsHardwareException@Command(type=QUERY, level=1, description="print status word in binary.") default String printStatusWordInBinary()
@Command(type=QUERY, level=1, description="Shutdown the controller - writeControlWord[6] and check that controller is in state READY_TO_SWITCH_ON.") default void shutdownController()
@Command(type=QUERY, level=1, description="Returns true if controller state is state given as argument.") default boolean isInState(EPOSEnumerations.EposState state)
static boolean isReadyToSwitchOn(int statusWord)
static boolean isSwitchedOn(int statusWord)
static boolean isSwitchOnDisabled(int statusWord)
static boolean isOperationEnabled(int statusWord)
static boolean isFault(int statusWord)
static boolean isQuickstop(int statusWord)
statusWord - @Command(type=QUERY, level=1, description="Read statusWord by SDO and update eposState.") default void updateEposState()
default void updatePositionFromSDO()
default void updateEposState(int statusWord)
statusWord - @Command(type=QUERY, level=1, description="Check controller state until a timeout of 500ms. If controller never goes in state given as argument, throw an Exception.") default void checkState(EPOSEnumerations.EposState state)
@Command(type=ACTION, level=1, description="Disable voltage - writeControlWord[0] - and check that controller state is SWITCH_ON_DISABLED. This command does not activate holding brake. cf doc EPOS2_Firmware_Specification \u00a7 3.2 Device Control") default void disableVoltage()
@Command(type=ACTION, level=1, description="Got to state SWITH_ON_DISABLED.cf doc EPOS2_Firmware_Specification \u00a7 3.2 Device Control") default void goToSwitchOnDisabled()
@Command(type=ACTION, level=1, description="Disable operation - writeControlWord[7] - and check that controller state is SWITCHED_ON. This command activates holding brake. cf doc EPOS2_Firmware_Specification \u00a7 3.2 Device Control") default void disableOperation()
@Command(type=ACTION, level=1, description="Switch on and enable controller - writeControlWord[0xF] - and check that controller state is in state OPERATION_ENABLE within 500ms.") default void switchOnEnableOperation()
@Command(type=ACTION, level=1, description="Got to state OPERATION_ENABLE.cf doc EPOS2_Firmware_Specification \u00a7 3.2 Device Control") default void goToOperationEnable()
@Command(type=QUERY, level=1, description="Stop action and goToSwitchOnDisabled controller.") default void stopAction()
@Command(type=QUERY, level=1, description="QuickStop.") default void quickStop()
FcsHardwareException@Command(type=ACTION, level=1, description="This command enables the controller : i.e. this makes it able to receive commands.it does shutdownController, then switchOnEnableOperation.") default void enable()
@Command(type=QUERY, level=1, description="Returns true if the controller is enabled (statusWord & 0x6F) == 0x27).") default boolean isEnabled()
void changeMode(EPOSEnumerations.EposMode newMode)
newMode - SDORequestExceptionEPOSEnumerations.EposMode readMode()
FcsHardwareExceptionEPOSEnumerations.EposMode getMode()
default boolean isInMode(EPOSEnumerations.EposMode aMode)
aMode - default void checkEposMode(EPOSEnumerations.EposMode aMode)
int readCurrent()
SDORequestExceptionFcsHardwareExceptionint readCurrentAverageValue()
int readVelocity()
int readFollowingError()
@Command(type=ACTION, level=1, description="In current mode this methods send a current to the motor. index:0x2030 subindex:0 size:2") void writeCurrent(int aValue) throws EPOSConfigurationException
aValue - UNIT=mA / FORMAT=decimal the value of the current to be sent.EPOSConfigurationExceptionSDORequestException@Command(type=ACTION, level=3, description="Enables controller and sets the current value in the EPOS CPU.") default void enableAndWriteCurrent(int aValue)
aValue - @Command(type=ACTION, level=3, description="Define the actual position as position given as argument.") default void defineAbsolutePosition(int position)
position - SDORequestExceptionRejectedCommandException@Command(type=QUERY, level=3, description="Check if homing has been done otherwise throws an Exception.") default void checkHomingDone()
default void definePositionFromNegativeLimitSwitch()
default void defineHomingCurrentThresholdNegativeSpeed(int currentThreshold)
currentThreshold - current to send to controller to do the homing@Command(type=QUERY, level=1, description="In PROFILE_POSITION Mode this methods returns the actual position. index:0x6064 subindex:0") default int readPosition()
SDORequestException@Command(type=QUERY, level=1, description="read HomingMethod parameter") default byte readHomingMethod()
int getCurrent()
int getPosition()
int getVelocity()
void setCurrent(int cur)
void setPosition(int pos)
void setVelocity(int vel)
@Command(type=QUERY, level=1, description="Read the position returned by the absolute encoder (single serial data) index:0x2211 subindex:3") default int readSSIPosition()
SDORequestException@Command(type=QUERY, level=1, description="Read the controller structure : dual loop or not. Should be 0 or 1index:0x2220 subindex:0") default int readControllerStructure()
@Command(type=QUERY, level=1, description="In PROFILE_POSITION returns the value of the parameter ProfileVelocity. index:0x6081 subindex:0") default long readProfileVelocity()
SDORequestException@Command(type=QUERY, level=1, description="Read PositionSensorType. index:0x2210 subindex:2") default int readPositionSensorType()
@Command(type=ACTION, level=1, description="In PROFILE_POSITION mode this methods set the target position.index:0x607A subindex:0 size:4") void writeTargetPosition(int aValue)
aValue - UNIT=mA / FORMAT=decimal the value of the current to be sent.SDORequestExceptiondefault void changeProfileVelocity(int newVelocity)
newVelocity - boolean isParametersOK()
long readParameter(EPOSEnumerations.Parameter parameter)
parameter - void writeParameter(EPOSEnumerations.Parameter parameter, int val)
parameter - val - the value.FcsHardwareExceptionvoid checkParameters(EPOSEnumerations.EposMode aMode)
aMode - FcsHardwareExceptionvoid writeParameters(EPOSEnumerations.EposMode mode)
mode - SDORequestException@Command(type=ACTION, level=3, description="Write in the CPU of the EPOS device the values of the parameters set for the mode.") default void writeParameters()
@Command(type=QUERY, level=1, description="Reads in the EPOS CPU the decimal value of the Parameter which parameter name is given as argument.") default long readParameter(String parameterName)
parameterName - name of the parameter to readSDORequestException@Command(type=QUERY, level=1, description="Read the parameters for the actual mode.") default String readParameters()
@Command(type=QUERY, level=1, description="This methods reads in the CPU of the EPOS the values of the parameters for a given mode.") default String readParameters(String modeInString)
modeInString - SDORequestExceptiondefault String readParameters(EPOSEnumerations.EposMode aMode)
aMode - FcsHardwareExceptiondefault void writeParameters(Map<String,Integer> paramMap)
paramMap - SDORequestExceptionstatic long convertEPOSValue(EPOSEnumerations.Parameter param, long value, String myName)
param - value - myName - boolean isInError()
String getErrorRegister()
int getLastErrorCode()
String getLastErrorName()
int getErrorHistoryNB()
SDORequestExceptionFcsHardwareExceptionString displayErrorHistory()
SDORequestExceptionFcsHardwareExceptionvoid checkFault()
void faultReset()
@Command(type=QUERY, level=1, description="In HOMING mode and PROFILE_POSITION mode this indicates that the position is reached. ((readStatusWord() >> 10) & 1) == 1)") default boolean isTargetReached()
SDORequestExceptiondefault void checkTargetReached(long timeout)
timeout - @Command(type=ACTION, level=3, description="Enable controller and go to absolute position. Doesn\'t check condition. DANGER !!!! ") default void enableAndWriteAbsolutePosition(int pos)
pos - @Command(type=ACTION, level=3, description="Enable controller and go to relative position. Doesn\'t check condition. DANGER !!!! ") default void enableAndWriteRelativePosition(int pos)
pos - @Command(type=QUERY, level=1, description="Stop motion when in mode PROFILE_POSITION. (writeControlWord(0x010F))") default void stopPosition()
@Command(type=QUERY, level=1, description="Stop motion when in mode PROFILE_VELOCITY. (writeControlWord(0x0107)") default void stopVelocity()
default StatusDataPublishedByEPOSController createStatusDataPublishedByEPOSController()
Copyright © 2022 LSST. All rights reserved.