public class SimuEPOSController extends CanOpenEPOS implements org.lsst.ccs.framework.HasLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
current, eposState, followingError, mode, parametersOK, position, simuEnabled, statusWord, velocitybooted, dataProviderDictionaryService, errorHistory, errorRegister, inError, initialized, lastErrorCode, lastErrorName, name, nodeID, serialNB, subs, tcpProxyalertSeparator| Constructor and Description |
|---|
SimuEPOSController()
Build a new SimuEPOSControllerModule
|
| Modifier and Type | Method and Description |
|---|---|
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 |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given as
an argument.
|
String |
displayErrorHistory()
Read error history on the device and return its String representation.
|
void |
enable()
This methods enables the controller : i.e.
|
void |
enableAndWriteRelativePosition(int pos)
Enable controller and go to relative position.
|
int |
getErrorHistoryNB()
Return the number of errors that occured on this controller.
|
void |
goToOperationEnable() |
void |
goToSwitchOnDisabled() |
boolean |
isEnabled()
Read statusWord, update eposState and returns true if the controller is in
state OPERATION_ENABLE.
|
boolean |
isParametersOK()
We assum that simulated hardware'subs controller has always correct parameters.
|
boolean |
isTargetReached()
overriden for simulation
|
void |
postStart() |
void |
quickStop()
Send a quickStop command to the controller.
|
int |
readCurrent()
In Current Mode this methods returns the current actualy received by the
motor.
|
int |
readErrorRegister()
Read Error Register on the controller (index 1001).
|
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.
|
String |
readParameters(EPOSEnumerations.EposMode mode)
Read all the value of parameters for a given EPOS mode and return a printed
list of this values.
|
int |
readPosition()
Reads in the CPU the value of the parameter PositionActualValue and returns
it in a decimal format.
|
long |
readProfileVelocity()
In PROFILE_POSITION returns the value of the parameter ProfileVelocity.
|
int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
int |
readStatusWord()
Read the status word (index=6041, subindex=0,size=2)
|
void |
setPosition(int actualPosition) |
void |
stopAction()
Stop action and shutdownController(shutdown) controller.
|
void |
updateErrorHistory()
read error history on the device and update error history fields :
errorHistory, lastErrorCode, lastErrorName.
|
void |
writeControlWord(int w)
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 |
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.
|
build, changeEPOSParameter, changeMode, changeProfileVelocity, checkParameters, faultReset, getCurrent, getEposState, getFollowingError, getMode, getPosition, getStatusWord, getVelocity, init, initializeAndCheckHardware, isInError, printControlWord, publishData, readControlWord, readCurrentAverageValue, readFollowingError, readParameter, readVelocity, restoreParameters, setCurrent, setEposState, setVelocity, updateStatusWordconfigAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayError, displayErrorRegister, doInitializePDOs, getAlertService, getErrorHistory, getErrorRegister, getLastErrorCode, getLastErrorName, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInitialized, onEmergencyMessage, printSerialNumber, readDeviceType, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, toString, updateDeviceInfo, updateFromPDO, writeSDO, writeTransmissionTypeToDeviceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuild, init, postBuild, postInit, postShutdown, shutdown, startcheckEposMode, checkHomingDone, checkState, checkTargetReached, convertEPOSValue, createStatusDataPublishedByEPOSController, defineHomingCurrentThresholdNegativeSpeed, definePositionFromNegativeLimitSwitch, disableOperation, disableVoltage, enableAndWriteAbsolutePosition, enableAndWriteCurrent, getErrorRegister, getLastErrorCode, getLastErrorName, isFault, isInMode, isInState, isOperationEnabled, isQuickstop, isReadyToSwitchOn, isSwitchedOn, isSwitchOnDisabled, printStatusWordInBinary, readControllerStructure, readHomingMethod, readParameter, readParameters, readParameters, readPositionSensorType, shutdownController, stopPosition, stopVelocity, switchOnEnableOperation, updateEposState, updateEposState, updatePositionFromSDO, writeParameterscheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, 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 int targetPosition
protected int ssiPosition
protected int targetCurrent
protected int actualCurrent
public SimuEPOSController()
@Command(type=ACTION,
level=1,
description="For simulator only : Update position with a position given as argument.")
public void setPosition(int actualPosition)
setPosition in interface EPOSControllersetPosition in class CanOpenEPOSpublic boolean isTargetReached()
isTargetReached in interface EPOSControllerpublic void enable()
EPOSControllerenable in interface EPOSControllerpublic void goToOperationEnable()
goToOperationEnable in interface EPOSControllerpublic void goToSwitchOnDisabled()
goToSwitchOnDisabled in interface EPOSControllerpublic boolean isEnabled()
EPOSControllerisEnabled in interface EPOSControllerpublic boolean isParametersOK()
isParametersOK in interface EPOSControllerisParametersOK in class CanOpenEPOSpublic void defineAbsolutePosition(int position)
EPOSControllerdefineAbsolutePosition in interface EPOSControllerpublic void writeParameters(EPOSEnumerations.EposMode mode)
CanOpenEPOSwriteParameters in interface EPOSControllerwriteParameters in class CanOpenEPOSpublic void writeParameter(EPOSEnumerations.Parameter param, int value)
CanOpenEPOSwriteParameter in interface EPOSControllerwriteParameter in class CanOpenEPOSvalue - in decimalpublic void writeTargetPosition(int position)
CanOpenEPOSwriteTargetPosition in interface EPOSControllerwriteTargetPosition in class CanOpenEPOSposition - UNIT=mA / FORMAT=decimal the value of the unsCurrent to be
sent.public void writeParameters(Map<String,Integer> paramMap)
EPOSControllerwriteParameters in interface EPOSControllerpublic void writeCurrent(int aValue)
CanOpenEPOSwriteCurrent in interface EPOSControllerwriteCurrent in class CanOpenEPOSaValue - UNIT=mA / FORMAT=decimal the value of the unsCurrent to be
sent.public void stopAction()
EPOSControllerstopAction in interface EPOSControllerpublic int readPosition()
EPOSControllerreadPosition in interface EPOSControllerpublic int readSSIPosition()
readSSIPosition in interface EPOSControllerSDORequestExceptionpublic int readCurrent()
CanOpenEPOSreadCurrent in interface EPOSControllerreadCurrent in class CanOpenEPOSpublic EPOSEnumerations.EposMode readMode()
CanOpenEPOSreadMode in interface EPOSControllerreadMode in class CanOpenEPOSpublic int readStatusWord()
CanOpenEPOSreadStatusWord in interface EPOSControllerreadStatusWord in class CanOpenEPOSpublic void quickStop()
EPOSControllerquickStop in interface EPOSControllerpublic int getErrorHistoryNB()
EPOSControllergetErrorHistoryNB in interface EPOSControllergetErrorHistoryNB in class CanOpenDevicepublic int readErrorRegister()
CanOpenDevicereadErrorRegister in class CanOpenDevicepublic void updateErrorHistory()
CanOpenDeviceupdateErrorHistory in class CanOpenDevicepublic String displayErrorHistory()
CanOpenDevicedisplayErrorHistory in interface EPOSControllerdisplayErrorHistory in class CanOpenDevice@Command(type=QUERY,
level=1,
description="Check if the Controller is in fault.")
public void checkFault()
CanOpenEPOScheckFault in interface EPOSControllercheckFault in class CanOpenEPOSpublic long readProfileVelocity()
EPOSControllerreadProfileVelocity in interface EPOSControllerpublic String readParameters(EPOSEnumerations.EposMode mode)
EPOSControllerreadParameters in interface EPOSControllerpublic void checkParameters(EPOSEnumerations.EposMode aMode)
CanOpenEPOScheckParameters in interface EPOSControllercheckParameters in class CanOpenEPOSpublic void writeControlWord(int w)
CanOpenEPOSwriteControlWord in interface EPOSControllerwriteControlWord in class CanOpenEPOS@Command(type=ACTION,
level=3,
description="Enable controller and go to relative position. Doesn\'t check condition. DANGER !!!! ")
public void enableAndWriteRelativePosition(int pos)
EPOSControllerenableAndWriteRelativePosition in interface EPOSControllerpublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleCopyright © 2022 LSST. All rights reserved.