
public class CanOpenEPOS extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected int |
current |
protected boolean |
enabledToPublish
Used to publish on the status bus for the GUI*
|
protected EPOSEnumerations.EposState |
eposState |
protected int |
followingError |
protected EPOSEnumerations.EposMode |
mode |
protected boolean |
parametersOK
used in checkParameters and initializeAndCheckHardware methods
|
protected int |
position |
protected int |
statusWord |
protected int |
velocity |
booted, dataProviderDictionaryService, errorHistory, errorRegister, inError, initialized, lastErrorCode, lastErrorName, name, nodeID, serialNB, subs, tcpProxyalertSeparator| Constructor and Description |
|---|
CanOpenEPOS(int nodeID,
String serialNB)
Construction of a 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 |
changeProfileVelocity(int newVelocity)
change ProfileVelocity to a new value.
|
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 |
getCurrent() |
EPOSEnumerations.EposState |
getEposState() |
int |
getFollowingError() |
EPOSEnumerations.EposMode |
getMode()
Return Epos mode for GUI.
|
int |
getPosition() |
int |
getStatusWord() |
int |
getVelocity() |
void |
initializeAndCheckHardware()
Check if the parameters in the cPU of the controller have the right values.
|
boolean |
isEnabledToPublish()
For GUI.
|
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.
|
short |
readControlWord()
read controlWord on controller CPU.
|
int |
readCurrent()
In Current Mode this methods returns the current actualy 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 |
setEnabledToPublish(boolean enabledToPublish) |
void |
setEposState(EPOSEnumerations.EposState state) |
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.
|
void |
writeTargetVelocity(int velocity)
set target velocity in mode PROFILE_VELOCITY
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayError, displayErrorHistory, displayErrorRegister, doInitializePDOs, getAlertService, getErrorHistory, getErrorHistoryNB, getErrorRegister, getLastErrorCode, getLastErrorName, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInitialized, onEmergencyMessage, printSerialNumber, readErrorRegister, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, toString, updateDeviceInfo, updateErrorHistory, updateFromPDO, writeSDO, writeTransmissionTypeToDeviceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanClearAlert, checkEposMode, checkHomingDone, checkState, checkTargetReached, convertEPOSValue, createStatusDataPublishedByEPOSController, defineAbsolutePosition, definePositionFromNegativeLimitSwitch, disableOperation, disableVoltage, displayErrorHistory, enable, enableAndWriteAbsolutePosition, enableAndWriteCurrent, enableAndWriteRelativePosition, getErrorHistoryNB, getErrorRegister, getLastErrorCode, getLastErrorName, goToSwitchOnDisabled, isEnabled, isInMode, isInState, isOperationEnabled, isReadyToSwitchOn, isSwitchedOn, isSwitchOnDisabled, isTargetReached, printStatusWordInBinary, quickStop, readParameter, readParameters, readParameters, readParameters, readPosition, readPositionSensorType, readProfileVelocity, readSSIPosition, shutdownController, stopAction, stopPosition, stopVelocity, switchOnEnableOperation, updateEposState, updateEposState, writeParameters, writeParameterscheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getSerialNB, initializePDOs, isBooted, isInitialized, printState, raiseAlarmIfMissing, raiseWarningIfMissing, setBooted, updateDeviceInfo, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewprotected boolean parametersOK
protected EPOSEnumerations.EposMode mode
protected int statusWord
protected EPOSEnumerations.EposState eposState
protected int current
protected int position
protected int followingError
protected int velocity
protected boolean enabledToPublish
public CanOpenEPOS(int nodeID,
String serialNB)
nodeID - serialNB - public boolean isInError()
CanOpenDeviceisInError in interface EPOSControllerisInError in class CanOpenDevicepublic void build()
build in interface org.lsst.ccs.framework.HasLifecyclebuild in class CanOpenDevicepublic int getStatusWord()
getStatusWord in interface EPOSControllerpublic void setEposState(EPOSEnumerations.EposState state)
setEposState in interface EPOSControllerpublic EPOSEnumerations.EposState getEposState()
getEposState in interface EPOSControllerpublic int getCurrent()
getCurrent in interface EPOSControllerpublic int getPosition()
getPosition in interface EPOSControllerpublic int getFollowingError()
public int getVelocity()
getVelocity in interface EPOSControllerpublic boolean isEnabledToPublish()
EPOSControllerisEnabledToPublish in interface EPOSControllerpublic void setEnabledToPublish(boolean enabledToPublish)
setEnabledToPublish 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 - SDORequestExceptionpublic void changeProfileVelocity(int newVelocity)
changeProfileVelocity in interface EPOSControllernewVelocity - @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 and saveAllChanges.To save configuration, use command saveAllChanges.") 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=ACTION, level=1, description="set target velocity in mode PROFILE_VELOCITY. index:0x60FF subindex:0 size:4") public void writeTargetVelocity(int velocity)
writeTargetVelocity in interface EPOSControllervelocity - @Command(type=QUERY, level=1, description="Check if the Controller is in fault.") public void checkFault()
checkFault in interface EPOSControllerFcsHardwareException@Command(type=ACTION, level=1, description="Clear faults on the controller.", 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 CanOpenDeviceCopyright © 2021 LSST. All rights reserved.