public class SimuEPOSControllerModule extends CanOpenEPOS
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualCurrent |
protected int |
position |
protected int |
ssiPosition |
protected int |
targetCurrent |
protected int |
targetPosition |
enabledToPublish, mode, parametersOK, turnedOfferrorHistory, 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() |
protected void |
checkCurrentValue(int aValue)
Checks a current value typed by a user at the console.
|
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 HardwareException 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.
|
void |
disable()
shutdowns controller
|
String |
displayErrorHistory()
Return a printed list of errors that occured on this controller.
|
void |
enable()
This methods enables the controller : i.e.
|
void |
enableAndWriteRelativePosition(int pos) |
boolean |
isBooted()
Returns true if this CANopen node is booted.
|
boolean |
isEnabled()
Returns true if the controller is enabled.
|
boolean |
isParametersOK()
We assum that simulated hardware's controller has always correct parameters.
|
void |
off()
Turn off controller.
|
void |
quickStop()
Send a quickStop command to the controller.
|
int |
readCurrent()
In Current Mode this methods returns the current actualy received by the motor.
|
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()
Reads the EPOS mode in the CPU of the EPOS device, updates the field mode
and returns the mode as a String.
|
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()
Reads in the CPU the value of the parameter PositionActualValue and
returns it in a decimal format.
|
int |
readProfileVelocity()
In PROFILE_POSITION returns the value of the parameter ProfileVelocity.
|
int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
void |
releaseBrake() |
void |
setPosition(int actualPosition) |
void |
shutdownEPOS()
Shutdown the controller.
|
void |
writeControlWord(String f)
Write a value in hexa in the control world (index=6040,
subindex=0,size=2)
|
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
void |
writeParameter(EPOSEnumerations.Parameter param,
int value)
Set the parameter given as argument with the decimal value given as
argument and write it in the controller CPU.
|
void |
writeParameterInHexa(EPOSEnumerations.Parameter parameter,
String string)
Set the parameter given as argument with the hexadecimal value given as
argument and write it in the controller CPU.
|
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.
|
activateCurrentMode, activateHomingMode, activateProfilePositionMode, changeEPOSParameter, changeMode, checkParameters, checkTargetReached, enableAndWriteCurrent, faultReset, getMode, initializeAndCheckHardware, isEnabledToPublish, isInMode, isTargetReached, isTurnedOff, publishData, readControlWord, readCurrentAverageValue, readParameter, readParameter, readParameterInHexa, readParameterInHexa, readParameters, readParameters, readStatusWord, restoreParameters, stopCurrent, switchOnEnableOperation, writeParameter, writeParameterInHexa, writeParametersconfigAsHeartbeatConsumer, configAsHeartbeatProducer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorRegister, getErrorHistory, getErrorRegister, getNodeID, getSerialNB, getTcpProxy, initModule, isInError, isInitialized, processUpdate, readErrorHistoryNames, readSDO, resetError, saveParameters, 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, waitcreateStatusDataPublishedByEPOSController, enableAndWriteAbsolutePosition, getErrorHistory, getErrorRegister, isInErrorcheckBooted, checkInitialized, createStatusDataPublishedByHardware, getNodeID, getSerialNB, isInitialized, printStategetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarningchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected 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 isParametersOK()
isParametersOK in interface EPOSControllerisParametersOK in class CanOpenEPOSpublic void enableAndWriteRelativePosition(int pos)
public void defineAbsolutePosition(int position)
CanOpenEPOSdefineAbsolutePosition in interface EPOSControllerdefineAbsolutePosition in class CanOpenEPOSpublic void disable()
CanOpenEPOSdisable in interface EPOSControllerdisable in class CanOpenEPOSpublic void writeParameters(EPOSEnumerations.EposMode mode)
CanOpenEPOSwriteParameters in interface EPOSControllerwriteParameters in class CanOpenEPOSpublic void writeParameterInHexa(EPOSEnumerations.Parameter parameter, String string)
CanOpenEPOSwriteParameterInHexa in interface EPOSControllerwriteParameterInHexa in class CanOpenEPOSstring - HEXADECIMAL format of the new value.public void writeParameter(EPOSEnumerations.Parameter param, int value)
CanOpenEPOSwriteParameter in interface EPOSControllerwriteParameter in class CanOpenEPOSparam - parameter to be setvalue - decimal valuepublic void writeTargetPosition(int position)
CanOpenEPOSwriteTargetPosition in interface EPOSControllerwriteTargetPosition in class CanOpenEPOSposition - UNIT=mA / FORMAT=decimal the value of the current to be
sent.public void writeParameters(Map<String,Integer> paramMap)
CanOpenEPOSwriteParameters in interface EPOSControllerwriteParameters in class CanOpenEPOSpublic void writeCurrent(int aValue)
CanOpenEPOSwriteCurrent in interface EPOSControllerwriteCurrent in class CanOpenEPOSaValue - UNIT=mA / FORMAT=decimal the value of the current to be
sent.public void off()
EPOSControlleroff in interface EPOSControlleroff in class CanOpenEPOSpublic int readPosition()
CanOpenEPOSreadPosition in interface EPOSControllerreadPosition in class CanOpenEPOSpublic int readSSIPosition()
readSSIPosition in interface EPOSControllerreadSSIPosition in class CanOpenEPOSSDORequestExceptionShortResponseToSDORequestExceptionpublic void enable()
CanOpenEPOSenable in interface EPOSControllerenable in class CanOpenEPOSpublic int readCurrent()
CanOpenEPOSreadCurrent in interface EPOSControllerreadCurrent in class CanOpenEPOSpublic EPOSEnumerations.EposMode readMode()
CanOpenEPOSreadMode in interface EPOSControllerreadMode in class CanOpenEPOSpublic void quickStop()
EPOSControllerquickStop in interface EPOSControllerquickStop in class CanOpenEPOSpublic 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()
CanOpenEPOScheckFault in interface EPOSControllercheckFault in class CanOpenEPOS@Command(type=QUERY,
level=1,
description="Returns always true in simulation.")
public boolean isBooted()
isBooted in interface PieceOfHardwareisBooted in class CanOpenDevicepublic int readProfileVelocity()
CanOpenEPOSreadProfileVelocity in interface EPOSControllerreadProfileVelocity in class CanOpenEPOSpublic String readParameters(EPOSEnumerations.EposMode mode)
EPOSControllerreadParameters in interface EPOSControllerreadParameters in class CanOpenEPOSpublic void checkParameters(EPOSEnumerations.EposMode aMode)
CanOpenEPOScheckParameters in interface EPOSControllercheckParameters in class CanOpenEPOSprotected void checkCurrentValue(int aValue)
CanOpenEPOScheckCurrentValue in class CanOpenEPOSpublic void writeControlWord(String f)
CanOpenEPOSwriteControlWord in interface EPOSControllerwriteControlWord in class CanOpenEPOSf - in hexapublic void shutdownEPOS()
CanOpenEPOSshutdownEPOS in interface EPOSControllershutdownEPOS in class CanOpenEPOSpublic boolean isEnabled()
CanOpenEPOSisEnabled in interface EPOSControllerisEnabled in class CanOpenEPOSpublic void releaseBrake()
public void activateBrake()
Copyright © 2017 LSST. All rights reserved.