public abstract class SimuEPOSControllerModule extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected EPOSEnumerations.EposMode |
mode |
protected int |
position |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
protected boolean |
turnedOff |
booted, bridge, errorHistory, errorRegister, inError, initialized, nodeID, serialNB, tcpProxy| Constructor and Description |
|---|
SimuEPOSControllerModule(String nodeID,
String serialNB,
Map<String,Integer> paramsForCurrent,
Map<String,Integer> paramsForProfilePosition,
Map<String,Integer> paramsForHoming)
Build a new SimuEPOSControllerModule
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateBrake()
Activate brake for controller who manages a brake.
|
String |
changeMode(EPOSEnumerations.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
String |
changeMode(String modeInString)
Changes the mode to the new mode given as a String argument.
|
void |
checkFault()
Check if the controller is in fault.
|
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.
|
void |
checkParameters(String modeInString)
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 HardwareException if these values are not equal.
|
boolean |
checkTargetReached()
Throw an Exception if the target was not reached in the previous action.
|
void |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given
as an argument.
|
void |
disable()
Disable controller.
|
String |
displayErrorHistory()
Return a printed list of errors that occured on this controller.
|
String |
enable()
enable the controller.
|
void |
faultReset() |
int |
getMaxCurrent()
Return the max value of current which can be sent to this controller.
|
int |
getMaxPosition()
Return the max position for the object moved by motor which is controlled by this controller.
|
int |
getMaxSpeed()
Return the min value of speed for the motor controlled by this controller.
|
int |
getMinCurrent()
Return the min value of current which can be sent to this controller.
|
int |
getMinPosition()
Return the min position for the object moved by motor which is controlled by this controller.
|
EPOSEnumerations.EposMode |
getMode()
Return the EPOS mode stored in field mode.
|
Map<String,Integer> |
getParamsForCurrent()
Return the list of parameters in Current mode that are in Configuration System for this controller.
|
Map<String,Integer> |
getParamsForHoming()
Return the list of parameters in Homing mode that are in Configuration System for this controller.
|
Map<String,Integer> |
getParamsForProfilePosition()
Return the list of parameters in Homing mode that are in Configuration System for this controller.
|
StatusDataPublishedByEPOSController |
getStatusData()
Return the object to be published on the STATUS bus by a SimuEPOSControllerModule.
|
String |
initializeAndCheckHardware()
This methods is called during INITIALIZATION phase.
|
boolean |
isEnabled()
Return true if the controller is enabled and so ready to receive commands.
|
boolean |
isEnabledToPublish()
For GUI.
|
boolean |
isParametersOK()
We assum that simulated hardware's controller has always correct parameters.
|
boolean |
isTargetPositionReached(int targetPosition)
Return true if the target position has been reached.
|
boolean |
isTurnedOff()
Return true if the controller is turned OFF;
|
String |
off()
Turn off controller.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStop()
Send a quickStop command to the controller.
|
int |
readCurrent()
Read actual current on the controller CPU.
|
String[] |
readErrorHistory()
The error history holds errors that have occurred on the device and have
been signalled via the emergency object.
|
String |
readErrorRegister()
At index 1001 there deviceErrorFile an error register for the device.
|
EPOSEnumerations.EposMode |
readMode()
read the EPOS mode on the controller CPU.
|
int |
readNumberOfErrors()
Extract from the Maxon Motor firmware specification : Contains the number
of actual errors that are recorded in the array starting at subindex 1.
|
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()
Read actual position on the controller CPU.
|
int |
readProfileVelocity()
Read ProfileVelocity on the controller CPU.
|
int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
void |
releaseBrake()
Release brake for controller who manages a brake.
|
Object |
saveParameters()
This method saves the parameters in the controller memory.
|
void |
setPosition(int actualPosition) |
String |
shutdown()
Shutdown the controller.
|
void |
switchOnEnableOperation()
SwitchOn and enable controller.
|
void |
writeControlWord(String f)
Write controlWord to the controller.
|
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
String |
writeParameter(EPOSEnumerations.Parameter param,
int value) |
String |
writeParameterInHexa(EPOSEnumerations.Parameter parameter,
String string)
Write on the CPU of the controller a value given in hexadecimal format for a parameter.
|
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.
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorRegister, getErrorHistory, getErrorRegister, getNodeID, getSerialNB, getTcpProxy, initModule, isBooted, isInError, isInitialized, processUpdate, readErrorHistoryNames, readSDO, setBooted, toString, writeSDOgetNObserverThreads, getObservables, getTickMillis, init, listens, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, shutdownNow, signal, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetErrorHistory, getErrorRegister, isInErrorgetNodeID, getSerialNB, isBooted, isInitialized, printState, setBootedgetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemraiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarningchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected boolean turnedOff
protected EPOSEnumerations.EposMode mode
protected int targetPosition
protected int position
protected int ssiPosition
protected int targetCurrent
protected int actualCurrent
public SimuEPOSControllerModule(String nodeID, String serialNB, Map<String,Integer> paramsForCurrent, Map<String,Integer> paramsForProfilePosition, Map<String,Integer> paramsForHoming)
nodeID - serialNB - paramsForCurrent - paramsForProfilePosition - paramsForHoming - @Command(type=ACTION,
level=1,
description="For simulator only : Update position with a position given as argument.")
public void setPosition(int actualPosition)
public boolean isEnabledToPublish()
EPOSControllerisEnabledToPublish in interface EPOSControllerpublic boolean isTurnedOff()
EPOSControllerisTurnedOff in interface EPOSControllerpublic EPOSEnumerations.EposMode getMode()
EPOSControllergetMode in interface EPOSControllerpublic Map<String,Integer> getParamsForHoming()
EPOSControllergetParamsForHoming in interface EPOSControllerpublic Map<String,Integer> getParamsForProfilePosition()
EPOSControllergetParamsForProfilePosition in interface EPOSControllerpublic Map<String,Integer> getParamsForCurrent()
EPOSControllergetParamsForCurrent in interface EPOSControllerpublic boolean isParametersOK()
isParametersOK in interface EPOSControllerpublic String initializeAndCheckHardware()
initializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDevicepublic String changeMode(String modeInString)
modeInString - SDORequestExceptionpublic String changeMode(EPOSEnumerations.EposMode newMode)
EPOSControllerchangeMode in interface EPOSControllernewMode - SDORequestExceptionpublic void defineAbsolutePosition(int position)
EPOSControllerdefineAbsolutePosition in interface EPOSControllerpublic void disable()
EPOSControllerdisable in interface EPOSControllerpublic void writeParameters(EPOSEnumerations.EposMode mode)
EPOSControllerwriteParameters in interface EPOSControllerpublic String writeParameterInHexa(EPOSEnumerations.Parameter parameter, String string)
EPOSControllerwriteParameterInHexa in interface EPOSControllerstring - HEXADECIMAL format of the new value.public String writeParameter(EPOSEnumerations.Parameter param, int value)
public Object saveParameters()
CanOpenDevicesaveParameters in class CanOpenDevicepublic void writeTargetPosition(int position)
EPOSControllerwriteTargetPosition in interface EPOSControllerposition - UNIT=mA / FORMAT=decimal the value of the current to be
sent.public void writeParameters(Map<String,Integer> paramMap)
EPOSControllerwriteParameters in interface EPOSControllerpublic void writeCurrent(int aValue)
EPOSControllerwriteCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be
sent.public String off()
EPOSControlleroff in interface EPOSControllerpublic boolean isTargetPositionReached(int targetPosition)
EPOSControllerisTargetPositionReached in interface EPOSControllerpublic int readPosition()
EPOSControllerreadPosition in interface EPOSControllerpublic int readSSIPosition()
readSSIPosition in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic String enable()
EPOSControllerenable in interface EPOSControllerpublic int readCurrent()
EPOSControllerreadCurrent in interface EPOSControllerpublic EPOSEnumerations.EposMode readMode()
EPOSControllerreadMode in interface EPOSControllerpublic int getMaxCurrent()
EPOSControllergetMaxCurrent in interface EPOSControllerpublic int getMinCurrent()
EPOSControllergetMinCurrent in interface EPOSControllerpublic int getMaxSpeed()
EPOSControllergetMaxSpeed in interface EPOSControllerpublic int getMaxPosition()
EPOSControllergetMaxPosition in interface EPOSControllerpublic int getMinPosition()
EPOSControllergetMinPosition in interface EPOSControllerpublic void quickStop()
EPOSControllerquickStop in interface EPOSControllerpublic int readNumberOfErrors()
CanOpenDevicereadNumberOfErrors in interface EPOSControllerreadNumberOfErrors in class CanOpenDevicepublic String readErrorRegister()
CanOpenDevicereadErrorRegister in class CanOpenDevicepublic String[] readErrorHistory()
CanOpenDevicereadErrorHistory in class CanOpenDevicepublic String displayErrorHistory()
EPOSControllerdisplayErrorHistory in interface EPOSControllerdisplayErrorHistory in class CanOpenDevice@Command(type=QUERY,
level=1,
description="Check if the Controller is in fault.")
public void checkFault()
EPOSControllercheckFault in interface EPOSController@Command(type=ACTION,
level=1,
description="Clear faults on the controller.")
public void faultReset()
public int readProfileVelocity()
EPOSControllerreadProfileVelocity in interface EPOSControllerpublic String readParameters(EPOSEnumerations.EposMode mode)
EPOSControllerreadParameters in interface EPOSControllerpublic void checkParameters(String modeInString) throws org.lsst.ccs.HardwareException
EPOSControllercheckParameters in interface EPOSControllerorg.lsst.ccs.HardwareExceptionpublic void checkParameters(EPOSEnumerations.EposMode aMode) throws org.lsst.ccs.HardwareException
EPOSControllercheckParameters in interface EPOSControllerorg.lsst.ccs.HardwareExceptionpublic void writeControlWord(String f)
EPOSControllerwriteControlWord in interface EPOSControllerpublic String shutdown()
EPOSControllershutdown in interface EPOSControllerpublic boolean isEnabled()
EPOSControllerisEnabled in interface EPOSControllerpublic boolean checkTargetReached()
EPOSControllercheckTargetReached in interface EPOSControllerpublic void releaseBrake()
EPOSControllerreleaseBrake in interface EPOSControllerpublic void switchOnEnableOperation()
EPOSControllerswitchOnEnableOperation in interface EPOSControllerpublic void activateBrake()
EPOSControlleractivateBrake in interface EPOSControllerpublic StatusDataPublishedByEPOSController getStatusData()
getStatusData in class CanOpenDevice@Command(type=QUERY,
level=1,
alias="refreshGUI",
description="Publish data for the controller on the status bus.")
public void publishData()
publishData in class CanOpenDeviceCopyright © 2016 LSST. All rights reserved.