public interface EPOSController extends PieceOfHardware, org.lsst.ccs.framework.HasLifecycle, org.lsst.ccs.framework.ClearAlertHandler
alertSeparator| Modifier and Type | Method and Description |
|---|---|
default org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode |
canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState) |
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 |
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 |
goToSwitchOnDisabled() |
default boolean |
isEnabled()
Read statusWord, update eposState and returns true if the controller is
in state OPERATION_ENABLE.
|
boolean |
isEnabledToPublish()
For GUI.
|
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) |
default 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.
|
default boolean |
isReadyToSwitchOn(int statusWord) |
default boolean |
isSwitchedOn(int statusWord) |
default 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.
|
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.
|
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 |
setEnabledToPublish(boolean enabledToPublish) |
void |
setEposState(EPOSEnumerations.EposState state) |
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.
|
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.
|
void |
writeTargetVelocity(int velocity)
set the target velocity.
|
checkBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getSerialNB, initializeAndCheckHardware, initializePDOs, isBooted, isInitialized, printState, publishData, raiseAlarmIfMissing, raiseWarningIfMissing, setBooted, updateDeviceInfo, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewboolean isEnabledToPublish()
void setEnabledToPublish(boolean enabledToPublish)
int 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=ACTION,
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)
default boolean isReadyToSwitchOn(int statusWord)
default boolean isSwitchedOn(int statusWord)
default boolean isSwitchOnDisabled(int statusWord)
default boolean isOperationEnabled(int statusWord)
@Command(type=ACTION,
level=1,
description="Read statusWord by PDO and update eposState.")
default void updateEposState()
@Command(type=ACTION,
level=1,
description="Update eposState from statusWord given as argument.")
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="Stop action and disableOperation.")
default void stopAction()
@Command(type=ACTION,
level=1,
description="QuickStop.")
default void quickStop()
FcsHardwareException@Command(type=ACTION,
level=1,
description="This methods enables the controller : i.e. this makes it able to receive commands.")
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=ACTION,
level=3,
description="Check if homing has been done otherwise throws an Exception.")
default void checkHomingDone()
default void definePositionFromNegativeLimitSwitch()
@Command(type=QUERY,
level=1,
description="In PROFILE_POSITION Mode this methods returns the actual position. index:0x6064 subindex:0")
default int readPosition()
SDORequestExceptionint getPosition()
int getCurrent()
int getVelocity()
@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="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.SDORequestException@Command(type=ACTION,
level=1,
description="In PROFILE_VELOCITY mode this methods set the target velocity.index:0x60FF subindex:0 size:4")
void writeTargetVelocity(int velocity)
velocity - default 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=ACTION,
level=1,
description="Stop motion when in mode PROFILE_POSITION. (writeControlWord(0x010F))")
default void stopPosition()
@Command(type=ACTION,
level=1,
description="Stop motion when in mode PROFILE_VELOCITY. (writeControlWord(0x0107)")
default void stopVelocity()
default org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
canClearAlert in interface org.lsst.ccs.framework.ClearAlertHandlerdefault StatusDataPublishedByEPOSController createStatusDataPublishedByEPOSController()
Copyright © 2021 LSST. All rights reserved.