
public class SimuCarouselController extends CanOpenEPOSCarousel implements EPOSControllerForCarousel
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
cobid1, cobid2, positionSensorTypecurrent, eposState, followingError, mode, parametersOK, position, simuEnabled, statusWord, velocitybooted, dataProviderDictionaryService, errorHistory, errorRegister, inError, initialized, lastErrorCode, lastErrorName, name, nodeID, serialNB, subs, tcpProxyalertSeparator| Constructor and Description |
|---|
SimuCarouselController()
Build a new SimuCarouselController
|
| Modifier and Type | Method and Description |
|---|---|
void |
build() |
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.
|
int |
getErrorHistoryNB()
Return the number of errors that occured on this controller.
|
void |
goToSwitchOnDisabled() |
void |
init() |
boolean |
isParametersOK()
We assum that simulated hardware'subs controller has always correct
parameters.
|
boolean |
isTargetReached()
overriden for simulation
|
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.
|
long |
readParameter(EPOSEnumerations.Parameter parameter)
Reads in the EPOS CPU the value of the Parameter.
|
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.
|
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)
set a position for simulation
|
void |
setPositionSensorTypeEncoderSSI()
Set PositionSensorType to Absolute encoder SSI (value=4)
|
void |
setPositionSensorTypeSinusIncrementalEncoder()
Set PositionSensorType to Sinus Incremental Encoder(value=8)
|
void |
setSsiPosition(int ssiPosition)
To initialize a simulated ssiPosition.
|
void |
simulatePosition(int pos)
set controller position in PDOData to simulate a carousel position.
|
void |
simulateStatusWord(int sw)
set carouselController statusWord in PDOData to simulate a statusWord.
|
void |
simulateSWITCH_ON_DISABLED() |
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 |
updateFakePDOData(int cobid,
long newPdo)
Update PDOdata
|
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 absolutePosition)
This methods does nothing but save the relativePosition given as argument.
|
doInitializePDOs, extractCurrentAverage, extractFollowingError, extractPosition, extractStatusWord, extractVelocity, faultReset, getCobid1, getCobid2, getPdo1, getPdo2, getPositionSensorType, getStatusWord, printValuesUpdatedByPDOs, setPdo1, setPdo2, setPositionSensorType, updateFromPDO, updateStatusWordchangeEPOSParameter, changeMode, changeProfileVelocity, checkParameters, getCurrent, getEposState, getFollowingError, getMode, getPosition, getVelocity, initializeAndCheckHardware, isInError, printControlWord, publishData, readControlWord, readCurrentAverageValue, readFollowingError, readVelocity, restoreParameters, setCurrent, setEposState, setVelocityconfigAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayError, displayErrorRegister, getAlertService, getErrorHistory, getErrorRegister, getLastErrorCode, getLastErrorName, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInitialized, onEmergencyMessage, printSerialNumber, readDeviceType, readNumberOfErrors, readSDO, resetError, saveParameters, setBooted, toString, updateDeviceInfo, writeSDO, writeTransmissionTypeToDeviceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckPositionSensorType, doSetEncoderSSI, doSetSinusIncrementalEncoder, getPositionSensorType, setPositionSensorTypechangeMode, changeProfileVelocity, checkEposMode, checkHomingDone, checkState, checkTargetReached, convertEPOSValue, createStatusDataPublishedByEPOSController, defineHomingCurrentThresholdNegativeSpeed, definePositionFromNegativeLimitSwitch, disableOperation, disableVoltage, enable, enableAndWriteAbsolutePosition, enableAndWriteCurrent, enableAndWriteRelativePosition, faultReset, getCurrent, getEposState, getErrorRegister, getLastErrorCode, getLastErrorName, getMode, getPosition, getStatusWord, getVelocity, goToOperationEnable, isEnabled, isFault, isInError, isInMode, isInState, isOperationEnabled, isQuickstop, isReadyToSwitchOn, isSwitchedOn, isSwitchOnDisabled, printStatusWordInBinary, readControllerStructure, readControlWord, readCurrentAverageValue, readFollowingError, readHomingMethod, readParameter, readParameters, readParameters, readPositionSensorType, readProfileVelocity, readVelocity, setCurrent, setEposState, setVelocity, shutdownController, stopPosition, stopVelocity, switchOnEnableOperation, updateEposState, updateEposState, updatePositionFromSDO, updateStatusWord, writeParameterscheckBooted, 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, raiseWarningOnlyIfNewprotected int targetPosition
protected int ssiPosition
protected int targetCurrent
protected int actualCurrent
public SimuCarouselController()
public void init()
init in interface org.lsst.ccs.framework.HasLifecycleinit in class CanOpenEPOSCarouselpublic void build()
build in interface org.lsst.ccs.framework.HasLifecyclebuild in class CanOpenEPOSpublic void goToSwitchOnDisabled()
goToSwitchOnDisabled in interface EPOSControllerpublic void setSsiPosition(int ssiPosition)
ssiPosition - public void setPositionSensorTypeSinusIncrementalEncoder()
EPOSControllerForCarouselsetPositionSensorTypeSinusIncrementalEncoder in interface EPOSControllerForCarouselpublic void setPositionSensorTypeEncoderSSI()
EPOSControllerForCarouselsetPositionSensorTypeEncoderSSI in interface EPOSControllerForCarousel@Command(type=ACTION, level=1, description="In PROFILE_POSITION mode this methods set the target position.") public void writeTargetPosition(int absolutePosition) throws FcsHardwareException
writeTargetPosition in interface EPOSControllerwriteTargetPosition in class CanOpenEPOSabsolutePosition - FcsHardwareExceptionSDORequestExceptionpublic void updateFakePDOData(int cobid,
long newPdo)
cobid - newPdo - public void simulatePosition(int pos)
pos - public void simulateStatusWord(int sw)
sw - public void simulateSWITCH_ON_DISABLED()
@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 CanOpenEPOSactualPosition - public boolean isTargetReached()
isTargetReached in interface EPOSControllerisTargetReached in interface EPOSControllerForCarouselpublic boolean isParametersOK()
isParametersOK in interface EPOSControllerisParametersOK in class CanOpenEPOSpublic void defineAbsolutePosition(int position)
EPOSControllerdefineAbsolutePosition in interface EPOSControllerdefineAbsolutePosition in interface EPOSControllerForCarouselpublic 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 long readParameter(EPOSEnumerations.Parameter parameter)
CanOpenEPOSreadParameter in interface EPOSControllerreadParameter in class CanOpenEPOSpublic 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 EPOSControllerpublic 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 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 CanOpenEPOSCopyright © 2022 LSST. All rights reserved.