
public class SimuEPOSController extends CanOpenEPOS implements org.lsst.ccs.framework.HasLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected int |
position |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
enabledToPublish, mode, parametersOKbooted, errorHistory, errorRegister, inError, initialized, name, nodeID, serialNB, subs, tcpProxyalertSeparater| Constructor and Description |
|---|
SimuEPOSController(int 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 |
checkCurrent(int aValue) |
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 |
enableAndWriteRelativePosition(int pos)
Enable controller and go to relative position.
|
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 unsCurrent actualy received by the motor.
|
int[] |
readErrorHistory()
read error history on the device and return a list of device error code.
|
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.
|
int |
readNumberOfErrors()
Read and return the number of errors registred in the Error History of the device.
|
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 world (index=6041, subindex=0,size=2)
|
void |
setPosition(int actualPosition) |
void |
stopAction()
Stop action and disable(shutdown) controller.
|
void |
switchOnEnableOperation()
Switch on and enable controller.
|
void |
writeControlWord(int w)
Write a value in the control world (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.
|
changeEPOSParameter, changeMode, changeProfileVelocity, checkParameters, faultReset, getMode, initializeAndCheckHardware, isEnabledToPublish, printControlWord, printStatusWord, publishData, readControlWord, readCurrentAverageValue, readFollowingError, readParameter, readVelocity, restoreParameters, setEnabledToPublish, writeTargetVelocityconfigAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorRegister, doInitializePDOs, getAlertService, getErrorHistory, getErrorRegister, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInError, isInitialized, onEmergencyMessage, printSerialNumber, readSDO, resetError, saveParameters, setBooted, toString, updateFromPDO, writeSDOclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuild, init, postBuild, postInit, postShutdown, postStart, shutdown, startcheckEnabled, checkTargetReached, convertEPOSValue, createStatusDataPublishedByEPOSController, definePositionFromNegativeLimitSwitch, disable, disableVoltage, enable, enableAndWriteAbsolutePosition, enableAndWriteCurrent, getErrorHistory, getErrorRegister, isEnabled, isInError, isInMode, readParameter, readParameters, readParameters, readPositionSensorType, startVelocity, stopPosition, stopVelocity, writeParameterscheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getSerialNB, initializePDOs, isBooted, isInitialized, printState, raiseAlarmIfMissing, setBooted, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningprotected int targetPosition
protected int position
protected int ssiPosition
protected int targetCurrent
protected int actualCurrent
public SimuEPOSController(int 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 isTargetReached()
isTargetReached 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 readNumberOfErrors()
CanOpenDevicereadNumberOfErrors in interface EPOSControllerreadNumberOfErrors in class CanOpenDevicepublic int readErrorRegister()
CanOpenDevicereadErrorRegister in class CanOpenDevicepublic int[] readErrorHistory()
CanOpenDevicereadErrorHistory 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 CanOpenEPOSpublic void switchOnEnableOperation()
EPOSControllerswitchOnEnableOperation in interface EPOSController@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 checkCurrent(int aValue)
checkCurrent in interface EPOSControllerCopyright © 2018 LSST. All rights reserved.