public class CanOpenEPOS extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected int |
averageCurrent |
protected int |
current |
protected EPOSEnumerations.EposState |
eposState |
protected int |
followingError |
protected boolean |
hasEncoder
This value corresponds to whether the controller has an encoder or not.
|
protected EPOSEnumerations.EposMode |
mode |
protected boolean |
parametersOK
used in checkParameters and initializeAndCheckHardware methods
|
protected int |
position |
protected long |
profileAcceleration |
protected long |
profileDeceleration |
protected long |
profileVelocity |
protected boolean |
simuEnabled
Used to publish on the status bus for the GUI*
|
protected int |
statusWord |
protected int |
velocity |
booted, dataProviderDictionaryService, errorHistory, errorRegister, inError, initialized, lastErrorCode, lastErrorName, name, nodeID, path, serialNB, subs, tcpProxyalertSeparator| Constructor and Description |
|---|
CanOpenEPOS() |
| Modifier and Type | Method and Description |
|---|---|
void |
build() |
void |
changeEPOSParameter(String key,
int value)
Changes an EPOS parameter for this controller.
|
void |
changeMode(EPOSEnumerations.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
void |
checkFault()
Check if the Controller is in fault.
|
void |
checkParameters(EPOSEnumerations.EposMode aMode)
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
FcsHardwareException if these values are not equal.
|
void |
checkParameters(Map<String,Integer> paramsMap)
Compare values of parameters in the map with the values of parameters in the
controller CPU.
|
void |
faultReset()
Clear faults on the controller and clear alarm that was raised for this
controller.
|
int |
getAverageCurrent() |
int |
getCurrent() |
EPOSEnumerations.EposState |
getEposState() |
int |
getFollowingError() |
EPOSEnumerations.EposMode |
getMode()
Return Epos mode for GUI.
|
int |
getPosition() |
long |
getProfileAcceleration() |
long |
getProfileDeceleration() |
long |
getProfileVelocity() |
int |
getStatusWord() |
int |
getVelocity() |
void |
init() |
void |
initializeAndCheckHardware()
Check if the parameters in the cPU of the controller have the right values.
|
boolean |
isInError()
For the GUI
|
boolean |
isParametersOK()
This methods returns true if the values of parameters stored in CPU are the
same than those stored in the configuration system.
|
String |
printControlWord()
Read the control word (index=6040, subindex=0,size=2)
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
publishDataDuringMotion()
publish data during motion for trending data base.
|
short |
readControlWord()
read controlWord on controller CPU.
|
int |
readCurrent()
In Current Mode this methods returns the current actually received by the
motor.
|
int |
readCurrentAverageValue()
In Current Mode this methods returns the average of the current received by
the motor.
|
int |
readFollowingError()
return Following Error Actual Value
|
EPOSEnumerations.EposMode |
readMode()
Reads the EPOS mode in the CPU of the EPOS device, updates the field mode and
returns the mode as a String.
|
long |
readParameter(EPOSEnumerations.Parameter param)
Reads in the EPOS CPU the value of the Parameter.
|
int |
readStatusWord()
Read the status word (index=6041, subindex=0,size=2)
|
int |
readVelocity()
return motor velocity read on controller CPU Unit = RPM
|
void |
restoreParameters()
Restore default parameters.
|
void |
setCurrent(int current) |
void |
setEposState(EPOSEnumerations.EposState state) |
void |
setPosition(int position) |
void |
setProfileAcceleration(long acceleration) |
void |
setProfileDeceleration(long deceleration) |
void |
setProfileVelocity(long velocity) |
void |
setVelocity(int velocity) |
void |
updateStatusWord() |
void |
writeControlWord(int value)
Write a value in the control word (index=6040, subindex=0,size=2)
|
void |
writeCurrent(int aValue)
In unsCurrent mode this methods send a unsCurrent to the motor.
|
void |
writeParameter(EPOSEnumerations.Parameter param,
int value)
This method writes a parameter in the CPU of the EPOS.
|
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 |
writeTargetPosition(int aValue)
In PROFILE_POSITION mode this methods set the target position.
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayError, displayErrorHistory, displayErrorRegister, doInitializePDOs, getAlertService, getErrorHistory, getErrorHistoryNB, getErrorRegister, getLastErrorCode, getLastErrorName, getName, getNodeID, getPath, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInitialized, onEmergencyMessage, printSerialNumber, readDeviceType, readErrorRegister, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, toString, updateDeviceInfo, updateErrorHistory, updateFromPDO, writeSDO, writeTransmissionTypeToDeviceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchangeProfileAcceleration, changeProfileDeceleration, changeProfileVelocity, checkEposMode, checkHomingDone, checkState, checkTargetReached, convertEPOSValue, createStatusDataPublishedByEPOSController, createStatusDataPublishedDuringMotionNoEncoder, createStatusDataPublishedDuringMotionWithEncoder, defineAbsolutePosition, defineHomingCurrentThresholdNegativeSpeed, definePositionFromNegativeLimitSwitch, disableOperation, disableVoltage, displayErrorHistory, enable, enableAndWriteAbsolutePosition, enableAndWriteCurrent, enableAndWriteRelativePosition, getErrorHistoryNB, getErrorRegister, getLastErrorCode, getLastErrorName, goToOperationEnable, goToSwitchOnDisabled, isEnabled, isFault, isInMode, isInState, isOperationEnabled, isQuickstop, isReadyToSwitchOn, isSwitchedOn, isSwitchOnDisabled, isTargetReached, printStatusWordInBinary, quickStop, readControllerStructure, readHomingMethod, readParameter, readParameters, readParameters, readParameters, readPosition, readPositionSensorType, readProfileAcceleration, readProfileDeceleration, readProfileVelocity, readSSIPosition, shutdownController, stopAction, stopPosition, stopVelocity, switchOnEnableOperation, updateDataDuringMotionFromSDO, updateEposState, updateEposState, updatePositionFromSDO, writeParameters, writeParameterscheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getPath, getSerialNB, initializePDOs, isBooted, isInitialized, printState, raiseAlarmIfMissing, raiseWarningIfMissing, readDeviceType, setBooted, updateDeviceInfo, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewprotected boolean parametersOK
protected EPOSEnumerations.EposMode mode
protected int statusWord
protected EPOSEnumerations.EposState eposState
protected int current
protected int averageCurrent
protected int position
protected int followingError
protected int velocity
protected long profileVelocity
protected long profileAcceleration
protected long profileDeceleration
protected boolean hasEncoder
protected boolean simuEnabled
public boolean isInError()
CanOpenDeviceisInError in interface EPOSControllerisInError in class CanOpenDevicepublic void build()
build in interface org.lsst.ccs.framework.HasLifecyclebuild in class CanOpenDevicepublic void init()
init in interface org.lsst.ccs.framework.HasLifecycleinit in class CanOpenDevicepublic int getStatusWord()
getStatusWord in interface EPOSControllerpublic void setEposState(EPOSEnumerations.EposState state)
setEposState in interface EPOSController@Command(type=QUERY, level=1, description="display EPOS state") public EPOSEnumerations.EposState getEposState()
getEposState in interface EPOSControllerpublic int getCurrent()
getCurrent in interface EPOSControllerpublic int getAverageCurrent()
getAverageCurrent in interface EPOSControllerpublic int getPosition()
getPosition in interface EPOSControllerpublic int getFollowingError()
getFollowingError in interface EPOSControllerpublic int getVelocity()
getVelocity in interface EPOSControllerpublic long getProfileAcceleration()
getProfileAcceleration in interface EPOSControllerpublic long getProfileDeceleration()
getProfileDeceleration in interface EPOSControllerpublic long getProfileVelocity()
getProfileVelocity in interface EPOSControllerpublic void setCurrent(int current)
setCurrent in interface EPOSControllerpublic void setPosition(int position)
setPosition in interface EPOSControllerpublic void setVelocity(int velocity)
setVelocity in interface EPOSControllerpublic void setProfileVelocity(long velocity)
setProfileVelocity in interface EPOSControllerpublic void setProfileAcceleration(long acceleration)
setProfileAcceleration in interface EPOSControllerpublic void setProfileDeceleration(long deceleration)
setProfileDeceleration in interface EPOSControllerpublic boolean isParametersOK()
EPOSControllerisParametersOK in interface EPOSControllerpublic EPOSEnumerations.EposMode getMode()
getMode in interface EPOSController@Command(type=QUERY, level=1, description="Reads the EPOS mode in the CPU of the EPOS device and updates the field mode.") public EPOSEnumerations.EposMode readMode()
readMode in interface EPOSControllerSDORequestException@Command(type=ACTION, level=1, description="Changes EPOS mode in the CPU of the EPOS device and updates the field mode.") public void changeMode(EPOSEnumerations.EposMode newMode)
changeMode in interface EPOSControllernewMode - SDORequestException@Command(type=QUERY, level=1, description="Changes an EPOS parameter for this controller. Writes the new value on the CPU of the controller.Changes the new value in the configuration. But doesn\'t save the new parameter in the CPU. To save in CPU controller, use command saveParameters. To save the new value in the configuration, use command saveChangesForCategory controller.") public void changeEPOSParameter(String key, int value)
key - value - @Command(type=ACTION, level=3, description="This methods writes in the CPU of the EPOS device the values of the parameters set for the mode given as argument") public void writeParameters(EPOSEnumerations.EposMode mode)
writeParameters in interface EPOSControllermode - SDORequestException@Command(type=ACTION, level=3, description="Set EPOS parameter with the value given as argument.") public void writeParameter(EPOSEnumerations.Parameter param, int value)
writeParameter in interface EPOSControllerparam - value - in decimalSDORequestExceptionpublic long readParameter(EPOSEnumerations.Parameter param)
readParameter in interface EPOSControllerparam - FcsHardwareException@Command(type=QUERY, level=1, description="Read controller\'s parameter in the CPU for each mode and warn if a parameter has not the same value as in the configuration.Then publish data.") public void initializeAndCheckHardware()
initializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDeviceFcsHardwareException@Command(type=ACTION, level=3, description="Restore default parameters. AT YOUR OWN RISK.") public void restoreParameters()
SDORequestException@Command(type=ACTION, level=1, description="Write a value in the control word. index:6040 subindex:0 size:2") public void writeControlWord(int value)
writeControlWord in interface EPOSControllervalue - SDORequestException@Command(type=QUERY, level=1, description="Read control word and print it in hexadecimal format. index:6040 subindex:0 size:2") public String printControlWord()
SDORequestException@Command(type=QUERY, level=1, description="Read control word in controller CPU. index:6040 subindex:0 size:2") public short readControlWord()
readControlWord in interface EPOSController@Command(type=QUERY, level=1, description="Read status word. index:6041 subindex:0 size:2") public int readStatusWord()
readStatusWord in interface EPOSControllerSDORequestException@Command(type=QUERY, level=1, description="Update field statusWord in reading a SDO (readStatusWord)") public void updateStatusWord()
updateStatusWord in interface EPOSController@Command(type=ACTION, level=3, description="Sent current to controller the EPOS CPU. UNIT in mA / FORMAT in decimal") public void writeCurrent(int aValue)
writeCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the unsCurrent to be
sent.FcsHardwareException@Command(type=QUERY, level=1, alias="readCurrentActualValue", description="In Current Mode this methods returns the current actualy received by the motor. index:0x6078 subindex:0") public int readCurrent()
readCurrent in interface EPOSControllerSDORequestException@Command(type=QUERY, level=1, alias="readCurrentAverage", description="In Current Mode this methods returns the average of the current received by the motor. index:0x2027 subindex:0") public int readCurrentAverageValue()
readCurrentAverageValue in interface EPOSControllerSDORequestException@Command(type=QUERY, level=1, description="return motor velocity read on controller CPU. Units: rpm. index:0x2028 subindex:0") public int readVelocity()
readVelocity in interface EPOSController@Command(type=QUERY, level=1, description="return Following Error Actual Value read on controller CPU. index:0x20F4 subindex:0") public int readFollowingError()
readFollowingError in interface EPOSController@Command(type=ACTION, level=1, description="In PROFILE_POSITION mode this methods set the target position. Target position has to be given in microns. index:0x607A subindex:0 size:4") public void writeTargetPosition(int aValue)
writeTargetPosition in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the unsCurrent to be
sent.RejectedCommandExceptionSDORequestException@Command(type=QUERY, level=1, description="Check if the Controller is in fault.") public void checkFault()
checkFault in interface EPOSControllerFcsHardwareException@Command(type=QUERY, level=1, description="Clear faults on the controller and clear the Alert.", alias="resetFault") public void faultReset()
faultReset in interface EPOSController@Command(type=QUERY, level=1, description="For every parameter to be defined for this mode this method compares the values in configuration with the value stored in controller CPUand throws a FcsHardwareException if these values are not equal.") public void checkParameters(EPOSEnumerations.EposMode aMode)
checkParameters in interface EPOSControllerSDORequestExceptionpublic void checkParameters(Map<String,Integer> paramsMap)
paramsMap - SDORequestException@Command(type=QUERY, level=0, description="Publish data for the controller on the status bus.") public void publishData()
publishData in interface PieceOfHardwarepublishData in class CanOpenDevicepublic void publishDataDuringMotion()
EPOSControllerpublishDataDuringMotion in interface EPOSControllerCopyright © 2023 LSST. All rights reserved.